diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index b908e882d..25c92065a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -528,6 +528,83 @@ components: items: description: Agent check running on the host. type: array + AlertGraphWidgetDefinition: + description: Alert graphs are timeseries graphs showing the current status of + any monitor defined on your system. + properties: + alert_id: + description: ID of the alert to use in the widget. + example: '' + type: string + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: The title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/AlertGraphWidgetDefinitionType' + viz_type: + $ref: '#/components/schemas/WidgetVizType' + required: + - type + - alert_id + - viz_type + type: object + AlertGraphWidgetDefinitionType: + default: alert_graph + description: Type of the alert graph widget. + enum: + - alert_graph + example: alert_graph + type: string + x-enum-varnames: + - ALERT_GRAPH + AlertValueWidgetDefinition: + description: Alert values are query values showing the current value of the + metric in any monitor defined on your system. + properties: + alert_id: + description: ID of the alert to use in the widget. + example: '' + type: string + precision: + description: Number of decimal to show. If not defined, will use the raw + value. + format: int64 + type: integer + text_align: + $ref: '#/components/schemas/WidgetTextAlign' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of value in the widget. + type: string + type: + $ref: '#/components/schemas/AlertValueWidgetDefinitionType' + unit: + description: Unit to display with the value. + type: string + required: + - type + - alert_id + type: object + AlertValueWidgetDefinitionType: + default: alert_value + description: Type of the alert value widget. + enum: + - alert_value + example: alert_value + type: string + x-enum-varnames: + - ALERT_VALUE ApiKey: description: Datadog API key. properties: @@ -578,6 +655,73 @@ components: api_key: $ref: '#/components/schemas/ApiKey' type: object + ApmStatsQueryColumnType: + description: Column properties. + properties: + alias: + description: A user-assigned alias for the column. + example: Requests + type: string + cell_display_mode: + $ref: '#/components/schemas/TableWidgetCellDisplayMode' + name: + description: Column name. + example: Reqs + type: string + order: + $ref: '#/components/schemas/WidgetSort' + required: + - name + type: object + ApmStatsQueryDefinition: + description: The APM stats query for table and distributions widgets. + properties: + columns: + description: Column properties used by the front end for display. + items: + $ref: '#/components/schemas/ApmStatsQueryColumnType' + type: array + env: + description: Environment name. + example: prod + type: string + name: + description: Operation name associated with service. + example: rack.request + type: string + primary_tag: + description: The organization's host group name and value. + example: datacenter:* + type: string + resource: + description: Resource name. + example: CartsController + type: string + row_type: + $ref: '#/components/schemas/ApmStatsQueryRowType' + service: + description: Service name. + example: web-store + type: string + required: + - service + - env + - name + - primary_tag + - row_type + type: object + ApmStatsQueryRowType: + description: The level of detail for the request. + enum: + - service + - resource + - span + example: service + type: string + x-enum-varnames: + - SERVICE + - RESOURCE + - SPAN ApplicationKey: description: An application key with its associated metadata. properties: @@ -664,8 +808,9 @@ components: example: key:value,filter:example type: string cspm_enabled: - description: Enable Cloud Security Management Misconfigurations for your - organization. + description: "When enabled, Datadog\u2019s Cloud Security Management product + scans resource configurations monitored by this app registration.\nNote: + This requires resource_collection_enabled to be set to true." example: true type: boolean custom_metrics_enabled: @@ -696,6 +841,12 @@ components: description: Your New Azure Active Directory ID. example: new1c44-1234-5678-9101-cc00736ftest type: string + resource_collection_enabled: + description: When enabled, Datadog collects metadata and configuration info + from cloud resources (compute instances, databases, load balancers, etc.) + monitored by this app registration. + example: true + type: boolean tenant_name: description: Your Azure Active Directory ID. example: testc44-1234-5678-9101-cc00736ftest @@ -736,6 +887,130 @@ components: type: integer type: array type: object + ChangeWidgetDefinition: + description: The Change graph shows you the change in a value over the time + period chosen. + properties: + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + requests: + description: "Array of one request object to display in the widget.\n\nSee + the dedicated [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json)\n + to learn how to build the `REQUEST_SCHEMA`." + example: + - q: {} + items: + $ref: '#/components/schemas/ChangeWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/ChangeWidgetDefinitionType' + required: + - type + - requests + type: object + ChangeWidgetDefinitionType: + default: change + description: Type of the change widget. + enum: + - change + example: change + type: string + x-enum-varnames: + - CHANGE + ChangeWidgetRequest: + description: Updated change widget. + properties: + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + change_type: + $ref: '#/components/schemas/WidgetChangeType' + compare_to: + $ref: '#/components/schemas/WidgetCompareTo' + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + formulas: + description: List of formulas that operate on queries. + items: + $ref: '#/components/schemas/WidgetFormula' + type: array + increase_good: + description: Whether to show increase as good. + type: boolean + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + order_by: + $ref: '#/components/schemas/WidgetOrderBy' + order_dir: + $ref: '#/components/schemas/WidgetSort' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Query definition. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + show_present: + description: Whether to show the present value. + type: boolean + type: object + CheckCanDeleteMonitorResponse: + description: Response of monitor IDs that can or can't be safely deleted. + properties: + data: + $ref: '#/components/schemas/CheckCanDeleteMonitorResponseData' + errors: + additionalProperties: + description: Strings denoting where a monitor is used. + items: + description: Asset where a monitor is used. + type: string + type: array + description: A mapping of Monitor ID to strings denoting where it's used. + nullable: true + type: object + required: + - data + type: object + CheckCanDeleteMonitorResponseData: + description: Wrapper object with the list of monitor IDs. + example: {} + properties: + ok: + description: An array of of Monitor IDs that can be safely deleted. + items: + description: ID of a monitor that can be safely deleted. + format: int64 + type: integer + type: array + type: object CheckCanDeleteSLOResponse: description: A service level objective response containing the requested object. properties: @@ -758,6 +1033,58 @@ components: type: string type: array type: object + CheckStatusWidgetDefinition: + description: Check status shows the current status or number of results for + any check performed. + properties: + check: + description: Name of the check to use in the widget. + example: '' + type: string + group: + description: Group reporting a single check. + type: string + group_by: + description: List of tag prefixes to group by in the case of a cluster check. + items: + description: Tag prefix. + type: string + type: array + grouping: + $ref: '#/components/schemas/WidgetGrouping' + tags: + description: List of tags used to filter the groups reporting a cluster + check. + items: + description: Tag name. + type: string + type: array + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/CheckStatusWidgetDefinitionType' + required: + - type + - check + - grouping + type: object + CheckStatusWidgetDefinitionType: + default: check_status + description: Type of the check status widget. + enum: + - check_status + example: check_status + type: string + x-enum-varnames: + - CHECK_STATUS ContentEncoding: description: HTTP header used to compress the media-type. enum: @@ -782,6 +1109,204 @@ components: type: string readOnly: true type: object + Dashboard: + description: "A dashboard is Datadog\u2019s tool for visually tracking, analyzing, + and displaying\nkey performance metrics, which enable you to monitor the health + of your infrastructure." + properties: + author_handle: + description: Identifier of the dashboard author. + example: test@datadoghq.com + readOnly: true + type: string + author_name: + description: Name of the dashboard author. + example: John Doe + nullable: true + readOnly: true + type: string + created_at: + description: Creation date of the dashboard. + format: date-time + readOnly: true + type: string + description: + description: Description of the dashboard. + nullable: true + type: string + id: + description: ID of the dashboard. + example: 123-abc-456 + readOnly: true + type: string + is_read_only: + default: false + deprecated: true + description: Whether this dashboard is read-only. If True, only the author + and admins can make changes to it. Prefer using `restricted_roles` to + manage write authorization. + example: false + type: boolean + layout_type: + $ref: '#/components/schemas/DashboardLayoutType' + modified_at: + description: Modification date of the dashboard. + format: date-time + readOnly: true + type: string + notify_list: + description: List of handles of users to notify when changes are made to + this dashboard. + items: + description: User handles. + type: string + nullable: true + type: array + reflow_type: + $ref: '#/components/schemas/DashboardReflowType' + restricted_roles: + description: A list of role identifiers. Only the author and users associated + with at least one of these roles can edit this dashboard. + items: + description: A role UUID. + type: string + type: array + tags: + description: List of team names representing ownership of a dashboard. + items: + description: The name of a Datadog team of the form `team:` + type: string + maxItems: 5 + nullable: true + type: array + template_variable_presets: + description: Array of template variables saved views. + items: + $ref: '#/components/schemas/DashboardTemplateVariablePreset' + nullable: true + type: array + template_variables: + description: List of template variables for this dashboard. + items: + $ref: '#/components/schemas/DashboardTemplateVariable' + nullable: true + type: array + title: + description: Title of the dashboard. + example: '' + type: string + url: + description: The URL of the dashboard. + example: /dashboard/123-abc-456/example-dashboard-title + readOnly: true + type: string + widgets: + description: List of widgets to display on the dashboard. + example: + - definition: + requests: + fill: + q: avg:system.cpu.user{*} + type: hostmap + items: + $ref: '#/components/schemas/Widget' + type: array + required: + - title + - layout_type + - widgets + type: object + DashboardBulkActionData: + description: Dashboard bulk action request data. + example: + id: 123-abc-456 + type: dashboard + properties: + id: + $ref: '#/components/schemas/DashboardID' + type: + $ref: '#/components/schemas/DashboardResourceType' + required: + - type + - id + type: object + DashboardBulkActionDataList: + description: List of dashboard bulk action request data objects. + example: + - id: 123-abc-456 + type: dashboard + items: + $ref: '#/components/schemas/DashboardBulkActionData' + type: array + DashboardBulkDeleteRequest: + description: Dashboard bulk delete request body. + example: + data: + - id: 123-abc-456 + type: dashboard + properties: + data: + $ref: '#/components/schemas/DashboardBulkActionDataList' + required: + - data + type: object + DashboardDeleteResponse: + description: Response from the delete dashboard call. + properties: + deleted_dashboard_id: + description: ID of the deleted dashboard. + type: string + type: object + DashboardGlobalTime: + description: Object containing the live span selection for the dashboard. + properties: + live_span: + $ref: '#/components/schemas/DashboardGlobalTimeLiveSpan' + type: object + DashboardGlobalTimeLiveSpan: + description: Dashboard global time live_span selection + enum: + - 15m + - 1h + - 4h + - 1d + - 2d + - 1w + - 1mo + - 3mo + example: 1h + type: string + x-enum-varnames: + - PAST_FIFTEEN_MINUTES + - PAST_ONE_HOUR + - PAST_FOUR_HOURS + - PAST_ONE_DAY + - PAST_TWO_DAYS + - PAST_ONE_WEEK + - PAST_ONE_MONTH + - PAST_THREE_MONTHS + DashboardID: + description: Dashboard resource ID. + example: 123-abc-456 + type: string + DashboardInviteType: + description: Type for shared dashboard invitation request body. + enum: + - public_dashboard_invitation + example: public_dashboard_invitation + type: string + x-enum-varnames: + - PUBLIC_DASHBOARD_INVITATION + DashboardLayoutType: + description: Layout type of the dashboard. + enum: + - ordered + - free + example: ordered + type: string + x-enum-varnames: + - ORDERED + - FREE DashboardList: description: Your Datadog Dashboards. properties: @@ -840,42 +1365,491 @@ components: $ref: '#/components/schemas/DashboardList' type: array type: object - Downtime: - description: 'Downtiming gives you greater control over monitor notifications - by - - allowing you to globally exclude scopes from alerting. + DashboardReflowType: + description: 'Reflow type for a **new dashboard layout** dashboard. Set this + only when layout type is ''ordered''. - Downtime settings, which can be scheduled with start and end times, + If set to ''fixed'', the dashboard expects all widgets to have a layout, and + if it''s set to ''auto'', - prevent all alerting related to specified Datadog tags.' + widgets should not have layouts.' + enum: + - auto + - fixed + type: string + x-enum-varnames: + - AUTO + - FIXED + DashboardResourceType: + default: dashboard + description: Dashboard resource type. + enum: + - dashboard + example: dashboard + type: string + x-enum-varnames: + - DASHBOARD + DashboardRestoreRequest: + description: Dashboard restore request body. + example: + data: + - id: 123-abc-456 + type: dashboard properties: - active: - description: If a scheduled downtime currently exists. - example: true - readOnly: true - type: boolean - active_child: - $ref: '#/components/schemas/DowntimeChild' - canceled: - description: If a scheduled downtime is canceled. - example: 1412799983 - format: int64 - nullable: true - readOnly: true - type: integer - creator_id: - description: User ID of the downtime creator. - example: 123456 - format: int32 - maximum: 2147483647 - readOnly: true - type: integer - disabled: - description: If a downtime has been disabled. - example: false - type: boolean - downtime_type: + data: + $ref: '#/components/schemas/DashboardBulkActionDataList' + required: + - data + type: object + DashboardShareType: + description: Type of sharing access (either open to anyone who has the public + URL or invite-only). + enum: + - open + - invite + nullable: true + type: string + x-enum-varnames: + - OPEN + - INVITE + DashboardSummary: + description: Dashboard summary response. + properties: + dashboards: + description: List of dashboard definitions. + items: + $ref: '#/components/schemas/DashboardSummaryDefinition' + type: array + type: object + DashboardSummaryDefinition: + description: Dashboard definition. + properties: + author_handle: + description: Identifier of the dashboard author. + type: string + created_at: + description: Creation date of the dashboard. + format: date-time + type: string + description: + description: Description of the dashboard. + nullable: true + type: string + id: + description: Dashboard identifier. + type: string + is_read_only: + description: Whether this dashboard is read-only. If True, only the author + and admins can make changes to it. + type: boolean + layout_type: + $ref: '#/components/schemas/DashboardLayoutType' + modified_at: + description: Modification date of the dashboard. + format: date-time + type: string + title: + description: Title of the dashboard. + type: string + url: + description: URL of the dashboard. + type: string + type: object + DashboardTemplateVariable: + description: Template variable. + properties: + available_values: + description: The list of values that the template variable drop-down is + limited to. + example: + - my-host + - host1 + - host2 + items: + description: Template variable value. + type: string + nullable: true + type: array + default: + deprecated: true + description: (deprecated) The default value for the template variable on + dashboard load. Cannot be used in conjunction with `defaults`. + example: my-host + nullable: true + type: string + defaults: + description: One or many default values for template variables on load. + If more than one default is specified, they will be unioned together with + `OR`. Cannot be used in conjunction with `default`. + example: + - my-host-1 + - my-host-2 + items: + description: One of many default values for the template variable on dashboard + load. + minLength: 1 + type: string + type: array + name: + description: The name of the variable. + example: host1 + type: string + prefix: + description: The tag prefix associated with the variable. Only tags with + this prefix appear in the variable drop-down. + example: host + nullable: true + type: string + required: + - name + type: object + DashboardTemplateVariablePreset: + description: Template variables saved views. + properties: + name: + description: The name of the variable. + type: string + template_variables: + description: List of variables. + items: + $ref: '#/components/schemas/DashboardTemplateVariablePresetValue' + type: array + type: object + DashboardTemplateVariablePresetValue: + description: Template variables saved views. + properties: + name: + description: The name of the variable. + type: string + value: + deprecated: true + description: (deprecated) The value of the template variable within the + saved view. Cannot be used in conjunction with `values`. + type: string + values: + description: One or many template variable values within the saved view, + which will be unioned together using `OR` if more than one is specified. + Cannot be used in conjunction with `value`. + items: + description: One or many values of the template variable within the saved + view. + minLength: 1 + type: string + minItems: 1 + type: array + type: object + DashboardType: + description: The type of the associated private dashboard. + enum: + - custom_timeboard + - custom_screenboard + example: custom_timeboard + type: string + x-enum-varnames: + - CUSTOM_TIMEBOARD + - CUSTOM_SCREENBOARD + DeleteSharedDashboardResponse: + description: Response containing token of deleted shared dashboard. + properties: + deleted_public_dashboard_token: + description: Token associated with the shared dashboard that was revoked. + type: string + type: object + DeletedMonitor: + description: Response from the delete monitor call. + properties: + deleted_monitor_id: + description: ID of the deleted monitor. + example: 666486743 + format: int64 + type: integer + readOnly: true + type: object + DistributionPoint: + description: Array of distribution points. + example: + - 1575317847.0 + - - 0.5 + - 1.0 + items: + description: List of distribution point. + oneOf: + - $ref: '#/components/schemas/DistributionPointTimestamp' + - $ref: '#/components/schemas/DistributionPointData' + maxItems: 2 + minItems: 2 + type: array + DistributionPointData: + description: Distribution point data. + items: + description: List of distribution point data. + format: double + type: number + type: array + DistributionPointTimestamp: + description: Distribution point timestamp. It should be in seconds and current. + format: double + type: number + DistributionPointsContentEncoding: + description: HTTP header used to compress the media-type. + enum: + - deflate + type: string + x-enum-varnames: + - DEFLATE + DistributionPointsPayload: + description: The distribution points payload. + properties: + series: + description: A list of distribution points series to submit to Datadog. + example: + - metric: system.load.1 + points: + - - 1475317847.0 + - - 1.0 + - 2.0 + items: + $ref: '#/components/schemas/DistributionPointsSeries' + type: array + required: + - series + type: object + DistributionPointsSeries: + description: A distribution points metric to submit to Datadog. + properties: + host: + description: The name of the host that produced the distribution point metric. + example: test.example.com + type: string + metric: + description: The name of the distribution points metric. + example: system.load.1 + type: string + points: + description: Points relating to the distribution point metric. All points + must be tuples with timestamp and a list of values (cannot be a string). + Timestamps should be in POSIX time in seconds. + items: + $ref: '#/components/schemas/DistributionPoint' + type: array + tags: + description: A list of tags associated with the distribution point metric. + example: + - environment:test + items: + description: Individual tags. + type: string + type: array + type: + $ref: '#/components/schemas/DistributionPointsType' + required: + - metric + - points + type: object + DistributionPointsType: + default: distribution + description: The type of the distribution point. + enum: + - distribution + example: distribution + type: string + x-enum-varnames: + - DISTRIBUTION + DistributionWidgetDefinition: + description: "The Distribution visualization is another way of showing metrics\naggregated + across one or several tags, such as hosts.\nUnlike the heat map, a distribution + graph\u2019s x-axis is quantity rather than time." + properties: + custom_links: + description: A list of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + legend_size: + deprecated: true + description: (Deprecated) The widget legend was replaced by a tooltip and + sidebar. + type: string + markers: + description: List of markers. + items: + $ref: '#/components/schemas/WidgetMarker' + type: array + requests: + description: "Array of one request object to display in the widget.\n\nSee + the dedicated [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json)\n + to learn how to build the `REQUEST_SCHEMA`." + example: + - q: host:X tags:Y + items: + $ref: '#/components/schemas/DistributionWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + show_legend: + deprecated: true + description: (Deprecated) The widget legend was replaced by a tooltip and + sidebar. + type: boolean + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/DistributionWidgetDefinitionType' + xaxis: + $ref: '#/components/schemas/DistributionWidgetXAxis' + yaxis: + $ref: '#/components/schemas/DistributionWidgetYAxis' + required: + - type + - requests + type: object + DistributionWidgetDefinitionType: + default: distribution + description: Type of the distribution widget. + enum: + - distribution + example: distribution + type: string + x-enum-varnames: + - DISTRIBUTION + DistributionWidgetHistogramRequestQuery: + description: Query definition for Distribution Widget Histogram Request + example: + data_source: metrics + name: query1 + query: histogram:trace.Load{*} + oneOf: + - $ref: '#/components/schemas/FormulaAndFunctionMetricQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionEventQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionApmResourceStatsQueryDefinition' + DistributionWidgetHistogramRequestType: + description: Request type for the histogram request. + enum: + - histogram + example: histogram + type: string + x-enum-varnames: + - HISTOGRAM + DistributionWidgetRequest: + description: Updated distribution widget. + properties: + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + apm_stats_query: + $ref: '#/components/schemas/ApmStatsQueryDefinition' + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Widget query. + type: string + query: + $ref: '#/components/schemas/DistributionWidgetHistogramRequestQuery' + request_type: + $ref: '#/components/schemas/DistributionWidgetHistogramRequestType' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + style: + $ref: '#/components/schemas/WidgetStyle' + type: object + DistributionWidgetXAxis: + description: X Axis controls for the distribution widget. + properties: + include_zero: + description: True includes zero. + type: boolean + max: + default: auto + description: Specifies maximum value to show on the x-axis. It takes a number, + percentile (p90 === 90th percentile), or auto for default behavior. + type: string + min: + default: auto + description: Specifies minimum value to show on the x-axis. It takes a number, + percentile (p90 === 90th percentile), or auto for default behavior. + type: string + scale: + default: linear + description: Specifies the scale type. Possible values are `linear`. + type: string + type: object + DistributionWidgetYAxis: + description: Y Axis controls for the distribution widget. + properties: + include_zero: + description: True includes zero. + type: boolean + label: + description: The label of the axis to display on the graph. + type: string + max: + default: auto + description: Specifies the maximum value to show on the y-axis. It takes + a number, or auto for default behavior. + type: string + min: + default: auto + description: Specifies minimum value to show on the y-axis. It takes a number, + or auto for default behavior. + type: string + scale: + default: linear + description: Specifies the scale type. Possible values are `linear` or `log`. + type: string + type: object + Downtime: + description: 'Downtiming gives you greater control over monitor notifications + by + + allowing you to globally exclude scopes from alerting. + + Downtime settings, which can be scheduled with start and end times, + + prevent all alerting related to specified Datadog tags.' + properties: + active: + description: If a scheduled downtime currently exists. + example: true + readOnly: true + type: boolean + active_child: + $ref: '#/components/schemas/DowntimeChild' + canceled: + description: If a scheduled downtime is canceled. + example: 1412799983 + format: int64 + nullable: true + readOnly: true + type: integer + creator_id: + description: User ID of the downtime creator. + example: 123456 + format: int32 + maximum: 2147483647 + readOnly: true + type: integer + disabled: + description: If a downtime has been disabled. + example: false + type: boolean + downtime_type: description: '`0` for a downtime applied on `*` or all, `1` when the downtime is only scoped to hosts, @@ -1392,6 +2366,22 @@ components: x-enum-varnames: - NORMAL - LOW + EventQueryDefinition: + description: The event query. + properties: + search: + description: The query being made on the event. + example: '' + type: string + tags_execution: + description: The execution method for multi-value filters. Can be either + and or or. + example: '' + type: string + required: + - search + - tags_execution + type: object EventResponse: description: Object containing an event response. properties: @@ -1401,2058 +2391,5722 @@ components: description: A status. type: string type: object - GCPAccount: - description: Your Google Cloud Platform Account. + EventStreamWidgetDefinition: + description: 'The event stream is a widget version of the stream of events + + on the Event Stream view. Only available on FREE layout dashboards.' properties: - auth_provider_x509_cert_url: - description: Should be `https://www.googleapis.com/oauth2/v1/certs`. - example: https://www.googleapis.com/oauth2/v1/certs + event_size: + $ref: '#/components/schemas/WidgetEventSize' + query: + description: Query to filter the event stream with. + example: '' type: string - auth_uri: - description: Should be `https://accounts.google.com/o/oauth2/auth`. - example: https://accounts.google.com/o/oauth2/auth + tags_execution: + description: The execution method for multi-value filters. Can be either + and or or. type: string - automute: - description: Silence monitors for expected GCE instance shutdowns. - type: boolean - client_email: - description: Your email found in your JSON service account key. - example: api-dev@datadog-sandbox.iam.gserviceaccount.com + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. type: string - client_id: - description: Your ID found in your JSON service account key. - example: '123456712345671234567' + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. type: string - client_x509_cert_url: - description: 'Should be `https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL` - - where `$CLIENT_EMAIL` is the email found in your JSON service account - key.' - example: https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL + type: + $ref: '#/components/schemas/EventStreamWidgetDefinitionType' + required: + - type + - query + type: object + EventStreamWidgetDefinitionType: + default: event_stream + description: Type of the event stream widget. + enum: + - event_stream + example: event_stream + type: string + x-enum-varnames: + - EVENT_STREAM + EventTimelineWidgetDefinition: + description: The event timeline is a widget version of the timeline that appears + at the top of the Event Stream view. Only available on FREE layout dashboards. + properties: + query: + description: Query to filter the event timeline with. + example: '' type: string - errors: - description: An array of errors. - example: - - '*' - items: - description: String representation of one error. - readOnly: true - type: string - type: array - host_filters: - description: 'Limit the GCE instances that are pulled into Datadog by using - tags. - - Only hosts that match one of the defined tags are imported into Datadog.' - example: key:value,filter:example - type: string - is_cspm_enabled: - default: false - description: When enabled, Datadog performs configuration checks across - your Google Cloud environment by continuously scanning every resource. - example: true - type: boolean - private_key: - description: Your private key name found in your JSON service account key. - example: private_key - type: string - private_key_id: - description: Your private key ID found in your JSON service account key. - example: 123456789abcdefghi123456789abcdefghijklm + tags_execution: + description: The execution method for multi-value filters. Can be either + and or or. type: string - project_id: - description: Your Google Cloud project ID found in your JSON service account - key. - example: datadog-apitest + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. type: string - token_uri: - description: Should be `https://accounts.google.com/o/oauth2/token`. - example: https://accounts.google.com/o/oauth2/token + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. type: string type: - description: The value for service_account found in your JSON service account - key. - example: service_account - type: string + $ref: '#/components/schemas/EventTimelineWidgetDefinitionType' + required: + - type + - query type: object - GCPAccountListResponse: - description: Array of GCP account responses. - items: - $ref: '#/components/schemas/GCPAccount' - type: array - GraphSnapshot: - description: Object representing a graph snapshot. - properties: - graph_def: - description: 'A JSON document defining the graph. `graph_def` can be used - instead of `metric_query`. - - The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) - - and should be formatted to a single line then URL encoded.' + EventTimelineWidgetDefinitionType: + default: event_timeline + description: Type of the event timeline widget. + enum: + - event_timeline + example: event_timeline + type: string + x-enum-varnames: + - EVENT_TIMELINE + FormulaAndFunctionApmDependencyStatName: + description: APM statistic. + enum: + - avg_duration + - avg_root_duration + - avg_spans_per_trace + - error_rate + - pct_exec_time + - pct_of_traces + - total_traces_count + example: avg_duration + type: string + x-enum-varnames: + - AVG_DURATION + - AVG_ROOT_DURATION + - AVG_SPANS_PER_TRACE + - ERROR_RATE + - PCT_EXEC_TIME + - PCT_OF_TRACES + - TOTAL_TRACES_COUNT + FormulaAndFunctionApmDependencyStatsDataSource: + description: Data source for APM dependency stats queries. + enum: + - apm_dependency_stats + example: apm_dependency_stats + type: string + x-enum-varnames: + - APM_DEPENDENCY_STATS + FormulaAndFunctionApmDependencyStatsQueryDefinition: + description: A formula and functions APM dependency stats query. + properties: + data_source: + $ref: '#/components/schemas/FormulaAndFunctionApmDependencyStatsDataSource' + env: + description: APM environment. + example: staging + type: string + is_upstream: + description: Determines whether stats for upstream or downstream dependencies + should be queried. + example: false + type: boolean + name: + description: Name of query to use in formulas. + example: query_errors type: string - metric_query: - description: The metric query. One of `metric_query` or `graph_def` is required. + operation_name: + description: Name of operation on service. + example: cassandra.query type: string - snapshot_url: - description: URL of your [graph snapshot](https://docs.datadoghq.com/metrics/explorer/#snapshot). - example: https://app.datadoghq.com/s/f12345678/aaa-bbb-ccc + primary_tag_name: + description: The name of the second primary tag used within APM; required + when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog. + example: datacenter type: string - type: object - HTTPLog: - description: Structured log message. - items: - $ref: '#/components/schemas/HTTPLogItem' - type: array - HTTPLogError: - description: Invalid query performed. - properties: - code: - description: Error code. - example: 0 - format: int32 - maximum: 2147483647 - type: integer - message: - description: Error message. - example: Your browser sent an invalid request. + primary_tag_value: + description: Filter APM data by the second primary tag. `primary_tag_name` + must also be specified. + example: staging type: string + resource_name: + description: APM resource. + example: DELETE FROM foo WHERE baz = ? + type: string + service: + description: APM service. + example: cassandra + type: string + stat: + $ref: '#/components/schemas/FormulaAndFunctionApmDependencyStatName' required: - - code - - message + - data_source + - env + - stat + - operation_name + - resource_name + - service + - name type: object - HTTPLogItem: - additionalProperties: - description: Additional log attributes. - type: string - description: Logs that are sent over HTTP. + FormulaAndFunctionApmResourceStatName: + description: APM resource stat name. + enum: + - errors + - error_rate + - hits + - latency_avg + - latency_distribution + - latency_max + - latency_p50 + - latency_p75 + - latency_p90 + - latency_p95 + - latency_p99 + example: hits + type: string + x-enum-varnames: + - ERRORS + - ERROR_RATE + - HITS + - LATENCY_AVG + - LATENCY_DISTRIBUTION + - LATENCY_MAX + - LATENCY_P50 + - LATENCY_P75 + - LATENCY_P90 + - LATENCY_P95 + - LATENCY_P99 + FormulaAndFunctionApmResourceStatsDataSource: + description: Data source for APM resource stats queries. + enum: + - apm_resource_stats + example: apm_resource_stats + type: string + x-enum-varnames: + - APM_RESOURCE_STATS + FormulaAndFunctionApmResourceStatsQueryDefinition: + description: APM resource stats query using formulas and functions. properties: - ddsource: - description: 'The integration name associated with your log: the technology - from which the log originated. - - When it matches an integration name, Datadog automatically installs the - corresponding parsers and facets. - - See [reserved attributes](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes).' - example: nginx + data_source: + $ref: '#/components/schemas/FormulaAndFunctionApmResourceStatsDataSource' + env: + description: APM environment. + example: staging type: string - ddtags: - description: Tags associated with your logs. - example: env:staging,version:5.1 + group_by: + description: Array of fields to group results by. + items: + description: Field to group results by. + example: resource_name + type: string + type: array + name: + description: Name of this query to use in formulas. + example: query_errors type: string - hostname: - description: The name of the originating host of the log. - example: i-012345678 + operation_name: + description: Name of operation on service. + example: cassandra.query type: string - message: - description: 'The message [reserved attribute](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes) - - of your log. By default, Datadog ingests the value of the message attribute - as the body of the log entry. - - That value is then highlighted and displayed in the Logstream, where it - is indexed for full text search.' - example: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World + primary_tag_name: + description: Name of the second primary tag used within APM. Required when + `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog + example: datacenter + type: string + primary_tag_value: + description: Value of the second primary tag by which to filter APM data. + `primary_tag_name` must also be specified. + example: us-east-az + type: string + resource_name: + description: APM resource name. + example: Admin::ProductsController#create type: string service: - description: 'The name of the application or service generating the log - events. - - It is used to switch from Logs to APM, so make sure you define the same - value when you use both products. - - See [reserved attributes](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes).' - example: payment + description: APM service name. + example: web-store type: string + stat: + $ref: '#/components/schemas/FormulaAndFunctionApmResourceStatName' required: - - message + - data_source + - env + - name + - service + - stat type: object - Host: - description: Object representing a host. - properties: - aliases: - description: Host aliases collected by Datadog. + FormulaAndFunctionCloudCostDataSource: + description: Data source for Cloud Cost queries. + enum: + - cloud_cost + example: cloud_cost + type: string + x-enum-varnames: + - CLOUD_COST + FormulaAndFunctionCloudCostQueryDefinition: + description: A formula and functions Cloud Cost query. + example: + data_source: cloud_cost + name: query1 + query: sum:aws.cost.amortized{*} + properties: + aggregator: + $ref: '#/components/schemas/WidgetAggregator' + data_source: + $ref: '#/components/schemas/FormulaAndFunctionCloudCostDataSource' + name: + description: Name of the query for use in formulas. + example: my_query + type: string + query: + description: Query for Cloud Cost data. + example: '' + type: string + required: + - data_source + - query + - name + type: object + FormulaAndFunctionEventAggregation: + description: Aggregation methods for event platform queries. + enum: + - count + - cardinality + - median + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + example: avg + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - MEDIAN + - PC75 + - PC90 + - PC95 + - PC98 + - PC99 + - SUM + - MIN + - MAX + - AVG + FormulaAndFunctionEventQueryDefinition: + description: A formula and functions events query. + properties: + compute: + $ref: '#/components/schemas/FormulaAndFunctionEventQueryDefinitionCompute' + data_source: + $ref: '#/components/schemas/FormulaAndFunctionEventsDataSource' + group_by: + description: Group by options. items: - description: A host alias. - example: mycoolhost-1 - type: string + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBy' type: array - apps: - description: The Datadog integrations reporting metrics for the host. + indexes: + description: An array of index names to query in the stream. Omit or use + `[]` to query all indexes at once. + example: + - days-3 + - days-7 items: - description: Name of an app. - example: agent + description: A log index set up for your organization. For additional + indexes, see the [multiple indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes) + documentation. type: string type: array - aws_name: - description: AWS name of your host. - example: mycoolhost-1 + name: + description: Name of the query for use in formulas. + example: query_errors type: string - host_name: - description: The host name. - example: i-deadbeef + search: + $ref: '#/components/schemas/FormulaAndFunctionEventQueryDefinitionSearch' + storage: + description: Option for storage location. Feature in Private Beta. + example: indexes type: string - id: - description: The host ID. - example: 123456 - format: int64 - type: integer - is_muted: - description: If a host is muted or unmuted. - example: false - type: boolean - last_reported_time: - description: Last time the host reported a metric data point. - example: 1565000000 + required: + - data_source + - compute + - name + type: object + FormulaAndFunctionEventQueryDefinitionCompute: + description: Compute options. + properties: + aggregation: + $ref: '#/components/schemas/FormulaAndFunctionEventAggregation' + interval: + description: A time interval in milliseconds. + example: 60000 format: int64 type: integer - meta: - $ref: '#/components/schemas/HostMeta' - metrics: - $ref: '#/components/schemas/HostMetrics' - mute_timeout: - description: Timeout of the mute applied to your host. + metric: + description: Measurable attribute to compute. + example: '@duration' + type: string + required: + - aggregation + type: object + FormulaAndFunctionEventQueryDefinitionSearch: + description: Search options. + properties: + query: + description: Events search string. + example: service:query + type: string + required: + - query + type: object + FormulaAndFunctionEventQueryGroupBy: + description: List of objects used to group by. + properties: + facet: + description: Event facet. + example: status. + type: string + limit: + description: Number of groups to return. + example: 10 format: int64 - nullable: true type: integer + sort: + $ref: '#/components/schemas/FormulaAndFunctionEventQueryGroupBySort' + required: + - facet + type: object + FormulaAndFunctionEventQueryGroupBySort: + description: Options for sorting group by results. + properties: + aggregation: + $ref: '#/components/schemas/FormulaAndFunctionEventAggregation' + metric: + description: Metric used for sorting group by results. + type: string + order: + $ref: '#/components/schemas/QuerySortOrder' + required: + - aggregation + type: object + FormulaAndFunctionEventsDataSource: + description: Data source for event platform-based queries. + enum: + - logs + - spans + - network + - rum + - security_signals + - profiles + - audit + - events + - ci_tests + - ci_pipelines + example: logs + type: string + x-enum-varnames: + - LOGS + - SPANS + - NETWORK + - RUM + - SECURITY_SIGNALS + - PROFILES + - AUDIT + - EVENTS + - CI_TESTS + - CI_PIPELINES + FormulaAndFunctionMetricAggregation: + description: The aggregation methods available for metrics queries. + enum: + - avg + - min + - max + - sum + - last + - area + - l2norm + - percentile + example: avg + type: string + x-enum-varnames: + - AVG + - MIN + - MAX + - SUM + - LAST + - AREA + - L2NORM + - PERCENTILE + FormulaAndFunctionMetricDataSource: + description: Data source for metrics queries. + enum: + - metrics + example: metrics + type: string + x-enum-varnames: + - METRICS + FormulaAndFunctionMetricQueryDefinition: + description: A formula and functions metrics query. + example: + data_source: metrics + name: my_query + query: avg:system.cpu.user{*} + properties: + aggregator: + $ref: '#/components/schemas/FormulaAndFunctionMetricAggregation' + data_source: + $ref: '#/components/schemas/FormulaAndFunctionMetricDataSource' name: - description: The host name. - example: i-hostname + description: Name of the query for use in formulas. + example: my_query type: string - sources: - description: Source or cloud provider associated with your host. - items: - description: A source or cloud provider name. - example: aws - type: string - type: array - tags_by_source: - additionalProperties: - description: Array of tags for a single source. - items: - description: A tag. - example: test.example.com.host - type: string - type: array - description: List of tags for each source (AWS, Datadog Agent, Chef..). - type: object - up: - description: Displays UP when the expected metrics are received and displays - `???` if no metrics are received. - example: true - type: boolean + query: + description: Metrics query definition. + example: avg:system.cpu.user{*} + type: string + required: + - data_source + - query + - name type: object - HostListResponse: - description: Response with Host information from Datadog. - properties: - host_list: - description: Array of hosts. - items: - $ref: '#/components/schemas/Host' - type: array - total_matching: - description: Number of host matching the query. - example: 1 - format: int64 - type: integer - total_returned: - description: Number of host returned. - example: 1 + FormulaAndFunctionProcessQueryDataSource: + description: Data sources that rely on the process backend. + enum: + - process + - container + example: process + type: string + x-enum-varnames: + - PROCESS + - CONTAINER + FormulaAndFunctionProcessQueryDefinition: + description: Process query using formulas and functions. + properties: + aggregator: + $ref: '#/components/schemas/FormulaAndFunctionMetricAggregation' + data_source: + $ref: '#/components/schemas/FormulaAndFunctionProcessQueryDataSource' + is_normalized_cpu: + description: Whether to normalize the CPU percentages. + type: boolean + limit: + description: Number of hits to return. format: int64 type: integer - type: object - HostMeta: - description: Metadata associated with your host. - properties: - agent_checks: - description: A list of Agent checks running on the host. - items: - $ref: '#/components/schemas/AgentCheck' - type: array - agent_version: - description: The Datadog Agent version. - example: 7.32.3 + metric: + description: Process metric name. + example: avg:system.cpu.user{*} type: string - cpuCores: - description: The number of cores. - example: 1 - format: int64 - type: integer - fbsdV: - description: An array of Mac versions. - items: - description: The version name. - example: FreeBSD - type: array - gohai: - description: JSON string containing system information. - example: '{"cpu":{"cache_size":"8192 KB","cpu_cores":"1","cpu_logical_processors":"1","family":"6","mhz":"2712.000","model":"142","model_name":"Intel(R) - Core(TM) i7-8559U CPU @ 2.70GHz","stepping":"10","vendor_id":"GenuineIntel"},"filesystem":[{"kb_size":"3966896","mounted_on":"/dev","name":"udev"},{"kb_size":"797396","mounted_on":"/run","name":"tmpfs"},{"kb_size":"64800356","mounted_on":"/","name":"/dev/mapper/vagrant--vg-root"},{"kb_size":"3986972","mounted_on":"/dev/shm","name":"tmpfs"},{"kb_size":"5120","mounted_on":"/run/lock","name":"tmpfs"},{"kb_size":"3986972","mounted_on":"/sys/fs/cgroup","name":"tmpfs"},{"kb_size":"488245288","mounted_on":"/vagrant","name":"vagrant"},{"kb_size":"797392","mounted_on":"/run/user/1000","name":"tmpfs"}],"memory":{"swap_total":"1003516kB","total":"7973944kB"},"network":{"interfaces":[{"ipv4":"10.0.2.15","ipv4-network":"10.0.2.0/24","ipv6":"fe80::a00:27ff:fec2:be11","ipv6-network":"fe80::/64","macaddress":"08:00:27:c2:be:11","name":"eth0"},{"ipv4":"192.168.122.1","ipv4-network":"192.168.122.0/24","macaddress":"52:54:00:6f:1c:bf","name":"virbr0"}],"ipaddress":"10.0.2.15","ipaddressv6":"fe80::a00:27ff:fec2:be11","macaddress":"08:00:27:c2:be:11"},"platform":{"GOOARCH":"amd64","GOOS":"linux","goV":"1.16.7","hardware_platform":"x86_64","hostname":"vagrant","kernel_name":"Linux","kernel_release":"4.15.0-29-generic","kernel_version":"#31-Ubuntu - SMP Tue Jul 17 15:39:52 UTC 2018","machine":"x86_64","os":"GNU/Linux","processor":"x86_64","pythonV":"2.7.15rc1"}}' + name: + description: Name of query for use in formulas. + example: query_errors type: string - install_method: - $ref: '#/components/schemas/HostMetaInstallMethod' - macV: - description: An array of Mac versions. + sort: + $ref: '#/components/schemas/QuerySortOrder' + tag_filters: + description: An array of tags to filter by. items: - description: Version name. - example: Mac + description: One of the tags to filter by. + type: string type: array - machine: - description: The machine architecture. - example: amd64 + text_filter: + description: Text to use as filter. type: string - nixV: - description: Array of Unix versions. - items: - description: Version name. - example: Ubuntu - type: array - platform: - description: The OS platform. - example: linux + required: + - data_source + - metric + - name + type: object + FormulaAndFunctionQueryDefinition: + description: A formula and function query. + oneOf: + - $ref: '#/components/schemas/FormulaAndFunctionMetricQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionEventQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionProcessQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionApmDependencyStatsQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionApmResourceStatsQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionSLOQueryDefinition' + - $ref: '#/components/schemas/FormulaAndFunctionCloudCostQueryDefinition' + FormulaAndFunctionResponseFormat: + description: Timeseries, scalar, or event list response. Event list response + formats are supported by Geomap widgets. + enum: + - timeseries + - scalar + - event_list + example: timeseries + type: string + x-enum-varnames: + - TIMESERIES + - SCALAR + - EVENT_LIST + FormulaAndFunctionSLODataSource: + description: Data source for SLO measures queries. + enum: + - slo + example: slo + type: string + x-enum-varnames: + - SLO + FormulaAndFunctionSLOGroupMode: + description: Group mode to query measures. + enum: + - overall + - components + example: overall + type: string + x-enum-varnames: + - OVERALL + - COMPONENTS + FormulaAndFunctionSLOMeasure: + description: SLO measures queries. + enum: + - good_events + - bad_events + - slo_status + - error_budget_remaining + - burn_rate + - error_budget_burndown + example: slo_status + type: string + x-enum-varnames: + - GOOD_EVENTS + - BAD_EVENTS + - SLO_STATUS + - ERROR_BUDGET_REMAINING + - BURN_RATE + - ERROR_BUDGET_BURNDOWN + FormulaAndFunctionSLOQueryDefinition: + description: A formula and functions metrics query. + example: + additional_query_filters: '*' + data_source: slo + group_mode: overall + measure: good_events + name: my_slo + slo_id: '12345678910' + slo_query_type: metric + properties: + additional_query_filters: + description: Additional filters applied to the SLO query. + example: host:host_a,env:prod + type: string + data_source: + $ref: '#/components/schemas/FormulaAndFunctionSLODataSource' + group_mode: + $ref: '#/components/schemas/FormulaAndFunctionSLOGroupMode' + measure: + $ref: '#/components/schemas/FormulaAndFunctionSLOMeasure' + name: + description: Name of the query for use in formulas. + example: my_slo type: string - processor: - description: The processor. - example: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz + slo_id: + description: ID of an SLO to query measures. + example: '12345678910' type: string - pythonV: - description: The Python version. - example: 3.8.11 + slo_query_type: + $ref: '#/components/schemas/FormulaAndFunctionSLOQueryType' + required: + - data_source + - slo_id + - measure + type: object + FormulaAndFunctionSLOQueryType: + description: Name of the query for use in formulas. + enum: + - metric + example: metric + type: string + x-enum-varnames: + - METRIC + FreeTextWidgetDefinition: + description: Free text is a widget that allows you to add headings to your screenboard. + Commonly used to state the overall purpose of the dashboard. Only available + on FREE layout dashboards. + properties: + color: + description: Color of the text. type: string - socket-fqdn: - description: The socket fqdn. - example: vagrant.vm. + font_size: + description: Size of the text. type: string - socket-hostname: - description: The socket hostname. - example: vagrant + text: + description: Text to display. + example: '' type: string - winV: - description: An array of Windows versions. + text_align: + $ref: '#/components/schemas/WidgetTextAlign' + type: + $ref: '#/components/schemas/FreeTextWidgetDefinitionType' + required: + - type + - text + type: object + FreeTextWidgetDefinitionType: + default: free_text + description: Type of the free text widget. + enum: + - free_text + example: free_text + type: string + x-enum-varnames: + - FREE_TEXT + FunnelQuery: + description: Updated funnel widget. + properties: + data_source: + $ref: '#/components/schemas/FunnelSource' + query_string: + description: The widget query. + example: '@browser.name:Chrome' + type: string + steps: + description: List of funnel steps. items: - description: Version name. - example: Windows + $ref: '#/components/schemas/FunnelStep' type: array + required: + - query_string + - data_source + - steps type: object - HostMetaInstallMethod: - description: Agent install method. + FunnelRequestType: + description: Widget request type. + enum: + - funnel + example: funnel + type: string + x-enum-varnames: + - FUNNEL + FunnelSource: + default: rum + description: Source from which to query items to display in the funnel. + enum: + - rum + example: rum + type: string + x-enum-varnames: + - RUM + FunnelStep: + description: The funnel step. properties: - installer_version: - description: The installer version. - example: install_script-1.7.1 - type: string - tool: - description: Tool used to install the agent. - example: install_script + facet: + description: The facet of the step. + example: '@view.name' type: string - tool_version: - description: The tool version. - example: install_script + value: + description: The value of the step. + example: /apm/home type: string + required: + - facet + - value type: object - HostMetrics: - description: Host Metrics collected. - properties: - cpu: - description: The percent of CPU used (everything but idle). - example: 99.0 - format: double - type: number - iowait: - description: The percent of CPU spent waiting on the IO (not reported for - all platforms). - example: 3.2 - format: double - type: number - load: - description: The system load over the last 15 minutes. - example: 0.5 - format: double - type: number - type: object - HostMuteResponse: - description: Response with the list of muted host for your organization. + FunnelWidgetDefinition: + description: 'The funnel visualization displays a funnel of user sessions that + maps a sequence of view navigation and user interaction in your application. + + ' properties: - action: - description: Action applied to the hosts. - example: Muted - type: string - end: - description: POSIX timestamp in seconds when the host is unmuted. - example: 1579098130 - format: int64 - type: integer - hostname: - description: The host name. - example: test.host + requests: + description: Request payload used to query items. + example: + - query: + data_source: rum + query_string: '@browser.name:Chrome' + steps: + - facet: '@view.name' + value: /logs + - facet: '@view.name' + value: /apm/home + request_type: funnel + items: + $ref: '#/components/schemas/FunnelWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: The title of the widget. type: string - message: - description: Message associated with the mute. - example: Muting this host for a test! + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: The size of the title. type: string + type: + $ref: '#/components/schemas/FunnelWidgetDefinitionType' + required: + - type + - requests type: object - HostMuteSettings: - description: Combination of settings to mute a host. + FunnelWidgetDefinitionType: + default: funnel + description: Type of funnel widget. + enum: + - funnel + example: funnel + type: string + x-enum-varnames: + - FUNNEL + FunnelWidgetRequest: + description: Updated funnel widget. properties: - end: - description: POSIX timestamp in seconds when the host is unmuted. If omitted, - the host remains muted until explicitly unmuted. - example: 1579098130 - format: int64 - type: integer - message: - description: Message to associate with the muting of this host. - example: Muting this host for a test! - type: string - override: - description: If true and the host is already muted, replaces existing host - mute settings. - example: false - type: boolean + query: + $ref: '#/components/schemas/FunnelQuery' + request_type: + $ref: '#/components/schemas/FunnelRequestType' + required: + - query + - request_type type: object - HostTags: - description: Set of tags to associate with your host. + GCPAccount: + description: Your Google Cloud Platform Account. properties: - host: - description: Your host name. - example: test.host + auth_provider_x509_cert_url: + description: Should be `https://www.googleapis.com/oauth2/v1/certs`. + example: https://www.googleapis.com/oauth2/v1/certs type: string - tags: - description: A list of tags to apply to the host. - items: - description: A given tag in a list. - example: environment:production - type: string - type: array - type: object - HostTotals: - description: Total number of host currently monitored by Datadog. - properties: - total_active: - description: Total number of active host (UP and ???) reporting to Datadog. - format: int64 - type: integer - total_up: - description: Number of host that are UP and reporting to Datadog. - format: int64 - type: integer - type: object - HourlyUsageAttributionBody: - description: The usage for one set of tags for one hour. - properties: - hour: - description: The hour for the usage. - format: date-time + auth_uri: + description: Should be `https://accounts.google.com/o/oauth2/auth`. + example: https://accounts.google.com/o/oauth2/auth type: string - org_name: - description: The name of the organization. + automute: + description: Silence monitors for expected GCE instance shutdowns. + type: boolean + client_email: + description: Your email found in your JSON service account key. + example: api-dev@datadog-sandbox.iam.gserviceaccount.com type: string - public_id: - description: The organization public ID. + client_id: + description: Your ID found in your JSON service account key. + example: '123456712345671234567' type: string - region: - description: The region of the Datadog instance that the organization belongs - to. + client_x509_cert_url: + description: 'Should be `https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL` + + where `$CLIENT_EMAIL` is the email found in your JSON service account + key.' + example: https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL type: string - tag_config_source: - description: The source of the usage attribution tag configuration and the - selected tags in the format of `::://////`. + errors: + description: An array of errors. + example: + - '*' + items: + description: String representation of one error. + readOnly: true + type: string + type: array + host_filters: + description: 'Limit the GCE instances that are pulled into Datadog by using + tags. + + Only hosts that match one of the defined tags are imported into Datadog.' + example: key:value,filter:example type: string - tags: - $ref: '#/components/schemas/UsageAttributionTagNames' - total_usage_sum: - description: Total product usage for the given tags within the hour. - format: double - type: number - updated_at: - description: Shows the most recent hour in the current month for all organizations - where usages are calculated. + is_cspm_enabled: + description: 'When enabled, Datadog will activate the Cloud Security Monitoring + product for this service account. Note: This requires resource_collection_enabled + to be set to true.' + example: true + type: boolean + is_security_command_center_enabled: + default: false + description: 'When enabled, Datadog will attempt to collect Security Command + Center Findings. Note: This requires additional permissions on the service + account.' + example: true + type: boolean + private_key: + description: Your private key name found in your JSON service account key. + example: private_key + type: string + private_key_id: + description: Your private key ID found in your JSON service account key. + example: 123456789abcdefghi123456789abcdefghijklm + type: string + project_id: + description: Your Google Cloud project ID found in your JSON service account + key. + example: datadog-apitest + type: string + resource_collection_enabled: + description: When enabled, Datadog scans for all resources in your GCP environment. + example: true + type: boolean + token_uri: + description: Should be `https://accounts.google.com/o/oauth2/token`. + example: https://accounts.google.com/o/oauth2/token + type: string + type: + description: The value for service_account found in your JSON service account + key. + example: service_account type: string - usage_type: - $ref: '#/components/schemas/HourlyUsageAttributionUsageType' type: object - HourlyUsageAttributionMetadata: - description: The object containing document metadata. + GCPAccountListResponse: + description: Array of GCP account responses. + items: + $ref: '#/components/schemas/GCPAccount' + type: array + GeomapWidgetDefinition: + description: This visualization displays a series of values by country on a + world map. properties: - pagination: - $ref: '#/components/schemas/HourlyUsageAttributionPagination' + custom_links: + description: A list of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + requests: + description: 'Array of one request object to display in the widget. The + request must contain a `group-by` tag whose value is a country ISO code. + + + See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) + + for information about building the `REQUEST_SCHEMA`.' + example: + - rum_query: + search: + query: {} + items: + $ref: '#/components/schemas/GeomapWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + style: + $ref: '#/components/schemas/GeomapWidgetDefinitionStyle' + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: The title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: The size of the title. + type: string + type: + $ref: '#/components/schemas/GeomapWidgetDefinitionType' + view: + $ref: '#/components/schemas/GeomapWidgetDefinitionView' + required: + - type + - requests + - style + - view type: object - HourlyUsageAttributionPagination: - description: The metadata for the current pagination. + GeomapWidgetDefinitionStyle: + description: The style to apply to the widget. + example: + palette: hostmap_blues + palette_flip: false properties: - next_record_id: - description: The cursor to get the next results (if any). To make the next - request, use the same parameters and add `next_record_id`. - nullable: true + palette: + description: The color palette to apply to the widget. + example: hostmap_blues type: string + palette_flip: + description: Whether to flip the palette tones. + example: false + type: boolean + required: + - palette + - palette_flip type: object - HourlyUsageAttributionResponse: - description: Response containing the hourly usage attribution by tag(s). + GeomapWidgetDefinitionType: + default: geomap + description: Type of the geomap widget. + enum: + - geomap + example: geomap + type: string + x-enum-varnames: + - GEOMAP + GeomapWidgetDefinitionView: + description: The view of the world that the map should render. + example: + focus: WORLD properties: - metadata: - $ref: '#/components/schemas/HourlyUsageAttributionMetadata' - usage: - description: Get the hourly usage attribution by tag(s). + focus: + description: The 2-letter ISO code of a country to focus the map on. Or + `WORLD`. + example: WORLD + type: string + required: + - focus + type: object + GeomapWidgetRequest: + description: An updated geomap widget. + properties: + columns: + description: Widget columns. + example: + - field: timestamp + width: auto + - field: content + width: full items: - $ref: '#/components/schemas/HourlyUsageAttributionBody' + $ref: '#/components/schemas/ListStreamColumn' type: array + formulas: + description: List of formulas that operate on queries. + items: + $ref: '#/components/schemas/WidgetFormula' + type: array + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: The widget metrics query. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + query: + $ref: '#/components/schemas/ListStreamQuery' + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' type: object - HourlyUsageAttributionUsageType: - description: Supported products for hourly usage attribution requests. + GraphSnapshot: + description: Object representing a graph snapshot. + properties: + graph_def: + description: 'A JSON document defining the graph. `graph_def` can be used + instead of `metric_query`. + + The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) + + and should be formatted to a single line then URL encoded.' + type: string + metric_query: + description: The metric query. One of `metric_query` or `graph_def` is required. + type: string + snapshot_url: + description: URL of your [graph snapshot](https://docs.datadoghq.com/metrics/explorer/#snapshot). + example: https://app.datadoghq.com/s/f12345678/aaa-bbb-ccc + type: string + type: object + GroupWidgetDefinition: + description: The groups widget allows you to keep similar graphs together on + your timeboard. Each group has a custom header, can hold one to many graphs, + and is collapsible. + properties: + background_color: + description: Background color of the group title. + type: string + banner_img: + description: URL of image to display as a banner for the group. + type: string + layout_type: + $ref: '#/components/schemas/WidgetLayoutType' + show_title: + default: true + description: Whether to show the title or not. + type: boolean + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + type: + $ref: '#/components/schemas/GroupWidgetDefinitionType' + widgets: + description: List of widget groups. + example: + - definition: + requests: + fill: + q: avg:system.cpu.user{*} + type: hostmap + items: + $ref: '#/components/schemas/Widget' + type: array + required: + - type + - layout_type + - widgets + type: object + GroupWidgetDefinitionType: + default: group + description: Type of the group widget. enum: - - api_usage - - apm_fargate_usage - - apm_host_usage - - apm_usm_usage - - appsec_fargate_usage - - appsec_usage - - browser_usage - - ci_pipeline_indexed_spans_usage - - ci_test_indexed_spans_usage - - ci_visibility_itr_usage - - cloud_siem_usage - - container_excl_agent_usage - - container_usage - - cspm_containers_usage - - cspm_hosts_usage - - custom_event_usage - - custom_ingested_timeseries_usage - - custom_timeseries_usage - - cws_containers_usage - - cws_hosts_usage - - dbm_hosts_usage - - dbm_queries_usage - - estimated_indexed_logs_usage - - estimated_indexed_spans_usage - - estimated_ingested_logs_usage - - estimated_ingested_spans_usage - - estimated_rum_sessions_usage - - fargate_usage - - functions_usage - - indexed_spans_usage - - infra_host_usage - - ingested_logs_bytes_usage - - ingested_spans_bytes_usage - - invocations_usage - - lambda_traced_invocations_usage - - logs_indexed_15day_usage - - logs_indexed_180day_usage - - logs_indexed_30day_usage - - logs_indexed_360day_usage - - logs_indexed_3day_usage - - logs_indexed_45day_usage - - logs_indexed_60day_usage - - logs_indexed_7day_usage - - logs_indexed_90day_usage - - logs_indexed_custom_retention_usage - - mobile_app_testing_usage - - ndm_netflow_usage - - npm_host_usage - - obs_pipeline_bytes_usage - - profiled_container_usage - - profiled_fargate_usage - - profiled_host_usage - - rum_browser_mobile_sessions_usage - - rum_replay_sessions_usage - - sds_scanned_bytes_usage - - serverless_apps_usage - - siem_ingested_bytes_usage - - snmp_usage - - universal_service_monitoring_usage - - vuln_management_hosts_usage + - group + example: group type: string x-enum-varnames: - - API_USAGE - - APM_FARGATE_USAGE - - APM_HOST_USAGE - - APM_USM_USAGE - - APPSEC_FARGATE_USAGE - - APPSEC_USAGE - - BROWSER_USAGE - - CI_PIPELINE_INDEXED_SPANS_USAGE - - CI_TEST_INDEXED_SPANS_USAGE - - CI_VISIBILITY_ITR_USAGE - - CLOUD_SIEM_USAGE - - CONTAINER_EXCL_AGENT_USAGE - - CONTAINER_USAGE - - CSPM_CONTAINERS_USAGE - - CSPM_HOSTS_USAGE - - CUSTOM_EVENT_USAGE - - CUSTOM_INGESTED_TIMESERIES_USAGE - - CUSTOM_TIMESERIES_USAGE - - CWS_CONTAINERS_USAGE - - CWS_HOSTS_USAGE - - DBM_HOSTS_USAGE - - DBM_QUERIES_USAGE - - ESTIMATED_INDEXED_LOGS_USAGE - - ESTIMATED_INDEXED_SPANS_USAGE - - ESTIMATED_INGESTED_LOGS_USAGE - - ESTIMATED_INGESTED_SPANS_USAGE - - ESTIMATED_RUM_SESSIONS_USAGE - - FARGATE_USAGE - - FUNCTIONS_USAGE - - INDEXED_SPANS_USAGE - - INFRA_HOST_USAGE - - INGESTED_LOGS_BYTES_USAGE - - INGESTED_SPANS_BYTES_USAGE - - INVOCATIONS_USAGE - - LAMBDA_TRACED_INVOCATIONS_USAGE - - LOGS_INDEXED_15DAY_USAGE - - LOGS_INDEXED_180DAY_USAGE - - LOGS_INDEXED_30DAY_USAGE - - LOGS_INDEXED_360DAY_USAGE - - LOGS_INDEXED_3DAY_USAGE - - LOGS_INDEXED_45DAY_USAGE - - LOGS_INDEXED_60DAY_USAGE - - LOGS_INDEXED_7DAY_USAGE - - LOGS_INDEXED_90DAY_USAGE - - LOGS_INDEXED_CUSTOM_RETENTION_USAGE - - MOBILE_APP_TESTING_USAGE - - NDM_NETFLOW_USAGE - - NPM_HOST_USAGE - - OBS_PIPELINE_BYTES_USAGE - - PROFILED_CONTAINER_USAGE - - PROFILED_FARGATE_USAGE - - PROFILED_HOST_USAGE - - RUM_BROWSER_MOBILE_SESSIONS_USAGE - - RUM_REPLAY_SESSIONS_USAGE - - SDS_SCANNED_BYTES_USAGE - - SERVERLESS_APPS_USAGE - - SIEM_INGESTED_BYTES_USAGE - - SNMP_USAGE - - UNIVERSAL_SERVICE_MONITORING_USAGE - - VULN_MANAGEMENT_HOSTS_USAGE - IPPrefixesAPI: - description: Available prefix information for the API endpoints. + - GROUP + HTTPLog: + description: Structured log message. + items: + $ref: '#/components/schemas/HTTPLogItem' + type: array + HTTPLogError: + description: Invalid query performed. properties: - prefixes_ipv4: - description: List of IPv4 prefixes. - items: - description: IPv4 prefix - type: string - type: array - prefixes_ipv6: - description: List of IPv6 prefixes. - items: - description: IPv6 prefix - type: string - type: array + code: + description: Error code. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + message: + description: Error message. + example: Your browser sent an invalid request. + type: string + required: + - code + - message type: object - IPPrefixesAPM: - description: Available prefix information for the APM endpoints. + HTTPLogItem: + additionalProperties: + description: Additional log attributes. + type: string + description: Logs that are sent over HTTP. properties: - prefixes_ipv4: - description: List of IPv4 prefixes. - items: - description: IPv4 prefix - type: string - type: array - prefixes_ipv6: - description: List of IPv6 prefixes. - items: - description: IPv6 prefix - type: string - type: array + ddsource: + description: 'The integration name associated with your log: the technology + from which the log originated. + + When it matches an integration name, Datadog automatically installs the + corresponding parsers and facets. + + See [reserved attributes](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes).' + example: nginx + type: string + ddtags: + description: Tags associated with your logs. + example: env:staging,version:5.1 + type: string + hostname: + description: The name of the originating host of the log. + example: i-012345678 + type: string + message: + description: 'The message [reserved attribute](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes) + + of your log. By default, Datadog ingests the value of the message attribute + as the body of the log entry. + + That value is then highlighted and displayed in the Logstream, where it + is indexed for full text search.' + example: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World + type: string + service: + description: 'The name of the application or service generating the log + events. + + It is used to switch from Logs to APM, so make sure you define the same + value when you use both products. + + See [reserved attributes](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes).' + example: payment + type: string + required: + - message type: object - IPPrefixesAgents: - description: Available prefix information for the Agent endpoints. + HeatMapWidgetDefinition: + description: The heat map visualization shows metrics aggregated across many + tags, such as hosts. The more hosts that have a particular value, the darker + that square is. properties: - prefixes_ipv4: - description: List of IPv4 prefixes. + custom_links: + description: List of custom links. items: - description: IPv4 prefix - type: string + $ref: '#/components/schemas/WidgetCustomLink' type: array - prefixes_ipv6: - description: List of IPv6 prefixes. + events: + description: List of widget events. items: - description: IPv6 prefix - type: string + $ref: '#/components/schemas/WidgetEvent' + type: array + legend_size: + $ref: '#/components/schemas/WidgetLegendSize' + requests: + description: List of widget types. + example: + - q: jvm.heap.memory + items: + $ref: '#/components/schemas/HeatMapWidgetRequest' + maxItems: 1 + minItems: 1 type: array + show_legend: + description: Whether or not to display the legend on this widget. + type: boolean + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/HeatMapWidgetDefinitionType' + yaxis: + $ref: '#/components/schemas/WidgetAxis' + required: + - type + - requests type: object - IPPrefixesGlobal: - description: Available prefix information for all Datadog endpoints. - properties: - prefixes_ipv4: - description: List of IPv4 prefixes. + HeatMapWidgetDefinitionType: + default: heatmap + description: Type of the heat map widget. + enum: + - heatmap + example: heatmap + type: string + x-enum-varnames: + - HEATMAP + HeatMapWidgetRequest: + description: Updated heat map widget. + properties: + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + event_query: + $ref: '#/components/schemas/EventQueryDefinition' + formulas: + description: List of formulas that operate on queries. items: - description: IPv4 prefix - type: string + $ref: '#/components/schemas/WidgetFormula' type: array - prefixes_ipv6: - description: List of IPv6 prefixes. + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Widget query. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. items: - description: IPv6 prefix - type: string + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + style: + $ref: '#/components/schemas/WidgetStyle' type: object - IPPrefixesLogs: - description: Available prefix information for the Logs endpoints. + Host: + description: Object representing a host. properties: - prefixes_ipv4: - description: List of IPv4 prefixes. - items: - description: IPv4 prefix - type: string - type: array - prefixes_ipv6: - description: List of IPv6 prefixes. + aliases: + description: Host aliases collected by Datadog. items: - description: IPv6 prefix + description: A host alias. + example: mycoolhost-1 type: string type: array - type: object - IPPrefixesOrchestrator: - description: Available prefix information for the Orchestrator endpoints. - properties: - prefixes_ipv4: - description: List of IPv4 prefixes. + apps: + description: The Datadog integrations reporting metrics for the host. items: - description: IPv4 prefix + description: Name of an app. + example: agent type: string type: array - prefixes_ipv6: - description: List of IPv6 prefixes. + aws_name: + description: AWS name of your host. + example: mycoolhost-1 + type: string + host_name: + description: The host name. + example: i-deadbeef + type: string + id: + description: The host ID. + example: 123456 + format: int64 + type: integer + is_muted: + description: If a host is muted or unmuted. + example: false + type: boolean + last_reported_time: + description: Last time the host reported a metric data point. + example: 1565000000 + format: int64 + type: integer + meta: + $ref: '#/components/schemas/HostMeta' + metrics: + $ref: '#/components/schemas/HostMetrics' + mute_timeout: + description: Timeout of the mute applied to your host. + format: int64 + nullable: true + type: integer + name: + description: The host name. + example: i-hostname + type: string + sources: + description: Source or cloud provider associated with your host. items: - description: IPv6 prefix + description: A source or cloud provider name. + example: aws type: string type: array - type: object - IPPrefixesProcess: - description: Available prefix information for the Process endpoints. - properties: - prefixes_ipv4: - description: List of IPv4 prefixes. - items: - description: IPv4 prefix - type: string - type: array - prefixes_ipv6: - description: List of IPv6 prefixes. - items: - description: IPv6 prefix - type: string - type: array - type: object - IPPrefixesRemoteConfiguration: - description: Available prefix information for the Remote Configuration endpoints. - properties: - prefixes_ipv4: - description: List of IPv4 prefixes. - items: - description: IPv4 prefix - type: string - type: array - prefixes_ipv6: - description: List of IPv6 prefixes. - items: - description: IPv6 prefix - type: string - type: array - type: object - IPPrefixesSynthetics: - description: Available prefix information for the Synthetics endpoints. - properties: - prefixes_ipv4: - description: List of IPv4 prefixes. - items: - description: IPv4 prefix - type: string - type: array - prefixes_ipv4_by_location: - additionalProperties: - description: List of IPv4 prefixes. - items: - description: IPv4 prefix. - type: string - type: array - description: List of IPv4 prefixes by location. - type: object - prefixes_ipv6: - description: List of IPv6 prefixes. - items: - description: IPv6 prefix - type: string - type: array - prefixes_ipv6_by_location: + tags_by_source: additionalProperties: - description: List of IPv6 prefixes. + description: Array of tags for a single source. items: - description: IPv6 prefix. + description: A tag. + example: test.example.com.host type: string type: array - description: List of IPv6 prefixes by location. + description: List of tags for each source (AWS, Datadog Agent, Chef..). type: object + up: + description: Displays UP when the expected metrics are received and displays + `???` if no metrics are received. + example: true + type: boolean type: object - IPPrefixesSyntheticsPrivateLocations: - description: Available prefix information for the Synthetics Private Locations - endpoints. + HostListResponse: + description: Response with Host information from Datadog. properties: - prefixes_ipv4: - description: List of IPv4 prefixes. + host_list: + description: Array of hosts. items: - description: IPv4 prefix - type: string + $ref: '#/components/schemas/Host' type: array - prefixes_ipv6: - description: List of IPv6 prefixes. + total_matching: + description: Number of host matching the query. + example: 1 + format: int64 + type: integer + total_returned: + description: Number of host returned. + example: 1 + format: int64 + type: integer + type: object + HostMapRequest: + description: Updated host map. + properties: + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Query definition. + type: string + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + type: object + HostMapWidgetDefinition: + description: The host map widget graphs any metric across your hosts using the + same visualization available from the main Host Map page. + properties: + custom_links: + description: List of custom links. items: - description: IPv6 prefix - type: string + $ref: '#/components/schemas/WidgetCustomLink' type: array - type: object - IPPrefixesWebhooks: - description: Available prefix information for the Webhook endpoints. - properties: - prefixes_ipv4: - description: List of IPv4 prefixes. + group: + description: List of tag prefixes to group by. items: - description: IPv4 prefix + description: Tag prefixes. type: string type: array - prefixes_ipv6: - description: List of IPv6 prefixes. + no_group_hosts: + description: "Whether to show the hosts that don\u2019t fit in a group." + type: boolean + no_metric_hosts: + description: Whether to show the hosts with no metrics. + type: boolean + node_type: + $ref: '#/components/schemas/WidgetNodeType' + notes: + description: Notes on the title. + type: string + requests: + $ref: '#/components/schemas/HostMapWidgetDefinitionRequests' + scope: + description: List of tags used to filter the map. items: - description: IPv6 prefix + description: Tags. type: string type: array - type: object - IPRanges: - description: IP ranges. - properties: - agents: - $ref: '#/components/schemas/IPPrefixesAgents' - api: - $ref: '#/components/schemas/IPPrefixesAPI' - apm: - $ref: '#/components/schemas/IPPrefixesAPM' - global: - $ref: '#/components/schemas/IPPrefixesGlobal' - logs: - $ref: '#/components/schemas/IPPrefixesLogs' - modified: - description: Date when last updated, in the form `YYYY-MM-DD-hh-mm-ss`. - example: 2019-10-31-20-00-00 - type: string - orchestrator: - $ref: '#/components/schemas/IPPrefixesOrchestrator' - process: - $ref: '#/components/schemas/IPPrefixesProcess' - remote-configuration: - $ref: '#/components/schemas/IPPrefixesRemoteConfiguration' - synthetics: - $ref: '#/components/schemas/IPPrefixesSynthetics' - synthetics-private-locations: - $ref: '#/components/schemas/IPPrefixesSyntheticsPrivateLocations' - version: - description: Version of the IP list. - example: 11 - format: int64 - type: integer - webhooks: - $ref: '#/components/schemas/IPPrefixesWebhooks' - type: object - IdpFormData: - description: Object describing the IdP configuration. - properties: - idp_file: - description: The path to the XML metadata file you wish to upload. - example: '' - format: binary + style: + $ref: '#/components/schemas/HostMapWidgetDefinitionStyle' + title: + description: Title of the widget. type: string - required: - - idp_file - type: object - IdpResponse: - description: The IdP response object. - properties: - message: - description: Identity provider response. - example: IdP metadata successfully uploaded for example org + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. type: string + type: + $ref: '#/components/schemas/HostMapWidgetDefinitionType' required: - - message - type: object - IntakePayloadAccepted: - description: The payload accepted for intake. - properties: - status: - description: The status of the intake payload. - example: ok - type: string + - type + - requests type: object - Log: - description: Object describing a log after being processed and stored by Datadog. + HostMapWidgetDefinitionRequests: + description: List of definitions. + example: {} properties: - content: - $ref: '#/components/schemas/LogContent' - id: - description: Unique ID of the Log. - example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA - type: string + fill: + $ref: '#/components/schemas/HostMapRequest' + size: + $ref: '#/components/schemas/HostMapRequest' type: object - LogContent: - description: JSON object containing all log attributes and their associated - values. + HostMapWidgetDefinitionStyle: + description: The style to apply to the widget. properties: - attributes: - additionalProperties: {} - description: JSON object of attributes from your log. - example: - customAttribute: 123 - duration: 2345 - type: object - host: - description: Name of the machine from where the logs are being sent. - example: i-0123 - type: string - message: - description: 'The message [reserved attribute](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes) - - of your log. By default, Datadog ingests the value of the message attribute - as the body of the log entry. - - That value is then highlighted and displayed in the Logstream, where it - is indexed for full text search.' - example: Host connected to remote + fill_max: + description: Max value to use to color the map. type: string - service: - description: 'The name of the application or service generating the log - events. - - It is used to switch from Logs to APM, so make sure you define the same - - value when you use both products.' - example: agent + fill_min: + description: Min value to use to color the map. type: string - tags: - description: Array of tags associated with your log. - example: - - team:A - items: - description: Tag associated with your log. - type: string - type: array - timestamp: - description: Timestamp of your log. - example: '2020-05-26T13:36:14Z' - format: date-time + palette: + description: Color palette to apply to the widget. type: string + palette_flip: + description: Whether to flip the palette tones. + type: boolean type: object - LogsAPIError: - description: Error returned by the Logs API + HostMapWidgetDefinitionType: + default: hostmap + description: Type of the host map widget. + enum: + - hostmap + example: hostmap + type: string + x-enum-varnames: + - HOSTMAP + HostMeta: + description: Metadata associated with your host. properties: - code: - description: Code identifying the error - type: string - details: - description: Additional error details + agent_checks: + description: A list of Agent checks running on the host. items: - $ref: '#/components/schemas/LogsAPIError' + $ref: '#/components/schemas/AgentCheck' type: array - message: - description: Error message + agent_version: + description: The Datadog Agent version. + example: 7.32.3 type: string - type: object - LogsAPIErrorResponse: - description: Response returned by the Logs API when errors occur. - properties: - error: - $ref: '#/components/schemas/LogsAPIError' - type: object - LogsByRetention: - description: Object containing logs usage data broken down by retention period. - properties: - orgs: - $ref: '#/components/schemas/LogsByRetentionOrgs' - usage: - description: Aggregated index logs usage for each retention period with - usage. + cpuCores: + description: The number of cores. + example: 1 + format: int64 + type: integer + fbsdV: + description: An array of Mac versions. items: - $ref: '#/components/schemas/LogsRetentionAggSumUsage' + description: The version name. + example: FreeBSD type: array - usage_by_month: - $ref: '#/components/schemas/LogsByRetentionMonthlyUsage' - type: object - LogsByRetentionMonthlyUsage: - description: Object containing a summary of indexed logs usage by retention - period for a single month. - properties: - date: - description: The month for the usage. - format: date-time + gohai: + description: JSON string containing system information. + example: '{"cpu":{"cache_size":"8192 KB","cpu_cores":"1","cpu_logical_processors":"1","family":"6","mhz":"2712.000","model":"142","model_name":"Intel(R) + Core(TM) i7-8559U CPU @ 2.70GHz","stepping":"10","vendor_id":"GenuineIntel"},"filesystem":[{"kb_size":"3966896","mounted_on":"/dev","name":"udev"},{"kb_size":"797396","mounted_on":"/run","name":"tmpfs"},{"kb_size":"64800356","mounted_on":"/","name":"/dev/mapper/vagrant--vg-root"},{"kb_size":"3986972","mounted_on":"/dev/shm","name":"tmpfs"},{"kb_size":"5120","mounted_on":"/run/lock","name":"tmpfs"},{"kb_size":"3986972","mounted_on":"/sys/fs/cgroup","name":"tmpfs"},{"kb_size":"488245288","mounted_on":"/vagrant","name":"vagrant"},{"kb_size":"797392","mounted_on":"/run/user/1000","name":"tmpfs"}],"memory":{"swap_total":"1003516kB","total":"7973944kB"},"network":{"interfaces":[{"ipv4":"10.0.2.15","ipv4-network":"10.0.2.0/24","ipv6":"fe80::a00:27ff:fec2:be11","ipv6-network":"fe80::/64","macaddress":"08:00:27:c2:be:11","name":"eth0"},{"ipv4":"192.168.122.1","ipv4-network":"192.168.122.0/24","macaddress":"52:54:00:6f:1c:bf","name":"virbr0"}],"ipaddress":"10.0.2.15","ipaddressv6":"fe80::a00:27ff:fec2:be11","macaddress":"08:00:27:c2:be:11"},"platform":{"GOOARCH":"amd64","GOOS":"linux","goV":"1.16.7","hardware_platform":"x86_64","hostname":"vagrant","kernel_name":"Linux","kernel_release":"4.15.0-29-generic","kernel_version":"#31-Ubuntu + SMP Tue Jul 17 15:39:52 UTC 2018","machine":"x86_64","os":"GNU/Linux","processor":"x86_64","pythonV":"2.7.15rc1"}}' type: string - usage: - description: Indexed logs usage for each active retention for the month. + install_method: + $ref: '#/components/schemas/HostMetaInstallMethod' + macV: + description: An array of Mac versions. items: - $ref: '#/components/schemas/LogsRetentionSumUsage' + description: Version name. + example: Mac type: array - type: object - LogsByRetentionOrgUsage: - description: Indexed logs usage by retention for a single organization. - properties: - usage: - description: Indexed logs usage for each active retention for the organization. + machine: + description: The machine architecture. + example: amd64 + type: string + nixV: + description: Array of Unix versions. items: - $ref: '#/components/schemas/LogsRetentionSumUsage' + description: Version name. + example: Ubuntu type: array - type: object - LogsByRetentionOrgs: - description: Indexed logs usage summary for each organization for each retention - period with usage. - properties: - usage: - description: Indexed logs usage summary for each organization. + platform: + description: The OS platform. + example: linux + type: string + processor: + description: The processor. + example: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz + type: string + pythonV: + description: The Python version. + example: 3.8.11 + type: string + socket-fqdn: + description: The socket fqdn. + example: vagrant.vm. + type: string + socket-hostname: + description: The socket hostname. + example: vagrant + type: string + winV: + description: An array of Windows versions. items: - $ref: '#/components/schemas/LogsByRetentionOrgUsage' + description: Version name. + example: Windows type: array type: object - LogsExclusion: - description: Represents the index exclusion filter object from configuration - API. + HostMetaInstallMethod: + description: Agent install method. properties: - filter: - $ref: '#/components/schemas/LogsExclusionFilter' - is_enabled: - description: Whether or not the exclusion filter is active. - type: boolean - name: - description: Name of the index exclusion filter. - example: payment + installer_version: + description: The installer version. + example: install_script-1.7.1 + type: string + tool: + description: Tool used to install the agent. + example: install_script + type: string + tool_version: + description: The tool version. + example: install_script type: string - required: - - name type: object - LogsExclusionFilter: - description: Exclusion filter is defined by a query, a sampling rule, and a - active/inactive toggle. + HostMetrics: + description: Host Metrics collected. properties: - query: - description: 'Default query is `*`, meaning all logs flowing in the index - would be excluded. - - Scope down exclusion filter to only a subset of logs with a log query.' - example: '*' - type: string - sample_rate: - description: 'Sample rate to apply to logs going through this exclusion - filter, - - a value of 1.0 excludes all logs matching the query.' - example: 1.0 + cpu: + description: The percent of CPU used (everything but idle). + example: 99.0 + format: double + type: number + iowait: + description: The percent of CPU spent waiting on the IO (not reported for + all platforms). + example: 3.2 + format: double + type: number + load: + description: The system load over the last 15 minutes. + example: 0.5 format: double type: number - required: - - sample_rate type: object - LogsFilter: - description: Filter for logs. + HostMuteResponse: + description: Response with the list of muted host for your organization. properties: - query: - description: The filter query. - example: source:python + action: + description: Action applied to the hosts. + example: Muted + type: string + end: + description: POSIX timestamp in seconds when the host is unmuted. + example: 1579098130 + format: int64 + type: integer + hostname: + description: The host name. + example: test.host + type: string + message: + description: Message associated with the mute. + example: Muting this host for a test! type: string type: object - LogsIndex: - description: Object describing a Datadog Log index. + HostMuteSettings: + description: Combination of settings to mute a host. properties: - daily_limit: - description: The number of log events you can send in this index per day - before you are rate-limited. - example: 300000000 + end: + description: POSIX timestamp in seconds when the host is unmuted. If omitted, + the host remains muted until explicitly unmuted. + example: 1579098130 format: int64 type: integer - exclusion_filters: - description: 'An array of exclusion objects. The logs are tested against - the query of each filter, - - following the order of the array. Only the first matching active exclusion - matters, - - others (if any) are ignored.' - items: - $ref: '#/components/schemas/LogsExclusion' - type: array - filter: - $ref: '#/components/schemas/LogsFilter' - is_rate_limited: - description: 'A boolean stating if the index is rate limited, meaning more - logs than the daily limit have been sent. - - Rate limit is reset every-day at 2pm UTC.' + message: + description: Message to associate with the muting of this host. + example: Muting this host for a test! + type: string + override: + description: If true and the host is already muted, replaces existing host + mute settings. example: false - readOnly: true type: boolean - name: - description: The name of the index. - example: main - type: string - num_retention_days: - description: 'The number of days before logs are deleted from this index. - Available values depend on - - retention plans specified in your organization''s contract/subscriptions.' - example: 15 - format: int64 - type: integer - required: - - name - - filter type: object - LogsIndexListResponse: - description: Object with all Index configurations for a given organization. + HostTags: + description: Set of tags to associate with your host. properties: - indexes: - description: Array of Log index configurations. + host: + description: Your host name. + example: test.host + type: string + tags: + description: A list of tags to apply to the host. items: - $ref: '#/components/schemas/LogsIndex' + description: A given tag in a list. + example: environment:production + type: string type: array type: object - LogsIndexUpdateRequest: - description: Object for updating a Datadog Log index. + HostTotals: + description: Total number of host currently monitored by Datadog. properties: - daily_limit: - description: The number of log events you can send in this index per day - before you are rate-limited. - example: 300000000 + total_active: + description: Total number of active host (UP and ???) reporting to Datadog. format: int64 type: integer - disable_daily_limit: - description: 'If true, sets the `daily_limit` value to null and the index - is not limited on a daily basis (any - - specified `daily_limit` value in the request is ignored). If false or - omitted, the index''s current - - `daily_limit` is maintained.' - example: false - type: boolean - exclusion_filters: - description: 'An array of exclusion objects. The logs are tested against - the query of each filter, - - following the order of the array. Only the first matching active exclusion - matters, - - others (if any) are ignored.' - items: - $ref: '#/components/schemas/LogsExclusion' - type: array - filter: - $ref: '#/components/schemas/LogsFilter' - num_retention_days: - description: 'The number of days before logs are deleted from this index. - Available values depend on - - retention plans specified in your organization''s contract/subscriptions. - - - **Note:** Changing the retention for an index adjusts the length of retention - for all logs - - already in this index. It may also affect billing.' - example: 15 + total_up: + description: Number of host that are UP and reporting to Datadog. format: int64 type: integer - required: - - filter - type: object - LogsIndexesOrder: - description: Object containing the ordered list of log index names. - properties: - index_names: - description: 'Array of strings identifying by their name(s) the index(es) - of your organization. - - Logs are tested against the query filter of each index one by one, following - the order of the array. - - Logs are eventually stored in the first matching index.' - example: - - main - - payments - - web - items: - description: An index name. - type: string - type: array - required: - - index_names type: object - LogsListRequest: - description: Object to send with the request to retrieve a list of logs from - your Organization. + HourlyUsageAttributionBody: + description: The usage for one set of tags for one hour. properties: - index: - description: 'The log index on which the request is performed. For multi-index - organizations, - - the default is all live indexes. Historical indexes of rehydrated logs - must be specified.' - example: retention-3,retention-15 + hour: + description: The hour for the usage. + format: date-time type: string - limit: - description: Number of logs return in the response. - format: int32 - maximum: 1000 - type: integer - query: - description: The search query - following the log search syntax. - example: service:web* AND @http.status_code:[200 TO 299] + org_name: + description: The name of the organization. type: string - sort: - $ref: '#/components/schemas/LogsSort' - startAt: - description: 'Hash identifier of the first log to return in the list, available - in a log `id` attribute. - - This parameter is used for the pagination feature. - - - **Note**: This parameter is ignored if the corresponding log - - is out of the scope of the specified time window.' + public_id: + description: The organization public ID. type: string - time: - $ref: '#/components/schemas/LogsListRequestTime' - required: - - time - type: object - LogsListRequestTime: - description: Timeframe to retrieve the log from. - properties: - from: - description: Minimum timestamp for requested logs. - example: '2020-02-02T02:02:02.202Z' - format: date-time + region: + description: The region of the Datadog instance that the organization belongs + to. type: string - timezone: - description: 'Timezone can be specified both as an offset (for example "UTC+03:00") - - or a regional zone (for example "Europe/Paris").' + tag_config_source: + description: The source of the usage attribution tag configuration and the + selected tags in the format of `::://////`. type: string - to: - description: Maximum timestamp for requested logs. - example: '2020-02-20T02:02:02.202Z' - format: date-time + tags: + $ref: '#/components/schemas/UsageAttributionTagNames' + total_usage_sum: + description: Total product usage for the given tags within the hour. + format: double + type: number + updated_at: + description: Shows the most recent hour in the current month for all organizations + where usages are calculated. type: string - required: - - from - - to + usage_type: + $ref: '#/components/schemas/HourlyUsageAttributionUsageType' type: object - LogsListResponse: - description: Response object with all logs matching the request and pagination - information. + HourlyUsageAttributionMetadata: + description: The object containing document metadata. properties: - logs: - description: Array of logs matching the request and the `nextLogId` if sent. - items: - $ref: '#/components/schemas/Log' - type: array - nextLogId: - description: 'Hash identifier of the next log to return in the list. - - This parameter is used for the pagination feature.' - nullable: true - type: string - status: - description: Status of the response. - type: string + pagination: + $ref: '#/components/schemas/HourlyUsageAttributionPagination' type: object - LogsRetentionAggSumUsage: - description: Object containing indexed logs usage aggregated across organizations - and months for a retention period. + HourlyUsageAttributionPagination: + description: The metadata for the current pagination. properties: - logs_indexed_logs_usage_agg_sum: - description: Total indexed logs for this retention period. - format: int64 - type: integer - logs_live_indexed_logs_usage_agg_sum: - description: Live indexed logs for this retention period. - format: int64 - type: integer - logs_rehydrated_indexed_logs_usage_agg_sum: - description: Rehydrated indexed logs for this retention period. - format: int64 - type: integer - retention: - description: The retention period in days or "custom" for all custom retention - periods. + next_record_id: + description: The cursor to get the next results (if any). To make the next + request, use the same parameters and add `next_record_id`. + nullable: true type: string type: object - LogsRetentionSumUsage: - description: Object containing indexed logs usage grouped by retention period - and summed. + HourlyUsageAttributionResponse: + description: Response containing the hourly usage attribution by tag(s). properties: - logs_indexed_logs_usage_sum: - description: Total indexed logs for this retention period. - format: int64 - type: integer - logs_live_indexed_logs_usage_sum: - description: Live indexed logs for this retention period. - format: int64 - type: integer - logs_rehydrated_indexed_logs_usage_sum: - description: Rehydrated indexed logs for this retention period. - format: int64 - type: integer - retention: - description: The retention period in days or "custom" for all custom retention - periods. - type: string + metadata: + $ref: '#/components/schemas/HourlyUsageAttributionMetadata' + usage: + description: Get the hourly usage attribution by tag(s). + items: + $ref: '#/components/schemas/HourlyUsageAttributionBody' + type: array type: object - LogsSort: - description: Time-ascending `asc` or time-descending `desc` results. - enum: - - asc - - desc - type: string - x-enum-varnames: - - TIME_ASCENDING - - TIME_DESCENDING - MetricContentEncoding: - default: deflate - description: HTTP header used to compress the media-type. + HourlyUsageAttributionUsageType: + description: Supported products for hourly usage attribution requests. enum: - - deflate - - gzip - example: deflate - type: string - x-enum-varnames: - - DEFLATE - - GZIP - MetricMetadata: - description: Object with all metric related metadata. - properties: - description: - description: Metric description. - type: string - integration: - description: Name of the integration that sent the metric if applicable. - readOnly: true - type: string - per_unit: - description: Per unit of the metric such as `second` in `bytes per second`. - example: second - type: string - short_name: - description: A more human-readable and abbreviated version of the metric - name. - type: string - statsd_interval: - description: StatsD flush interval of the metric in seconds if applicable. - format: int64 - type: integer - type: - description: Metric type such as `gauge` or `rate`. - example: count - type: string - unit: - description: Primary unit of the metric such as `byte` or `operation`. - example: byte - type: string - type: object - MetricSearchResponse: - description: Object containing the list of metrics matching the search query. + - api_usage + - apm_fargate_usage + - apm_host_usage + - apm_usm_usage + - appsec_fargate_usage + - appsec_usage + - browser_usage + - ci_pipeline_indexed_spans_usage + - ci_test_indexed_spans_usage + - ci_visibility_itr_usage + - cloud_siem_usage + - container_excl_agent_usage + - container_usage + - cspm_containers_usage + - cspm_hosts_usage + - custom_event_usage + - custom_ingested_timeseries_usage + - custom_timeseries_usage + - cws_containers_usage + - cws_hosts_usage + - dbm_hosts_usage + - dbm_queries_usage + - estimated_indexed_logs_usage + - estimated_indexed_spans_usage + - estimated_ingested_logs_usage + - estimated_ingested_spans_usage + - estimated_rum_sessions_usage + - fargate_usage + - functions_usage + - indexed_spans_usage + - infra_host_usage + - ingested_logs_bytes_usage + - ingested_spans_bytes_usage + - invocations_usage + - lambda_traced_invocations_usage + - logs_indexed_15day_usage + - logs_indexed_180day_usage + - logs_indexed_30day_usage + - logs_indexed_360day_usage + - logs_indexed_3day_usage + - logs_indexed_45day_usage + - logs_indexed_60day_usage + - logs_indexed_7day_usage + - logs_indexed_90day_usage + - logs_indexed_custom_retention_usage + - mobile_app_testing_usage + - ndm_netflow_usage + - npm_host_usage + - obs_pipeline_bytes_usage + - profiled_container_usage + - profiled_fargate_usage + - profiled_host_usage + - rum_browser_mobile_sessions_usage + - rum_replay_sessions_usage + - sds_scanned_bytes_usage + - serverless_apps_usage + - siem_ingested_bytes_usage + - snmp_usage + - universal_service_monitoring_usage + - vuln_management_hosts_usage + type: string + x-enum-varnames: + - API_USAGE + - APM_FARGATE_USAGE + - APM_HOST_USAGE + - APM_USM_USAGE + - APPSEC_FARGATE_USAGE + - APPSEC_USAGE + - BROWSER_USAGE + - CI_PIPELINE_INDEXED_SPANS_USAGE + - CI_TEST_INDEXED_SPANS_USAGE + - CI_VISIBILITY_ITR_USAGE + - CLOUD_SIEM_USAGE + - CONTAINER_EXCL_AGENT_USAGE + - CONTAINER_USAGE + - CSPM_CONTAINERS_USAGE + - CSPM_HOSTS_USAGE + - CUSTOM_EVENT_USAGE + - CUSTOM_INGESTED_TIMESERIES_USAGE + - CUSTOM_TIMESERIES_USAGE + - CWS_CONTAINERS_USAGE + - CWS_HOSTS_USAGE + - DBM_HOSTS_USAGE + - DBM_QUERIES_USAGE + - ESTIMATED_INDEXED_LOGS_USAGE + - ESTIMATED_INDEXED_SPANS_USAGE + - ESTIMATED_INGESTED_LOGS_USAGE + - ESTIMATED_INGESTED_SPANS_USAGE + - ESTIMATED_RUM_SESSIONS_USAGE + - FARGATE_USAGE + - FUNCTIONS_USAGE + - INDEXED_SPANS_USAGE + - INFRA_HOST_USAGE + - INGESTED_LOGS_BYTES_USAGE + - INGESTED_SPANS_BYTES_USAGE + - INVOCATIONS_USAGE + - LAMBDA_TRACED_INVOCATIONS_USAGE + - LOGS_INDEXED_15DAY_USAGE + - LOGS_INDEXED_180DAY_USAGE + - LOGS_INDEXED_30DAY_USAGE + - LOGS_INDEXED_360DAY_USAGE + - LOGS_INDEXED_3DAY_USAGE + - LOGS_INDEXED_45DAY_USAGE + - LOGS_INDEXED_60DAY_USAGE + - LOGS_INDEXED_7DAY_USAGE + - LOGS_INDEXED_90DAY_USAGE + - LOGS_INDEXED_CUSTOM_RETENTION_USAGE + - MOBILE_APP_TESTING_USAGE + - NDM_NETFLOW_USAGE + - NPM_HOST_USAGE + - OBS_PIPELINE_BYTES_USAGE + - PROFILED_CONTAINER_USAGE + - PROFILED_FARGATE_USAGE + - PROFILED_HOST_USAGE + - RUM_BROWSER_MOBILE_SESSIONS_USAGE + - RUM_REPLAY_SESSIONS_USAGE + - SDS_SCANNED_BYTES_USAGE + - SERVERLESS_APPS_USAGE + - SIEM_INGESTED_BYTES_USAGE + - SNMP_USAGE + - UNIVERSAL_SERVICE_MONITORING_USAGE + - VULN_MANAGEMENT_HOSTS_USAGE + IFrameWidgetDefinition: + description: The iframe widget allows you to embed a portion of any other web + page on your dashboard. Only available on FREE layout dashboards. properties: - results: - $ref: '#/components/schemas/MetricSearchResponseResults' + type: + $ref: '#/components/schemas/IFrameWidgetDefinitionType' + url: + description: URL of the iframe. + example: '' + type: string + required: + - type + - url type: object - MetricSearchResponseResults: - description: Search result. + IFrameWidgetDefinitionType: + default: iframe + description: Type of the iframe widget. + enum: + - iframe + example: iframe + type: string + x-enum-varnames: + - IFRAME + IPPrefixesAPI: + description: Available prefix information for the API endpoints. properties: - metrics: - description: List of metrics that match the search query. + prefixes_ipv4: + description: List of IPv4 prefixes. items: - description: Metric name. + description: IPv4 prefix + type: string + type: array + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix type: string type: array type: object - MetricsListResponse: - description: Object listing all metric names stored by Datadog since a given - time. + IPPrefixesAPM: + description: Available prefix information for the APM endpoints. properties: - from: - description: Time when the metrics were active, seconds since the Unix epoch. - type: string - metrics: - description: List of metric names. + prefixes_ipv4: + description: List of IPv4 prefixes. items: - description: A metric name. + description: IPv4 prefix + type: string + type: array + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix type: string type: array type: object - MetricsPayload: - description: The metrics' payload. + IPPrefixesAgents: + description: Available prefix information for the Agent endpoints. properties: - series: - description: A list of time series to submit to Datadog. - example: - - metric: system.load.1 - points: - - - 1475317847.0 - - 0.7 + prefixes_ipv4: + description: List of IPv4 prefixes. items: - $ref: '#/components/schemas/Series' + description: IPv4 prefix + type: string + type: array + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix + type: string type: array - required: - - series type: object - MetricsQueryMetadata: - description: Object containing all metric names returned and their associated - metadata. + IPPrefixesGlobal: + description: Available prefix information for all Datadog endpoints. properties: - aggr: - description: Aggregation type. - example: avg - nullable: true - readOnly: true - type: string - display_name: - description: Display name of the metric. - example: system.cpu.idle - readOnly: true - type: string - end: - description: End of the time window, milliseconds since Unix epoch. - format: int64 - readOnly: true - type: integer - expression: - description: Metric expression. - example: system.cpu.idle{host:foo,env:test} - readOnly: true - type: string - interval: - description: Number of milliseconds between data samples. - format: int64 - readOnly: true - type: integer - length: - description: Number of data samples. - format: int64 - readOnly: true - type: integer - metric: - description: Metric name. - example: system.cpu.idle - readOnly: true - type: string - pointlist: - description: List of points of the time series in milliseconds. - example: - - - 1681683300000.0 - - 77.62145685254418 + prefixes_ipv4: + description: List of IPv4 prefixes. items: - $ref: '#/components/schemas/Point' - readOnly: true + description: IPv4 prefix + type: string type: array - query_index: - description: The index of the series' query within the request. - format: int64 - readOnly: true - type: integer - scope: - description: Metric scope, comma separated list of tags. - example: host:foo,env:test - readOnly: true - type: string - start: - description: Start of the time window, milliseconds since Unix epoch. - format: int64 - readOnly: true - type: integer - tag_set: - description: Unique tags identifying this series. + prefixes_ipv6: + description: List of IPv6 prefixes. items: - description: Unique tags identifying this series. + description: IPv6 prefix type: string - readOnly: true - type: array - unit: - description: 'Detailed information about the metric unit. - - The first element describes the "primary unit" (for example, `bytes` in - `bytes per second`). - - The second element describes the "per unit" (for example, `second` in - `bytes per second`). - - If the second element is not present, the API returns null.' - items: - $ref: '#/components/schemas/MetricsQueryUnit' - maxItems: 2 - minItems: 2 - readOnly: true type: array type: object - MetricsQueryResponse: - description: Response Object that includes your query and the list of metrics - retrieved. + IPPrefixesLogs: + description: Available prefix information for the Logs endpoints. properties: - error: - description: Message indicating the errors if status is not `ok`. - readOnly: true - type: string - from_date: - description: Start of requested time window, milliseconds since Unix epoch. - format: int64 - readOnly: true - type: integer - group_by: - description: List of tag keys on which to group. + prefixes_ipv4: + description: List of IPv4 prefixes. items: - description: Tag key to group by your metric. + description: IPv4 prefix type: string - readOnly: true type: array - message: - description: Message indicating `success` if status is `ok`. - readOnly: true - type: string - query: - description: Query string - readOnly: true - type: string - res_type: - description: Type of response. - example: time_series - readOnly: true - type: string - series: - description: List of timeseries queried. + prefixes_ipv6: + description: List of IPv6 prefixes. items: - $ref: '#/components/schemas/MetricsQueryMetadata' - readOnly: true + description: IPv6 prefix + type: string type: array - status: - description: Status of the query. - example: ok - readOnly: true - type: string - to_date: - description: End of requested time window, milliseconds since Unix epoch. - format: int64 - readOnly: true - type: integer type: object - MetricsQueryUnit: - description: Object containing the metric unit family, scale factor, name, and - short name. - nullable: true + IPPrefixesOrchestrator: + description: Available prefix information for the Orchestrator endpoints. properties: - family: - description: Unit family, allows for conversion between units of the same - family, for scaling. - example: time - readOnly: true - type: string - name: - description: Unit name - example: minute - readOnly: true - type: string - plural: - description: Plural form of the unit name. - example: minutes - readOnly: true - type: string - scale_factor: - description: Factor for scaling between units of the same family. - example: 60.0 - format: double - readOnly: true - type: number - short_name: - description: Abbreviation of the unit. - example: min - readOnly: true - type: string + prefixes_ipv4: + description: List of IPv4 prefixes. + items: + description: IPv4 prefix + type: string + type: array + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix + type: string + type: array type: object - MonthlyUsageAttributionBody: - description: Usage Summary by tag for a given organization. + IPPrefixesProcess: + description: Available prefix information for the Process endpoints. properties: - month: - description: 'Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM].' - format: date-time - type: string - org_name: - description: The name of the organization. - type: string - public_id: - description: The organization public ID. - type: string - region: - description: The region of the Datadog instance that the organization belongs - to. - type: string - tag_config_source: - description: The source of the usage attribution tag configuration and the - selected tags in the format `::://////`. - type: string - tags: - $ref: '#/components/schemas/UsageAttributionTagNames' - updated_at: - description: Datetime of the most recent update to the usage values. - format: date-time - type: string - values: - $ref: '#/components/schemas/MonthlyUsageAttributionValues' + prefixes_ipv4: + description: List of IPv4 prefixes. + items: + description: IPv4 prefix + type: string + type: array + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix + type: string + type: array type: object - MonthlyUsageAttributionMetadata: - description: The object containing document metadata. + IPPrefixesRemoteConfiguration: + description: Available prefix information for the Remote Configuration endpoints. properties: - aggregates: - $ref: '#/components/schemas/UsageAttributionAggregates' - pagination: - $ref: '#/components/schemas/MonthlyUsageAttributionPagination' + prefixes_ipv4: + description: List of IPv4 prefixes. + items: + description: IPv4 prefix + type: string + type: array + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix + type: string + type: array type: object - MonthlyUsageAttributionPagination: - description: The metadata for the current pagination. + IPPrefixesSynthetics: + description: Available prefix information for the Synthetics endpoints. properties: - next_record_id: - description: The cursor to use to get the next results, if any. To make - the next request, use the same parameters with the addition of the `next_record_id`. - nullable: true - type: string + prefixes_ipv4: + description: List of IPv4 prefixes. + items: + description: IPv4 prefix + type: string + type: array + prefixes_ipv4_by_location: + additionalProperties: + description: List of IPv4 prefixes. + items: + description: IPv4 prefix. + type: string + type: array + description: List of IPv4 prefixes by location. + type: object + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix + type: string + type: array + prefixes_ipv6_by_location: + additionalProperties: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix. + type: string + type: array + description: List of IPv6 prefixes by location. + type: object type: object - MonthlyUsageAttributionResponse: - description: Response containing the monthly Usage Summary by tag(s). + IPPrefixesSyntheticsPrivateLocations: + description: Available prefix information for the Synthetics Private Locations + endpoints. properties: - metadata: - $ref: '#/components/schemas/MonthlyUsageAttributionMetadata' - usage: - description: Get usage summary by tag(s). + prefixes_ipv4: + description: List of IPv4 prefixes. items: - $ref: '#/components/schemas/MonthlyUsageAttributionBody' + description: IPv4 prefix + type: string type: array - type: object - MonthlyUsageAttributionSupportedMetrics: - description: Supported metrics for monthly usage attribution requests. - enum: - - api_usage - - api_percentage - - apm_fargate_usage - - apm_fargate_percentage - - appsec_fargate_usage - - appsec_fargate_percentage - - apm_host_usage - - apm_host_percentage - - apm_usm_usage - - apm_usm_percentage - - appsec_usage - - appsec_percentage - - browser_usage - - browser_percentage - - ci_visibility_itr_usage - - ci_visibility_itr_percentage - - cloud_siem_usage - - cloud_siem_percentage - - container_excl_agent_usage - - container_excl_agent_percentage - - container_usage - - container_percentage - - cspm_containers_percentage - - cspm_containers_usage - - cspm_hosts_percentage - - cspm_hosts_usage - - custom_timeseries_usage - - custom_timeseries_percentage - - custom_ingested_timeseries_usage - - custom_ingested_timeseries_percentage - - cws_containers_percentage - - cws_containers_usage - - cws_hosts_percentage - - cws_hosts_usage - - dbm_hosts_percentage - - dbm_hosts_usage - - dbm_queries_percentage - - dbm_queries_usage - - estimated_indexed_logs_usage - - estimated_indexed_logs_percentage - - estimated_ingested_logs_usage - - estimated_ingested_logs_percentage - - estimated_indexed_spans_usage - - estimated_indexed_spans_percentage - - estimated_ingested_spans_usage - - estimated_ingested_spans_percentage - - fargate_usage - - fargate_percentage - - functions_usage - - functions_percentage - - infra_host_usage - - infra_host_percentage - - invocations_usage - - invocations_percentage - - lambda_traced_invocations_usage - - lambda_traced_invocations_percentage - - mobile_app_testing_percentage - - mobile_app_testing_usage - - ndm_netflow_usage - - ndm_netflow_percentage - - npm_host_usage - - npm_host_percentage - - obs_pipeline_bytes_usage - - obs_pipeline_bytes_percentage - - profiled_container_usage - - profiled_container_percentage - - profiled_fargate_usage - - profiled_fargate_percentage - - profiled_host_usage - - profiled_host_percentage - - serverless_apps_usage - - serverless_apps_percentage - - snmp_usage - - snmp_percentage - - estimated_rum_sessions_usage - - estimated_rum_sessions_percentage - - universal_service_monitoring_usage - - universal_service_monitoring_percentage - - vuln_management_hosts_usage - - vuln_management_hosts_percentage - - sds_scanned_bytes_usage - - sds_scanned_bytes_percentage - - ci_test_indexed_spans_usage - - ci_test_indexed_spans_percentage - - ingested_logs_bytes_usage - - ingested_logs_bytes_percentage - - ci_pipeline_indexed_spans_usage - - ci_pipeline_indexed_spans_percentage - - indexed_spans_usage - - indexed_spans_percentage - - custom_event_usage - - custom_event_percentage - - logs_indexed_custom_retention_usage - - logs_indexed_custom_retention_percentage - - logs_indexed_360day_usage - - logs_indexed_360day_percentage - - logs_indexed_180day_usage - - logs_indexed_180day_percentage - - logs_indexed_90day_usage - - logs_indexed_90day_percentage - - logs_indexed_60day_usage - - logs_indexed_60day_percentage - - logs_indexed_45day_usage - - logs_indexed_45day_percentage - - logs_indexed_30day_usage - - logs_indexed_30day_percentage - - logs_indexed_15day_usage - - logs_indexed_15day_percentage - - logs_indexed_7day_usage - - logs_indexed_7day_percentage - - logs_indexed_3day_usage - - logs_indexed_3day_percentage - - rum_replay_sessions_usage - - rum_replay_sessions_percentage - - rum_browser_mobile_sessions_usage - - rum_browser_mobile_sessions_percentage - - ingested_spans_bytes_usage - - ingested_spans_bytes_percentage - - siem_ingested_bytes_usage - - siem_ingested_bytes_percentage - - '*' + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix + type: string + type: array + type: object + IPPrefixesWebhooks: + description: Available prefix information for the Webhook endpoints. + properties: + prefixes_ipv4: + description: List of IPv4 prefixes. + items: + description: IPv4 prefix + type: string + type: array + prefixes_ipv6: + description: List of IPv6 prefixes. + items: + description: IPv6 prefix + type: string + type: array + type: object + IPRanges: + description: IP ranges. + properties: + agents: + $ref: '#/components/schemas/IPPrefixesAgents' + api: + $ref: '#/components/schemas/IPPrefixesAPI' + apm: + $ref: '#/components/schemas/IPPrefixesAPM' + global: + $ref: '#/components/schemas/IPPrefixesGlobal' + logs: + $ref: '#/components/schemas/IPPrefixesLogs' + modified: + description: Date when last updated, in the form `YYYY-MM-DD-hh-mm-ss`. + example: 2019-10-31-20-00-00 + type: string + orchestrator: + $ref: '#/components/schemas/IPPrefixesOrchestrator' + process: + $ref: '#/components/schemas/IPPrefixesProcess' + remote-configuration: + $ref: '#/components/schemas/IPPrefixesRemoteConfiguration' + synthetics: + $ref: '#/components/schemas/IPPrefixesSynthetics' + synthetics-private-locations: + $ref: '#/components/schemas/IPPrefixesSyntheticsPrivateLocations' + version: + description: Version of the IP list. + example: 11 + format: int64 + type: integer + webhooks: + $ref: '#/components/schemas/IPPrefixesWebhooks' + type: object + IdpFormData: + description: Object describing the IdP configuration. + properties: + idp_file: + description: The path to the XML metadata file you wish to upload. + example: '' + format: binary + type: string + required: + - idp_file + type: object + IdpResponse: + description: The IdP response object. + properties: + message: + description: Identity provider response. + example: IdP metadata successfully uploaded for example org + type: string + required: + - message + type: object + ImageWidgetDefinition: + description: The image widget allows you to embed an image on your dashboard. + An image can be a PNG, JPG, or animated GIF. Only available on FREE layout + dashboards. + properties: + has_background: + default: true + description: Whether to display a background or not. + example: true + type: boolean + has_border: + default: true + description: Whether to display a border or not. + example: true + type: boolean + horizontal_align: + $ref: '#/components/schemas/WidgetHorizontalAlign' + margin: + $ref: '#/components/schemas/WidgetMargin' + sizing: + $ref: '#/components/schemas/WidgetImageSizing' + type: + $ref: '#/components/schemas/ImageWidgetDefinitionType' + url: + description: URL of the image. + example: https://example.com/image.png + type: string + url_dark_theme: + description: URL of the image in dark mode. + example: https://example.com/image-dark-mode.png + type: string + vertical_align: + $ref: '#/components/schemas/WidgetVerticalAlign' + required: + - type + - url + type: object + ImageWidgetDefinitionType: + default: image + description: Type of the image widget. + enum: + - image + example: image type: string x-enum-varnames: - - API_USAGE - - API_PERCENTAGE - - APM_FARGATE_USAGE - - APM_FARGATE_PERCENTAGE - - APPSEC_FARGATE_USAGE - - APPSEC_FARGATE_PERCENTAGE - - APM_HOST_USAGE - - APM_HOST_PERCENTAGE - - APM_USM_USAGE - - APM_USM_PERCENTAGE - - APPSEC_USAGE - - APPSEC_PERCENTAGE - - BROWSER_USAGE - - BROWSER_PERCENTAGE - - CI_VISIBILITY_ITR_USAGE - - CI_VISIBILITY_ITR_PERCENTAGE - - CLOUD_SIEM_USAGE - - CLOUD_SIEM_PERCENTAGE - - CONTAINER_EXCL_AGENT_USAGE - - CONTAINER_EXCL_AGENT_PERCENTAGE - - CONTAINER_USAGE - - CONTAINER_PERCENTAGE - - CSPM_CONTAINERS_PERCENTAGE - - CSPM_CONTAINERS_USAGE - - CSPM_HOSTS_PERCENTAGE - - CSPM_HOSTS_USAGE - - CUSTOM_TIMESERIES_USAGE - - CUSTOM_TIMESERIES_PERCENTAGE - - CUSTOM_INGESTED_TIMESERIES_USAGE - - CUSTOM_INGESTED_TIMESERIES_PERCENTAGE - - CWS_CONTAINERS_PERCENTAGE - - CWS_CONTAINERS_USAGE - - CWS_HOSTS_PERCENTAGE - - CWS_HOSTS_USAGE - - DBM_HOSTS_PERCENTAGE - - DBM_HOSTS_USAGE - - DBM_QUERIES_PERCENTAGE - - DBM_QUERIES_USAGE - - ESTIMATED_INDEXED_LOGS_USAGE - - ESTIMATED_INDEXED_LOGS_PERCENTAGE - - ESTIMATED_INGESTED_LOGS_USAGE - - ESTIMATED_INGESTED_LOGS_PERCENTAGE - - ESTIMATED_INDEXED_SPANS_USAGE - - ESTIMATED_INDEXED_SPANS_PERCENTAGE - - ESTIMATED_INGESTED_SPANS_USAGE - - ESTIMATED_INGESTED_SPANS_PERCENTAGE - - FARGATE_USAGE - - FARGATE_PERCENTAGE - - FUNCTIONS_USAGE - - FUNCTIONS_PERCENTAGE - - INFRA_HOST_USAGE - - INFRA_HOST_PERCENTAGE - - INVOCATIONS_USAGE - - INVOCATIONS_PERCENTAGE - - LAMBDA_TRACED_INVOCATIONS_USAGE - - LAMBDA_TRACED_INVOCATIONS_PERCENTAGE - - MOBILE_APP_TESTING_USAGE - - MOBILE_APP_TESTING_PERCENTAGE - - NDM_NETFLOW_USAGE - - NDM_NETFLOW_PERCENTAGE - - NPM_HOST_USAGE - - NPM_HOST_PERCENTAGE - - OBS_PIPELINE_BYTES_USAGE - - OBS_PIPELINE_BYTES_PERCENTAGE - - PROFILED_CONTAINER_USAGE - - PROFILED_CONTAINER_PERCENTAGE - - PROFILED_FARGATE_USAGE - - PROFILED_FARGATE_PERCENTAGE - - PROFILED_HOST_USAGE - - PROFILED_HOST_PERCENTAGE - - SERVERLESS_APPS_USAGE - - SERVERLESS_APPS_PERCENTAGE - - SNMP_USAGE - - SNMP_PERCENTAGE - - ESTIMATED_RUM_SESSIONS_USAGE - - ESTIMATED_RUM_SESSIONS_PERCENTAGE - - UNIVERSAL_SERVICE_MONITORING_USAGE - - UNIVERSAL_SERVICE_MONITORING_PERCENTAGE - - VULN_MANAGEMENT_HOSTS_USAGE - - VULN_MANAGEMENT_HOSTS_PERCENTAGE - - SDS_SCANNED_BYTES_USAGE - - SDS_SCANNED_BYTES_PERCENTAGE - - CI_TEST_INDEXED_SPANS_USAGE - - CI_TEST_INDEXED_SPANS_PERCENTAGE - - INGESTED_LOGS_BYTES_USAGE - - INGESTED_LOGS_BYTES_PERCENTAGE - - CI_PIPELINE_INDEXED_SPANS_USAGE - - CI_PIPELINE_INDEXED_SPANS_PERCENTAGE - - INDEXED_SPANS_USAGE - - INDEXED_SPANS_PERCENTAGE - - CUSTOM_EVENT_USAGE - - CUSTOM_EVENT_PERCENTAGE - - LOGS_INDEXED_CUSTOM_RETENTION_USAGE - - LOGS_INDEXED_CUSTOM_RETENTION_PERCENTAGE - - LOGS_INDEXED_360DAY_USAGE - - LOGS_INDEXED_360DAY_PERCENTAGE - - LOGS_INDEXED_180DAY_USAGE - - LOGS_INDEXED_180DAY_PERCENTAGE - - LOGS_INDEXED_90DAY_USAGE - - LOGS_INDEXED_90DAY_PERCENTAGE - - LOGS_INDEXED_60DAY_USAGE - - LOGS_INDEXED_60DAY_PERCENTAGE - - LOGS_INDEXED_45DAY_USAGE - - LOGS_INDEXED_45DAY_PERCENTAGE - - LOGS_INDEXED_30DAY_USAGE - - LOGS_INDEXED_30DAY_PERCENTAGE - - LOGS_INDEXED_15DAY_USAGE - - LOGS_INDEXED_15DAY_PERCENTAGE - - LOGS_INDEXED_7DAY_USAGE - - LOGS_INDEXED_7DAY_PERCENTAGE - - LOGS_INDEXED_3DAY_USAGE - - LOGS_INDEXED_3DAY_PERCENTAGE - - RUM_REPLAY_SESSIONS_USAGE - - RUM_REPLAY_SESSIONS_PERCENTAGE - - RUM_BROWSER_MOBILE_SESSIONS_USAGE - - RUM_BROWSER_MOBILE_SESSIONS_PERCENTAGE - - INGESTED_SPANS_BYTES_USAGE - - INGESTED_SPANS_BYTES_PERCENTAGE - - SIEM_INGESTED_BYTES_USAGE - - SIEM_INGESTED_BYTES_PERCENTAGE - - ALL - MonthlyUsageAttributionValues: - description: Fields in Usage Summary by tag(s). + - IMAGE + IntakePayloadAccepted: + description: The payload accepted for intake. properties: - api_percentage: - description: The percentage of synthetic API test usage by tag(s). - format: double - type: number - api_usage: - description: The synthetic API test usage by tag(s). - format: double - type: number - apm_fargate_percentage: - description: The percentage of APM ECS Fargate task usage by tag(s). - format: double - type: number - apm_fargate_usage: - description: The APM ECS Fargate task usage by tag(s). - format: double - type: number - apm_host_percentage: - description: The percentage of APM host usage by tag(s). - format: double - type: number - apm_host_usage: - description: The APM host usage by tag(s). - format: double - type: number - apm_usm_percentage: - description: The percentage of APM and Universal Service Monitoring host - usage by tag(s). - format: double - type: number - apm_usm_usage: - description: The APM and Universal Service Monitoring host usage by tag(s). - format: double - type: number - appsec_fargate_percentage: - description: The percentage of Application Security Monitoring ECS Fargate - task usage by tag(s). - format: double - type: number - appsec_fargate_usage: - description: The Application Security Monitoring ECS Fargate task usage - by tag(s). - format: double - type: number - appsec_percentage: - description: The percentage of Application Security Monitoring host usage - by tag(s). - format: double - type: number - appsec_usage: - description: The Application Security Monitoring host usage by tag(s). - format: double - type: number - browser_percentage: - description: The percentage of synthetic browser test usage by tag(s). - format: double - type: number - browser_usage: - description: The synthetic browser test usage by tag(s). - format: double - type: number - ci_pipeline_indexed_spans_percentage: - description: The percentage of CI Pipeline Indexed Spans usage by tag(s). - format: double - type: number - ci_pipeline_indexed_spans_usage: - description: The total CI Pipeline Indexed Spans usage by tag(s). - format: double - type: number - ci_test_indexed_spans_percentage: - description: The percentage of CI Test Indexed Spans usage by tag(s). - format: double - type: number - ci_test_indexed_spans_usage: - description: The total CI Test Indexed Spans usage by tag(s). - format: double - type: number - ci_visibility_itr_percentage: - description: The percentage of Git committers for Intelligent Test Runner - usage by tag(s). - format: double - type: number - ci_visibility_itr_usage: - description: The Git committers for Intelligent Test Runner usage by tag(s). - format: double - type: number - cloud_siem_percentage: - description: The percentage of Cloud Security Information and Event Management - usage by tag(s). - format: double - type: number - cloud_siem_usage: - description: The Cloud Security Information and Event Management usage by - tag(s). - format: double - type: number - container_excl_agent_percentage: - description: The percentage of container usage without the Datadog Agent - by tag(s). - format: double - type: number - container_excl_agent_usage: - description: The container usage without the Datadog Agent by tag(s). - format: double - type: number - container_percentage: - description: The percentage of container usage by tag(s). - format: double - type: number - container_usage: - description: The container usage by tag(s). - format: double - type: number - cspm_containers_percentage: - description: The percentage of Cloud Security Management Pro container usage - by tag(s). - format: double - type: number - cspm_containers_usage: - description: The Cloud Security Management Pro container usage by tag(s). - format: double - type: number - cspm_hosts_percentage: - description: The percentage of Cloud Security Management Pro host usage - by tag(s). - format: double - type: number - cspm_hosts_usage: - description: The Cloud Security Management Pro host usage by tag(s). - format: double - type: number - custom_event_percentage: - description: The percentage of Custom Events usage by tag(s). - format: double - type: number - custom_event_usage: - description: The total Custom Events usage by tag(s). - format: double - type: number - custom_ingested_timeseries_percentage: - description: The percentage of ingested custom metrics usage by tag(s). - format: double - type: number - custom_ingested_timeseries_usage: - description: The ingested custom metrics usage by tag(s). - format: double - type: number - custom_timeseries_percentage: - description: The percentage of indexed custom metrics usage by tag(s). - format: double - type: number - custom_timeseries_usage: - description: The indexed custom metrics usage by tag(s). - format: double - type: number - cws_containers_percentage: - description: The percentage of Cloud Workload Security container usage by - tag(s). - format: double - type: number - cws_containers_usage: - description: The Cloud Workload Security container usage by tag(s). - format: double - type: number - cws_hosts_percentage: - description: The percentage of Cloud Workload Security host usage by tag(s). - format: double - type: number - cws_hosts_usage: - description: The Cloud Workload Security host usage by tag(s). - format: double - type: number - dbm_hosts_percentage: + status: + description: The status of the intake payload. + example: ok + type: string + type: object + ListStreamColumn: + description: Widget column. + example: + field: timestamp + width: auto + properties: + field: + description: Widget column field. + example: content + type: string + width: + $ref: '#/components/schemas/ListStreamColumnWidth' + required: + - width + - field + type: object + ListStreamColumnWidth: + description: Widget column width. + enum: + - auto + - compact + - full + example: compact + type: string + x-enum-varnames: + - AUTO + - COMPACT + - FULL + ListStreamComputeAggregation: + description: Aggregation value. + enum: + - count + - cardinality + - median + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + - earliest + - latest + - most_frequent + example: count + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - MEDIAN + - PC75 + - PC90 + - PC95 + - PC98 + - PC99 + - SUM + - MIN + - MAX + - AVG + - EARLIEST + - LATEST + - MOST_FREQUENT + ListStreamComputeItems: + description: List of facets and aggregations which to compute. + properties: + aggregation: + $ref: '#/components/schemas/ListStreamComputeAggregation' + facet: + description: Facet name. + example: resource_name + type: string + required: + - aggregation + type: object + ListStreamGroupByItems: + description: List of facets on which to group. + properties: + facet: + description: Facet name. + example: resource_name + type: string + required: + - facet + type: object + ListStreamQuery: + description: Updated list stream widget. + properties: + compute: + description: Compute configuration for the List Stream Widget. Compute can + be used only with the logs_transaction_stream (from 1 to 5 items) list + stream source. + items: + $ref: '#/components/schemas/ListStreamComputeItems' + maxItems: 5 + minItems: 1 + type: array + data_source: + $ref: '#/components/schemas/ListStreamSource' + event_size: + $ref: '#/components/schemas/WidgetEventSize' + group_by: + description: Group by configuration for the List Stream Widget. Group by + can be used only with logs_pattern_stream (up to 3 items) or logs_transaction_stream + (one group by item is required) list stream source. + items: + $ref: '#/components/schemas/ListStreamGroupByItems' + maxItems: 3 + type: array + indexes: + description: List of indexes. + items: + description: Index. + type: string + type: array + query_string: + description: Widget query. + example: '@service:app' + type: string + sort: + $ref: '#/components/schemas/WidgetFieldSort' + storage: + description: Option for storage location. Feature in Private Beta. + example: indexes + type: string + required: + - query_string + - data_source + type: object + ListStreamResponseFormat: + description: Widget response format. + enum: + - event_list + example: event_list + type: string + x-enum-varnames: + - EVENT_LIST + ListStreamSource: + default: apm_issue_stream + description: Source from which to query items to display in the stream. + enum: + - logs_stream + - audit_stream + - ci_pipeline_stream + - ci_test_stream + - rum_issue_stream + - apm_issue_stream + - trace_stream + - logs_issue_stream + - logs_pattern_stream + - logs_transaction_stream + - event_stream + example: apm_issue_stream + type: string + x-enum-varnames: + - LOGS_STREAM + - AUDIT_STREAM + - CI_PIPELINE_STREAM + - CI_TEST_STREAM + - RUM_ISSUE_STREAM + - APM_ISSUE_STREAM + - TRACE_STREAM + - LOGS_ISSUE_STREAM + - LOGS_PATTERN_STREAM + - LOGS_TRANSACTION_STREAM + - EVENT_STREAM + ListStreamWidgetDefinition: + description: 'The list stream visualization displays a table of recent events + in your application that + + match a search criteria using user-defined columns. + + ' + properties: + legend_size: + $ref: '#/components/schemas/WidgetLegendSize' + requests: + description: Request payload used to query items. + example: + - columns: + - field: timestamp + width: auto + query: + data_source: apm_issue_stream + query_string: '@data_source:APM' + response_format: event_list + items: + $ref: '#/components/schemas/ListStreamWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + show_legend: + description: Whether or not to display the legend on this widget. + type: boolean + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/ListStreamWidgetDefinitionType' + required: + - type + - requests + type: object + ListStreamWidgetDefinitionType: + default: list_stream + description: Type of the list stream widget. + enum: + - list_stream + example: list_stream + type: string + x-enum-varnames: + - LIST_STREAM + ListStreamWidgetRequest: + description: Updated list stream widget. + properties: + columns: + description: Widget columns. + example: + - field: timestamp + width: auto + - field: content + width: full + items: + $ref: '#/components/schemas/ListStreamColumn' + type: array + query: + $ref: '#/components/schemas/ListStreamQuery' + response_format: + $ref: '#/components/schemas/ListStreamResponseFormat' + required: + - columns + - query + - response_format + type: object + Log: + description: Object describing a log after being processed and stored by Datadog. + properties: + content: + $ref: '#/components/schemas/LogContent' + id: + description: Unique ID of the Log. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: object + LogContent: + description: JSON object containing all log attributes and their associated + values. + properties: + attributes: + additionalProperties: {} + description: JSON object of attributes from your log. + example: + customAttribute: 123 + duration: 2345 + type: object + host: + description: Name of the machine from where the logs are being sent. + example: i-0123 + type: string + message: + description: 'The message [reserved attribute](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes) + + of your log. By default, Datadog ingests the value of the message attribute + as the body of the log entry. + + That value is then highlighted and displayed in the Logstream, where it + is indexed for full text search.' + example: Host connected to remote + type: string + service: + description: 'The name of the application or service generating the log + events. + + It is used to switch from Logs to APM, so make sure you define the same + + value when you use both products.' + example: agent + type: string + tags: + description: Array of tags associated with your log. + example: + - team:A + items: + description: Tag associated with your log. + type: string + type: array + timestamp: + description: Timestamp of your log. + example: '2020-05-26T13:36:14Z' + format: date-time + type: string + type: object + LogQueryDefinition: + description: The log query. + properties: + compute: + $ref: '#/components/schemas/LogsQueryCompute' + group_by: + description: List of tag prefixes to group by in the case of a cluster check. + items: + $ref: '#/components/schemas/LogQueryDefinitionGroupBy' + type: array + index: + description: A coma separated-list of index names. Use "*" query all indexes + at once. [Multiple Indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes) + example: days-3,days-7 + type: string + multi_compute: + description: This field is mutually exclusive with `compute`. + items: + $ref: '#/components/schemas/LogsQueryCompute' + type: array + search: + $ref: '#/components/schemas/LogQueryDefinitionSearch' + type: object + LogQueryDefinitionGroupBy: + description: Defined items in the group. + properties: + facet: + description: Facet name. + example: resource_name + type: string + limit: + description: Maximum number of items in the group. + example: 50 + format: int64 + type: integer + sort: + $ref: '#/components/schemas/LogQueryDefinitionGroupBySort' + required: + - facet + type: object + LogQueryDefinitionGroupBySort: + description: Define a sorting method. + properties: + aggregation: + description: The aggregation method. + example: avg + type: string + facet: + description: Facet name. + example: '@string_query.interval' + type: string + order: + $ref: '#/components/schemas/WidgetSort' + required: + - aggregation + - order + type: object + LogQueryDefinitionSearch: + description: The query being made on the logs. + properties: + query: + description: Search value to apply. + example: '' + type: string + required: + - query + type: object + LogStreamWidgetDefinition: + description: The Log Stream displays a log flow matching the defined query. + Only available on FREE layout dashboards. + properties: + columns: + description: Which columns to display on the widget. + items: + description: Column name. + type: string + type: array + indexes: + description: An array of index names to query in the stream. Use [] to query + all indexes at once. + example: + - days-3 + - days-7 + items: + description: One of the log indexes set up for your organization. [Multiple + Indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes) + type: string + type: array + logset: + deprecated: true + description: ID of the log set to use. + type: string + message_display: + $ref: '#/components/schemas/WidgetMessageDisplay' + query: + description: Query to filter the log stream with. + type: string + show_date_column: + description: Whether to show the date column or not + type: boolean + show_message_column: + description: Whether to show the message column or not + type: boolean + sort: + $ref: '#/components/schemas/WidgetFieldSort' + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/LogStreamWidgetDefinitionType' + required: + - type + type: object + LogStreamWidgetDefinitionType: + default: log_stream + description: Type of the log stream widget. + enum: + - log_stream + example: log_stream + type: string + x-enum-varnames: + - LOG_STREAM + LogsAPIError: + description: Error returned by the Logs API + properties: + code: + description: Code identifying the error + type: string + details: + description: Additional error details + items: + $ref: '#/components/schemas/LogsAPIError' + type: array + message: + description: Error message + type: string + type: object + LogsAPIErrorResponse: + description: Response returned by the Logs API when errors occur. + properties: + error: + $ref: '#/components/schemas/LogsAPIError' + type: object + LogsArithmeticProcessor: + description: "Use the Arithmetic Processor to add a new attribute (without spaces + or special characters\nin the new attribute name) to a log with the result + of the provided formula.\nThis enables you to remap different time attributes + with different units into a single attribute,\nor to compute operations on + attributes within the same log.\n\nThe formula can use parentheses and the + basic arithmetic operators `-`, `+`, `*`, `/`.\n\nBy default, the calculation + is skipped if an attribute is missing.\nSelect \u201CReplace missing attribute + by 0\u201D to automatically populate\nmissing attribute values with 0 to ensure + that the calculation is done.\nAn attribute is missing if it is not found + in the log attributes,\nor if it cannot be converted to a number.\n\n*Notes*:\n\n- + The operator `-` needs to be space split in the formula as it can also be + contained in attribute names.\n- If the target attribute already exists, it + is overwritten by the result of the formula.\n- Results are rounded up to + the 9th decimal. For example, if the result of the formula is `0.1234567891`,\n + \ the actual value stored for the attribute is `0.123456789`.\n- If you need + to scale a unit of measure,\n see [Scale Filter](https://docs.datadoghq.com/logs/log_configuration/parsing/?tab=filter#matcher-and-filter)." + properties: + expression: + description: Arithmetic operation between one or more log attributes. + example: '' + type: string + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + is_replace_missing: + default: false + description: 'If `true`, it replaces all missing attributes of expression + by `0`, `false` + + skip the operation if an attribute is missing.' + type: boolean + name: + description: Name of the processor. + type: string + target: + description: Name of the attribute that contains the result of the arithmetic + operation. + example: '' + type: string + type: + $ref: '#/components/schemas/LogsArithmeticProcessorType' + required: + - target + - expression + - type + type: object + LogsArithmeticProcessorType: + default: arithmetic-processor + description: Type of logs arithmetic processor. + enum: + - arithmetic-processor + example: arithmetic-processor + type: string + x-enum-varnames: + - ARITHMETIC_PROCESSOR + LogsAttributeRemapper: + description: 'The remapper processor remaps any source attribute(s) or tag to + another target attribute or tag. + + Constraints on the tag/attribute name are explained in the [Tag Best Practice + documentation](https://docs.datadoghq.com/logs/guide/log-parsing-best-practice). + + Some additional constraints are applied as `:` or `,` are not allowed in the + target tag/attribute name.' + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + override_on_conflict: + default: false + description: Override or not the target element if already set, + type: boolean + preserve_source: + default: false + description: Remove or preserve the remapped source element. + type: boolean + source_type: + default: attribute + description: Defines if the sources are from log `attribute` or `tag`. + type: string + sources: + description: Array of source attributes. + example: + - web + - gateway + items: + description: Attribute used as a source to remap its value to the target + attribute. + type: string + type: array + target: + description: Final attribute or tag name to remap the sources to. + example: operation_id + type: string + target_format: + $ref: '#/components/schemas/TargetFormatType' + target_type: + default: attribute + description: Defines if the final attribute or tag name is from log `attribute` + or `tag`. + type: string + type: + $ref: '#/components/schemas/LogsAttributeRemapperType' + required: + - sources + - target + - type + type: object + LogsAttributeRemapperType: + default: attribute-remapper + description: Type of logs attribute remapper. + enum: + - attribute-remapper + example: attribute-remapper + type: string + x-enum-varnames: + - ATTRIBUTE_REMAPPER + LogsByRetention: + description: Object containing logs usage data broken down by retention period. + properties: + orgs: + $ref: '#/components/schemas/LogsByRetentionOrgs' + usage: + description: Aggregated index logs usage for each retention period with + usage. + items: + $ref: '#/components/schemas/LogsRetentionAggSumUsage' + type: array + usage_by_month: + $ref: '#/components/schemas/LogsByRetentionMonthlyUsage' + type: object + LogsByRetentionMonthlyUsage: + description: Object containing a summary of indexed logs usage by retention + period for a single month. + properties: + date: + description: The month for the usage. + format: date-time + type: string + usage: + description: Indexed logs usage for each active retention for the month. + items: + $ref: '#/components/schemas/LogsRetentionSumUsage' + type: array + type: object + LogsByRetentionOrgUsage: + description: Indexed logs usage by retention for a single organization. + properties: + usage: + description: Indexed logs usage for each active retention for the organization. + items: + $ref: '#/components/schemas/LogsRetentionSumUsage' + type: array + type: object + LogsByRetentionOrgs: + description: Indexed logs usage summary for each organization for each retention + period with usage. + properties: + usage: + description: Indexed logs usage summary for each organization. + items: + $ref: '#/components/schemas/LogsByRetentionOrgUsage' + type: array + type: object + LogsCategoryProcessor: + description: "Use the Category Processor to add a new attribute (without spaces + or special characters in the new attribute name)\nto a log matching a provided + search query. Use categories to create groups for an analytical view.\nFor + example, URL groups, machine groups, environments, and response time buckets.\n\n**Notes**:\n\n- + The syntax of the query is the one of Logs Explorer search bar.\n The query + can be done on any log attribute or tag, whether it is a facet or not.\n Wildcards + can also be used inside your query.\n- Once the log has matched one of the + Processor queries, it stops.\n Make sure they are properly ordered in case + a log could match several queries.\n- The names of the categories must be + unique.\n- Once defined in the Category Processor, you can map categories + to log status using the Log Status Remapper." + properties: + categories: + description: 'Array of filters to match or not a log and their + + corresponding `name` to assign a custom value to the log.' + example: [] + items: + $ref: '#/components/schemas/LogsCategoryProcessorCategory' + type: array + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + target: + description: Name of the target attribute which value is defined by the + matching category. + example: '' + type: string + type: + $ref: '#/components/schemas/LogsCategoryProcessorType' + required: + - categories + - target + - type + type: object + LogsCategoryProcessorCategory: + description: Object describing the logs filter. + properties: + filter: + $ref: '#/components/schemas/LogsFilter' + name: + description: Value to assign to the target attribute. + type: string + type: object + LogsCategoryProcessorType: + default: category-processor + description: Type of logs category processor. + enum: + - category-processor + example: category-processor + type: string + x-enum-varnames: + - CATEGORY_PROCESSOR + LogsDateRemapper: + description: "As Datadog receives logs, it timestamps them using the value(s) + from any of these default attributes.\n\n - `timestamp`\n - `date`\n - + `_timestamp`\n - `Timestamp`\n - `eventTime`\n - `published_date`\n\n If + your logs put their dates in an attribute not in this list,\n use the log + date Remapper Processor to define their date attribute as the official log + timestamp.\n The recognized date formats are ISO8601, UNIX (the milliseconds + EPOCH format), and RFC3164.\n\n **Note:** If your logs don\u2019t contain + any of the default attributes\n and you haven\u2019t defined your own date + attribute, Datadog timestamps\n the logs with the date it received them.\n\n + \ If multiple log date remapper processors can be applied to a given log,\n + \ only the first one (according to the pipelines order) is taken into account." + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + sources: + description: Array of source attributes. + example: + - web + - gateway + items: + description: Attribute used as a source to define the log associated date. + type: string + type: array + type: + $ref: '#/components/schemas/LogsDateRemapperType' + required: + - sources + - type + type: object + LogsDateRemapperType: + default: date-remapper + description: Type of logs date remapper. + enum: + - date-remapper + example: date-remapper + type: string + x-enum-varnames: + - DATE_REMAPPER + LogsExclusion: + description: Represents the index exclusion filter object from configuration + API. + properties: + filter: + $ref: '#/components/schemas/LogsExclusionFilter' + is_enabled: + description: Whether or not the exclusion filter is active. + type: boolean + name: + description: Name of the index exclusion filter. + example: payment + type: string + required: + - name + type: object + LogsExclusionFilter: + description: Exclusion filter is defined by a query, a sampling rule, and a + active/inactive toggle. + properties: + query: + description: 'Default query is `*`, meaning all logs flowing in the index + would be excluded. + + Scope down exclusion filter to only a subset of logs with a log query.' + example: '*' + type: string + sample_rate: + description: 'Sample rate to apply to logs going through this exclusion + filter, + + a value of 1.0 excludes all logs matching the query.' + example: 1.0 + format: double + type: number + required: + - sample_rate + type: object + LogsFilter: + description: Filter for logs. + properties: + query: + description: The filter query. + example: source:python + type: string + type: object + LogsGeoIPParser: + description: 'The GeoIP parser takes an IP address attribute and extracts if + available + + the Continent, Country, Subdivision, and City information in the target attribute + path.' + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + sources: + default: + - network.client.ip + description: Array of source attributes. + example: + - network.client.ip + items: + description: Attribute to geo-localize the IP from. + type: string + type: array + target: + default: network.client.geoip + description: Name of the parent attribute that contains all the extracted + details from the `sources`. + example: network.client.geoip + type: string + type: + $ref: '#/components/schemas/LogsGeoIPParserType' + required: + - sources + - target + - type + type: object + LogsGeoIPParserType: + default: geo-ip-parser + description: Type of GeoIP parser. + enum: + - geo-ip-parser + example: geo-ip-parser + type: string + x-enum-varnames: + - GEO_IP_PARSER + LogsGrokParser: + description: 'Create custom grok rules to parse the full message or [a specific + attribute of your raw event](https://docs.datadoghq.com/logs/log_configuration/parsing/#advanced-settings). + + For more information, see the [parsing section](https://docs.datadoghq.com/logs/log_configuration/parsing).' + properties: + grok: + $ref: '#/components/schemas/LogsGrokParserRules' + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + samples: + description: List of sample logs to test this grok parser. + items: + description: A log sample that is used to test the grok parser. + maxLength: 5000 + type: string + maxItems: 5 + type: array + source: + default: message + description: Name of the log attribute to parse. + example: message + type: string + type: + $ref: '#/components/schemas/LogsGrokParserType' + required: + - source + - grok + - type + type: object + LogsGrokParserRules: + description: Set of rules for the grok parser. + properties: + match_rules: + description: List of match rules for the grok parser, separated by a new + line. + example: 'rule_name_1 foo + + rule_name_2 bar + + ' + type: string + support_rules: + default: '' + description: List of support rules for the grok parser, separated by a new + line. + example: 'rule_name_1 foo + + rule_name_2 bar + + ' + type: string + required: + - match_rules + type: object + LogsGrokParserType: + default: grok-parser + description: Type of logs grok parser. + enum: + - grok-parser + example: grok-parser + type: string + x-enum-varnames: + - GROK_PARSER + LogsIndex: + description: Object describing a Datadog Log index. + properties: + daily_limit: + description: The number of log events you can send in this index per day + before you are rate-limited. + example: 300000000 + format: int64 + type: integer + exclusion_filters: + description: 'An array of exclusion objects. The logs are tested against + the query of each filter, + + following the order of the array. Only the first matching active exclusion + matters, + + others (if any) are ignored.' + items: + $ref: '#/components/schemas/LogsExclusion' + type: array + filter: + $ref: '#/components/schemas/LogsFilter' + is_rate_limited: + description: 'A boolean stating if the index is rate limited, meaning more + logs than the daily limit have been sent. + + Rate limit is reset every-day at 2pm UTC.' + example: false + readOnly: true + type: boolean + name: + description: The name of the index. + example: main + type: string + num_retention_days: + description: 'The number of days before logs are deleted from this index. + Available values depend on + + retention plans specified in your organization''s contract/subscriptions.' + example: 15 + format: int64 + type: integer + required: + - name + - filter + type: object + LogsIndexListResponse: + description: Object with all Index configurations for a given organization. + properties: + indexes: + description: Array of Log index configurations. + items: + $ref: '#/components/schemas/LogsIndex' + type: array + type: object + LogsIndexUpdateRequest: + description: Object for updating a Datadog Log index. + properties: + daily_limit: + description: The number of log events you can send in this index per day + before you are rate-limited. + example: 300000000 + format: int64 + type: integer + disable_daily_limit: + description: 'If true, sets the `daily_limit` value to null and the index + is not limited on a daily basis (any + + specified `daily_limit` value in the request is ignored). If false or + omitted, the index''s current + + `daily_limit` is maintained.' + example: false + type: boolean + exclusion_filters: + description: 'An array of exclusion objects. The logs are tested against + the query of each filter, + + following the order of the array. Only the first matching active exclusion + matters, + + others (if any) are ignored.' + items: + $ref: '#/components/schemas/LogsExclusion' + type: array + filter: + $ref: '#/components/schemas/LogsFilter' + num_retention_days: + description: 'The number of days before logs are deleted from this index. + Available values depend on + + retention plans specified in your organization''s contract/subscriptions. + + + **Note:** Changing the retention for an index adjusts the length of retention + for all logs + + already in this index. It may also affect billing.' + example: 15 + format: int64 + type: integer + required: + - filter + type: object + LogsIndexesOrder: + description: Object containing the ordered list of log index names. + properties: + index_names: + description: 'Array of strings identifying by their name(s) the index(es) + of your organization. + + Logs are tested against the query filter of each index one by one, following + the order of the array. + + Logs are eventually stored in the first matching index.' + example: + - main + - payments + - web + items: + description: An index name. + type: string + type: array + required: + - index_names + type: object + LogsListRequest: + description: Object to send with the request to retrieve a list of logs from + your Organization. + properties: + index: + description: 'The log index on which the request is performed. For multi-index + organizations, + + the default is all live indexes. Historical indexes of rehydrated logs + must be specified.' + example: retention-3,retention-15 + type: string + limit: + description: Number of logs return in the response. + format: int32 + maximum: 1000 + type: integer + query: + description: The search query - following the log search syntax. + example: service:web* AND @http.status_code:[200 TO 299] + type: string + sort: + $ref: '#/components/schemas/LogsSort' + startAt: + description: 'Hash identifier of the first log to return in the list, available + in a log `id` attribute. + + This parameter is used for the pagination feature. + + + **Note**: This parameter is ignored if the corresponding log + + is out of the scope of the specified time window.' + type: string + time: + $ref: '#/components/schemas/LogsListRequestTime' + required: + - time + type: object + LogsListRequestTime: + description: Timeframe to retrieve the log from. + properties: + from: + description: Minimum timestamp for requested logs. + example: '2020-02-02T02:02:02.202Z' + format: date-time + type: string + timezone: + description: 'Timezone can be specified both as an offset (for example "UTC+03:00") + + or a regional zone (for example "Europe/Paris").' + type: string + to: + description: Maximum timestamp for requested logs. + example: '2020-02-20T02:02:02.202Z' + format: date-time + type: string + required: + - from + - to + type: object + LogsListResponse: + description: Response object with all logs matching the request and pagination + information. + properties: + logs: + description: Array of logs matching the request and the `nextLogId` if sent. + items: + $ref: '#/components/schemas/Log' + type: array + nextLogId: + description: 'Hash identifier of the next log to return in the list. + + This parameter is used for the pagination feature.' + nullable: true + type: string + status: + description: Status of the response. + type: string + type: object + LogsLookupProcessor: + description: 'Use the Lookup Processor to define a mapping between a log attribute + + and a human readable value saved in the processors mapping table. + + For example, you can use the Lookup Processor to map an internal service ID + + into a human readable service name. Alternatively, you could also use it to + check + + if the MAC address that just attempted to connect to the production + + environment belongs to your list of stolen machines.' + properties: + default_lookup: + description: Value to set the target attribute if the source value is not + found in the list. + type: string + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + lookup_table: + description: 'Mapping table of values for the source attribute and their + associated target attribute values, + + formatted as `["source_key1,target_value1", "source_key2,target_value2"]`' + example: + - source_key1,target_value1 + - source_key2,target_value2 + items: + description: Mapping between a source and a value, it should follow the + format `","`. + type: string + type: array + name: + description: Name of the processor. + type: string + source: + description: Source attribute used to perform the lookup. + example: service_id + type: string + target: + description: 'Name of the attribute that contains the corresponding value + in the mapping list + + or the `default_lookup` if not found in the mapping list.' + example: service + type: string + type: + $ref: '#/components/schemas/LogsLookupProcessorType' + required: + - source + - target + - lookup_table + - type + type: object + LogsLookupProcessorType: + default: lookup-processor + description: Type of logs lookup processor. + enum: + - lookup-processor + example: lookup-processor + type: string + x-enum-varnames: + - LOOKUP_PROCESSOR + LogsMessageRemapper: + description: 'The message is a key attribute in Datadog. + + It is displayed in the message column of the Log Explorer and you can do full + string search on it. + + Use this Processor to define one or more attributes as the official log message. + + + **Note:** If multiple log message remapper processors can be applied to a + given log, + + only the first one (according to the pipeline order) is taken into account.' + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + sources: + default: + - msg + description: Array of source attributes. + example: + - msg + items: + description: Attribute used as a source to define the log associated message. + type: string + type: array + type: + $ref: '#/components/schemas/LogsMessageRemapperType' + required: + - sources + - type + type: object + LogsMessageRemapperType: + default: message-remapper + description: Type of logs message remapper. + enum: + - message-remapper + example: message-remapper + type: string + x-enum-varnames: + - MESSAGE_REMAPPER + LogsPipeline: + description: 'Pipelines and processors operate on incoming logs, + + parsing and transforming them into structured attributes for easier querying. + + + **Note**: These endpoints are only available for admin users. + + Make sure to use an application key created by an admin.' + properties: + filter: + $ref: '#/components/schemas/LogsFilter' + id: + description: ID of the pipeline. + readOnly: true + type: string + is_enabled: + description: Whether or not the pipeline is enabled. + type: boolean + is_read_only: + description: Whether or not the pipeline can be edited. + readOnly: true + type: boolean + name: + description: Name of the pipeline. + example: '' + type: string + processors: + description: Ordered list of processors in this pipeline. + items: + $ref: '#/components/schemas/LogsProcessor' + type: array + type: + description: Type of pipeline. + example: pipeline + readOnly: true + type: string + required: + - name + type: object + LogsPipelineList: + description: Array of pipeline ID strings. + items: + $ref: '#/components/schemas/LogsPipeline' + type: array + LogsPipelineProcessor: + description: 'Nested Pipelines are pipelines within a pipeline. Use Nested Pipelines + to split the processing into two steps. + + For example, first use a high-level filtering such as team and then a second + level of filtering based on the + + integration, service, or any other tag or attribute. + + + A pipeline can contain Nested Pipelines and Processors whereas a Nested Pipeline + can only contain Processors.' + properties: + filter: + $ref: '#/components/schemas/LogsFilter' + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + processors: + description: Ordered list of processors in this pipeline. + items: + $ref: '#/components/schemas/LogsProcessor' + type: array + type: + $ref: '#/components/schemas/LogsPipelineProcessorType' + required: + - type + type: object + LogsPipelineProcessorType: + default: pipeline + description: Type of logs pipeline processor. + enum: + - pipeline + example: pipeline + type: string + x-enum-varnames: + - PIPELINE + LogsPipelinesOrder: + description: Object containing the ordered list of pipeline IDs. + properties: + pipeline_ids: + description: 'Ordered Array of `` strings, the order of pipeline + IDs in the array + + define the overall Pipelines order for Datadog.' + example: + - tags + - org_ids + - products + items: + description: A given pipeline ID. + type: string + type: array + required: + - pipeline_ids + type: object + LogsProcessor: + description: Definition of a logs processor. + oneOf: + - $ref: '#/components/schemas/LogsGrokParser' + - $ref: '#/components/schemas/LogsDateRemapper' + - $ref: '#/components/schemas/LogsStatusRemapper' + - $ref: '#/components/schemas/LogsServiceRemapper' + - $ref: '#/components/schemas/LogsMessageRemapper' + - $ref: '#/components/schemas/LogsAttributeRemapper' + - $ref: '#/components/schemas/LogsURLParser' + - $ref: '#/components/schemas/LogsUserAgentParser' + - $ref: '#/components/schemas/LogsCategoryProcessor' + - $ref: '#/components/schemas/LogsArithmeticProcessor' + - $ref: '#/components/schemas/LogsStringBuilderProcessor' + - $ref: '#/components/schemas/LogsPipelineProcessor' + - $ref: '#/components/schemas/LogsGeoIPParser' + - $ref: '#/components/schemas/LogsLookupProcessor' + - $ref: '#/components/schemas/ReferenceTableLogsLookupProcessor' + - $ref: '#/components/schemas/LogsTraceRemapper' + LogsQueryCompute: + description: Define computation for a log query. + properties: + aggregation: + description: The aggregation method. + example: avg + type: string + facet: + description: Facet name. + example: '@duration' + type: string + interval: + description: Define a time interval in seconds. + example: 5000 + format: int64 + type: integer + required: + - aggregation + type: object + LogsRetentionAggSumUsage: + description: Object containing indexed logs usage aggregated across organizations + and months for a retention period. + properties: + logs_indexed_logs_usage_agg_sum: + description: Total indexed logs for this retention period. + format: int64 + type: integer + logs_live_indexed_logs_usage_agg_sum: + description: Live indexed logs for this retention period. + format: int64 + type: integer + logs_rehydrated_indexed_logs_usage_agg_sum: + description: Rehydrated indexed logs for this retention period. + format: int64 + type: integer + retention: + description: The retention period in days or "custom" for all custom retention + periods. + type: string + type: object + LogsRetentionSumUsage: + description: Object containing indexed logs usage grouped by retention period + and summed. + properties: + logs_indexed_logs_usage_sum: + description: Total indexed logs for this retention period. + format: int64 + type: integer + logs_live_indexed_logs_usage_sum: + description: Live indexed logs for this retention period. + format: int64 + type: integer + logs_rehydrated_indexed_logs_usage_sum: + description: Rehydrated indexed logs for this retention period. + format: int64 + type: integer + retention: + description: The retention period in days or "custom" for all custom retention + periods. + type: string + type: object + LogsServiceRemapper: + description: 'Use this processor if you want to assign one or more attributes + as the official service. + + + **Note:** If multiple service remapper processors can be applied to a given + log, + + only the first one (according to the pipeline order) is taken into account.' + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + sources: + description: Array of source attributes. + example: + - web + - gateway + items: + description: Attribute used as a source to define the log associated service. + type: string + type: array + type: + $ref: '#/components/schemas/LogsServiceRemapperType' + required: + - sources + - type + type: object + LogsServiceRemapperType: + default: service-remapper + description: Type of logs service remapper. + enum: + - service-remapper + example: service-remapper + type: string + x-enum-varnames: + - SERVICE_REMAPPER + LogsSort: + description: Time-ascending `asc` or time-descending `desc` results. + enum: + - asc + - desc + type: string + x-enum-varnames: + - TIME_ASCENDING + - TIME_DESCENDING + LogsStatusRemapper: + description: "Use this Processor if you want to assign some attributes as the + official status.\n\nEach incoming status value is mapped as follows.\n\n - + Integers from 0 to 7 map to the Syslog severity standards\n - Strings beginning + with `emerg` or f (case-insensitive) map to `emerg` (0)\n - Strings beginning + with `a` (case-insensitive) map to `alert` (1)\n - Strings beginning with + `c` (case-insensitive) map to `critical` (2)\n - Strings beginning with `err` + (case-insensitive) map to `error` (3)\n - Strings beginning with `w` (case-insensitive) + map to `warning` (4)\n - Strings beginning with `n` (case-insensitive) map + to `notice` (5)\n - Strings beginning with `i` (case-insensitive) map to + `info` (6)\n - Strings beginning with `d`, `trace` or `verbose` (case-insensitive) + map to `debug` (7)\n - Strings beginning with `o` or matching `OK` or `Success` + (case-insensitive) map to OK\n - All others map to `info` (6)\n\n **Note:** + If multiple log status remapper processors can be applied to a given log,\n + \ only the first one (according to the pipelines order) is taken into account." + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + sources: + description: Array of source attributes. + example: [] + items: + description: Attribute used as a source to define the log associated status. + type: string + type: array + type: + $ref: '#/components/schemas/LogsStatusRemapperType' + required: + - sources + - type + type: object + LogsStatusRemapperType: + default: status-remapper + description: Type of logs status remapper. + enum: + - status-remapper + example: status-remapper + type: string + x-enum-varnames: + - STATUS_REMAPPER + LogsStringBuilderProcessor: + description: "Use the string builder processor to add a new attribute (without + spaces or special characters)\nto a log with the result of the provided template.\nThis + enables aggregation of different attributes or raw strings into a single attribute.\n\nThe + template is defined by both raw text and blocks with the syntax `%{attribute_path}`.\n\n**Notes**:\n\n- + The processor only accepts attributes with values or an array of values in + the blocks.\n- If an attribute cannot be used (object or array of object),\n + \ it is replaced by an empty string or the entire operation is skipped depending + on your selection.\n- If the target attribute already exists, it is overwritten + by the result of the template.\n- Results of the template cannot exceed 256 + characters." + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + is_replace_missing: + default: false + description: 'If true, it replaces all missing attributes of `template` + by an empty string. + + If `false` (default), skips the operation for missing attributes.' + type: boolean + name: + description: Name of the processor. + type: string + target: + description: The name of the attribute that contains the result of the template. + example: '' + type: string + template: + description: A formula with one or more attributes and raw text. + example: '' + type: string + type: + $ref: '#/components/schemas/LogsStringBuilderProcessorType' + required: + - target + - template + - type + type: object + LogsStringBuilderProcessorType: + default: string-builder-processor + description: Type of logs string builder processor. + enum: + - string-builder-processor + example: string-builder-processor + type: string + x-enum-varnames: + - STRING_BUILDER_PROCESSOR + LogsTraceRemapper: + description: "There are two ways to improve correlation between application + traces and logs.\n\n 1. Follow the documentation on [how to inject a trace + ID in the application logs](https://docs.datadoghq.com/tracing/connect_logs_and_traces)\n + \ and by default log integrations take care of all the rest of the setup.\n\n + \ 2. Use the Trace remapper processor to define a log attribute as its associated + trace ID." + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + sources: + default: + - dd.trace_id + description: Array of source attributes. + items: + description: Attribute to extract the Trace ID from. + type: string + type: array + type: + $ref: '#/components/schemas/LogsTraceRemapperType' + required: + - type + type: object + LogsTraceRemapperType: + default: trace-id-remapper + description: Type of logs trace remapper. + enum: + - trace-id-remapper + example: trace-id-remapper + type: string + x-enum-varnames: + - TRACE_ID_REMAPPER + LogsURLParser: + description: This processor extracts query parameters and other important parameters + from a URL. + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + name: + description: Name of the processor. + type: string + normalize_ending_slashes: + default: false + description: Normalize the ending slashes or not. + nullable: true + type: boolean + sources: + default: + - http.url + description: Array of source attributes. + example: + - http.url + items: + description: Attribute to extract the URL from. + type: string + type: array + target: + default: http.url_details + description: Name of the parent attribute that contains all the extracted + details from the `sources`. + example: http.url_details + type: string + type: + $ref: '#/components/schemas/LogsURLParserType' + required: + - sources + - target + - type + type: object + LogsURLParserType: + default: url-parser + description: Type of logs URL parser. + enum: + - url-parser + example: url-parser + type: string + x-enum-varnames: + - URL_PARSER + LogsUserAgentParser: + description: 'The User-Agent parser takes a User-Agent attribute and extracts + the OS, browser, device, and other user data. + + It recognizes major bots like the Google Bot, Yahoo Slurp, and Bing.' + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + is_encoded: + default: false + description: Define if the source attribute is URL encoded or not. + type: boolean + name: + description: Name of the processor. + type: string + sources: + default: + - http.useragent + description: Array of source attributes. + example: + - http.useragent + items: + description: Attribute to extract the User-Agent from. + type: string + type: array + target: + default: http.useragent_details + description: Name of the parent attribute that contains all the extracted + details from the `sources`. + example: http.useragent_details + type: string + type: + $ref: '#/components/schemas/LogsUserAgentParserType' + required: + - sources + - target + - type + type: object + LogsUserAgentParserType: + default: user-agent-parser + description: Type of logs User-Agent parser. + enum: + - user-agent-parser + example: user-agent-parser + type: string + x-enum-varnames: + - USER_AGENT_PARSER + MatchingDowntime: + description: Object describing a downtime that matches this monitor. + properties: + end: + description: POSIX timestamp to end the downtime. + example: 1412792983 + format: int64 + nullable: true + type: integer + id: + description: The downtime ID. + example: 1625 + format: int64 + readOnly: true + type: integer + scope: + description: 'The scope(s) to which the downtime applies. Must be in `key:value` + format. For example, `host:app2`. + + Provide multiple scopes as a comma-separated list like `env:dev,env:prod`. + + The resulting downtime applies to sources that matches ALL provided scopes + (`env:dev` **AND** `env:prod`).' + example: + - env:staging + items: + description: A scope. For example, `"env:staging"`. + type: string + type: array + start: + description: POSIX timestamp to start the downtime. + example: 1412792983 + format: int64 + type: integer + required: + - id + type: object + MetricContentEncoding: + default: deflate + description: HTTP header used to compress the media-type. + enum: + - deflate + - gzip + example: deflate + type: string + x-enum-varnames: + - DEFLATE + - GZIP + MetricMetadata: + description: Object with all metric related metadata. + properties: + description: + description: Metric description. + type: string + integration: + description: Name of the integration that sent the metric if applicable. + readOnly: true + type: string + per_unit: + description: Per unit of the metric such as `second` in `bytes per second`. + example: second + type: string + short_name: + description: A more human-readable and abbreviated version of the metric + name. + type: string + statsd_interval: + description: StatsD flush interval of the metric in seconds if applicable. + format: int64 + type: integer + type: + description: Metric type such as `gauge` or `rate`. + example: count + type: string + unit: + description: Primary unit of the metric such as `byte` or `operation`. + example: byte + type: string + type: object + MetricSearchResponse: + description: Object containing the list of metrics matching the search query. + properties: + results: + $ref: '#/components/schemas/MetricSearchResponseResults' + type: object + MetricSearchResponseResults: + description: Search result. + properties: + metrics: + description: List of metrics that match the search query. + items: + description: Metric name. + type: string + type: array + type: object + MetricsListResponse: + description: Object listing all metric names stored by Datadog since a given + time. + properties: + from: + description: Time when the metrics were active, seconds since the Unix epoch. + type: string + metrics: + description: List of metric names. + items: + description: A metric name. + type: string + type: array + type: object + MetricsPayload: + description: The metrics' payload. + properties: + series: + description: A list of time series to submit to Datadog. + example: + - metric: system.load.1 + points: + - - 1475317847.0 + - 0.7 + items: + $ref: '#/components/schemas/Series' + type: array + required: + - series + type: object + MetricsQueryMetadata: + description: Object containing all metric names returned and their associated + metadata. + properties: + aggr: + description: Aggregation type. + example: avg + nullable: true + readOnly: true + type: string + display_name: + description: Display name of the metric. + example: system.cpu.idle + readOnly: true + type: string + end: + description: End of the time window, milliseconds since Unix epoch. + format: int64 + readOnly: true + type: integer + expression: + description: Metric expression. + example: system.cpu.idle{host:foo,env:test} + readOnly: true + type: string + interval: + description: Number of milliseconds between data samples. + format: int64 + readOnly: true + type: integer + length: + description: Number of data samples. + format: int64 + readOnly: true + type: integer + metric: + description: Metric name. + example: system.cpu.idle + readOnly: true + type: string + pointlist: + description: List of points of the time series in milliseconds. + example: + - - 1681683300000.0 + - 77.62145685254418 + items: + $ref: '#/components/schemas/Point' + readOnly: true + type: array + query_index: + description: The index of the series' query within the request. + format: int64 + readOnly: true + type: integer + scope: + description: Metric scope, comma separated list of tags. + example: host:foo,env:test + readOnly: true + type: string + start: + description: Start of the time window, milliseconds since Unix epoch. + format: int64 + readOnly: true + type: integer + tag_set: + description: Unique tags identifying this series. + items: + description: Unique tags identifying this series. + type: string + readOnly: true + type: array + unit: + description: 'Detailed information about the metric unit. + + The first element describes the "primary unit" (for example, `bytes` in + `bytes per second`). + + The second element describes the "per unit" (for example, `second` in + `bytes per second`). + + If the second element is not present, the API returns null.' + items: + $ref: '#/components/schemas/MetricsQueryUnit' + maxItems: 2 + minItems: 2 + readOnly: true + type: array + type: object + MetricsQueryResponse: + description: Response Object that includes your query and the list of metrics + retrieved. + properties: + error: + description: Message indicating the errors if status is not `ok`. + readOnly: true + type: string + from_date: + description: Start of requested time window, milliseconds since Unix epoch. + format: int64 + readOnly: true + type: integer + group_by: + description: List of tag keys on which to group. + items: + description: Tag key to group by your metric. + type: string + readOnly: true + type: array + message: + description: Message indicating `success` if status is `ok`. + readOnly: true + type: string + query: + description: Query string + readOnly: true + type: string + res_type: + description: Type of response. + example: time_series + readOnly: true + type: string + series: + description: List of timeseries queried. + items: + $ref: '#/components/schemas/MetricsQueryMetadata' + readOnly: true + type: array + status: + description: Status of the query. + example: ok + readOnly: true + type: string + to_date: + description: End of requested time window, milliseconds since Unix epoch. + format: int64 + readOnly: true + type: integer + type: object + MetricsQueryUnit: + description: Object containing the metric unit family, scale factor, name, and + short name. + nullable: true + properties: + family: + description: Unit family, allows for conversion between units of the same + family, for scaling. + example: time + readOnly: true + type: string + name: + description: Unit name + example: minute + readOnly: true + type: string + plural: + description: Plural form of the unit name. + example: minutes + readOnly: true + type: string + scale_factor: + description: Factor for scaling between units of the same family. + example: 60.0 + format: double + readOnly: true + type: number + short_name: + description: Abbreviation of the unit. + example: min + readOnly: true + type: string + type: object + Monitor: + description: Object describing a monitor. + properties: + created: + description: Timestamp of the monitor creation. + format: date-time + readOnly: true + type: string + creator: + $ref: '#/components/schemas/Creator' + deleted: + description: Whether or not the monitor is deleted. (Always `null`) + format: date-time + nullable: true + readOnly: true + type: string + id: + description: ID of this monitor. + format: int64 + readOnly: true + type: integer + matching_downtimes: + description: A list of active v1 downtimes that match this monitor. + items: + $ref: '#/components/schemas/MatchingDowntime' + type: array + message: + description: A message to include with notifications for this monitor. + type: string + modified: + description: Last timestamp when the monitor was edited. + format: date-time + readOnly: true + type: string + multi: + description: Whether or not the monitor is broken down on different groups. + readOnly: true + type: boolean + name: + description: The monitor name. + example: My monitor + type: string + options: + $ref: '#/components/schemas/MonitorOptions' + overall_state: + $ref: '#/components/schemas/MonitorOverallStates' + priority: + description: Integer from 1 (high) to 5 (low) indicating alert severity. + format: int64 + maximum: 5 + minimum: 1 + nullable: true + type: integer + query: + description: The monitor query. + example: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100 + type: string + restricted_roles: + description: A list of unique role identifiers to define which roles are + allowed to edit the monitor. The unique identifiers for all roles can + be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) + and are located in the `data.id` field. Editing a monitor includes any + updates to the monitor configuration, monitor deletion, and muting of + the monitor for any amount of time. `restricted_roles` is the successor + of `locked`. For more information about `locked` and `restricted_roles`, + see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options). + items: + description: A role UUID. + type: string + nullable: true + type: array + state: + $ref: '#/components/schemas/MonitorState' + tags: + description: Tags associated to your monitor. + items: + description: A Datadog tag. + type: string + type: array + type: + $ref: '#/components/schemas/MonitorType' + required: + - type + - query + type: object + MonitorDeviceID: + description: ID of the device the Synthetics monitor is running on. Same as + `SyntheticsDeviceID`. + enum: + - laptop_large + - tablet + - mobile_small + - chrome.laptop_large + - chrome.tablet + - chrome.mobile_small + - firefox.laptop_large + - firefox.tablet + - firefox.mobile_small + type: string + x-enum-varnames: + - LAPTOP_LARGE + - TABLET + - MOBILE_SMALL + - CHROME_LAPTOP_LARGE + - CHROME_TABLET + - CHROME_MOBILE_SMALL + - FIREFOX_LAPTOP_LARGE + - FIREFOX_TABLET + - FIREFOX_MOBILE_SMALL + MonitorFormulaAndFunctionEventAggregation: + description: Aggregation methods for event platform queries. + enum: + - count + - cardinality + - median + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + example: avg + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - MEDIAN + - PC75 + - PC90 + - PC95 + - PC98 + - PC99 + - SUM + - MIN + - MAX + - AVG + MonitorFormulaAndFunctionEventQueryDefinition: + description: A formula and functions events query. + properties: + compute: + $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryDefinitionCompute' + data_source: + $ref: '#/components/schemas/MonitorFormulaAndFunctionEventsDataSource' + group_by: + description: Group by options. + items: + $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryGroupBy' + type: array + indexes: + description: An array of index names to query in the stream. Omit or use + `[]` to query all indexes at once. + example: + - days-3 + - days-7 + items: + description: A log index set up for your organization. For additional + indexes, see the [multiple indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes) + documentation. + type: string + type: array + name: + description: Name of the query for use in formulas. + example: query_errors + type: string + search: + $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryDefinitionSearch' + required: + - data_source + - compute + - name + type: object + MonitorFormulaAndFunctionEventQueryDefinitionCompute: + description: Compute options. + properties: + aggregation: + $ref: '#/components/schemas/MonitorFormulaAndFunctionEventAggregation' + interval: + description: A time interval in milliseconds. + example: 60000 + format: int64 + type: integer + metric: + description: Measurable attribute to compute. + example: '@duration' + type: string + required: + - aggregation + type: object + MonitorFormulaAndFunctionEventQueryDefinitionSearch: + description: Search options. + properties: + query: + description: Events search string. + example: service:query + type: string + required: + - query + type: object + MonitorFormulaAndFunctionEventQueryGroupBy: + description: List of objects used to group by. + properties: + facet: + description: Event facet. + example: status + type: string + limit: + description: Number of groups to return. + example: 10 + format: int64 + type: integer + sort: + $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryGroupBySort' + required: + - facet + type: object + MonitorFormulaAndFunctionEventQueryGroupBySort: + description: Options for sorting group by results. + properties: + aggregation: + $ref: '#/components/schemas/MonitorFormulaAndFunctionEventAggregation' + metric: + description: Metric used for sorting group by results. + type: string + order: + $ref: '#/components/schemas/QuerySortOrder' + required: + - aggregation + type: object + MonitorFormulaAndFunctionEventsDataSource: + description: Data source for event platform-based queries. + enum: + - rum + - ci_pipelines + - ci_tests + - audit + - events + - logs + - spans + example: rum + type: string + x-enum-varnames: + - RUM + - CI_PIPELINES + - CI_TESTS + - AUDIT + - EVENTS + - LOGS + - SPANS + MonitorFormulaAndFunctionQueryDefinition: + description: A formula and function query. + oneOf: + - $ref: '#/components/schemas/MonitorFormulaAndFunctionEventQueryDefinition' + MonitorGroupSearchResponse: + description: The response of a monitor group search. + example: + counts: + status: + - count: 2 + name: OK + type: + - count: 2 + name: metric + groups: + - group: '*' + group_tags: + - '*' + last_nodata_ts: 0 + last_triggered_ts: 1525702966 + monitor_id: 2738266 + monitor_name: '[demo] Cassandra disk usage is high on {{host.name}}' + status: OK + - group: '*' + group_tags: + - '*' + last_nodata_ts: 0 + last_triggered_ts: 1525703008 + monitor_id: 1576648 + monitor_name: '[demo] Disk usage is high on {{host.name}}' + status: OK + metadata: + page: 0 + page_count: 2 + per_page: 30 + total_count: 2 + properties: + counts: + $ref: '#/components/schemas/MonitorGroupSearchResponseCounts' + groups: + description: The list of found monitor groups. + items: + $ref: '#/components/schemas/MonitorGroupSearchResult' + readOnly: true + type: array + metadata: + $ref: '#/components/schemas/MonitorSearchResponseMetadata' + type: object + MonitorGroupSearchResponseCounts: + description: The counts of monitor groups per different criteria. + properties: + status: + $ref: '#/components/schemas/MonitorSearchCount' + type: + $ref: '#/components/schemas/MonitorSearchCount' + readOnly: true + type: object + MonitorGroupSearchResult: + description: A single monitor group search result. + properties: + group: + description: The name of the group. + readOnly: true + type: string + group_tags: + description: The list of tags of the monitor group. + items: + description: One monitor group tag. + readOnly: true + type: string + readOnly: true + type: array + last_nodata_ts: + description: Latest timestamp the monitor group was in NO_DATA state. + format: int64 + readOnly: true + type: integer + last_triggered_ts: + description: Latest timestamp the monitor group triggered. + format: int64 + nullable: true + readOnly: true + type: integer + monitor_id: + description: The ID of the monitor. + format: int64 + readOnly: true + type: integer + monitor_name: + description: The name of the monitor. + readOnly: true + type: string + status: + $ref: '#/components/schemas/MonitorOverallStates' + type: object + MonitorOptions: + description: List of options associated with your monitor. + properties: + aggregation: + $ref: '#/components/schemas/MonitorOptionsAggregation' + device_ids: + deprecated: true + description: IDs of the device the Synthetics monitor is running on. + items: + $ref: '#/components/schemas/MonitorDeviceID' + readOnly: true + type: array + enable_logs_sample: + description: Whether or not to send a log sample when the log monitor triggers. + type: boolean + enable_samples: + description: Whether or not to send a list of samples when the monitor triggers. + This is only used by CI Test and Pipeline monitors. + type: boolean + escalation_message: + description: 'We recommend using the [is_renotify](https://docs.datadoghq.com/monitors/notify/?tab=is_alert#renotify), + + block in the original message instead. + + A message to include with a re-notification. Supports the `@username` + notification we allow elsewhere. + + Not applicable if `renotify_interval` is `None`.' + type: string + evaluation_delay: + description: 'Time (in seconds) to delay evaluation, as a non-negative integer. + For example, if the value is set to `300` (5min), + + the timeframe is set to `last_5m` and the time is 7:00, the monitor evaluates + data from 6:50 to 6:55. + + This is useful for AWS CloudWatch and other backfilled metrics to ensure + the monitor always has data during evaluation.' + format: int64 + nullable: true + type: integer + group_retention_duration: + description: 'The time span after which groups with missing data are dropped + from the monitor state. + + The minimum value is one hour, and the maximum value is 72 hours. + + Example values are: "60m", "1h", and "2d". + + This option is only available for APM Trace Analytics, Audit Trail, CI, + Error Tracking, Event, Logs, and RUM monitors.' + type: string + groupby_simple_monitor: + description: Whether the log alert monitor triggers a single alert or multiple + alerts when any group breaches a threshold. + type: boolean + include_tags: + default: true + description: 'A Boolean indicating whether notifications from this monitor + automatically inserts its triggering tags into the title. + + + **Examples** + + - If `True`, `[Triggered on {host:h1}] Monitor Title` + + - If `False`, `[Triggered] Monitor Title`' + type: boolean + locked: + deprecated: true + description: Whether or not the monitor is locked (only editable by creator + and admins). Use `restricted_roles` instead. + type: boolean + min_failure_duration: + default: 0 + description: How long the test should be in failure before alerting (integer, + number of seconds, max 7200). + format: int64 + maximum: 7200 + minimum: 0 + nullable: true + type: integer + min_location_failed: + default: 1 + description: 'The minimum number of locations in failure at the same time + during + + at least one moment in the `min_failure_duration` period (`min_location_failed` + and `min_failure_duration` + + are part of the advanced alerting rules - integer, >= 1).' + format: int64 + nullable: true + type: integer + new_group_delay: + description: 'Time (in seconds) to skip evaluations for new groups. + + + For example, this option can be used to skip evaluations for new hosts + while they initialize. + + + Must be a non negative integer.' + format: int64 + nullable: true + type: integer + new_host_delay: + default: 300 + deprecated: true + description: 'Time (in seconds) to allow a host to boot and applications + + to fully start before starting the evaluation of monitor results. + + Should be a non negative integer. + + + Use new_group_delay instead.' + format: int64 + nullable: true + type: integer + no_data_timeframe: + description: 'The number of minutes before a monitor notifies after data + stops reporting. + + Datadog recommends at least 2x the monitor timeframe for query alerts + or 2 minutes for service checks. + + If omitted, 2x the evaluation timeframe is used for query alerts, and + 24 hours is used for service checks.' + format: int64 + nullable: true + type: integer + notification_preset_name: + $ref: '#/components/schemas/MonitorOptionsNotificationPresets' + notify_audit: + default: false + description: A Boolean indicating whether tagged users is notified on changes + to this monitor. + type: boolean + notify_by: + description: 'Controls what granularity a monitor alerts on. Only available + for monitors with groupings. + + For instance, a monitor grouped by `cluster`, `namespace`, and `pod` can + be configured to only notify on each + + new `cluster` violating the alert conditions by setting `notify_by` to + `["cluster"]`. Tags mentioned + + in `notify_by` must be a subset of the grouping tags in the query. + + For example, a query grouped by `cluster` and `namespace` cannot notify + on `region`. + + Setting `notify_by` to `[*]` configures the monitor to notify as a simple-alert.' + items: + description: A grouping tag. + type: string + type: array + notify_no_data: + description: A Boolean indicating whether this monitor notifies when data + stops reporting. Defaults to `false`. + type: boolean + on_missing_data: + $ref: '#/components/schemas/OnMissingDataOption' + renotify_interval: + default: null + description: "The number of minutes after the last notification before a + monitor re-notifies on the current status.\nIt only re-notifies if it\u2019s + not resolved." + format: int64 + nullable: true + type: integer + renotify_occurrences: + description: The number of times re-notification messages should be sent + on the current status at the provided re-notification interval. + format: int64 + nullable: true + type: integer + renotify_statuses: + description: The types of monitor statuses for which re-notification messages + are sent. + items: + $ref: '#/components/schemas/MonitorRenotifyStatusType' + nullable: true + type: array + require_full_window: + description: "A Boolean indicating whether this monitor needs a full window + of data before it\u2019s evaluated.\nWe highly recommend you set this + to `false` for sparse metrics,\notherwise some evaluations are skipped. + Default is false." + type: boolean + scheduling_options: + $ref: '#/components/schemas/MonitorOptionsSchedulingOptions' + silenced: + additionalProperties: + description: UTC epoch timestamp in seconds when the downtime for the + group expires. + format: int64 + nullable: true + type: integer + deprecated: true + description: Information about the downtime applied to the monitor. Only + shows v1 downtimes. + type: object + synthetics_check_id: + deprecated: true + description: ID of the corresponding Synthetic check. + nullable: true + type: string + threshold_windows: + $ref: '#/components/schemas/MonitorThresholdWindowOptions' + thresholds: + $ref: '#/components/schemas/MonitorThresholds' + timeout_h: + default: null + description: The number of hours of the monitor not reporting data before + it automatically resolves from a triggered state. The minimum allowed + value is 0 hours. The maximum allowed value is 24 hours. + format: int64 + nullable: true + type: integer + variables: + description: List of requests that can be used in the monitor query. **This + feature is currently in beta.** + items: + $ref: '#/components/schemas/MonitorFormulaAndFunctionQueryDefinition' + type: array + type: object + MonitorOptionsAggregation: + description: Type of aggregation performed in the monitor query. + properties: + group_by: + description: Group to break down the monitor on. + example: host + type: string + metric: + description: Metric name used in the monitor. + example: metrics.name + type: string + type: + description: Metric type used in the monitor. + example: count + type: string + readOnly: true + type: object + MonitorOptionsCustomSchedule: + description: Configuration options for the custom schedule. **This feature is + in private beta.** + properties: + recurrences: + description: Array of custom schedule recurrences. + items: + $ref: '#/components/schemas/MonitorOptionsCustomScheduleRecurrence' + type: array + type: object + MonitorOptionsCustomScheduleRecurrence: + description: Configuration for a recurrence set on the monitor options for custom + schedule. + properties: + rrule: + description: Defines the recurrence rule (RRULE) for a given schedule. + example: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR + type: string + start: + description: Defines the start date and time of the recurring schedule. + example: '2023-08-31T16:30:00' + type: string + timezone: + description: Defines the timezone the schedule runs on. + example: Europe/Paris + type: string + type: object + MonitorOptionsNotificationPresets: + default: show_all + description: Toggles the display of additional content sent in the monitor notification. + enum: + - show_all + - hide_query + - hide_handles + - hide_all + type: string + x-enum-varnames: + - SHOW_ALL + - HIDE_QUERY + - HIDE_HANDLES + - HIDE_ALL + MonitorOptionsSchedulingOptions: + description: Configuration options for scheduling. + properties: + custom_schedule: + $ref: '#/components/schemas/MonitorOptionsCustomSchedule' + evaluation_window: + $ref: '#/components/schemas/MonitorOptionsSchedulingOptionsEvaluationWindow' + type: object + MonitorOptionsSchedulingOptionsEvaluationWindow: + description: Configuration options for the evaluation window. If `hour_starts` + is set, no other fields may be set. Otherwise, `day_starts` and `month_starts` + must be set together. + properties: + day_starts: + description: The time of the day at which a one day cumulative evaluation + window starts. Must be defined in UTC time in `HH:mm` format. + example: 04:00 + type: string + hour_starts: + description: The minute of the hour at which a one hour cumulative evaluation + window starts. + example: 0 + format: int32 + maximum: 59 + minimum: 0 + type: integer + month_starts: + description: The day of the month at which a one month cumulative evaluation + window starts. + example: 1 + format: int32 + maximum: 1 + minimum: 1 + type: integer + type: object + MonitorOverallStates: + description: The different states your monitor can be in. + enum: + - Alert + - Ignored + - No Data + - OK + - Skipped + - Unknown + - Warn + readOnly: true + type: string + x-enum-varnames: + - ALERT + - IGNORED + - NO_DATA + - OK + - SKIPPED + - UNKNOWN + - WARN + MonitorRenotifyStatusType: + description: The different statuses for which renotification is supported. + enum: + - alert + - warn + - no data + type: string + x-enum-varnames: + - ALERT + - WARN + - NO_DATA + MonitorSearchCount: + description: Search facets. + items: + $ref: '#/components/schemas/MonitorSearchCountItem' + type: array + MonitorSearchCountItem: + description: A facet item. + properties: + count: + description: The number of found monitors with the listed value. + format: int64 + readOnly: true + type: integer + name: + description: The facet value. + readOnly: true + type: object + MonitorSearchResponse: + description: The response form a monitor search. + example: + counts: + muted: + - count: 3 + name: false + - count: 3 + name: true + status: + - count: 4 + name: No Data + - count: 2 + name: OK + tag: + - count: 6 + name: service:cassandra + type: + - count: 6 + name: metric + metadata: + page: 0 + page_count: 6 + per_page: 30 + total_count: 6 + monitors: + - classification: metric + creator: + handle: john@datadoghq.com + name: John Doe + id: 2699850 + last_triggered_ts: null + metrics: + - system.cpu.user + name: Cassandra CPU is high on {{host.name}} in {{availability-zone.name}} + notifications: + - handle: jane@datadoghq.com + name: Jane Doe + org_id: 1234 + scopes: + - '!availability-zone:us-east-1c' + - name:cassandra + status: No Data + tags: + - service:cassandra + type: query alert + properties: + counts: + $ref: '#/components/schemas/MonitorSearchResponseCounts' + metadata: + $ref: '#/components/schemas/MonitorSearchResponseMetadata' + monitors: + description: The list of found monitors. + items: + $ref: '#/components/schemas/MonitorSearchResult' + readOnly: true + type: array + type: object + MonitorSearchResponseCounts: + description: The counts of monitors per different criteria. + properties: + muted: + $ref: '#/components/schemas/MonitorSearchCount' + status: + $ref: '#/components/schemas/MonitorSearchCount' + tag: + $ref: '#/components/schemas/MonitorSearchCount' + type: + $ref: '#/components/schemas/MonitorSearchCount' + readOnly: true + type: object + MonitorSearchResponseMetadata: + description: Metadata about the response. + properties: + page: + description: The page to start paginating from. + format: int64 + readOnly: true + type: integer + page_count: + description: The number of pages. + format: int64 + readOnly: true + type: integer + per_page: + description: The number of monitors to return per page. + format: int64 + readOnly: true + type: integer + total_count: + description: The total number of monitors. + format: int64 + readOnly: true + type: integer + type: object + MonitorSearchResult: + description: Holds search results. + properties: + classification: + description: Classification of the monitor. + readOnly: true + type: string + creator: + $ref: '#/components/schemas/Creator' + id: + description: ID of the monitor. + format: int64 + readOnly: true + type: integer + last_triggered_ts: + description: Latest timestamp the monitor triggered. + format: int64 + nullable: true + readOnly: true + type: integer + metrics: + description: Metrics used by the monitor. + items: + description: A metric used by the monitor. + readOnly: true + type: string + readOnly: true + type: array + name: + description: The monitor name. + readOnly: true + type: string + notifications: + description: The notification triggered by the monitor. + items: + $ref: '#/components/schemas/MonitorSearchResultNotification' + readOnly: true + type: array + org_id: + description: The ID of the organization. + format: int64 + readOnly: true + type: integer + query: + description: The monitor query. + example: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100 + type: string + scopes: + description: 'The scope(s) to which the downtime applies, for example `host:app2`. + + Provide multiple scopes as a comma-separated list, for example `env:dev,env:prod`. + + The resulting downtime applies to sources that matches ALL provided scopes + + (that is `env:dev AND env:prod`), NOT any of them.' + example: + - host:app2 + - env:dev,env:prod + items: + description: Scope value(s). + readOnly: true + type: string + type: array + status: + $ref: '#/components/schemas/MonitorOverallStates' + tags: + description: Tags associated with the monitor. + items: + description: A tag associated with the monitor. + readOnly: true + type: string + readOnly: true + type: array + type: + $ref: '#/components/schemas/MonitorType' + type: object + MonitorSearchResultNotification: + description: A notification triggered by the monitor. + properties: + handle: + description: The email address that received the notification. + readOnly: true + type: string + name: + description: The username receiving the notification + readOnly: true + type: string + readOnly: true + type: object + MonitorState: + description: Wrapper object with the different monitor states. + properties: + groups: + additionalProperties: + $ref: '#/components/schemas/MonitorStateGroup' + description: 'Dictionary where the keys are groups (comma separated lists + of tags) and the values are + + the list of groups your monitor is broken down on.' + type: object + readOnly: true + type: object + MonitorStateGroup: + description: Monitor state for a single group. + properties: + last_nodata_ts: + description: Latest timestamp the monitor was in NO_DATA state. + format: int64 + type: integer + last_notified_ts: + description: Latest timestamp of the notification sent for this monitor + group. + format: int64 + type: integer + last_resolved_ts: + description: Latest timestamp the monitor group was resolved. + format: int64 + type: integer + last_triggered_ts: + description: Latest timestamp the monitor group triggered. + format: int64 + type: integer + name: + description: The name of the monitor. + type: string + status: + $ref: '#/components/schemas/MonitorOverallStates' + type: object + MonitorSummaryWidgetDefinition: + description: The monitor summary widget displays a summary view of all your + Datadog monitors, or a subset based on a query. Only available on FREE layout + dashboards. + properties: + color_preference: + $ref: '#/components/schemas/WidgetColorPreference' + count: + deprecated: true + description: The number of monitors to display. + format: int64 + type: integer + display_format: + $ref: '#/components/schemas/WidgetMonitorSummaryDisplayFormat' + hide_zero_counts: + description: Whether to show counts of 0 or not. + type: boolean + query: + description: Query to filter the monitors with. + example: '' + type: string + show_last_triggered: + description: Whether to show the time that has elapsed since the monitor/group + triggered. + type: boolean + show_priority: + default: false + description: Whether to show the priorities column. + type: boolean + sort: + $ref: '#/components/schemas/WidgetMonitorSummarySort' + start: + deprecated: true + description: The start of the list. Typically 0. + format: int64 + type: integer + summary_type: + $ref: '#/components/schemas/WidgetSummaryType' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/MonitorSummaryWidgetDefinitionType' + required: + - type + - query + type: object + MonitorSummaryWidgetDefinitionType: + default: manage_status + description: Type of the monitor summary widget. + enum: + - manage_status + example: manage_status + type: string + x-enum-varnames: + - MANAGE_STATUS + MonitorThresholdWindowOptions: + description: Alerting time window options. + properties: + recovery_window: + description: Describes how long an anomalous metric must be normal before + the alert recovers. + nullable: true + type: string + trigger_window: + description: Describes how long a metric must be anomalous before an alert + triggers. + nullable: true + type: string + type: object + MonitorThresholds: + description: List of the different monitor threshold available. + properties: + critical: + description: The monitor `CRITICAL` threshold. + format: double + type: number + critical_recovery: + description: The monitor `CRITICAL` recovery threshold. + format: double + nullable: true + type: number + ok: + description: The monitor `OK` threshold. + format: double + nullable: true + type: number + unknown: + description: The monitor UNKNOWN threshold. + format: double + nullable: true + type: number + warning: + description: The monitor `WARNING` threshold. + format: double + nullable: true + type: number + warning_recovery: + description: The monitor `WARNING` recovery threshold. + format: double + nullable: true + type: number + type: object + MonitorType: + description: The type of the monitor. For more information about `type`, see + the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) + docs. + enum: + - composite + - event alert + - log alert + - metric alert + - process alert + - query alert + - rum alert + - service check + - synthetics alert + - trace-analytics alert + - slo alert + - event-v2 alert + - audit alert + - ci-pipelines alert + - ci-tests alert + - error-tracking alert + - database-monitoring alert + example: query alert + type: string + x-enum-varnames: + - COMPOSITE + - EVENT_ALERT + - LOG_ALERT + - METRIC_ALERT + - PROCESS_ALERT + - QUERY_ALERT + - RUM_ALERT + - SERVICE_CHECK + - SYNTHETICS_ALERT + - TRACE_ANALYTICS_ALERT + - SLO_ALERT + - EVENT_V2_ALERT + - AUDIT_ALERT + - CI_PIPELINES_ALERT + - CI_TESTS_ALERT + - ERROR_TRACKING_ALERT + - DATABASE_MONITORING_ALERT + MonitorUpdateRequest: + description: Object describing a monitor update request. + properties: + created: + description: Timestamp of the monitor creation. + format: date-time + readOnly: true + type: string + creator: + $ref: '#/components/schemas/Creator' + deleted: + description: Whether or not the monitor is deleted. (Always `null`) + format: date-time + nullable: true + readOnly: true + type: string + id: + description: ID of this monitor. + format: int64 + readOnly: true + type: integer + message: + description: A message to include with notifications for this monitor. + type: string + modified: + description: Last timestamp when the monitor was edited. + format: date-time + readOnly: true + type: string + multi: + description: Whether or not the monitor is broken down on different groups. + readOnly: true + type: boolean + name: + description: The monitor name. + type: string + options: + $ref: '#/components/schemas/MonitorOptions' + overall_state: + $ref: '#/components/schemas/MonitorOverallStates' + priority: + description: Integer from 1 (high) to 5 (low) indicating alert severity. + format: int64 + maximum: 5 + minimum: 1 + type: integer + query: + description: The monitor query. + type: string + restricted_roles: + description: A list of unique role identifiers to define which roles are + allowed to edit the monitor. The unique identifiers for all roles can + be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) + and are located in the `data.id` field. Editing a monitor includes any + updates to the monitor configuration, monitor deletion, and muting of + the monitor for any amount of time. `restricted_roles` is the successor + of `locked`. For more information about `locked` and `restricted_roles`, + see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options). + items: + description: A role UUID. + type: string + nullable: true + type: array + state: + $ref: '#/components/schemas/MonitorState' + tags: + description: Tags associated to your monitor. + items: + description: A Datadog tag. + type: string + type: array + type: + $ref: '#/components/schemas/MonitorType' + type: object + MonthlyUsageAttributionBody: + description: Usage Summary by tag for a given organization. + properties: + month: + description: 'Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM].' + format: date-time + type: string + org_name: + description: The name of the organization. + type: string + public_id: + description: The organization public ID. + type: string + region: + description: The region of the Datadog instance that the organization belongs + to. + type: string + tag_config_source: + description: The source of the usage attribution tag configuration and the + selected tags in the format `::://////`. + type: string + tags: + $ref: '#/components/schemas/UsageAttributionTagNames' + updated_at: + description: Datetime of the most recent update to the usage values. + format: date-time + type: string + values: + $ref: '#/components/schemas/MonthlyUsageAttributionValues' + type: object + MonthlyUsageAttributionMetadata: + description: The object containing document metadata. + properties: + aggregates: + $ref: '#/components/schemas/UsageAttributionAggregates' + pagination: + $ref: '#/components/schemas/MonthlyUsageAttributionPagination' + type: object + MonthlyUsageAttributionPagination: + description: The metadata for the current pagination. + properties: + next_record_id: + description: The cursor to use to get the next results, if any. To make + the next request, use the same parameters with the addition of the `next_record_id`. + nullable: true + type: string + type: object + MonthlyUsageAttributionResponse: + description: Response containing the monthly Usage Summary by tag(s). + properties: + metadata: + $ref: '#/components/schemas/MonthlyUsageAttributionMetadata' + usage: + description: Get usage summary by tag(s). + items: + $ref: '#/components/schemas/MonthlyUsageAttributionBody' + type: array + type: object + MonthlyUsageAttributionSupportedMetrics: + description: Supported metrics for monthly usage attribution requests. + enum: + - api_usage + - api_percentage + - apm_fargate_usage + - apm_fargate_percentage + - appsec_fargate_usage + - appsec_fargate_percentage + - apm_host_usage + - apm_host_percentage + - apm_usm_usage + - apm_usm_percentage + - appsec_usage + - appsec_percentage + - browser_usage + - browser_percentage + - ci_visibility_itr_usage + - ci_visibility_itr_percentage + - cloud_siem_usage + - cloud_siem_percentage + - container_excl_agent_usage + - container_excl_agent_percentage + - container_usage + - container_percentage + - cspm_containers_percentage + - cspm_containers_usage + - cspm_hosts_percentage + - cspm_hosts_usage + - custom_timeseries_usage + - custom_timeseries_percentage + - custom_ingested_timeseries_usage + - custom_ingested_timeseries_percentage + - cws_containers_percentage + - cws_containers_usage + - cws_hosts_percentage + - cws_hosts_usage + - dbm_hosts_percentage + - dbm_hosts_usage + - dbm_queries_percentage + - dbm_queries_usage + - estimated_indexed_logs_usage + - estimated_indexed_logs_percentage + - estimated_ingested_logs_usage + - estimated_ingested_logs_percentage + - estimated_indexed_spans_usage + - estimated_indexed_spans_percentage + - estimated_ingested_spans_usage + - estimated_ingested_spans_percentage + - fargate_usage + - fargate_percentage + - functions_usage + - functions_percentage + - infra_host_usage + - infra_host_percentage + - invocations_usage + - invocations_percentage + - lambda_traced_invocations_usage + - lambda_traced_invocations_percentage + - mobile_app_testing_percentage + - mobile_app_testing_usage + - ndm_netflow_usage + - ndm_netflow_percentage + - npm_host_usage + - npm_host_percentage + - obs_pipeline_bytes_usage + - obs_pipeline_bytes_percentage + - profiled_container_usage + - profiled_container_percentage + - profiled_fargate_usage + - profiled_fargate_percentage + - profiled_host_usage + - profiled_host_percentage + - serverless_apps_usage + - serverless_apps_percentage + - snmp_usage + - snmp_percentage + - estimated_rum_sessions_usage + - estimated_rum_sessions_percentage + - universal_service_monitoring_usage + - universal_service_monitoring_percentage + - vuln_management_hosts_usage + - vuln_management_hosts_percentage + - sds_scanned_bytes_usage + - sds_scanned_bytes_percentage + - ci_test_indexed_spans_usage + - ci_test_indexed_spans_percentage + - ingested_logs_bytes_usage + - ingested_logs_bytes_percentage + - ci_pipeline_indexed_spans_usage + - ci_pipeline_indexed_spans_percentage + - indexed_spans_usage + - indexed_spans_percentage + - custom_event_usage + - custom_event_percentage + - logs_indexed_custom_retention_usage + - logs_indexed_custom_retention_percentage + - logs_indexed_360day_usage + - logs_indexed_360day_percentage + - logs_indexed_180day_usage + - logs_indexed_180day_percentage + - logs_indexed_90day_usage + - logs_indexed_90day_percentage + - logs_indexed_60day_usage + - logs_indexed_60day_percentage + - logs_indexed_45day_usage + - logs_indexed_45day_percentage + - logs_indexed_30day_usage + - logs_indexed_30day_percentage + - logs_indexed_15day_usage + - logs_indexed_15day_percentage + - logs_indexed_7day_usage + - logs_indexed_7day_percentage + - logs_indexed_3day_usage + - logs_indexed_3day_percentage + - rum_replay_sessions_usage + - rum_replay_sessions_percentage + - rum_browser_mobile_sessions_usage + - rum_browser_mobile_sessions_percentage + - ingested_spans_bytes_usage + - ingested_spans_bytes_percentage + - siem_ingested_bytes_usage + - siem_ingested_bytes_percentage + - '*' + type: string + x-enum-varnames: + - API_USAGE + - API_PERCENTAGE + - APM_FARGATE_USAGE + - APM_FARGATE_PERCENTAGE + - APPSEC_FARGATE_USAGE + - APPSEC_FARGATE_PERCENTAGE + - APM_HOST_USAGE + - APM_HOST_PERCENTAGE + - APM_USM_USAGE + - APM_USM_PERCENTAGE + - APPSEC_USAGE + - APPSEC_PERCENTAGE + - BROWSER_USAGE + - BROWSER_PERCENTAGE + - CI_VISIBILITY_ITR_USAGE + - CI_VISIBILITY_ITR_PERCENTAGE + - CLOUD_SIEM_USAGE + - CLOUD_SIEM_PERCENTAGE + - CONTAINER_EXCL_AGENT_USAGE + - CONTAINER_EXCL_AGENT_PERCENTAGE + - CONTAINER_USAGE + - CONTAINER_PERCENTAGE + - CSPM_CONTAINERS_PERCENTAGE + - CSPM_CONTAINERS_USAGE + - CSPM_HOSTS_PERCENTAGE + - CSPM_HOSTS_USAGE + - CUSTOM_TIMESERIES_USAGE + - CUSTOM_TIMESERIES_PERCENTAGE + - CUSTOM_INGESTED_TIMESERIES_USAGE + - CUSTOM_INGESTED_TIMESERIES_PERCENTAGE + - CWS_CONTAINERS_PERCENTAGE + - CWS_CONTAINERS_USAGE + - CWS_HOSTS_PERCENTAGE + - CWS_HOSTS_USAGE + - DBM_HOSTS_PERCENTAGE + - DBM_HOSTS_USAGE + - DBM_QUERIES_PERCENTAGE + - DBM_QUERIES_USAGE + - ESTIMATED_INDEXED_LOGS_USAGE + - ESTIMATED_INDEXED_LOGS_PERCENTAGE + - ESTIMATED_INGESTED_LOGS_USAGE + - ESTIMATED_INGESTED_LOGS_PERCENTAGE + - ESTIMATED_INDEXED_SPANS_USAGE + - ESTIMATED_INDEXED_SPANS_PERCENTAGE + - ESTIMATED_INGESTED_SPANS_USAGE + - ESTIMATED_INGESTED_SPANS_PERCENTAGE + - FARGATE_USAGE + - FARGATE_PERCENTAGE + - FUNCTIONS_USAGE + - FUNCTIONS_PERCENTAGE + - INFRA_HOST_USAGE + - INFRA_HOST_PERCENTAGE + - INVOCATIONS_USAGE + - INVOCATIONS_PERCENTAGE + - LAMBDA_TRACED_INVOCATIONS_USAGE + - LAMBDA_TRACED_INVOCATIONS_PERCENTAGE + - MOBILE_APP_TESTING_USAGE + - MOBILE_APP_TESTING_PERCENTAGE + - NDM_NETFLOW_USAGE + - NDM_NETFLOW_PERCENTAGE + - NPM_HOST_USAGE + - NPM_HOST_PERCENTAGE + - OBS_PIPELINE_BYTES_USAGE + - OBS_PIPELINE_BYTES_PERCENTAGE + - PROFILED_CONTAINER_USAGE + - PROFILED_CONTAINER_PERCENTAGE + - PROFILED_FARGATE_USAGE + - PROFILED_FARGATE_PERCENTAGE + - PROFILED_HOST_USAGE + - PROFILED_HOST_PERCENTAGE + - SERVERLESS_APPS_USAGE + - SERVERLESS_APPS_PERCENTAGE + - SNMP_USAGE + - SNMP_PERCENTAGE + - ESTIMATED_RUM_SESSIONS_USAGE + - ESTIMATED_RUM_SESSIONS_PERCENTAGE + - UNIVERSAL_SERVICE_MONITORING_USAGE + - UNIVERSAL_SERVICE_MONITORING_PERCENTAGE + - VULN_MANAGEMENT_HOSTS_USAGE + - VULN_MANAGEMENT_HOSTS_PERCENTAGE + - SDS_SCANNED_BYTES_USAGE + - SDS_SCANNED_BYTES_PERCENTAGE + - CI_TEST_INDEXED_SPANS_USAGE + - CI_TEST_INDEXED_SPANS_PERCENTAGE + - INGESTED_LOGS_BYTES_USAGE + - INGESTED_LOGS_BYTES_PERCENTAGE + - CI_PIPELINE_INDEXED_SPANS_USAGE + - CI_PIPELINE_INDEXED_SPANS_PERCENTAGE + - INDEXED_SPANS_USAGE + - INDEXED_SPANS_PERCENTAGE + - CUSTOM_EVENT_USAGE + - CUSTOM_EVENT_PERCENTAGE + - LOGS_INDEXED_CUSTOM_RETENTION_USAGE + - LOGS_INDEXED_CUSTOM_RETENTION_PERCENTAGE + - LOGS_INDEXED_360DAY_USAGE + - LOGS_INDEXED_360DAY_PERCENTAGE + - LOGS_INDEXED_180DAY_USAGE + - LOGS_INDEXED_180DAY_PERCENTAGE + - LOGS_INDEXED_90DAY_USAGE + - LOGS_INDEXED_90DAY_PERCENTAGE + - LOGS_INDEXED_60DAY_USAGE + - LOGS_INDEXED_60DAY_PERCENTAGE + - LOGS_INDEXED_45DAY_USAGE + - LOGS_INDEXED_45DAY_PERCENTAGE + - LOGS_INDEXED_30DAY_USAGE + - LOGS_INDEXED_30DAY_PERCENTAGE + - LOGS_INDEXED_15DAY_USAGE + - LOGS_INDEXED_15DAY_PERCENTAGE + - LOGS_INDEXED_7DAY_USAGE + - LOGS_INDEXED_7DAY_PERCENTAGE + - LOGS_INDEXED_3DAY_USAGE + - LOGS_INDEXED_3DAY_PERCENTAGE + - RUM_REPLAY_SESSIONS_USAGE + - RUM_REPLAY_SESSIONS_PERCENTAGE + - RUM_BROWSER_MOBILE_SESSIONS_USAGE + - RUM_BROWSER_MOBILE_SESSIONS_PERCENTAGE + - INGESTED_SPANS_BYTES_USAGE + - INGESTED_SPANS_BYTES_PERCENTAGE + - SIEM_INGESTED_BYTES_USAGE + - SIEM_INGESTED_BYTES_PERCENTAGE + - ALL + MonthlyUsageAttributionValues: + description: Fields in Usage Summary by tag(s). + properties: + api_percentage: + description: The percentage of synthetic API test usage by tag(s). + format: double + type: number + api_usage: + description: The synthetic API test usage by tag(s). + format: double + type: number + apm_fargate_percentage: + description: The percentage of APM ECS Fargate task usage by tag(s). + format: double + type: number + apm_fargate_usage: + description: The APM ECS Fargate task usage by tag(s). + format: double + type: number + apm_host_percentage: + description: The percentage of APM host usage by tag(s). + format: double + type: number + apm_host_usage: + description: The APM host usage by tag(s). + format: double + type: number + apm_usm_percentage: + description: The percentage of APM and Universal Service Monitoring host + usage by tag(s). + format: double + type: number + apm_usm_usage: + description: The APM and Universal Service Monitoring host usage by tag(s). + format: double + type: number + appsec_fargate_percentage: + description: The percentage of Application Security Monitoring ECS Fargate + task usage by tag(s). + format: double + type: number + appsec_fargate_usage: + description: The Application Security Monitoring ECS Fargate task usage + by tag(s). + format: double + type: number + appsec_percentage: + description: The percentage of Application Security Monitoring host usage + by tag(s). + format: double + type: number + appsec_usage: + description: The Application Security Monitoring host usage by tag(s). + format: double + type: number + browser_percentage: + description: The percentage of synthetic browser test usage by tag(s). + format: double + type: number + browser_usage: + description: The synthetic browser test usage by tag(s). + format: double + type: number + ci_pipeline_indexed_spans_percentage: + description: The percentage of CI Pipeline Indexed Spans usage by tag(s). + format: double + type: number + ci_pipeline_indexed_spans_usage: + description: The total CI Pipeline Indexed Spans usage by tag(s). + format: double + type: number + ci_test_indexed_spans_percentage: + description: The percentage of CI Test Indexed Spans usage by tag(s). + format: double + type: number + ci_test_indexed_spans_usage: + description: The total CI Test Indexed Spans usage by tag(s). + format: double + type: number + ci_visibility_itr_percentage: + description: The percentage of Git committers for Intelligent Test Runner + usage by tag(s). + format: double + type: number + ci_visibility_itr_usage: + description: The Git committers for Intelligent Test Runner usage by tag(s). + format: double + type: number + cloud_siem_percentage: + description: The percentage of Cloud Security Information and Event Management + usage by tag(s). + format: double + type: number + cloud_siem_usage: + description: The Cloud Security Information and Event Management usage by + tag(s). + format: double + type: number + container_excl_agent_percentage: + description: The percentage of container usage without the Datadog Agent + by tag(s). + format: double + type: number + container_excl_agent_usage: + description: The container usage without the Datadog Agent by tag(s). + format: double + type: number + container_percentage: + description: The percentage of container usage by tag(s). + format: double + type: number + container_usage: + description: The container usage by tag(s). + format: double + type: number + cspm_containers_percentage: + description: The percentage of Cloud Security Management Pro container usage + by tag(s). + format: double + type: number + cspm_containers_usage: + description: The Cloud Security Management Pro container usage by tag(s). + format: double + type: number + cspm_hosts_percentage: + description: The percentage of Cloud Security Management Pro host usage + by tag(s). + format: double + type: number + cspm_hosts_usage: + description: The Cloud Security Management Pro host usage by tag(s). + format: double + type: number + custom_event_percentage: + description: The percentage of Custom Events usage by tag(s). + format: double + type: number + custom_event_usage: + description: The total Custom Events usage by tag(s). + format: double + type: number + custom_ingested_timeseries_percentage: + description: The percentage of ingested custom metrics usage by tag(s). + format: double + type: number + custom_ingested_timeseries_usage: + description: The ingested custom metrics usage by tag(s). + format: double + type: number + custom_timeseries_percentage: + description: The percentage of indexed custom metrics usage by tag(s). + format: double + type: number + custom_timeseries_usage: + description: The indexed custom metrics usage by tag(s). + format: double + type: number + cws_containers_percentage: + description: The percentage of Cloud Workload Security container usage by + tag(s). + format: double + type: number + cws_containers_usage: + description: The Cloud Workload Security container usage by tag(s). + format: double + type: number + cws_hosts_percentage: + description: The percentage of Cloud Workload Security host usage by tag(s). + format: double + type: number + cws_hosts_usage: + description: The Cloud Workload Security host usage by tag(s). + format: double + type: number + dbm_hosts_percentage: description: The percentage of Database Monitoring host usage by tag(s). format: double type: number @@ -3642,2596 +8296,9275 @@ components: description: The total Indexed Logs (7-day Retention) usage by tag(s). format: double type: number - logs_indexed_90day_percentage: - description: The percentage of Indexed Logs (90-day Retention) usage by - tag(s). + logs_indexed_90day_percentage: + description: The percentage of Indexed Logs (90-day Retention) usage by + tag(s). + format: double + type: number + logs_indexed_90day_usage: + description: The total Indexed Logs (90-day Retention) usage by tag(s). + format: double + type: number + logs_indexed_custom_retention_percentage: + description: The percentage of Indexed Logs (Custom Retention) usage by + tag(s). + format: double + type: number + logs_indexed_custom_retention_usage: + description: The total Indexed Logs (Custom Retention) usage by tag(s). + format: double + type: number + mobile_app_testing_percentage: + description: The percentage of Synthetic mobile application test usage by + tag(s). + format: double + type: number + mobile_app_testing_usage: + description: The Synthetic mobile application test usage by tag(s). + format: double + type: number + ndm_netflow_percentage: + description: The percentage of Network Device Monitoring NetFlow usage by + tag(s). + format: double + type: number + ndm_netflow_usage: + description: The Network Device Monitoring NetFlow usage by tag(s). + format: double + type: number + npm_host_percentage: + description: The percentage of network host usage by tag(s). + format: double + type: number + npm_host_usage: + description: The network host usage by tag(s). + format: double + type: number + obs_pipeline_bytes_percentage: + description: The percentage of observability pipeline bytes usage by tag(s). + format: double + type: number + obs_pipeline_bytes_usage: + description: The observability pipeline bytes usage by tag(s). + format: double + type: number + profiled_container_percentage: + description: The percentage of profiled container usage by tag(s). + format: double + type: number + profiled_container_usage: + description: The profiled container usage by tag(s). + format: double + type: number + profiled_fargate_percentage: + description: The percentage of profiled Fargate task usage by tag(s). + format: double + type: number + profiled_fargate_usage: + description: The profiled Fargate task usage by tag(s). + format: double + type: number + profiled_host_percentage: + description: The percentage of profiled hosts usage by tag(s). + format: double + type: number + profiled_host_usage: + description: The profiled hosts usage by tag(s). + format: double + type: number + rum_browser_mobile_sessions_percentage: + description: The percentage of RUM Browser and Mobile usage by tag(s). + format: double + type: number + rum_browser_mobile_sessions_usage: + description: The total RUM Browser and Mobile usage by tag(s). + format: double + type: number + rum_replay_sessions_percentage: + description: The percentage of RUM Replay Sessions usage by tag(s). + format: double + type: number + rum_replay_sessions_usage: + description: The total RUM Replay Sessions usage by tag(s). + format: double + type: number + sds_scanned_bytes_percentage: + description: The percentage of Sensitive Data Scanner usage by tag(s). + format: double + type: number + sds_scanned_bytes_usage: + description: The total Sensitive Data Scanner usage by tag(s). + format: double + type: number + serverless_apps_percentage: + description: The percentage of Serverless Apps usage by tag(s). + format: double + type: number + serverless_apps_usage: + description: The total Serverless Apps usage by tag(s). + format: double + type: number + siem_ingested_bytes_percentage: + description: The percentage of SIEM usage by tag(s). + format: double + type: number + siem_ingested_bytes_usage: + description: The total SIEM usage by tag(s). + format: double + type: number + snmp_percentage: + description: The percentage of network device usage by tag(s). + format: double + type: number + snmp_usage: + description: The network device usage by tag(s). + format: double + type: number + universal_service_monitoring_percentage: + description: The percentage of universal service monitoring usage by tag(s). + format: double + type: number + universal_service_monitoring_usage: + description: The universal service monitoring usage by tag(s). + format: double + type: number + vuln_management_hosts_percentage: + description: The percentage of Application Vulnerability Management usage + by tag(s). + format: double + type: number + vuln_management_hosts_usage: + description: The Application Vulnerability Management usage by tag(s). + format: double + type: number + type: object + NoteWidgetDefinition: + description: The notes and links widget is similar to free text widget, but + allows for more formatting options. + properties: + background_color: + description: Background color of the note. + type: string + content: + description: Content of the note. + example: '' + type: string + font_size: + description: Size of the text. + type: string + has_padding: + default: true + description: Whether to add padding or not. + type: boolean + show_tick: + description: Whether to show a tick or not. + type: boolean + text_align: + $ref: '#/components/schemas/WidgetTextAlign' + tick_edge: + $ref: '#/components/schemas/WidgetTickEdge' + tick_pos: + description: Where to position the tick on an edge. + type: string + type: + $ref: '#/components/schemas/NoteWidgetDefinitionType' + vertical_align: + $ref: '#/components/schemas/WidgetVerticalAlign' + required: + - type + - content + type: object + NoteWidgetDefinitionType: + default: note + description: Type of the note widget. + enum: + - note + example: note + type: string + x-enum-varnames: + - NOTE + NotebookAbsoluteTime: + description: Absolute timeframe. + example: + end: '2021-02-24T20:18:28+00:00' + start: '2021-02-24T19:18:28+00:00' + properties: + end: + description: The end time. + example: '2021-02-24T20:18:28+00:00' + format: date-time + type: string + live: + description: Indicates whether the timeframe should be shifted to end at + the current time. + type: boolean + start: + description: The start time. + example: '2021-02-24T19:18:28+00:00' + format: date-time + type: string + required: + - start + - end + type: object + NotebookAuthor: + description: Attributes of user object returned by the API. + properties: + created_at: + description: Creation time of the user. + format: date-time + type: string + disabled: + description: Whether the user is disabled. + type: boolean + email: + description: Email of the user. + type: string + handle: + description: Handle of the user. + type: string + icon: + description: URL of the user's icon. + type: string + name: + description: Name of the user. + nullable: true + type: string + status: + description: Status of the user. + type: string + title: + description: Title of the user. + nullable: true + type: string + verified: + description: Whether the user is verified. + type: boolean + type: object + NotebookCellCreateRequest: + additionalProperties: false + description: The description of a notebook cell create request. + properties: + attributes: + $ref: '#/components/schemas/NotebookCellCreateRequestAttributes' + type: + $ref: '#/components/schemas/NotebookCellResourceType' + required: + - attributes + - type + type: object + NotebookCellCreateRequestAttributes: + description: 'The attributes of a notebook cell in create cell request. Valid + cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, + + `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/)' + example: + definition: + requests: + - display_type: line + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: dog_classic + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + oneOf: + - $ref: '#/components/schemas/NotebookMarkdownCellAttributes' + - $ref: '#/components/schemas/NotebookTimeseriesCellAttributes' + - $ref: '#/components/schemas/NotebookToplistCellAttributes' + - $ref: '#/components/schemas/NotebookHeatMapCellAttributes' + - $ref: '#/components/schemas/NotebookDistributionCellAttributes' + - $ref: '#/components/schemas/NotebookLogStreamCellAttributes' + NotebookCellResourceType: + default: notebook_cells + description: Type of the Notebook Cell resource. + enum: + - notebook_cells + example: notebook_cells + type: string + x-enum-varnames: + - NOTEBOOK_CELLS + NotebookCellResponse: + description: The description of a notebook cell response. + properties: + attributes: + $ref: '#/components/schemas/NotebookCellResponseAttributes' + id: + description: Notebook cell ID. + example: abcd1234 + type: string + type: + $ref: '#/components/schemas/NotebookCellResourceType' + required: + - id + - type + - attributes + type: object + NotebookCellResponseAttributes: + description: 'The attributes of a notebook cell response. Valid cell types are + `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, + + `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/)' + example: + definition: + requests: + - display_type: line + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: dog_classic + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + oneOf: + - $ref: '#/components/schemas/NotebookMarkdownCellAttributes' + - $ref: '#/components/schemas/NotebookTimeseriesCellAttributes' + - $ref: '#/components/schemas/NotebookToplistCellAttributes' + - $ref: '#/components/schemas/NotebookHeatMapCellAttributes' + - $ref: '#/components/schemas/NotebookDistributionCellAttributes' + - $ref: '#/components/schemas/NotebookLogStreamCellAttributes' + NotebookCellTime: + description: Timeframe for the notebook cell. When 'null', the notebook global + time is used. + nullable: true + oneOf: + - $ref: '#/components/schemas/NotebookRelativeTime' + - $ref: '#/components/schemas/NotebookAbsoluteTime' + type: object + NotebookCellUpdateRequest: + description: The description of a notebook cell update request. + properties: + attributes: + $ref: '#/components/schemas/NotebookCellUpdateRequestAttributes' + id: + description: Notebook cell ID. + example: abcd1234 + type: string + type: + $ref: '#/components/schemas/NotebookCellResourceType' + required: + - id + - type + - attributes + type: object + NotebookCellUpdateRequestAttributes: + description: 'The attributes of a notebook cell in update cell request. Valid + cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, + + `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/)' + example: + definition: + requests: + - display_type: line + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: dog_classic + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + oneOf: + - $ref: '#/components/schemas/NotebookMarkdownCellAttributes' + - $ref: '#/components/schemas/NotebookTimeseriesCellAttributes' + - $ref: '#/components/schemas/NotebookToplistCellAttributes' + - $ref: '#/components/schemas/NotebookHeatMapCellAttributes' + - $ref: '#/components/schemas/NotebookDistributionCellAttributes' + - $ref: '#/components/schemas/NotebookLogStreamCellAttributes' + NotebookCreateData: + description: The data for a notebook create request. + properties: + attributes: + $ref: '#/components/schemas/NotebookCreateDataAttributes' + type: + $ref: '#/components/schemas/NotebookResourceType' + required: + - type + - attributes + type: object + NotebookCreateDataAttributes: + description: The data attributes of a notebook. + properties: + cells: + description: List of cells to display in the notebook. + example: + - attributes: + definition: + text: '## Some test markdown + + + ```js + + var x, y; + + x = 5; + + y = 6; + + ```' + type: markdown + type: notebook_cells + - attributes: + definition: + requests: + - display_type: line + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: dog_classic + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + type: notebook_cells + items: + $ref: '#/components/schemas/NotebookCellCreateRequest' + type: array + metadata: + $ref: '#/components/schemas/NotebookMetadata' + name: + description: The name of the notebook. + example: Example Notebook + maxLength: 80 + minLength: 0 + type: string + status: + $ref: '#/components/schemas/NotebookStatus' + time: + $ref: '#/components/schemas/NotebookGlobalTime' + required: + - name + - cells + - time + type: object + NotebookCreateRequest: + description: The description of a notebook create request. + properties: + data: + $ref: '#/components/schemas/NotebookCreateData' + required: + - data + type: object + NotebookDistributionCellAttributes: + description: The attributes of a notebook `distribution` cell. + properties: + definition: + $ref: '#/components/schemas/DistributionWidgetDefinition' + graph_size: + $ref: '#/components/schemas/NotebookGraphSize' + split_by: + $ref: '#/components/schemas/NotebookSplitBy' + time: + $ref: '#/components/schemas/NotebookCellTime' + required: + - definition + type: object + NotebookGlobalTime: + description: Notebook global timeframe. + oneOf: + - $ref: '#/components/schemas/NotebookRelativeTime' + - $ref: '#/components/schemas/NotebookAbsoluteTime' + NotebookGraphSize: + description: The size of the graph. + enum: + - xs + - s + - m + - l + - xl + example: m + type: string + x-enum-varnames: + - EXTRA_SMALL + - SMALL + - MEDIUM + - LARGE + - EXTRA_LARGE + NotebookHeatMapCellAttributes: + description: The attributes of a notebook `heatmap` cell. + properties: + definition: + $ref: '#/components/schemas/HeatMapWidgetDefinition' + graph_size: + $ref: '#/components/schemas/NotebookGraphSize' + split_by: + $ref: '#/components/schemas/NotebookSplitBy' + time: + $ref: '#/components/schemas/NotebookCellTime' + required: + - definition + type: object + NotebookLogStreamCellAttributes: + description: The attributes of a notebook `log_stream` cell. + properties: + definition: + $ref: '#/components/schemas/LogStreamWidgetDefinition' + graph_size: + $ref: '#/components/schemas/NotebookGraphSize' + time: + $ref: '#/components/schemas/NotebookCellTime' + required: + - definition + type: object + NotebookMarkdownCellAttributes: + description: The attributes of a notebook `markdown` cell. + properties: + definition: + $ref: '#/components/schemas/NotebookMarkdownCellDefinition' + required: + - definition + type: object + NotebookMarkdownCellDefinition: + description: Text in a notebook is formatted with [Markdown](https://daringfireball.net/projects/markdown/), + which enables the use of headings, subheadings, links, images, lists, and + code blocks. + properties: + text: + description: The markdown content. + example: "# Example Header \nexample content" + type: string + type: + $ref: '#/components/schemas/NotebookMarkdownCellDefinitionType' + required: + - type + - text + type: object + NotebookMarkdownCellDefinitionType: + default: markdown + description: Type of the markdown cell. + enum: + - markdown + example: markdown + type: string + x-enum-varnames: + - MARKDOWN + NotebookMetadata: + description: Metadata associated with the notebook. + properties: + is_template: + default: false + description: Whether or not the notebook is a template. + example: false + type: boolean + take_snapshots: + default: false + description: Whether or not the notebook takes snapshot image backups of + the notebook's fixed-time graphs. + example: false + type: boolean + type: + $ref: '#/components/schemas/NotebookMetadataType' + type: object + NotebookMetadataType: + description: Metadata type of the notebook. + enum: + - postmortem + - runbook + - investigation + - documentation + - report + example: investigation + nullable: true + type: string + x-enum-varnames: + - POSTMORTEM + - RUNBOOK + - INVESTIGATION + - DOCUMENTATION + - REPORT + NotebookRelativeTime: + description: Relative timeframe. + example: + live_span: 1h + nullable: true + properties: + live_span: + $ref: '#/components/schemas/WidgetLiveSpan' + required: + - live_span + type: object + NotebookResourceType: + default: notebooks + description: Type of the Notebook resource. + enum: + - notebooks + example: notebooks + type: string + x-enum-varnames: + - NOTEBOOKS + NotebookResponse: + description: The description of a notebook response. + properties: + data: + $ref: '#/components/schemas/NotebookResponseData' + type: object + NotebookResponseData: + description: The data for a notebook. + properties: + attributes: + $ref: '#/components/schemas/NotebookResponseDataAttributes' + id: + description: Unique notebook ID, assigned when you create the notebook. + example: 123456 + format: int64 + readOnly: true + type: integer + type: + $ref: '#/components/schemas/NotebookResourceType' + required: + - id + - type + - attributes + type: object + NotebookResponseDataAttributes: + description: The attributes of a notebook. + properties: + author: + $ref: '#/components/schemas/NotebookAuthor' + cells: + description: List of cells to display in the notebook. + example: + - attributes: + definition: + text: '## Some test markdown + + + ```js + + var x, y; + + x = 5; + + y = 6; + + ```' + type: markdown + id: bzbycoya + type: notebook_cells + - attributes: + definition: + requests: + - display_type: line + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: dog_classic + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + id: 9k6bc6xc + type: notebook_cells + items: + $ref: '#/components/schemas/NotebookCellResponse' + type: array + created: + description: UTC time stamp for when the notebook was created. + example: '2021-02-24T23:14:15.173964+00:00' + format: date-time + readOnly: true + type: string + metadata: + $ref: '#/components/schemas/NotebookMetadata' + modified: + description: UTC time stamp for when the notebook was last modified. + example: '2021-02-24T23:15:23.274966+00:00' + format: date-time + readOnly: true + type: string + name: + description: The name of the notebook. + example: Example Notebook + maxLength: 80 + minLength: 0 + type: string + status: + $ref: '#/components/schemas/NotebookStatus' + time: + $ref: '#/components/schemas/NotebookGlobalTime' + required: + - cells + - time + - name + type: object + NotebookSplitBy: + description: Object describing how to split the graph to display multiple visualizations + per request. + example: + keys: [] + tags: [] + properties: + keys: + description: Keys to split on. + items: + description: A key to split on. + example: environment + type: string + type: array + tags: + description: Tags to split on. + items: + description: A tag to split on. + example: environment:staging + type: string + type: array + required: + - keys + - tags + type: object + NotebookStatus: + default: published + description: Publication status of the notebook. For now, always "published". + enum: + - published + example: published + type: string + x-enum-varnames: + - PUBLISHED + NotebookTimeseriesCellAttributes: + description: The attributes of a notebook `timeseries` cell. + properties: + definition: + $ref: '#/components/schemas/TimeseriesWidgetDefinition' + graph_size: + $ref: '#/components/schemas/NotebookGraphSize' + split_by: + $ref: '#/components/schemas/NotebookSplitBy' + time: + $ref: '#/components/schemas/NotebookCellTime' + required: + - definition + type: object + NotebookToplistCellAttributes: + description: The attributes of a notebook `toplist` cell. + properties: + definition: + $ref: '#/components/schemas/ToplistWidgetDefinition' + graph_size: + $ref: '#/components/schemas/NotebookGraphSize' + split_by: + $ref: '#/components/schemas/NotebookSplitBy' + time: + $ref: '#/components/schemas/NotebookCellTime' + required: + - definition + type: object + NotebookUpdateCell: + description: 'Updating a notebook can either insert new cell(s) or update existing + cell(s) by including the cell `id`. + + To delete existing cell(s), simply omit it from the list of cells.' + oneOf: + - $ref: '#/components/schemas/NotebookCellCreateRequest' + - $ref: '#/components/schemas/NotebookCellUpdateRequest' + NotebookUpdateData: + description: The data for a notebook update request. + properties: + attributes: + $ref: '#/components/schemas/NotebookUpdateDataAttributes' + type: + $ref: '#/components/schemas/NotebookResourceType' + required: + - type + - attributes + type: object + NotebookUpdateDataAttributes: + description: The data attributes of a notebook. + properties: + cells: + description: List of cells to display in the notebook. + example: + - attributes: + definition: + text: '## Some test markdown + + + ```js + + var x, y; + + x = 5; + + y = 6; + + ```' + type: markdown + id: bzbycoya + type: notebook_cells + - attributes: + definition: + requests: + - display_type: line + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: dog_classic + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + id: 9k6bc6xc + type: notebook_cells + items: + $ref: '#/components/schemas/NotebookUpdateCell' + type: array + metadata: + $ref: '#/components/schemas/NotebookMetadata' + name: + description: The name of the notebook. + example: Example Notebook + maxLength: 80 + minLength: 0 + type: string + status: + $ref: '#/components/schemas/NotebookStatus' + time: + $ref: '#/components/schemas/NotebookGlobalTime' + required: + - name + - cells + - time + type: object + NotebookUpdateRequest: + description: The description of a notebook update request. + properties: + data: + $ref: '#/components/schemas/NotebookUpdateData' + required: + - data + type: object + NotebooksResponse: + description: Notebooks get all response. + properties: + data: + description: List of notebook definitions. + items: + $ref: '#/components/schemas/NotebooksResponseData' + type: array + meta: + $ref: '#/components/schemas/NotebooksResponseMeta' + type: object + NotebooksResponseData: + description: The data for a notebook in get all response. + properties: + attributes: + $ref: '#/components/schemas/NotebooksResponseDataAttributes' + id: + description: Unique notebook ID, assigned when you create the notebook. + example: 123456 + format: int64 + readOnly: true + type: integer + type: + $ref: '#/components/schemas/NotebookResourceType' + required: + - id + - type + - attributes + type: object + NotebooksResponseDataAttributes: + description: The attributes of a notebook in get all response. + properties: + author: + $ref: '#/components/schemas/NotebookAuthor' + cells: + description: List of cells to display in the notebook. + items: + $ref: '#/components/schemas/NotebookCellResponse' + type: array + created: + description: UTC time stamp for when the notebook was created. + example: '2021-02-24T23:14:15.173964+00:00' + format: date-time + readOnly: true + type: string + metadata: + $ref: '#/components/schemas/NotebookMetadata' + modified: + description: UTC time stamp for when the notebook was last modified. + example: '2021-02-24T23:15:23.274966+00:00' + format: date-time + readOnly: true + type: string + name: + description: The name of the notebook. + example: Example Notebook + maxLength: 80 + minLength: 0 + type: string + status: + $ref: '#/components/schemas/NotebookStatus' + time: + $ref: '#/components/schemas/NotebookGlobalTime' + required: + - name + type: object + NotebooksResponseMeta: + description: Searches metadata returned by the API. + properties: + page: + $ref: '#/components/schemas/NotebooksResponsePage' + type: object + NotebooksResponsePage: + description: Pagination metadata returned by the API. + properties: + total_count: + description: The total number of notebooks that would be returned if the + request was not filtered by `start` and `count` parameters. + format: int64 + type: integer + total_filtered_count: + description: The total number of notebooks returned. + format: int64 + type: integer + type: object + NotifyEndState: + description: A notification end state. + enum: + - alert + - no data + - warn + example: alert + type: string + x-enum-varnames: + - ALERT + - NO_DATA + - WARN + NotifyEndStates: + default: + - alert + - no data + - warn + description: States for which `notify_end_types` sends out notifications for. + example: + - alert + - no data + - warn + items: + $ref: '#/components/schemas/NotifyEndState' + type: array + NotifyEndType: + description: A notification end type. + enum: + - canceled + - expired + example: expired + type: string + x-enum-varnames: + - CANCELED + - EXPIRED + NotifyEndTypes: + default: + - expired + description: 'If set, notifies if a monitor is in an alert-worthy state (`ALERT`, + `WARNING`, or `NO DATA`) + + when this downtime expires or is canceled. Applied to monitors that change + states during + + the downtime (such as from `OK` to `ALERT`, `WARNING`, or `NO DATA`), and + to monitors that + + already have an alert-worthy state when downtime begins.' + example: + - canceled + - expired + items: + $ref: '#/components/schemas/NotifyEndType' + type: array + OnMissingDataOption: + description: 'Controls how groups or monitors are treated if an evaluation does + not return any data points. + + The default option results in different behavior depending on the monitor + query type. + + For monitors using Count queries, an empty monitor evaluation is treated as + 0 and is compared to the threshold conditions. + + For monitors using any query type other than Count, for example Gauge, Measure, + or Rate, the monitor shows the last known status. + + This option is only available for APM Trace Analytics, Audit Trail, CI, Error + Tracking, Event, Logs, and RUM monitors.' + enum: + - default + - show_no_data + - show_and_notify_no_data + - resolve + type: string + x-enum-varnames: + - DEFAULT + - SHOW_NO_DATA + - SHOW_AND_NOTIFY_NO_DATA + - RESOLVE + OrgDowngradedResponse: + description: Status of downgrade + properties: + message: + description: Information pertaining to the downgraded child organization. + type: string + type: object + Organization: + description: Create, edit, and manage organizations. + properties: + billing: + $ref: '#/components/schemas/OrganizationBilling' + created: + description: Date of the organization creation. + example: '2019-09-26T17:28:28Z' + readOnly: true + type: string + description: + description: Description of the organization. + example: some description + type: string + name: + description: The name of the child organization, limited to 32 characters. + example: New child org + maxLength: 32 + type: string + public_id: + description: The `public_id` of the organization you are operating within. + example: abcdef12345 + type: string + settings: + $ref: '#/components/schemas/OrganizationSettings' + subscription: + $ref: '#/components/schemas/OrganizationSubscription' + trial: + description: Only available for MSP customers. Allows child organizations + to be created on a trial plan. + example: false + type: boolean + type: object + OrganizationBilling: + deprecated: true + description: A JSON array of billing type. + example: + type: parent_billing + properties: + type: + description: The type of billing. Only `parent_billing` is supported. + type: string + type: object + OrganizationCreateBody: + description: Object describing an organization to create. + properties: + billing: + $ref: '#/components/schemas/OrganizationBilling' + name: + description: The name of the new child-organization, limited to 32 characters. + example: New child org + maxLength: 32 + type: string + subscription: + $ref: '#/components/schemas/OrganizationSubscription' + required: + - name + type: object + OrganizationCreateResponse: + description: Response object for an organization creation. + properties: + api_key: + $ref: '#/components/schemas/ApiKey' + application_key: + $ref: '#/components/schemas/ApplicationKey' + org: + $ref: '#/components/schemas/Organization' + user: + $ref: '#/components/schemas/User' + type: object + OrganizationListResponse: + description: Response with the list of organizations. + properties: + orgs: + description: Array of organization objects. + items: + $ref: '#/components/schemas/Organization' + type: array + type: object + OrganizationResponse: + description: Response with an organization. + properties: + org: + $ref: '#/components/schemas/Organization' + type: object + OrganizationSettings: + description: A JSON array of settings. + properties: + private_widget_share: + description: Whether or not the organization users can share widgets outside + of Datadog. + example: false + type: boolean + saml: + $ref: '#/components/schemas/OrganizationSettingsSaml' + saml_autocreate_access_role: + $ref: '#/components/schemas/AccessRole' + saml_autocreate_users_domains: + $ref: '#/components/schemas/OrganizationSettingsSamlAutocreateUsersDomains' + saml_can_be_enabled: + description: Whether or not SAML can be enabled for this organization. + example: false + type: boolean + saml_idp_endpoint: + description: Identity provider endpoint for SAML authentication. + example: https://my.saml.endpoint + type: string + saml_idp_initiated_login: + $ref: '#/components/schemas/OrganizationSettingsSamlIdpInitiatedLogin' + saml_idp_metadata_uploaded: + description: Whether or not a SAML identity provider metadata file was provided + to the Datadog organization. + example: false + type: boolean + saml_login_url: + description: URL for SAML logging. + example: https://my.saml.login.url + type: string + saml_strict_mode: + $ref: '#/components/schemas/OrganizationSettingsSamlStrictMode' + type: object + OrganizationSettingsSaml: + description: 'Set the boolean property enabled to enable or disable single sign + on with SAML. + + See the SAML documentation for more information about all SAML settings.' + properties: + enabled: + description: Whether or not SAML is enabled for this organization. + example: false + type: boolean + type: object + OrganizationSettingsSamlAutocreateUsersDomains: + description: Has two properties, `enabled` (boolean) and `domains`, which is + a list of domains without the @ symbol. + properties: + domains: + description: List of domains where the SAML automated user creation is enabled. + items: + description: Domain to automate user creation from. + example: example.com + type: string + type: array + enabled: + description: Whether or not the automated user creation based on SAML domain + is enabled. + example: false + type: boolean + type: object + OrganizationSettingsSamlIdpInitiatedLogin: + description: Has one property enabled (boolean). + properties: + enabled: + description: 'Whether SAML IdP initiated login is enabled, learn more + + in the [SAML documentation](https://docs.datadoghq.com/account_management/saml/#idp-initiated-login).' + example: false + type: boolean + type: object + OrganizationSettingsSamlStrictMode: + description: Has one property enabled (boolean). + properties: + enabled: + description: 'Whether or not the SAML strict mode is enabled. If true, all + users must log in with SAML. + + Learn more on the [SAML Strict documentation](https://docs.datadoghq.com/account_management/saml/#saml-strict).' + example: false + type: boolean + type: object + OrganizationSubscription: + deprecated: true + description: Subscription definition. + example: + type: pro + properties: + type: + description: The subscription type. Types available are `trial`, `free`, + and `pro`. + type: string + type: object + PagerDutyService: + description: The PagerDuty service that is available for integration with Datadog. + properties: + service_key: + description: Your service key in PagerDuty. + example: '' + type: string + service_name: + description: Your service name associated with a service key in PagerDuty. + example: '' + type: string + required: + - service_name + - service_key + type: object + PagerDutyServiceKey: + description: PagerDuty service object key. + properties: + service_key: + description: Your service key in PagerDuty. + example: '' + type: string + required: + - service_key + type: object + PagerDutyServiceName: + description: PagerDuty service object name. + properties: + service_name: + description: Your service name associated service key in PagerDuty. + example: '' + type: string + required: + - service_name + type: object + Pagination: + description: Pagination object. + properties: + total_count: + description: Total count. + format: int64 + type: integer + total_filtered_count: + description: Total count of elements matched by the filter. + format: int64 + type: integer + type: object + Point: + description: Array of timeseries points. + example: + - 1575317847.0 + - 0.5 + items: + description: 'Each point is of the form `[POSIX_timestamp, numeric_value]`. + + The timestamp should be in seconds and current. + + The numeric value format should be a 32bit float gauge-type value. + + Current is defined as not more than 10 minutes in the future or more than + 1 hour in the past.' + format: double + nullable: true + type: number + maxItems: 2 + minItems: 2 + type: array + PowerpackTemplateVariableContents: + description: Powerpack template variable contents. + properties: + name: + description: The name of the variable. + example: host1 + type: string + prefix: + description: The tag prefix associated with the variable. + type: string + values: + description: One or many template variable values within the saved view, + which will be unioned together using `OR` if more than one is specified. + example: + - my-host + - host1 + - host2 + items: + description: One or more possible values of the template variable. + minLength: 1 + type: string + type: array + required: + - name + - values + type: object + PowerpackTemplateVariables: + description: Powerpack template variables. + properties: + controlled_by_powerpack: + description: Template variables controlled at the powerpack level. + items: + $ref: '#/components/schemas/PowerpackTemplateVariableContents' + type: array + controlled_externally: + description: Template variables controlled by the external resource, such + as the dashboard this powerpack is on. + items: + $ref: '#/components/schemas/PowerpackTemplateVariableContents' + type: array + type: object + PowerpackWidgetDefinition: + description: The powerpack widget allows you to keep similar graphs together + on your timeboard. Each group has a custom header, can hold one to many graphs, + and is collapsible. + properties: + background_color: + description: Background color of the powerpack title. + type: string + banner_img: + description: URL of image to display as a banner for the powerpack. + type: string + powerpack_id: + description: UUID of the associated powerpack. + example: df43cf2a-6475-490d-b686-6fbc6cb9a49c + type: string + show_title: + default: true + description: Whether to show the title or not. + type: boolean + template_variables: + $ref: '#/components/schemas/PowerpackTemplateVariables' + title: + description: Title of the widget. + type: string + type: + $ref: '#/components/schemas/PowerpackWidgetDefinitionType' + required: + - type + - powerpack_id + type: object + PowerpackWidgetDefinitionType: + default: powerpack + description: Type of the powerpack widget. + enum: + - powerpack + example: powerpack + type: string + x-enum-varnames: + - POWERPACK + ProcessQueryDefinition: + description: The process query to use in the widget. + properties: + filter_by: + description: List of processes. + items: + description: Process name. + type: string + type: array + limit: + description: Max number of items in the filter list. + format: int64 + minimum: 0 + type: integer + metric: + description: Your chosen metric. + example: system.load.1 + type: string + search_by: + description: Your chosen search term. + type: string + required: + - metric + type: object + QuerySortOrder: + default: desc + description: Direction of sort. + enum: + - asc + - desc + type: string + x-enum-varnames: + - ASC + - DESC + QueryValueWidgetDefinition: + description: Query values display the current value of a given metric, APM, + or log query. + properties: + autoscale: + description: Whether to use auto-scaling or not. + type: boolean + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + custom_unit: + description: Display a unit of your choice on the widget. + type: string + precision: + description: Number of decimals to show. If not defined, the widget uses + the raw value. + format: int64 + type: integer + requests: + description: Widget definition. + example: + - q/apm_query/log_query: {} + items: + $ref: '#/components/schemas/QueryValueWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + text_align: + $ref: '#/components/schemas/WidgetTextAlign' + time: + $ref: '#/components/schemas/WidgetTime' + timeseries_background: + $ref: '#/components/schemas/TimeseriesBackground' + title: + description: Title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/QueryValueWidgetDefinitionType' + required: + - type + - requests + type: object + QueryValueWidgetDefinitionType: + default: query_value + description: Type of the query value widget. + enum: + - query_value + example: query_value + type: string + x-enum-varnames: + - QUERY_VALUE + QueryValueWidgetRequest: + description: Updated query value widget. + properties: + aggregator: + $ref: '#/components/schemas/WidgetAggregator' + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + audit_query: + $ref: '#/components/schemas/LogQueryDefinition' + conditional_formats: + description: List of conditional formats. + items: + $ref: '#/components/schemas/WidgetConditionalFormat' + type: array + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + formulas: + description: List of formulas that operate on queries. + items: + $ref: '#/components/schemas/WidgetFormula' + type: array + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: TODO. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + type: object + ReferenceTableLogsLookupProcessor: + description: '**Note**: Reference Tables are in public beta. + + Use the Lookup Processor to define a mapping between a log attribute + + and a human readable value saved in a Reference Table. + + For example, you can use the Lookup Processor to map an internal service ID + + into a human readable service name. Alternatively, you could also use it to + check + + if the MAC address that just attempted to connect to the production + + environment belongs to your list of stolen machines.' + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + lookup_enrichment_table: + description: Name of the Reference Table for the source attribute and their + associated target attribute values. + example: service_id_to_service_name_table + type: string + name: + description: Name of the processor. + type: string + source: + description: Source attribute used to perform the lookup. + example: service_id + type: string + target: + description: Name of the attribute that contains the corresponding value + in the mapping list. + example: service + type: string + type: + $ref: '#/components/schemas/LogsLookupProcessorType' + required: + - source + - target + - lookup_enrichment_table + - type + type: object + ResponseMetaAttributes: + description: Object describing meta attributes of response. + properties: + page: + $ref: '#/components/schemas/Pagination' + type: object + RunWorkflowWidgetDefinition: + description: Run workflow is widget that allows you to run a workflow from a + dashboard. + properties: + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + inputs: + description: Array of workflow inputs to map to dashboard template variables. + items: + $ref: '#/components/schemas/RunWorkflowWidgetInput' + type: array + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/RunWorkflowWidgetDefinitionType' + workflow_id: + description: Workflow id. + example: + type: string + required: + - type + - workflow_id + type: object + RunWorkflowWidgetDefinitionType: + default: run_workflow + description: Type of the run workflow widget. + enum: + - run_workflow + example: run_workflow + type: string + x-enum-varnames: + - RUN_WORKFLOW + RunWorkflowWidgetInput: + description: Object to map a dashboard template variable to a workflow input. + properties: + name: + description: Name of the workflow input. + example: Environment + type: string + value: + description: Dashboard template variable. Can be suffixed with '.value' + or '.key'. + example: $env.value + type: string + required: + - name + - value + type: object + SLOBulkDelete: + additionalProperties: + description: An array of all SLO timeframes. + items: + $ref: '#/components/schemas/SLOTimeframe' + type: array + description: 'A map of service level objective object IDs to arrays of timeframes, + + which indicate the thresholds to delete for each ID.' + example: + id1: + - 7d + - 30d + id2: + - 7d + - 30d + type: object + SLOBulkDeleteError: + description: Object describing the error. + properties: + id: + description: 'The ID of the service level objective object associated with + + this error.' + example: '' + type: string + message: + description: The error message. + example: '' + type: string + timeframe: + $ref: '#/components/schemas/SLOErrorTimeframe' + required: + - id + - timeframe + - message + type: object + SLOBulkDeleteResponse: + description: 'The bulk partial delete service level objective object endpoint + + response. + + + This endpoint operates on multiple service level objective objects, so + + it may be partially successful. In such cases, the "data" and "error" + + fields in this response indicate which deletions succeeded and failed.' + properties: + data: + $ref: '#/components/schemas/SLOBulkDeleteResponseData' + errors: + description: Array of errors object returned. + items: + $ref: '#/components/schemas/SLOBulkDeleteError' + type: array + type: object + SLOBulkDeleteResponseData: + description: An array of service level objective objects. + properties: + deleted: + description: 'An array of service level objective object IDs that indicates + + which objects that were completely deleted.' + items: + description: A deleted SLO ID. + type: string + type: array + updated: + description: 'An array of service level objective object IDs that indicates + + which objects that were modified (objects for which at least one + + threshold was deleted, but that were not completely deleted).' + items: + description: An updated SLO ID. + type: string + type: array + type: object + SLOCorrection: + description: The response object of a list of SLO corrections. + properties: + attributes: + $ref: '#/components/schemas/SLOCorrectionResponseAttributes' + id: + description: The ID of the SLO correction. + type: string + type: + $ref: '#/components/schemas/SLOCorrectionType' + type: object + SLOCorrectionCategory: + description: Category the SLO correction belongs to. + enum: + - Scheduled Maintenance + - Outside Business Hours + - Deployment + - Other + example: Scheduled Maintenance + type: string + x-enum-varnames: + - SCHEDULED_MAINTENANCE + - OUTSIDE_BUSINESS_HOURS + - DEPLOYMENT + - OTHER + SLOCorrectionCreateData: + description: The data object associated with the SLO correction to be created. + properties: + attributes: + $ref: '#/components/schemas/SLOCorrectionCreateRequestAttributes' + type: + $ref: '#/components/schemas/SLOCorrectionType' + required: + - type + type: object + SLOCorrectionCreateRequest: + description: An object that defines a correction to be applied to an SLO. + properties: + data: + $ref: '#/components/schemas/SLOCorrectionCreateData' + type: object + SLOCorrectionCreateRequestAttributes: + description: The attribute object associated with the SLO correction to be created. + properties: + category: + $ref: '#/components/schemas/SLOCorrectionCategory' + description: + description: Description of the correction being made. + type: string + duration: + description: Length of time (in seconds) for a specified `rrule` recurring + SLO correction. + example: 1600000000 + format: int64 + type: integer + end: + description: Ending time of the correction in epoch seconds. + example: 1600000000 + format: int64 + type: integer + rrule: + description: 'The recurrence rules as defined in the iCalendar RFC 5545. + The supported rules for SLO corrections + + are `FREQ`, `INTERVAL`, `COUNT` and `UNTIL`.' + example: FREQ=DAILY;INTERVAL=10;COUNT=5 + type: string + slo_id: + description: ID of the SLO that this correction applies to. + example: sloId + type: string + start: + description: Starting time of the correction in epoch seconds. + example: 1600000000 + format: int64 + type: integer + timezone: + description: The timezone to display in the UI for the correction times + (defaults to "UTC"). + example: UTC + type: string + required: + - slo_id + - start + - category + type: object + SLOCorrectionListResponse: + description: A list of SLO correction objects. + properties: + data: + description: The list of of SLO corrections objects. + items: + $ref: '#/components/schemas/SLOCorrection' + type: array + meta: + $ref: '#/components/schemas/ResponseMetaAttributes' + type: object + SLOCorrectionResponse: + description: The response object of an SLO correction. + properties: + data: + $ref: '#/components/schemas/SLOCorrection' + type: object + SLOCorrectionResponseAttributes: + description: The attribute object associated with the SLO correction. + properties: + category: + $ref: '#/components/schemas/SLOCorrectionCategory' + created_at: + description: The epoch timestamp of when the correction was created at. + format: int64 + nullable: true + type: integer + creator: + $ref: '#/components/schemas/Creator' + description: + description: Description of the correction being made. + type: string + duration: + description: Length of time (in seconds) for a specified `rrule` recurring + SLO correction. + example: 3600 + format: int64 + nullable: true + type: integer + end: + description: Ending time of the correction in epoch seconds. + format: int64 + nullable: true + type: integer + modified_at: + description: The epoch timestamp of when the correction was modified at. + format: int64 + nullable: true + type: integer + modifier: + $ref: '#/components/schemas/SLOCorrectionResponseAttributesModifier' + rrule: + description: 'The recurrence rules as defined in the iCalendar RFC 5545. + The supported rules for SLO corrections + + are `FREQ`, `INTERVAL`, `COUNT`, and `UNTIL`.' + example: FREQ=DAILY;INTERVAL=10;COUNT=5 + nullable: true + type: string + slo_id: + description: ID of the SLO that this correction applies to. + type: string + start: + description: Starting time of the correction in epoch seconds. + format: int64 + type: integer + timezone: + description: The timezone to display in the UI for the correction times + (defaults to "UTC"). + type: string + type: object + SLOCorrectionResponseAttributesModifier: + description: Modifier of the object. + nullable: true + properties: + email: + description: Email of the Modifier. + type: string + handle: + description: Handle of the Modifier. + type: string + name: + description: Name of the Modifier. + type: string + type: object + SLOCorrectionType: + default: correction + description: SLO correction resource type. + enum: + - correction + example: correction + type: string + x-enum-varnames: + - CORRECTION + SLOCorrectionUpdateData: + description: The data object associated with the SLO correction to be updated. + properties: + attributes: + $ref: '#/components/schemas/SLOCorrectionUpdateRequestAttributes' + type: + $ref: '#/components/schemas/SLOCorrectionType' + type: object + SLOCorrectionUpdateRequest: + description: An object that defines a correction to be applied to an SLO. + properties: + data: + $ref: '#/components/schemas/SLOCorrectionUpdateData' + type: object + SLOCorrectionUpdateRequestAttributes: + description: The attribute object associated with the SLO correction to be updated. + properties: + category: + $ref: '#/components/schemas/SLOCorrectionCategory' + description: + description: Description of the correction being made. + type: string + duration: + description: Length of time (in seconds) for a specified `rrule` recurring + SLO correction. + example: 3600 + format: int64 + type: integer + end: + description: Ending time of the correction in epoch seconds. + example: 1600000000 + format: int64 + type: integer + rrule: + description: 'The recurrence rules as defined in the iCalendar RFC 5545. + The supported rules for SLO corrections + + are `FREQ`, `INTERVAL`, `COUNT`, and `UNTIL`.' + example: FREQ=DAILY;INTERVAL=10;COUNT=5 + type: string + start: + description: Starting time of the correction in epoch seconds. + example: 1600000000 + format: int64 + type: integer + timezone: + description: The timezone to display in the UI for the correction times + (defaults to "UTC"). + example: UTC + type: string + type: object + SLOCreator: + description: The creator of the SLO + nullable: true + properties: + email: + description: Email of the creator. + type: string + id: + description: User ID of the creator. + format: int64 + type: integer + name: + description: Name of the creator. + nullable: true + type: string + type: object + SLODeleteResponse: + description: A response list of all service level objective deleted. + properties: + data: + description: An array containing the ID of the deleted service level objective + object. + items: + description: ID of a deleted SLO. + type: string + type: array + errors: + additionalProperties: + description: Error preventing the SLO deletion. + type: string + description: An dictionary containing the ID of the SLO as key and a deletion + error as value. + type: object + type: object + SLOErrorBudgetRemainingData: + additionalProperties: + description: Remaining error budget. + format: double + type: number + description: A mapping of threshold `timeframe` to the remaining error budget. + example: + 7d: 100.0 + type: object + SLOErrorTimeframe: + description: 'The timeframe of the threshold associated with this error + + or "all" if all thresholds are affected.' + enum: + - 7d + - 30d + - 90d + - all + example: 30d + type: string + x-enum-varnames: + - SEVEN_DAYS + - THIRTY_DAYS + - NINETY_DAYS + - ALL + SLOHistoryMetrics: + description: 'A `metric` based SLO history response. + + + This is not included in responses for `monitor` based SLOs.' + properties: + denominator: + $ref: '#/components/schemas/SLOHistoryMetricsSeries' + interval: + description: The aggregated query interval for the series data. It's implicit + based on the query time window. + example: 0 + format: int64 + type: integer + message: + description: Optional message if there are specific query issues/warnings. + example: '' + type: string + numerator: + $ref: '#/components/schemas/SLOHistoryMetricsSeries' + query: + description: The combined numerator and denominator query CSV. + example: '' + type: string + res_type: + description: The series result type. This mimics `batch_query` response + type. + example: '' + type: string + resp_version: + description: The series response version type. This mimics `batch_query` + response type. + example: 0 + format: int64 + type: integer + times: + description: An array of query timestamps in EPOCH milliseconds. + example: [] + items: + description: A timestamp in EPOCH milliseconds. + format: double + type: number + type: array + required: + - res_type + - interval + - resp_version + - query + - times + - numerator + - denominator + type: object + SLOHistoryMetricsSeries: + description: 'A representation of `metric` based SLO time series for the provided + queries. + + This is the same response type from `batch_query` endpoint.' + properties: + count: + description: Count of submitted metrics. + example: 0 + format: int64 + type: integer + metadata: + $ref: '#/components/schemas/SLOHistoryMetricsSeriesMetadata' + sum: + description: Total sum of the query. + example: 0.0 + format: double + type: number + values: + description: The query values for each metric. + example: [] + items: + description: A metric name and its value. + format: double + type: number + type: array + required: + - count + - sum + - values + type: object + SLOHistoryMetricsSeriesMetadata: + description: Query metadata. + example: {} + properties: + aggr: + description: Query aggregator function. + type: string + expression: + description: Query expression. + type: string + metric: + description: Query metric used. + type: string + query_index: + description: Query index from original combined query. + format: int64 + type: integer + scope: + description: Query scope. + type: string + unit: + description: 'An array of metric units that contains up to two unit objects. + + For example, bytes represents one unit object and bytes per second represents + two unit objects. + + If a metric query only has one unit object, the second array element is + null.' + example: + - family: bytes + id: 2 + name: byte + plural: bytes + scale_factor: 1.0 + short_name: B + - null + items: + $ref: '#/components/schemas/SLOHistoryMetricsSeriesMetadataUnit' + nullable: true + type: array + type: object + SLOHistoryMetricsSeriesMetadataUnit: + description: An Object of metric units. + nullable: true + properties: + family: + description: The family of metric unit, for example `bytes` is the family + for `kibibyte`, `byte`, and `bit` units. + type: string + id: + description: The ID of the metric unit. + format: int64 + type: integer + name: + description: The unit of the metric, for instance `byte`. + type: string + plural: + description: The plural Unit of metric, for instance `bytes`. + nullable: true + type: string + scale_factor: + description: The scale factor of metric unit, for instance `1.0`. format: double type: number - logs_indexed_90day_usage: - description: The total Indexed Logs (90-day Retention) usage by tag(s). + short_name: + description: A shorter and abbreviated version of the metric unit, for instance + `B`. + nullable: true + type: string + type: object + SLOHistoryMonitor: + description: 'An object that holds an SLI value and its associated data. It + can represent an SLO''s overall SLI value. + + This can also represent the SLI value for a specific monitor in multi-monitor + SLOs, or a group in grouped SLOs.' + properties: + error_budget_remaining: + $ref: '#/components/schemas/SLOErrorBudgetRemainingData' + errors: + description: An array of error objects returned while querying the history + data for the service level objective. + items: + $ref: '#/components/schemas/SLOHistoryResponseErrorWithType' + type: array + group: + description: For groups in a grouped SLO, this is the group name. + example: name + type: string + history: + description: For `monitor` based SLOs, this includes the aggregated history + as arrays that include time series and uptime data where `0=monitor` is + in `OK` state and `1=monitor` is in `alert` state. + example: + - - 1579212382 + - 0 + items: + description: Represents an array time series data. + example: + - 1579212382 + - 0 + items: + description: A time series data point which is a tuple of (timestamp, + value). + format: double + type: number + maxItems: 2 + minItems: 2 + type: array + type: array + monitor_modified: + description: For `monitor` based SLOs, this is the last modified timestamp + in epoch seconds of the monitor. + example: 1615867200 + format: int64 + type: integer + monitor_type: + description: For `monitor` based SLOs, this describes the type of monitor. + example: string + type: string + name: + description: For groups in a grouped SLO, this is the group name. For monitors + in a multi-monitor SLO, this is the monitor name. + example: string + type: string + precision: + deprecated: true + description: The amount of decimal places the SLI value is accurate to for + the given from `&&` to timestamp. Use `span_precision` instead. + example: 2.0 format: double type: number - logs_indexed_custom_retention_percentage: - description: The percentage of Indexed Logs (Custom Retention) usage by - tag(s). + preview: + description: 'For `monitor` based SLOs, when `true` this indicates that + a replay is in progress to give an accurate uptime + + calculation.' + example: true + type: boolean + sli_value: + description: The current SLI value of the SLO over the history window. + example: 99.99 format: double + nullable: true type: number - logs_indexed_custom_retention_usage: - description: The total Indexed Logs (Custom Retention) usage by tag(s). + span_precision: + description: The amount of decimal places the SLI value is accurate to for + the given from `&&` to timestamp. + example: 2.0 format: double type: number - mobile_app_testing_percentage: - description: The percentage of Synthetic mobile application test usage by - tag(s). + uptime: + deprecated: true + description: Use `sli_value` instead. + example: 99.99 format: double type: number - mobile_app_testing_usage: - description: The Synthetic mobile application test usage by tag(s). + type: object + SLOHistoryResponse: + description: A service level objective history response. + properties: + data: + $ref: '#/components/schemas/SLOHistoryResponseData' + errors: + description: A list of errors while querying the history data for the service + level objective. + items: + $ref: '#/components/schemas/SLOHistoryResponseError' + nullable: true + type: array + type: object + SLOHistoryResponseData: + description: An array of service level objective objects. + properties: + from_ts: + description: The `from` timestamp in epoch seconds. + example: 1615323990 + format: int64 + type: integer + group_by: + description: 'For `metric` based SLOs where the query includes a group-by + clause, this represents the list of grouping parameters. + + + This is not included in responses for `monitor` based SLOs.' + items: + description: A grouping parameter. + type: string + type: array + groups: + description: 'For grouped SLOs, this represents SLI data for specific groups. + + + This is not included in the responses for `metric` based SLOs.' + items: + $ref: '#/components/schemas/SLOHistoryMonitor' + type: array + monitors: + description: 'For multi-monitor SLOs, this represents SLI data for specific + monitors. + + + This is not included in the responses for `metric` based SLOs.' + items: + $ref: '#/components/schemas/SLOHistoryMonitor' + type: array + overall: + $ref: '#/components/schemas/SLOHistorySLIData' + series: + $ref: '#/components/schemas/SLOHistoryMetrics' + thresholds: + additionalProperties: + $ref: '#/components/schemas/SLOThreshold' + description: mapping of string timeframe to the SLO threshold. + example: + my_service: + target: 95 + timeframe: 7d + type: object + to_ts: + description: The `to` timestamp in epoch seconds. + example: 1615928790 + format: int64 + type: integer + type: + $ref: '#/components/schemas/SLOType' + type_id: + $ref: '#/components/schemas/SLOTypeNumeric' + type: object + SLOHistoryResponseError: + description: A list of errors while querying the history data for the service + level objective. + properties: + error: + description: Human readable error. + type: string + type: object + SLOHistoryResponseErrorWithType: + description: An object describing the error with error type and error message. + properties: + error_message: + description: A message with more details about the error. + example: '' + type: string + error_type: + description: Type of the error. + example: '' + type: string + required: + - error_type + - error_message + type: object + SLOHistorySLIData: + description: 'An object that holds an SLI value and its associated data. It + can represent an SLO''s overall SLI value. + + This can also represent the SLI value for a specific monitor in multi-monitor + SLOs, or a group in grouped SLOs.' + properties: + error_budget_remaining: + $ref: '#/components/schemas/SLOErrorBudgetRemainingData' + errors: + description: An array of error objects returned while querying the history + data for the service level objective. + items: + $ref: '#/components/schemas/SLOHistoryResponseErrorWithType' + type: array + group: + description: For groups in a grouped SLO, this is the group name. + example: name + type: string + history: + description: For `monitor` based SLOs, this includes the aggregated history + as arrays that include time series and uptime data where `0=monitor` is + in `OK` state and `1=monitor` is in `alert` state. + example: + - - 1579212382 + - 0 + items: + description: Represents an array time series data. + example: + - 1579212382 + - 0 + items: + description: A time series data point which is a tuple of (timestamp, + value). + format: double + type: number + maxItems: 2 + minItems: 2 + type: array + type: array + monitor_modified: + description: For `monitor` based SLOs, this is the last modified timestamp + in epoch seconds of the monitor. + example: 1615867200 + format: int64 + type: integer + monitor_type: + description: For `monitor` based SLOs, this describes the type of monitor. + example: string + type: string + name: + description: For groups in a grouped SLO, this is the group name. For monitors + in a multi-monitor SLO, this is the monitor name. + example: string + type: string + precision: + additionalProperties: + description: The number of accurate decimals. + format: double + type: number + description: A mapping of threshold `timeframe` to number of accurate decimals, + regardless of the from && to timestamp. + example: + 30d: 1 + 7d: 2 + type: object + preview: + description: 'For `monitor` based SLOs, when `true` this indicates that + a replay is in progress to give an accurate uptime + + calculation.' + example: true + type: boolean + sli_value: + description: The current SLI value of the SLO over the history window. + example: 99.99 format: double + nullable: true type: number - ndm_netflow_percentage: - description: The percentage of Network Device Monitoring NetFlow usage by - tag(s). + span_precision: + description: The amount of decimal places the SLI value is accurate to for + the given from `&&` to timestamp. + example: 2.0 format: double - type: number - ndm_netflow_usage: - description: The Network Device Monitoring NetFlow usage by tag(s). + type: number + uptime: + deprecated: true + description: Use `sli_value` instead. + example: 99.99 format: double + nullable: true type: number - npm_host_percentage: - description: The percentage of network host usage by tag(s). + type: object + SLOListResponse: + description: A response with one or more service level objective. + properties: + data: + description: An array of service level objective objects. + items: + $ref: '#/components/schemas/ServiceLevelObjective' + type: array + errors: + description: 'An array of error messages. Each endpoint documents how/whether + this field is + + used.' + items: + description: The error message. + type: string + type: array + metadata: + $ref: '#/components/schemas/SLOListResponseMetadata' + type: object + SLOListResponseMetadata: + description: The metadata object containing additional information about the + list of SLOs. + properties: + page: + $ref: '#/components/schemas/SLOListResponseMetadataPage' + type: object + SLOListResponseMetadataPage: + description: The object containing information about the pages of the list of + SLOs. + properties: + total_count: + description: The total number of resources that could be retrieved ignoring + the parameters and filters in the request. + format: int64 + type: integer + total_filtered_count: + description: The total number of resources that match the parameters and + filters in the request. This attribute can be used by a client to determine + the total number of pages. + format: int64 + type: integer + type: object + SLOListWidgetDefinition: + description: Use the SLO List widget to track your SLOs (Service Level Objectives) + on dashboards. + properties: + requests: + description: Array of one request object to display in the widget. + items: + $ref: '#/components/schemas/SLOListWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/SLOListWidgetDefinitionType' + required: + - type + - requests + type: object + SLOListWidgetDefinitionType: + default: slo_list + description: Type of the SLO List widget. + enum: + - slo_list + example: slo_list + type: string + x-enum-varnames: + - SLO_LIST + SLOListWidgetQuery: + description: Updated SLO List widget. + properties: + limit: + default: 100 + description: Maximum number of results to display in the table. + format: int64 + maximum: 100 + minimum: 1 + type: integer + query_string: + description: Widget query. + example: env:prod AND service:my-app + type: string + sort: + description: Options for sorting results. + items: + $ref: '#/components/schemas/WidgetFieldSort' + type: array + required: + - query_string + type: object + SLOListWidgetRequest: + description: Updated SLO List widget. + properties: + query: + $ref: '#/components/schemas/SLOListWidgetQuery' + request_type: + $ref: '#/components/schemas/SLOListWidgetRequestType' + required: + - query + - request_type + type: object + SLOListWidgetRequestType: + description: Widget request type. + enum: + - slo_list + example: slo_list + type: string + x-enum-varnames: + - SLO_LIST + SLOOverallStatuses: + description: Overall status of the SLO by timeframes. + properties: + error: + description: Error message if SLO status or error budget could not be calculated. + nullable: true + type: string + error_budget_remaining: + description: Remaining error budget of the SLO in percentage. + example: 100 format: double + nullable: true type: number - npm_host_usage: - description: The network host usage by tag(s). + indexed_at: + description: 'timestamp (UNIX time in seconds) of when the SLO status and + error budget + + were calculated.' + example: 1662496260 + format: int64 + type: integer + raw_error_budget_remaining: + $ref: '#/components/schemas/SLORawErrorBudgetRemaining' + span_precision: + description: The amount of decimal places the SLI value is accurate to. + example: 2 + format: int64 + nullable: true + type: integer + state: + $ref: '#/components/schemas/SLOState' + status: + description: The status of the SLO. + example: 100 format: double + nullable: true type: number - obs_pipeline_bytes_percentage: - description: The percentage of observability pipeline bytes usage by tag(s). + target: + description: The target of the SLO. + example: 99 format: double type: number - obs_pipeline_bytes_usage: - description: The observability pipeline bytes usage by tag(s). + timeframe: + $ref: '#/components/schemas/SLOTimeframe' + type: object + SLORawErrorBudgetRemaining: + description: Error budget remaining for an SLO. + nullable: true + properties: + unit: + description: Error budget remaining unit. + example: requests + type: string + value: + description: Error budget remaining value. + example: 60 format: double type: number - profiled_container_percentage: - description: The percentage of profiled container usage by tag(s). + type: object + SLOResponse: + description: A service level objective response containing a single service + level objective. + properties: + data: + $ref: '#/components/schemas/SLOResponseData' + errors: + description: 'An array of error messages. Each endpoint documents how/whether + this field is + + used.' + items: + description: The error message. + type: string + type: array + type: object + SLOResponseData: + description: 'A service level objective object includes a service level indicator, + thresholds + + for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).' + properties: + configured_alert_ids: + description: A list of SLO monitors IDs that reference this SLO. This field + is returned only when `with_configured_alert_ids` parameter is true in + query. + example: + - 123 + - 456 + - 789 + items: + description: A monitor ID. + format: int64 + type: integer + type: array + created_at: + description: 'Creation timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + creator: + $ref: '#/components/schemas/Creator' + description: + description: 'A user-defined description of the service level objective. + + + Always included in service level objective responses (but may be `null`). + + Optional in create/update requests.' + nullable: true + type: string + groups: + description: 'A list of (up to 20) monitor groups that narrow the scope + of a monitor service level objective. + + + Included in service level objective responses if it is not empty. Optional + in + + create/update requests for monitor service level objectives, but may only + be + + used when then length of the `monitor_ids` field is one.' + example: + - env:prod + - role:mysql + items: + description: A group name, for instance `env:prod`. + type: string + type: array + id: + description: 'A unique identifier for the service level objective object. + + + Always included in service level objective responses.' + readOnly: true + type: string + modified_at: + description: 'Modification timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + monitor_ids: + description: 'A list of monitor ids that defines the scope of a monitor + service level + + objective. **Required if type is `monitor`**.' + items: + description: A monitor ID. + format: int64 + type: integer + type: array + monitor_tags: + description: 'The union of monitor tags for all monitors referenced by the + `monitor_ids` + + field. + + Always included in service level objective responses for monitor service + level + + objectives (but may be empty). Ignored in create/update requests. Does + not + + affect which monitors are included in the service level objective (that + is + + determined entirely by the `monitor_ids` field).' + items: + description: A monitor tag. + type: string + type: array + name: + description: The name of the service level objective object. + example: Custom Metric SLO + type: string + query: + $ref: '#/components/schemas/ServiceLevelObjectiveQuery' + tags: + description: 'A list of tags associated with this service level objective. + + Always included in service level objective responses (but may be empty). + + Optional in create/update requests.' + example: + - env:prod + - app:core + items: + description: A tag to apply to your SLO. + type: string + type: array + target_threshold: + description: 'The target threshold such that when the service level indicator + is above this + + threshold over the given timeframe, the objective is being met.' + example: 99.9 format: double type: number - profiled_container_usage: - description: The profiled container usage by tag(s). + thresholds: + description: 'The thresholds (timeframes and associated targets) for this + service level + + objective object.' + example: + - target: 95 + timeframe: 7d + - target: 95 + timeframe: 30d + warning: 97 + items: + $ref: '#/components/schemas/SLOThreshold' + type: array + timeframe: + $ref: '#/components/schemas/SLOTimeframe' + type: + $ref: '#/components/schemas/SLOType' + warning_threshold: + description: 'The optional warning threshold such that when the service + level indicator is + + below this value for the given threshold, but above the target threshold, + the + + objective appears in a "warning" state. This value must be greater than + the target + + threshold.' + example: 99.95 format: double type: number - profiled_fargate_percentage: - description: The percentage of profiled Fargate task usage by tag(s). + type: object + SLOState: + description: State of the SLO. + enum: + - breached + - warning + - ok + - no_data + example: ok + type: string + x-enum-varnames: + - BREACHED + - WARNING + - OK + - NO_DATA + SLOStatus: + description: Status of the SLO's primary timeframe. + properties: + calculation_error: + description: Error message if SLO status or error budget could not be calculated. + nullable: true + type: string + error_budget_remaining: + description: Remaining error budget of the SLO in percentage. + example: 100 format: double + nullable: true type: number - profiled_fargate_usage: - description: The profiled Fargate task usage by tag(s). + indexed_at: + description: 'timestamp (UNIX time in seconds) of when the SLO status and + error budget + + were calculated.' + example: 1662496260 + format: int64 + type: integer + raw_error_budget_remaining: + $ref: '#/components/schemas/SLORawErrorBudgetRemaining' + sli: + description: The current service level indicator (SLI) of the SLO, also + known as 'status'. This is a percentage value from 0-100 (inclusive). + example: 100 format: double + nullable: true type: number - profiled_host_percentage: - description: The percentage of profiled hosts usage by tag(s). + span_precision: + description: The number of decimal places the SLI value is accurate to. + example: 2 + format: int64 + nullable: true + type: integer + state: + $ref: '#/components/schemas/SLOState' + type: object + SLOThreshold: + description: SLO thresholds (target and optionally warning) for a single time + window. + properties: + target: + description: 'The target value for the service level indicator within the + corresponding + + timeframe.' + example: 99.9 format: double type: number - profiled_host_usage: - description: The profiled hosts usage by tag(s). + target_display: + description: 'A string representation of the target that indicates its precision. + + It uses trailing zeros to show significant decimal places (for example + `98.00`). + + + Always included in service level objective responses. Ignored in + + create/update requests.' + example: '99.9' + type: string + timeframe: + $ref: '#/components/schemas/SLOTimeframe' + warning: + description: The warning value for the service level objective. + example: 90.0 format: double type: number - rum_browser_mobile_sessions_percentage: - description: The percentage of RUM Browser and Mobile usage by tag(s). + warning_display: + description: 'A string representation of the warning target (see the description + of + + the `target_display` field for details). + + + Included in service level objective responses if a warning target exists. + + Ignored in create/update requests.' + example: '90.0' + type: string + required: + - timeframe + - target + type: object + SLOTimeframe: + description: The SLO time window options. + enum: + - 7d + - 30d + - 90d + - custom + example: 30d + type: string + x-enum-varnames: + - SEVEN_DAYS + - THIRTY_DAYS + - NINETY_DAYS + - CUSTOM + SLOType: + description: The type of the service level objective. + enum: + - metric + - monitor + example: metric + type: string + x-enum-varnames: + - METRIC + - MONITOR + SLOTypeNumeric: + description: 'A numeric representation of the type of the service level objective + (`0` for + + monitor, `1` for metric). Always included in service level objective responses. + + Ignored in create/update requests.' + enum: + - 0 + - 1 + example: 0 + format: int32 + type: integer + x-enum-varnames: + - MONITOR + - METRIC + SLOWidgetDefinition: + description: Use the SLO and uptime widget to track your SLOs (Service Level + Objectives) and uptime on screenboards and timeboards. + properties: + additional_query_filters: + description: Additional filters applied to the SLO query. + type: string + global_time_target: + description: Defined global time target. + type: string + show_error_budget: + description: Defined error budget. + type: boolean + slo_id: + description: ID of the SLO displayed. + type: string + time_windows: + description: Times being monitored. + items: + $ref: '#/components/schemas/WidgetTimeWindows' + type: array + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/SLOWidgetDefinitionType' + view_mode: + $ref: '#/components/schemas/WidgetViewMode' + view_type: + default: detail + description: Type of view displayed by the widget. + example: detail + type: string + required: + - type + - view_type + type: object + SLOWidgetDefinitionType: + default: slo + description: Type of the SLO widget. + enum: + - slo + example: slo + type: string + x-enum-varnames: + - SLO + ScatterPlotRequest: + description: Updated scatter plot. + properties: + aggregator: + $ref: '#/components/schemas/ScatterplotWidgetAggregator' + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Query definition. + type: string + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + type: object + ScatterPlotWidgetDefinition: + description: The scatter plot visualization allows you to graph a chosen scope + over two different metrics with their respective aggregation. + properties: + color_by_groups: + description: List of groups used for colors. + items: + description: Group name. + type: string + type: array + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + requests: + $ref: '#/components/schemas/ScatterPlotWidgetDefinitionRequests' + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/ScatterPlotWidgetDefinitionType' + xaxis: + $ref: '#/components/schemas/WidgetAxis' + yaxis: + $ref: '#/components/schemas/WidgetAxis' + required: + - type + - requests + type: object + ScatterPlotWidgetDefinitionRequests: + description: Widget definition. + example: + x: + q: system.cpu.user + y: + q: system.mem.used + properties: + table: + $ref: '#/components/schemas/ScatterplotTableRequest' + x: + $ref: '#/components/schemas/ScatterPlotRequest' + y: + $ref: '#/components/schemas/ScatterPlotRequest' + type: object + ScatterPlotWidgetDefinitionType: + default: scatterplot + description: Type of the scatter plot widget. + enum: + - scatterplot + example: scatterplot + type: string + x-enum-varnames: + - SCATTERPLOT + ScatterplotDimension: + description: Dimension of the Scatterplot. + enum: + - x + - y + - radius + - color + example: radius + type: string + x-enum-varnames: + - X + - Y + - RADIUS + - COLOR + ScatterplotTableRequest: + description: Scatterplot request containing formulas and functions. + properties: + formulas: + description: List of Scatterplot formulas that operate on queries. + items: + $ref: '#/components/schemas/ScatterplotWidgetFormula' + type: array + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + type: object + ScatterplotWidgetAggregator: + description: Aggregator used for the request. + enum: + - avg + - last + - max + - min + - sum + type: string + x-enum-varnames: + - AVERAGE + - LAST + - MAXIMUM + - MINIMUM + - SUM + ScatterplotWidgetFormula: + description: Formula to be used in a Scatterplot widget query. + properties: + alias: + description: Expression alias. + example: my-query + type: string + dimension: + $ref: '#/components/schemas/ScatterplotDimension' + formula: + description: String expression built from queries, formulas, and functions. + example: func(a) + b + type: string + required: + - formula + - dimension + type: object + SearchSLOQuery: + description: 'A metric-based SLO. **Required if type is `metric`**. Note that + Datadog only allows the sum by aggregator + + to be used because this will sum up all request counts instead of averaging + them, or taking the max or + + min of all of those requests.' + nullable: true + properties: + denominator: + description: A Datadog metric query for total (valid) events. + example: sum:my.custom.metric{*}.as_count() + type: string + metrics: + description: 'Metric names used in the query''s numerator and denominator. + + This field will return null and will be implemented in the next version + of this endpoint.' + example: + - my.custom.metric + - my.other.custom.metric + items: + description: Metric name. + type: string + nullable: true + type: array + numerator: + description: A Datadog metric query for good events. + example: sum:my.custom.metric{type:good}.as_count() + type: string + type: object + SearchSLOResponse: + description: A search SLO response containing results from the search query. + properties: + data: + $ref: '#/components/schemas/SearchSLOResponseData' + links: + $ref: '#/components/schemas/SearchSLOResponseLinks' + meta: + $ref: '#/components/schemas/SearchSLOResponseMeta' + type: object + SearchSLOResponseData: + description: Data from search SLO response. + properties: + attributes: + $ref: '#/components/schemas/SearchSLOResponseDataAttributes' + type: + description: Type of service level objective result. + example: '' + type: string + type: object + SearchSLOResponseDataAttributes: + description: Attributes + properties: + facets: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacets' + slos: + description: SLOs + items: + $ref: '#/components/schemas/SearchServiceLevelObjective' + type: array + type: object + SearchSLOResponseDataAttributesFacets: + description: Facets + properties: + all_tags: + description: All tags associated with an SLO. + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' + type: array + creator_name: + description: Creator of an SLO. + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' + type: array + env_tags: + description: Tags with the `env` tag key. + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' + type: array + service_tags: + description: Tags with the `service` tag key. + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' + type: array + slo_type: + description: Type of SLO. + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectInt' + type: array + target: + description: SLO Target + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectInt' + type: array + team_tags: + description: Tags with the `team` tag key. + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' + type: array + timeframe: + description: Timeframes of SLOs. + items: + $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' + type: array + type: object + SearchSLOResponseDataAttributesFacetsObjectInt: + description: Facet + properties: + count: + description: Count + format: int64 + type: integer + name: + description: Facet format: double type: number - rum_browser_mobile_sessions_usage: - description: The total RUM Browser and Mobile usage by tag(s). + type: object + SearchSLOResponseDataAttributesFacetsObjectString: + description: Facet + properties: + count: + description: Count + format: int64 + type: integer + name: + description: Facet + type: string + type: object + SearchSLOResponseLinks: + description: Pagination links. + properties: + first: + description: Link to last page. + type: string + last: + description: Link to first page. + nullable: true + type: string + next: + description: Link to the next page. + type: string + prev: + description: Link to previous page. + nullable: true + type: string + self: + description: Link to current page. + type: string + type: object + SearchSLOResponseMeta: + description: Searches metadata returned by the API. + properties: + pagination: + $ref: '#/components/schemas/SearchSLOResponseMetaPage' + type: object + SearchSLOResponseMetaPage: + description: Pagination metadata returned by the API. + properties: + first_number: + description: The first number. + format: int64 + type: integer + last_number: + description: The last number. + format: int64 + type: integer + next_number: + description: The next number. + format: int64 + type: integer + number: + description: The page number. + format: int64 + type: integer + prev_number: + description: The previous page number. + format: int64 + type: integer + size: + description: The size of the response. + format: int64 + type: integer + total: + description: The total number of SLOs in the response. + format: int64 + type: integer + type: + description: Type of pagination. + type: string + type: object + SearchSLOThreshold: + description: SLO thresholds (target and optionally warning) for a single time + window. + properties: + target: + description: 'The target value for the service level indicator within the + corresponding + + timeframe.' + example: 99.9 format: double type: number - rum_replay_sessions_percentage: - description: The percentage of RUM Replay Sessions usage by tag(s). + target_display: + description: 'A string representation of the target that indicates its precision. + + It uses trailing zeros to show significant decimal places (for example + `98.00`). + + + Always included in service level objective responses. Ignored in + + create/update requests.' + example: '99.9' + type: string + timeframe: + $ref: '#/components/schemas/SearchSLOTimeframe' + warning: + description: The warning value for the service level objective. + example: 90.0 format: double + nullable: true type: number - rum_replay_sessions_usage: - description: The total RUM Replay Sessions usage by tag(s). + warning_display: + description: 'A string representation of the warning target (see the description + of + + the `target_display` field for details). + + + Included in service level objective responses if a warning target exists. + + Ignored in create/update requests.' + example: '90.0' + nullable: true + type: string + required: + - timeframe + - target + type: object + SearchSLOTimeframe: + description: The SLO time window options. + enum: + - 7d + - 30d + - 90d + example: 30d + type: string + x-enum-varnames: + - SEVEN_DAYS + - THIRTY_DAYS + - NINETY_DAYS + SearchServiceLevelObjective: + description: A service level objective data container. + properties: + data: + $ref: '#/components/schemas/SearchServiceLevelObjectiveData' + type: object + SearchServiceLevelObjectiveAttributes: + description: 'A service level objective object includes a service level indicator, + thresholds + + for one or more timeframes, and metadata (`name`, `description`, and `tags`).' + properties: + all_tags: + description: 'A list of tags associated with this service level objective. + + Always included in service level objective responses (but may be empty).' + example: + - env:prod + - app:core + items: + type: string + type: array + created_at: + description: 'Creation timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + creator: + $ref: '#/components/schemas/SLOCreator' + description: + description: 'A user-defined description of the service level objective. + + + Always included in service level objective responses (but may be `null`). + + Optional in create/update requests.' + nullable: true + type: string + env_tags: + description: Tags with the `env` tag key. + items: + type: string + type: array + groups: + description: 'A list of (up to 100) monitor groups that narrow the scope + of a monitor service level objective. + + Included in service level objective responses if it is not empty.' + example: + - env:prod + - role:mysql + items: + description: A group name, for instance `env:prod`. + type: string + nullable: true + type: array + modified_at: + description: 'Modification timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + monitor_ids: + description: 'A list of monitor ids that defines the scope of a monitor + service level + + objective.' + items: + description: A monitor ID. + format: int64 + type: integer + nullable: true + type: array + name: + description: The name of the service level objective object. + example: Custom Metric SLO + type: string + overall_status: + description: calculated status and error budget remaining. + items: + $ref: '#/components/schemas/SLOOverallStatuses' + type: array + query: + $ref: '#/components/schemas/SearchSLOQuery' + service_tags: + description: Tags with the `service` tag key. + items: + type: string + type: array + slo_type: + $ref: '#/components/schemas/SLOType' + status: + $ref: '#/components/schemas/SLOStatus' + team_tags: + description: Tags with the `team` tag key. + items: + type: string + type: array + thresholds: + description: 'The thresholds (timeframes and associated targets) for this + service level + + objective object.' + example: + - target: 95 + target_display: '95' + timeframe: 7d + - target: 95 + target_display: '95' + timeframe: 30d + warning: 97 + warning_display: '97' + items: + $ref: '#/components/schemas/SearchSLOThreshold' + type: array + type: object + SearchServiceLevelObjectiveData: + description: A service level objective ID and attributes. + properties: + attributes: + $ref: '#/components/schemas/SearchServiceLevelObjectiveAttributes' + id: + description: 'A unique identifier for the service level objective object. + + + Always included in service level objective responses.' + readOnly: true + type: string + type: + description: The type of the object, must be `slo`. + type: string + type: object + SelectableTemplateVariableItems: + description: Object containing the template variable's name, associated tag/attribute, + default value and selectable values. + properties: + default_value: + description: The default value of the template variable. + type: string + name: + description: Name of the template variable. + type: string + prefix: + description: The tag/attribute key associated with the template variable. + type: string + visible_tags: + description: List of visible tag values on the shared dashboard. + items: + description: Other values for this tag that can be selected on the shared + dashboard. + type: string + nullable: true + type: array + type: object + Series: + description: 'A metric to submit to Datadog. + + See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties).' + properties: + host: + description: The name of the host that produced the metric. + example: test.example.com + type: string + interval: + default: null + description: If the type of the metric is rate or count, define the corresponding + interval. + example: 20 + format: int64 + nullable: true + type: integer + metric: + description: The name of the timeseries. + example: system.load.1 + type: string + points: + description: Points relating to a metric. All points must be tuples with + timestamp and a scalar value (cannot be a string). Timestamps should be + in POSIX time in seconds, and cannot be more than ten minutes in the future + or more than one hour in the past. + items: + $ref: '#/components/schemas/Point' + type: array + tags: + description: A list of tags associated with the metric. + example: + - environment:test + items: + description: Individual tags. + type: string + type: array + type: + default: '' + description: The type of the metric. Valid types are "",`count`, `gauge`, + and `rate`. + example: rate + type: string + required: + - metric + - points + type: object + ServiceCheck: + description: An object containing service check and status. + properties: + check: + description: The check. + example: app.ok + type: string + host_name: + description: The host name correlated with the check. + example: app.host1 + type: string + message: + description: Message containing check status. + example: app is running + type: string + status: + $ref: '#/components/schemas/ServiceCheckStatus' + tags: + description: Tags related to a check. + example: + - environment:test + items: + description: Items related to a check. + type: string + type: array + timestamp: + description: Time of check. + format: int64 + type: integer + required: + - check + - status + - tags + - host_name + type: object + ServiceCheckStatus: + description: The status of a service check. Set to `0` for OK, `1` for warning, + `2` for critical, and `3` for unknown. + enum: + - 0 + - 1 + - 2 + - 3 + example: 0 + format: int32 + type: integer + x-enum-varnames: + - OK + - WARNING + - CRITICAL + - UNKNOWN + ServiceChecks: + description: The service checks. + items: + $ref: '#/components/schemas/ServiceCheck' + type: array + ServiceLevelObjective: + description: 'A service level objective object includes a service level indicator, + thresholds + + for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).' + properties: + created_at: + description: 'Creation timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + creator: + $ref: '#/components/schemas/Creator' + description: + description: 'A user-defined description of the service level objective. + + + Always included in service level objective responses (but may be `null`). + + Optional in create/update requests.' + nullable: true + type: string + groups: + description: 'A list of (up to 100) monitor groups that narrow the scope + of a monitor service level objective. + + + Included in service level objective responses if it is not empty. Optional + in + + create/update requests for monitor service level objectives, but may only + be + + used when then length of the `monitor_ids` field is one.' + example: + - env:prod + - role:mysql + items: + description: A group name, for instance `env:prod`. + type: string + type: array + id: + description: 'A unique identifier for the service level objective object. + + + Always included in service level objective responses.' + readOnly: true + type: string + modified_at: + description: 'Modification timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + monitor_ids: + description: 'A list of monitor ids that defines the scope of a monitor + service level + + objective. **Required if type is `monitor`**.' + items: + description: A monitor ID. + format: int64 + type: integer + type: array + monitor_tags: + description: 'The union of monitor tags for all monitors referenced by the + `monitor_ids` + + field. + + Always included in service level objective responses for monitor-based + service level + + objectives (but may be empty). Ignored in create/update requests. Does + not + + affect which monitors are included in the service level objective (that + is + + determined entirely by the `monitor_ids` field).' + items: + description: A monitor tag. + type: string + type: array + name: + description: The name of the service level objective object. + example: Custom Metric SLO + type: string + query: + $ref: '#/components/schemas/ServiceLevelObjectiveQuery' + tags: + description: 'A list of tags associated with this service level objective. + + Always included in service level objective responses (but may be empty). + + Optional in create/update requests.' + example: + - env:prod + - app:core + items: + description: A tag to apply to your SLO. + type: string + type: array + target_threshold: + description: 'The target threshold such that when the service level indicator + is above this + + threshold over the given timeframe, the objective is being met.' + example: 99.9 format: double type: number - sds_scanned_bytes_percentage: - description: The percentage of Sensitive Data Scanner usage by tag(s). + thresholds: + description: 'The thresholds (timeframes and associated targets) for this + service level + + objective object.' + example: + - target: 95 + timeframe: 7d + - target: 95 + timeframe: 30d + warning: 97 + items: + $ref: '#/components/schemas/SLOThreshold' + type: array + timeframe: + $ref: '#/components/schemas/SLOTimeframe' + type: + $ref: '#/components/schemas/SLOType' + warning_threshold: + description: 'The optional warning threshold such that when the service + level indicator is + + below this value for the given threshold, but above the target threshold, + the + + objective appears in a "warning" state. This value must be greater than + the target + + threshold.' + example: 99.95 format: double type: number - sds_scanned_bytes_usage: - description: The total Sensitive Data Scanner usage by tag(s). + required: + - name + - thresholds + - type + type: object + ServiceLevelObjectiveQuery: + description: 'A metric-based SLO. **Required if type is `metric`**. Note that + Datadog only allows the sum by aggregator + + to be used because this will sum up all request counts instead of averaging + them, or taking the max or + + min of all of those requests.' + properties: + denominator: + description: A Datadog metric query for total (valid) events. + example: sum:my.custom.metric{*}.as_count() + type: string + numerator: + description: A Datadog metric query for good events. + example: sum:my.custom.metric{type:good}.as_count() + type: string + required: + - numerator + - denominator + type: object + ServiceLevelObjectiveRequest: + description: 'A service level objective object includes a service level indicator, + thresholds + + for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).' + properties: + description: + description: 'A user-defined description of the service level objective. + + + Always included in service level objective responses (but may be `null`). + + Optional in create/update requests.' + nullable: true + type: string + groups: + description: 'A list of (up to 100) monitor groups that narrow the scope + of a monitor service level objective. + + + Included in service level objective responses if it is not empty. Optional + in + + create/update requests for monitor service level objectives, but may only + be + + used when then length of the `monitor_ids` field is one.' + example: + - env:prod + - role:mysql + items: + description: A group name, for instance `env:prod`. + type: string + type: array + monitor_ids: + description: 'A list of monitor IDs that defines the scope of a monitor + service level + + objective. **Required if type is `monitor`**.' + items: + description: A monitor ID. + format: int64 + type: integer + type: array + name: + description: The name of the service level objective object. + example: Custom Metric SLO + type: string + query: + $ref: '#/components/schemas/ServiceLevelObjectiveQuery' + tags: + description: 'A list of tags associated with this service level objective. + + Always included in service level objective responses (but may be empty). + + Optional in create/update requests.' + example: + - env:prod + - app:core + items: + description: A tag to apply to your SLO. + type: string + type: array + target_threshold: + description: 'The target threshold such that when the service level indicator + is above this + + threshold over the given timeframe, the objective is being met.' + example: 99.9 format: double type: number - serverless_apps_percentage: - description: The percentage of Serverless Apps usage by tag(s). + thresholds: + description: 'The thresholds (timeframes and associated targets) for this + service level + + objective object.' + example: + - target: 95 + timeframe: 7d + - target: 95 + timeframe: 30d + warning: 97 + items: + $ref: '#/components/schemas/SLOThreshold' + type: array + timeframe: + $ref: '#/components/schemas/SLOTimeframe' + type: + $ref: '#/components/schemas/SLOType' + warning_threshold: + description: 'The optional warning threshold such that when the service + level indicator is + + below this value for the given threshold, but above the target threshold, + the + + objective appears in a "warning" state. This value must be greater than + the target + + threshold.' + example: 99.95 format: double type: number - serverless_apps_usage: - description: The total Serverless Apps usage by tag(s). + required: + - name + - thresholds + - type + type: object + ServiceMapWidgetDefinition: + description: This widget displays a map of a service to all of the services + that call it, and all of the services that it calls. + properties: + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + filters: + description: Your environment and primary tag (or * if enabled for your + account). + example: + - '*' + items: + description: Filter name. + type: string + minItems: 1 + type: array + service: + description: The ID of the service you want to map. + example: '' + type: string + title: + description: The title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/ServiceMapWidgetDefinitionType' + required: + - type + - filters + - service + type: object + ServiceMapWidgetDefinitionType: + default: servicemap + description: Type of the service map widget. + enum: + - servicemap + example: servicemap + type: string + x-enum-varnames: + - SERVICEMAP + ServiceSummaryWidgetDefinition: + description: The service summary displays the graphs of a chosen service in + your screenboard. Only available on FREE layout dashboards. + properties: + display_format: + $ref: '#/components/schemas/WidgetServiceSummaryDisplayFormat' + env: + description: APM environment. + example: '' + type: string + service: + description: APM service. + example: '' + type: string + show_breakdown: + description: Whether to show the latency breakdown or not. + type: boolean + show_distribution: + description: Whether to show the latency distribution or not. + type: boolean + show_errors: + description: Whether to show the error metrics or not. + type: boolean + show_hits: + description: Whether to show the hits metrics or not. + type: boolean + show_latency: + description: Whether to show the latency metrics or not. + type: boolean + show_resource_list: + description: Whether to show the resource list or not. + type: boolean + size_format: + $ref: '#/components/schemas/WidgetSizeFormat' + span_name: + description: APM span name. + example: '' + type: string + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of the widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/ServiceSummaryWidgetDefinitionType' + required: + - type + - env + - service + - span_name + type: object + ServiceSummaryWidgetDefinitionType: + default: trace_service + description: Type of the service summary widget. + enum: + - trace_service + example: trace_service + type: string + x-enum-varnames: + - TRACE_SERVICE + SharedDashboard: + description: The metadata object associated with how a dashboard has been/will + be shared. + properties: + author: + $ref: '#/components/schemas/SharedDashboardAuthor' + created_at: + description: Date the dashboard was shared. + format: date-time + readOnly: true + type: string + dashboard_id: + description: ID of the dashboard to share. + example: 123-abc-456 + type: string + dashboard_type: + $ref: '#/components/schemas/DashboardType' + global_time: + $ref: '#/components/schemas/DashboardGlobalTime' + global_time_selectable_enabled: + description: Whether to allow viewers to select a different global time + setting for the shared dashboard. + nullable: true + type: boolean + public_url: + description: URL of the shared dashboard. + readOnly: true + type: string + selectable_template_vars: + description: List of objects representing template variables on the shared + dashboard which can have selectable values. + example: + - default_value: '*' + name: exampleVar + prefix: test + visible_tags: + - selectableValue1 + - selectableValue2 + items: + $ref: '#/components/schemas/SelectableTemplateVariableItems' + nullable: true + type: array + share_list: + description: List of email addresses that can receive an invitation to access + to the shared dashboard. + example: + - test@datadoghq.com + - test2@email.com + items: + description: Email address that can receive an invitation to access the + shared dashboard. + format: email + type: string + nullable: true + type: array + share_type: + $ref: '#/components/schemas/DashboardShareType' + token: + description: A unique token assigned to the shared dashboard. + readOnly: true + type: string + required: + - dashboard_id + - dashboard_type + type: object + SharedDashboardAuthor: + description: User who shared the dashboard. + properties: + handle: + description: Identifier of the user who shared the dashboard. + example: test@datadoghq.com + readOnly: true + type: string + name: + description: Name of the user who shared the dashboard. + nullable: true + readOnly: true + type: string + readOnly: true + type: object + SharedDashboardInvites: + description: Invitations data and metadata that exists for a shared dashboard + returned by the API. + example: + data: + - attributes: + email: test@datadoghq.com + type: public_dashboard_invitation + properties: + data: + $ref: '#/components/schemas/SharedDashboardInvitesData' + meta: + $ref: '#/components/schemas/SharedDashboardInvitesMeta' + required: + - data + type: object + SharedDashboardInvitesData: + description: An object or list of objects containing the information for an + invitation to a shared dashboard. + example: + - attributes: + email: test@datadoghq.com + type: public_dashboard_invitation + oneOf: + - $ref: '#/components/schemas/SharedDashboardInvitesDataObject' + - $ref: '#/components/schemas/SharedDashboardInvitesDataList' + SharedDashboardInvitesDataList: + description: A list of objects containing the information for an invitation(s) + to a shared dashboard. + example: + - attributes: + email: test@datadoghq.com + type: public_dashboard_invitation + items: + $ref: '#/components/schemas/SharedDashboardInvitesDataObject' + type: array + SharedDashboardInvitesDataObject: + description: Object containing the information for an invitation to a shared + dashboard. + example: + attributes: + created_at: '2020-12-07T20:16:27.846985+00:00' + email: test@datadoghq.com + has_session: false + invitation_expiry: '2020-12-07T21:16:27.840542+00:00' + session_expiry: null + share_token: XXXXXX-123456abcedfg7890hijklmnopqrstuv + type: public_dashboard_invitation + properties: + attributes: + $ref: '#/components/schemas/SharedDashboardInvitesDataObjectAttributes' + type: + $ref: '#/components/schemas/DashboardInviteType' + required: + - type + - attributes + type: object + SharedDashboardInvitesDataObjectAttributes: + description: Attributes of the shared dashboard invitation + example: + created_at: '2020-12-07T20:16:27.846985+00:00' + email: test@datadoghq.com + has_session: false + invitation_expiry: '2020-12-07T21:16:27.840542+00:00' + session_expiry: null + share_token: XXXXXX-123456abcedfg7890hijklmnopqrstuv + properties: + created_at: + description: When the invitation was sent. + format: date-time + readOnly: true + type: string + email: + description: An email address that an invitation has been (or if used in + invitation request, will be) sent to. + nullable: false + type: string + has_session: + description: Indicates whether an active session exists for the invitation + (produced when a user clicks the link in the email). + readOnly: true + type: boolean + invitation_expiry: + description: When the invitation expires. + format: date-time + readOnly: true + type: string + session_expiry: + description: When the invited user's session expires. null if the invitation + has no associated session. + format: date-time + nullable: true + readOnly: true + type: string + share_token: + description: The unique token of the shared dashboard that was (or is to + be) shared. + readOnly: true + type: string + type: object + SharedDashboardInvitesMeta: + description: Pagination metadata returned by the API. + properties: + page: + $ref: '#/components/schemas/SharedDashboardInvitesMetaPage' + readOnly: true + type: object + SharedDashboardInvitesMetaPage: + description: Object containing the total count of invitations across all pages + properties: + total_count: + description: The total number of invitations on this shared board, across + all pages. + format: int64 + type: integer + type: object + SharedDashboardUpdateRequest: + description: Update a shared dashboard's settings. + example: + global_time: + live_span: 1h + share_list: + - test@datadoghq.com + - test2@datadoghq.com + share_type: invite + properties: + global_time: + $ref: '#/components/schemas/SharedDashboardUpdateRequestGlobalTime' + global_time_selectable_enabled: + description: Whether to allow viewers to select a different global time + setting for the shared dashboard. + nullable: true + type: boolean + selectable_template_vars: + description: List of objects representing template variables on the shared + dashboard which can have selectable values. + example: + - default_value: '*' + name: exampleVar + prefix: test + visible_tags: + - selectableValue1 + - selectableValue2 + items: + $ref: '#/components/schemas/SelectableTemplateVariableItems' + nullable: true + type: array + share_list: + description: List of email addresses that can be given access to the shared + dashboard. + example: + - test@datadoghq.com + - test2@email.com + items: + description: Email address that can receive an invitation to access the + shared dashboard. + format: email + type: string + nullable: true + type: array + share_type: + $ref: '#/components/schemas/DashboardShareType' + required: + - global_time + type: object + SharedDashboardUpdateRequestGlobalTime: + description: Timeframe setting for the shared dashboard. + example: + live_span: 1h + nullable: true + properties: + live_span: + $ref: '#/components/schemas/DashboardGlobalTimeLiveSpan' + type: object + SignalArchiveReason: + description: Reason why a signal has been archived. + enum: + - none + - false_positive + - testing_or_maintenance + - investigated_case_opened + - other + type: string + x-enum-varnames: + - NONE + - FALSE_POSITIVE + - TESTING_OR_MAINTENANCE + - INVESTIGATED_CASE_OPENED + - OTHER + SignalAssigneeUpdateRequest: + description: Attributes describing an assignee update operation over a security + signal. + properties: + assignee: + description: The UUID of the user being assigned. Use empty string to return + signal to unassigned. + example: 773b045d-ccf8-4808-bd3b-955ef6a8c940 + type: string + version: + $ref: '#/components/schemas/Version' + required: + - assignee + type: object + SignalStateUpdateRequest: + description: Attributes describing the change of state for a given state. + properties: + archiveComment: + description: Optional comment to explain why a signal is being archived. + type: string + archiveReason: + $ref: '#/components/schemas/SignalArchiveReason' + state: + $ref: '#/components/schemas/SignalTriageState' + version: + $ref: '#/components/schemas/Version' + required: + - state + type: object + SignalTriageState: + description: The new triage state of the signal. + enum: + - open + - archived + - under_review + example: open + type: string + x-enum-varnames: + - OPEN + - ARCHIVED + - UNDER_REVIEW + SlackIntegrationChannel: + description: The Slack channel configuration. + properties: + display: + $ref: '#/components/schemas/SlackIntegrationChannelDisplay' + name: + description: Your channel name. + example: '#general' + type: string + type: object + SlackIntegrationChannelDisplay: + description: Configuration options for what is shown in an alert event message. + properties: + message: + default: true + description: Show the main body of the alert event. + type: boolean + notified: + default: true + description: Show the list of @-handles in the alert event. + type: boolean + snapshot: + default: true + description: Show the alert event's snapshot image. + type: boolean + tags: + default: true + description: Show the scopes on which the monitor alerted. + type: boolean + type: object + SlackIntegrationChannels: + description: A list of configured Slack channels. + example: + - display: + message: true + notified: true + snapshot: true + tags: true + name: '#channel_name_main_account' + - display: + message: true + notified: true + snapshot: false + tags: true + name: '#channel_name_doghouse' + items: + $ref: '#/components/schemas/SlackIntegrationChannel' + type: array + SplitConfig: + description: Encapsulates all user choices about how to split a graph. + properties: + limit: + description: Maximum number of graphs to display in the widget. + example: 24 + format: int64 + maximum: 100 + minimum: 1 + type: integer + sort: + $ref: '#/components/schemas/SplitSort' + split_dimensions: + description: The dimension(s) on which to split the graph + items: + $ref: '#/components/schemas/SplitDimension' + maxItems: 1 + minItems: 1 + type: array + static_splits: + description: Manual selection of tags making split graph widget static + items: + $ref: '#/components/schemas/SplitVectorEntry' + maxItems: 100 + type: array + required: + - split_dimensions + - limit + - sort + type: object + SplitConfigSortCompute: + description: Defines the metric and aggregation used as the sort value. + properties: + aggregation: + description: How to aggregate the sort metric for the purposes of ordering. + example: sum + type: string + metric: + description: The metric to use for sorting graphs. + example: system.cpu.user + type: string + required: + - aggregation + - metric + type: object + SplitDimension: + description: The property by which the graph splits + example: + one_graph_per: service + properties: + one_graph_per: + description: The system interprets this attribute differently depending + on the data source of the query being split. For metrics, it's a tag. + For the events platform, it's an attribute or tag. + example: service + type: string + required: + - one_graph_per + type: object + SplitGraphSourceWidgetDefinition: + description: The original widget we are splitting on. + oneOf: + - $ref: '#/components/schemas/ChangeWidgetDefinition' + - $ref: '#/components/schemas/GeomapWidgetDefinition' + - $ref: '#/components/schemas/QueryValueWidgetDefinition' + - $ref: '#/components/schemas/ScatterPlotWidgetDefinition' + - $ref: '#/components/schemas/SunburstWidgetDefinition' + - $ref: '#/components/schemas/TableWidgetDefinition' + - $ref: '#/components/schemas/TimeseriesWidgetDefinition' + - $ref: '#/components/schemas/ToplistWidgetDefinition' + - $ref: '#/components/schemas/TreeMapWidgetDefinition' + SplitGraphVizSize: + description: Size of the individual graphs in the split. + enum: + - xs + - sm + - md + - lg + example: sm + type: string + x-enum-varnames: + - XS + - SM + - MD + - LG + SplitGraphWidgetDefinition: + description: 'The split graph widget allows you to create repeating units of + a graph - one for each value in a group (for example: one per service) + + ' + properties: + has_uniform_y_axes: + description: Normalize y axes across graphs + type: boolean + size: + $ref: '#/components/schemas/SplitGraphVizSize' + source_widget_definition: + $ref: '#/components/schemas/SplitGraphSourceWidgetDefinition' + split_config: + $ref: '#/components/schemas/SplitConfig' + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. + type: string + type: + $ref: '#/components/schemas/SplitGraphWidgetDefinitionType' + required: + - size + - type + - source_widget_definition + - split_config + type: object + SplitGraphWidgetDefinitionType: + default: split_group + description: Type of the split graph widget + enum: + - split_group + example: split_group + type: string + x-enum-varnames: + - SPLIT_GROUP + SplitSort: + description: Controls the order in which graphs appear in the split. + properties: + compute: + $ref: '#/components/schemas/SplitConfigSortCompute' + order: + $ref: '#/components/schemas/WidgetSort' + required: + - order + type: object + SplitVectorEntry: + description: The widget displays one graph for each entry in this parameter. + example: + - tag_key: demo + tag_values: + - env + items: + $ref: '#/components/schemas/SplitVectorEntryItem' + minItems: 1 + type: array + SplitVectorEntryItem: + description: The split graph list contains a graph for each value of the split + dimension. + minLength: 1 + properties: + tag_key: + description: The tag key. + example: demo + minLength: 1 + type: string + tag_values: + description: The tag values. + example: + - env + items: + minLength: 1 + type: string + type: array + required: + - tag_key + - tag_values + type: object + SuccessfulSignalUpdateResponse: + description: Updated signal data following a successfully performed update. + properties: + status: + description: Status of the response. + type: string + type: object + SunburstWidgetDefinition: + description: Sunbursts are spot on to highlight how groups contribute to the + total of a query. + properties: + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + hide_total: + description: Show the total value in this widget. + type: boolean + legend: + $ref: '#/components/schemas/SunburstWidgetLegend' + requests: + description: List of sunburst widget requests. + example: + - q/apm_query/log_query: {} + items: + $ref: '#/components/schemas/SunburstWidgetRequest' + minItems: 1 + type: array + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/SunburstWidgetDefinitionType' + required: + - type + - requests + type: object + SunburstWidgetDefinitionType: + default: sunburst + description: Type of the Sunburst widget. + enum: + - sunburst + example: sunburst + type: string + x-enum-varnames: + - SUNBURST + SunburstWidgetLegend: + description: Configuration of the legend. + oneOf: + - $ref: '#/components/schemas/SunburstWidgetLegendTable' + - $ref: '#/components/schemas/SunburstWidgetLegendInlineAutomatic' + SunburstWidgetLegendInlineAutomatic: + description: Configuration of inline or automatic legends. + properties: + hide_percent: + description: Whether to hide the percentages of the groups. + type: boolean + hide_value: + description: Whether to hide the values of the groups. + type: boolean + type: + $ref: '#/components/schemas/SunburstWidgetLegendInlineAutomaticType' + required: + - type + type: object + SunburstWidgetLegendInlineAutomaticType: + description: Whether to show the legend inline or let it be automatically generated. + enum: + - inline + - automatic + example: automatic + type: string + x-enum-varnames: + - INLINE + - AUTOMATIC + SunburstWidgetLegendTable: + description: Configuration of table-based legend. + properties: + type: + $ref: '#/components/schemas/SunburstWidgetLegendTableType' + required: + - type + type: object + SunburstWidgetLegendTableType: + description: Whether or not to show a table legend. + enum: + - table + - none + example: table + type: string + x-enum-varnames: + - TABLE + - NONE + SunburstWidgetRequest: + description: Request definition of sunburst widget. + properties: + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + audit_query: + $ref: '#/components/schemas/LogQueryDefinition' + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + formulas: + description: List of formulas that operate on queries. + items: + $ref: '#/components/schemas/WidgetFormula' + type: array + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Widget query. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + style: + $ref: '#/components/schemas/WidgetStyle' + type: object + SyntheticsAPIStep: + description: The steps used in a Synthetic multistep API test. + properties: + allowFailure: + description: Determines whether or not to continue with test if this step + fails. + type: boolean + assertions: + default: [] + description: Array of assertions used for the test. + example: + - operator: lessThan + target: 1000 + type: responseTime + items: + $ref: '#/components/schemas/SyntheticsAssertion' + type: array + extractedValues: + description: Array of values to parse and save as variables from the response. + items: + $ref: '#/components/schemas/SyntheticsParsingOptions' + type: array + isCritical: + description: 'Determines whether or not to consider the entire test as failed + if this step fails. + + Can be used only if `allowFailure` is `true`.' + type: boolean + name: + description: The name of the step. + example: Example step name + type: string + request: + $ref: '#/components/schemas/SyntheticsTestRequest' + retry: + $ref: '#/components/schemas/SyntheticsTestOptionsRetry' + subtype: + $ref: '#/components/schemas/SyntheticsAPIStepSubtype' + required: + - assertions + - request + - name + - subtype + type: object + SyntheticsAPIStepSubtype: + description: The subtype of the Synthetic multistep API test step, currently + only supporting `http`. + enum: + - http + example: http + type: string + x-enum-varnames: + - HTTP + SyntheticsAPITest: + description: Object containing details about a Synthetic API test. + properties: + config: + $ref: '#/components/schemas/SyntheticsAPITestConfig' + locations: + description: Array of locations used to run the test. + example: + - aws:eu-west-3 + items: + description: A location from which the test was run. + type: string + type: array + message: + description: Notification message associated with the test. + example: Notification message + type: string + monitor_id: + description: The associated monitor ID. + example: 12345678 + format: int64 + readOnly: true + type: integer + name: + description: Name of the test. + example: Example test name + type: string + options: + $ref: '#/components/schemas/SyntheticsTestOptions' + public_id: + description: The public ID for the test. + example: 123-abc-456 + readOnly: true + type: string + status: + $ref: '#/components/schemas/SyntheticsTestPauseStatus' + subtype: + $ref: '#/components/schemas/SyntheticsTestDetailsSubType' + tags: + description: Array of tags attached to the test. + example: + - env:production + items: + description: A tag attached to the test. + type: string + type: array + type: + $ref: '#/components/schemas/SyntheticsAPITestType' + required: + - name + - config + - locations + - options + - type + - message + type: object + SyntheticsAPITestConfig: + description: Configuration object for a Synthetic API test. + example: + assertions: + - operator: lessThan + target: 1000 + type: responseTime + request: + method: GET + url: https://example.com + properties: + assertions: + default: [] + description: Array of assertions used for the test. Required for single + API tests. + example: + - operator: lessThan + target: 1000 + type: responseTime + items: + $ref: '#/components/schemas/SyntheticsAssertion' + type: array + configVariables: + description: Array of variables used for the test. + items: + $ref: '#/components/schemas/SyntheticsConfigVariable' + type: array + request: + $ref: '#/components/schemas/SyntheticsTestRequest' + steps: + description: When the test subtype is `multi`, the steps of the test. + items: + $ref: '#/components/schemas/SyntheticsAPIStep' + type: array + type: object + SyntheticsAPITestResultData: + description: Object containing results for your Synthetic API test. + properties: + cert: + $ref: '#/components/schemas/SyntheticsSSLCertificate' + eventType: + $ref: '#/components/schemas/SyntheticsTestProcessStatus' + failure: + $ref: '#/components/schemas/SyntheticsApiTestResultFailure' + httpStatusCode: + description: The API test HTTP status code. + format: int64 + type: integer + requestHeaders: + additionalProperties: + description: Requested request header. + type: object + description: Request header object used for the API test. + type: object + responseBody: + description: Response body returned for the API test. + type: string + responseHeaders: + additionalProperties: + description: Returned request header. + description: Response headers returned for the API test. + type: object + responseSize: + description: Global size in byte of the API test response. + format: int64 + type: integer + timings: + $ref: '#/components/schemas/SyntheticsTiming' + type: object + SyntheticsAPITestResultFull: + description: Object returned describing a API test result. + properties: + check: + $ref: '#/components/schemas/SyntheticsAPITestResultFullCheck' + check_time: + description: When the API test was conducted. format: double type: number - siem_ingested_bytes_percentage: - description: The percentage of SIEM usage by tag(s). + check_version: + description: Version of the API test used. + format: int64 + type: integer + probe_dc: + description: Locations for which to query the API test results. + type: string + result: + $ref: '#/components/schemas/SyntheticsAPITestResultData' + result_id: + description: ID of the API test result. + type: string + status: + $ref: '#/components/schemas/SyntheticsTestMonitorStatus' + type: object + SyntheticsAPITestResultFullCheck: + description: Object describing the API test configuration. + properties: + config: + $ref: '#/components/schemas/SyntheticsTestConfig' + required: + - config + type: object + SyntheticsAPITestResultShort: + description: Object with the results of a single Synthetic API test. + properties: + check_time: + description: Last time the API test was performed. format: double type: number - siem_ingested_bytes_usage: - description: The total SIEM usage by tag(s). + probe_dc: + description: Location from which the API test was performed. + type: string + result: + $ref: '#/components/schemas/SyntheticsAPITestResultShortResult' + result_id: + description: ID of the API test result. + type: string + status: + $ref: '#/components/schemas/SyntheticsTestMonitorStatus' + type: object + SyntheticsAPITestResultShortResult: + description: Result of the last API test run. + properties: + passed: + description: Describes if the test run has passed or failed. + type: boolean + timings: + $ref: '#/components/schemas/SyntheticsTiming' + type: object + SyntheticsAPITestType: + default: api + description: Type of the Synthetic test, `api`. + enum: + - api + example: api + type: string + x-enum-varnames: + - API + SyntheticsApiTestFailureCode: + description: Error code that can be returned by a Synthetic test. + enum: + - BODY_TOO_LARGE + - DENIED + - TOO_MANY_REDIRECTS + - AUTHENTICATION_ERROR + - DECRYPTION + - INVALID_CHAR_IN_HEADER + - HEADER_TOO_LARGE + - HEADERS_INCOMPATIBLE_CONTENT_LENGTH + - INVALID_REQUEST + - REQUIRES_UPDATE + - UNESCAPED_CHARACTERS_IN_REQUEST_PATH + - MALFORMED_RESPONSE + - INCORRECT_ASSERTION + - CONNREFUSED + - CONNRESET + - DNS + - HOSTUNREACH + - NETUNREACH + - TIMEOUT + - SSL + - OCSP + - INVALID_TEST + - TUNNEL + - WEBSOCKET + - UNKNOWN + - INTERNAL_ERROR + type: string + x-enum-varnames: + - BODY_TOO_LARGE + - DENIED + - TOO_MANY_REDIRECTS + - AUTHENTICATION_ERROR + - DECRYPTION + - INVALID_CHAR_IN_HEADER + - HEADER_TOO_LARGE + - HEADERS_INCOMPATIBLE_CONTENT_LENGTH + - INVALID_REQUEST + - REQUIRES_UPDATE + - UNESCAPED_CHARACTERS_IN_REQUEST_PATH + - MALFORMED_RESPONSE + - INCORRECT_ASSERTION + - CONNREFUSED + - CONNRESET + - DNS + - HOSTUNREACH + - NETUNREACH + - TIMEOUT + - SSL + - OCSP + - INVALID_TEST + - TUNNEL + - WEBSOCKET + - UNKNOWN + - INTERNAL_ERROR + SyntheticsApiTestResultFailure: + description: The API test failure details. + properties: + code: + $ref: '#/components/schemas/SyntheticsApiTestFailureCode' + message: + description: The API test error message. + example: Error during DNS resolution (ENOTFOUND). + type: string + type: object + SyntheticsAssertion: + description: 'Object describing the assertions type, their associated operator, + + which property they apply, and upon which target.' + oneOf: + - $ref: '#/components/schemas/SyntheticsAssertionTarget' + - $ref: '#/components/schemas/SyntheticsAssertionJSONPathTarget' + - $ref: '#/components/schemas/SyntheticsAssertionXPathTarget' + SyntheticsAssertionJSONPathOperator: + description: Assertion operator to apply. + enum: + - validatesJSONPath + example: validatesJSONPath + type: string + x-enum-varnames: + - VALIDATES_JSON_PATH + SyntheticsAssertionJSONPathTarget: + description: An assertion for the `validatesJSONPath` operator. + properties: + operator: + $ref: '#/components/schemas/SyntheticsAssertionJSONPathOperator' + property: + description: The associated assertion property. + type: string + target: + $ref: '#/components/schemas/SyntheticsAssertionJSONPathTargetTarget' + type: + $ref: '#/components/schemas/SyntheticsAssertionType' + required: + - type + - operator + type: object + SyntheticsAssertionJSONPathTargetTarget: + description: Composed target for `validatesJSONPath` operator. + properties: + jsonPath: + description: The JSON path to assert. + type: string + operator: + description: The specific operator to use on the path. + type: string + targetValue: + description: The path target value to compare to. + type: object + SyntheticsAssertionOperator: + description: Assertion operator to apply. + enum: + - contains + - doesNotContain + - is + - isNot + - lessThan + - lessThanOrEqual + - moreThan + - moreThanOrEqual + - matches + - doesNotMatch + - validates + - isInMoreThan + - isInLessThan + - doesNotExist + - isUndefined + example: contains + type: string + x-enum-varnames: + - CONTAINS + - DOES_NOT_CONTAIN + - IS + - IS_NOT + - LESS_THAN + - LESS_THAN_OR_EQUAL + - MORE_THAN + - MORE_THAN_OR_EQUAL + - MATCHES + - DOES_NOT_MATCH + - VALIDATES + - IS_IN_MORE_DAYS_THAN + - IS_IN_LESS_DAYS_THAN + - DOES_NOT_EXIST + - IS_UNDEFINED + SyntheticsAssertionTarget: + description: An assertion which uses a simple target. + properties: + operator: + $ref: '#/components/schemas/SyntheticsAssertionOperator' + property: + description: The associated assertion property. + type: string + target: + description: Value used by the operator. + example: 123456 + timingsScope: + $ref: '#/components/schemas/SyntheticsAssertionTimingsScope' + type: + $ref: '#/components/schemas/SyntheticsAssertionType' + required: + - type + - operator + - target + type: object + SyntheticsAssertionTimingsScope: + description: Timings scope for response time assertions. + enum: + - all + - withoutDNS + type: string + x-enum-varnames: + - ALL + - WITHOUT_DNS + SyntheticsAssertionType: + description: Type of the assertion. + enum: + - body + - header + - statusCode + - certificate + - responseTime + - property + - recordEvery + - recordSome + - tlsVersion + - minTlsVersion + - latency + - packetLossPercentage + - packetsReceived + - networkHop + - receivedMessage + - grpcHealthcheckStatus + - grpcMetadata + - grpcProto + - connection + example: statusCode + type: string + x-enum-varnames: + - BODY + - HEADER + - STATUS_CODE + - CERTIFICATE + - RESPONSE_TIME + - PROPERTY + - RECORD_EVERY + - RECORD_SOME + - TLS_VERSION + - MIN_TLS_VERSION + - LATENCY + - PACKET_LOSS_PERCENTAGE + - PACKETS_RECEIVED + - NETWORK_HOP + - RECEIVED_MESSAGE + - GRPC_HEALTHCHECK_STATUS + - GRPC_METADATA + - GRPC_PROTO + - CONNECTION + SyntheticsAssertionXPathOperator: + description: Assertion operator to apply. + enum: + - validatesXPath + example: validatesXPath + type: string + x-enum-varnames: + - VALIDATES_X_PATH + SyntheticsAssertionXPathTarget: + description: An assertion for the `validatesXPath` operator. + properties: + operator: + $ref: '#/components/schemas/SyntheticsAssertionXPathOperator' + property: + description: The associated assertion property. + type: string + target: + $ref: '#/components/schemas/SyntheticsAssertionXPathTargetTarget' + type: + $ref: '#/components/schemas/SyntheticsAssertionType' + required: + - type + - operator + type: object + SyntheticsAssertionXPathTargetTarget: + description: Composed target for `validatesXPath` operator. + properties: + operator: + description: The specific operator to use on the path. + type: string + targetValue: + description: The path target value to compare to. + xPath: + description: The X path to assert. + type: string + type: object + SyntheticsBasicAuth: + description: Object to handle basic authentication when performing the test. + oneOf: + - $ref: '#/components/schemas/SyntheticsBasicAuthWeb' + - $ref: '#/components/schemas/SyntheticsBasicAuthSigv4' + - $ref: '#/components/schemas/SyntheticsBasicAuthNTLM' + - $ref: '#/components/schemas/SyntheticsBasicAuthDigest' + - $ref: '#/components/schemas/SyntheticsBasicAuthOauthClient' + - $ref: '#/components/schemas/SyntheticsBasicAuthOauthROP' + SyntheticsBasicAuthDigest: + description: Object to handle digest authentication when performing the test. + properties: + password: + description: Password to use for the digest authentication. + example: PaSSw0RD! + type: string + type: + $ref: '#/components/schemas/SyntheticsBasicAuthDigestType' + username: + description: Username to use for the digest authentication. + example: my_username + type: string + required: + - password + - username + type: object + SyntheticsBasicAuthDigestType: + default: digest + description: The type of basic authentication to use when performing the test. + enum: + - digest + example: digest + type: string + x-enum-varnames: + - DIGEST + SyntheticsBasicAuthNTLM: + description: Object to handle `NTLM` authentication when performing the test. + properties: + domain: + description: Domain for the authentication to use when performing the test. + example: DOMAINNAME + type: string + password: + description: Password for the authentication to use when performing the + test. + example: examplepassword + type: string + type: + $ref: '#/components/schemas/SyntheticsBasicAuthNTLMType' + username: + description: Username for the authentication to use when performing the + test. + example: joedoe + type: string + workstation: + description: Workstation for the authentication to use when performing the + test. + example: '' + type: string + required: + - type + type: object + SyntheticsBasicAuthNTLMType: + default: ntlm + description: The type of authentication to use when performing the test. + enum: + - ntlm + example: ntlm + type: string + x-enum-varnames: + - NTLM + SyntheticsBasicAuthOauthClient: + description: Object to handle `oauth client` authentication when performing + the test. + properties: + accessTokenUrl: + description: Access token URL to use when performing the authentication. + example: https://example.com + type: string + audience: + description: Audience to use when performing the authentication. + example: audience + type: string + clientId: + description: Client ID to use when performing the authentication. + example: oauth-username + type: string + clientSecret: + description: Client secret to use when performing the authentication. + example: oauth-password + type: string + resource: + description: Resource to use when performing the authentication. + example: resource + type: string + scope: + description: Scope to use when performing the authentication. + example: scope + type: string + tokenApiAuthentication: + $ref: '#/components/schemas/SyntheticsBasicAuthOauthTokenApiAuthentication' + type: + $ref: '#/components/schemas/SyntheticsBasicAuthOauthClientType' + required: + - accessTokenUrl + - tokenApiAuthentication + - clientId + - clientSecret + type: object + SyntheticsBasicAuthOauthClientType: + default: oauth-client + description: The type of basic authentication to use when performing the test. + enum: + - oauth-client + example: oauth-client + type: string + x-enum-varnames: + - OAUTH_CLIENT + SyntheticsBasicAuthOauthROP: + description: Object to handle `oauth rop` authentication when performing the + test. + properties: + accessTokenUrl: + description: Access token URL to use when performing the authentication. + example: https://example.com + type: string + audience: + description: Audience to use when performing the authentication. + example: audience + type: string + clientId: + description: Client ID to use when performing the authentication. + example: client-id + type: string + clientSecret: + description: Client secret to use when performing the authentication. + example: client-secret + type: string + password: + description: Password to use when performing the authentication. + example: password + type: string + resource: + description: Resource to use when performing the authentication. + example: resource + type: string + scope: + description: Scope to use when performing the authentication. + example: scope + type: string + tokenApiAuthentication: + $ref: '#/components/schemas/SyntheticsBasicAuthOauthTokenApiAuthentication' + type: + $ref: '#/components/schemas/SyntheticsBasicAuthOauthROPType' + username: + description: Username to use when performing the authentication. + example: username + type: string + required: + - accessTokenUrl + - password + - tokenApiAuthentication + - username + type: object + SyntheticsBasicAuthOauthROPType: + default: oauth-rop + description: The type of basic authentication to use when performing the test. + enum: + - oauth-rop + example: oauth-rop + type: string + x-enum-varnames: + - OAUTH_ROP + SyntheticsBasicAuthOauthTokenApiAuthentication: + description: Type of token to use when performing the authentication. + enum: + - header + - body + example: header + type: string + x-enum-varnames: + - HEADER + - BODY + SyntheticsBasicAuthSigv4: + description: Object to handle `SIGV4` authentication when performing the test. + properties: + accessKey: + description: Access key for the `SIGV4` authentication. + example: AKIAIOSFODNN7EXAMPLE + type: string + region: + description: Region for the `SIGV4` authentication. + example: us-east-1 + type: string + secretKey: + description: Secret key for the `SIGV4` authentication. + example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY + type: string + serviceName: + description: Service name for the `SIGV4` authentication. + example: execute-api + type: string + sessionToken: + description: Session token for the `SIGV4` authentication. + example: 'AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/L + + To6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3z + + rkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtp + + Z3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE + + ' + type: string + type: + $ref: '#/components/schemas/SyntheticsBasicAuthSigv4Type' + required: + - accessKey + - secretKey + - type + type: object + SyntheticsBasicAuthSigv4Type: + default: sigv4 + description: The type of authentication to use when performing the test. + enum: + - sigv4 + example: sigv4 + type: string + x-enum-varnames: + - SIGV4 + SyntheticsBasicAuthWeb: + description: Object to handle basic authentication when performing the test. + properties: + password: + description: Password to use for the basic authentication. + example: PaSSw0RD! + type: string + type: + $ref: '#/components/schemas/SyntheticsBasicAuthWebType' + username: + description: Username to use for the basic authentication. + example: my_username + type: string + required: + - password + - username + type: object + SyntheticsBasicAuthWebType: + default: web + description: The type of basic authentication to use when performing the test. + enum: + - web + example: web + type: string + x-enum-varnames: + - WEB + SyntheticsBatchDetails: + description: Details about a batch response. + properties: + data: + $ref: '#/components/schemas/SyntheticsBatchDetailsData' + type: object + SyntheticsBatchDetailsData: + description: Wrapper object that contains the details of a batch. + properties: + metadata: + $ref: '#/components/schemas/SyntheticsCIBatchMetadata' + results: + description: List of results for the batch. + items: + $ref: '#/components/schemas/SyntheticsBatchResult' + type: array + status: + $ref: '#/components/schemas/SyntheticsStatus' + type: object + SyntheticsBatchResult: + description: Object with the results of a Synthetic batch. + properties: + device: + $ref: '#/components/schemas/SyntheticsDeviceID' + duration: + description: Total duration in millisecond of the test. format: double type: number - snmp_percentage: - description: The percentage of network device usage by tag(s). + execution_rule: + $ref: '#/components/schemas/SyntheticsTestExecutionRule' + location: + description: Name of the location. + type: string + result_id: + description: The ID of the result to get. + type: string + retries: + description: Number of times this result has been retried. format: double type: number - snmp_usage: - description: The network device usage by tag(s). + status: + $ref: '#/components/schemas/SyntheticsStatus' + test_name: + description: Name of the test. + type: string + test_public_id: + description: The public ID of the Synthetic test. + type: string + test_type: + $ref: '#/components/schemas/SyntheticsTestDetailsType' + type: object + SyntheticsBrowserError: + description: Error response object for a browser test. + properties: + description: + description: Description of the error. + example: Example error message + type: string + name: + description: Name of the error. + example: Failed test + type: string + status: + description: Status Code of the error. + example: 500 + format: int64 + type: integer + type: + $ref: '#/components/schemas/SyntheticsBrowserErrorType' + required: + - description + - name + - type + type: object + SyntheticsBrowserErrorType: + description: Error type returned by a browser test. + enum: + - network + - js + example: network + type: string + x-enum-varnames: + - NETWORK + - JS + SyntheticsBrowserTest: + description: Object containing details about a Synthetic browser test. + properties: + config: + $ref: '#/components/schemas/SyntheticsBrowserTestConfig' + locations: + description: Array of locations used to run the test. + example: + - aws:eu-west-3 + items: + description: A location from which the test was run. + type: string + type: array + message: + description: Notification message associated with the test. Message can + either be text or an empty string. + example: '' + type: string + monitor_id: + description: The associated monitor ID. + format: int64 + readOnly: true + type: integer + name: + description: Name of the test. + example: Example test name + type: string + options: + $ref: '#/components/schemas/SyntheticsTestOptions' + public_id: + description: The public ID of the test. + readOnly: true + type: string + status: + $ref: '#/components/schemas/SyntheticsTestPauseStatus' + steps: + description: Array of steps for the test. + items: + $ref: '#/components/schemas/SyntheticsStep' + type: array + tags: + description: Array of tags attached to the test. + example: + - env:prod + items: + description: A tag attached to the test. + type: string + type: array + type: + $ref: '#/components/schemas/SyntheticsBrowserTestType' + required: + - config + - locations + - name + - options + - type + - message + type: object + SyntheticsBrowserTestConfig: + description: Configuration object for a Synthetic browser test. + properties: + assertions: + default: [] + description: Array of assertions used for the test. + example: [] + items: + $ref: '#/components/schemas/SyntheticsAssertion' + type: array + configVariables: + description: Array of variables used for the test. + items: + $ref: '#/components/schemas/SyntheticsConfigVariable' + type: array + request: + $ref: '#/components/schemas/SyntheticsTestRequest' + setCookie: + description: Cookies to be used for the request, using the [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) + syntax. + type: string + variables: + description: Array of variables used for the test steps. + items: + $ref: '#/components/schemas/SyntheticsBrowserVariable' + type: array + required: + - request + - assertions + type: object + SyntheticsBrowserTestFailureCode: + description: Error code that can be returned by a Synthetic test. + enum: + - API_REQUEST_FAILURE + - ASSERTION_FAILURE + - DOWNLOAD_FILE_TOO_LARGE + - ELEMENT_NOT_INTERACTABLE + - EMAIL_VARIABLE_NOT_DEFINED + - EVALUATE_JAVASCRIPT + - EVALUATE_JAVASCRIPT_CONTEXT + - EXTRACT_VARIABLE + - FORBIDDEN_URL + - FRAME_DETACHED + - INCONSISTENCIES + - INTERNAL_ERROR + - INVALID_TYPE_TEXT_DELAY + - INVALID_URL + - INVALID_VARIABLE_PATTERN + - INVISIBLE_ELEMENT + - LOCATE_ELEMENT + - NAVIGATE_TO_LINK + - OPEN_URL + - PRESS_KEY + - SERVER_CERTIFICATE + - SELECT_OPTION + - STEP_TIMEOUT + - SUB_TEST_NOT_PASSED + - TEST_TIMEOUT + - TOO_MANY_HTTP_REQUESTS + - UNAVAILABLE_BROWSER + - UNKNOWN + - UNSUPPORTED_AUTH_SCHEMA + - UPLOAD_FILES_ELEMENT_TYPE + - UPLOAD_FILES_DIALOG + - UPLOAD_FILES_DYNAMIC_ELEMENT + - UPLOAD_FILES_NAME + type: string + x-enum-varnames: + - API_REQUEST_FAILURE + - ASSERTION_FAILURE + - DOWNLOAD_FILE_TOO_LARGE + - ELEMENT_NOT_INTERACTABLE + - EMAIL_VARIABLE_NOT_DEFINED + - EVALUATE_JAVASCRIPT + - EVALUATE_JAVASCRIPT_CONTEXT + - EXTRACT_VARIABLE + - FORBIDDEN_URL + - FRAME_DETACHED + - INCONSISTENCIES + - INTERNAL_ERROR + - INVALID_TYPE_TEXT_DELAY + - INVALID_URL + - INVALID_VARIABLE_PATTERN + - INVISIBLE_ELEMENT + - LOCATE_ELEMENT + - NAVIGATE_TO_LINK + - OPEN_URL + - PRESS_KEY + - SERVER_CERTIFICATE + - SELECT_OPTION + - STEP_TIMEOUT + - SUB_TEST_NOT_PASSED + - TEST_TIMEOUT + - TOO_MANY_HTTP_REQUESTS + - UNAVAILABLE_BROWSER + - UNKNOWN + - UNSUPPORTED_AUTH_SCHEMA + - UPLOAD_FILES_ELEMENT_TYPE + - UPLOAD_FILES_DIALOG + - UPLOAD_FILES_DYNAMIC_ELEMENT + - UPLOAD_FILES_NAME + SyntheticsBrowserTestResultData: + description: Object containing results for your Synthetic browser test. + properties: + browserType: + description: Type of browser device used for the browser test. + type: string + browserVersion: + description: Browser version used for the browser test. + type: string + device: + $ref: '#/components/schemas/SyntheticsDevice' + duration: + description: Global duration in second of the browser test. format: double type: number - universal_service_monitoring_percentage: - description: The percentage of universal service monitoring usage by tag(s). + error: + description: Error returned for the browser test. + type: string + failure: + $ref: '#/components/schemas/SyntheticsBrowserTestResultFailure' + passed: + description: Whether or not the browser test was conducted. + type: boolean + receivedEmailCount: + description: The amount of email received during the browser test. + format: int64 + type: integer + startUrl: + description: Starting URL for the browser test. + type: string + stepDetails: + description: Array containing the different browser test steps. + items: + $ref: '#/components/schemas/SyntheticsStepDetail' + type: array + thumbnailsBucketKey: + description: Whether or not a thumbnail is associated with the browser test. + type: boolean + timeToInteractive: + description: 'Time in second to wait before the browser test starts after + + reaching the start URL.' format: double type: number - universal_service_monitoring_usage: - description: The universal service monitoring usage by tag(s). + type: object + SyntheticsBrowserTestResultFailure: + description: The browser test failure details. + properties: + code: + $ref: '#/components/schemas/SyntheticsBrowserTestFailureCode' + message: + description: The browser test error message. + example: Error during DNS resolution (ENOTFOUND). + type: string + type: object + SyntheticsBrowserTestResultFull: + description: Object returned describing a browser test result. + properties: + check: + $ref: '#/components/schemas/SyntheticsBrowserTestResultFullCheck' + check_time: + description: When the browser test was conducted. format: double type: number - vuln_management_hosts_percentage: - description: The percentage of Application Vulnerability Management usage - by tag(s). + check_version: + description: Version of the browser test used. + format: int64 + type: integer + probe_dc: + description: Location from which the browser test was performed. + type: string + result: + $ref: '#/components/schemas/SyntheticsBrowserTestResultData' + result_id: + description: ID of the browser test result. + type: string + status: + $ref: '#/components/schemas/SyntheticsTestMonitorStatus' + type: object + SyntheticsBrowserTestResultFullCheck: + description: Object describing the browser test configuration. + properties: + config: + $ref: '#/components/schemas/SyntheticsTestConfig' + required: + - config + type: object + SyntheticsBrowserTestResultShort: + description: Object with the results of a single Synthetic browser test. + properties: + check_time: + description: Last time the browser test was performed. format: double type: number - vuln_management_hosts_usage: - description: The Application Vulnerability Management usage by tag(s). + probe_dc: + description: Location from which the Browser test was performed. + type: string + result: + $ref: '#/components/schemas/SyntheticsBrowserTestResultShortResult' + result_id: + description: ID of the browser test result. + type: string + status: + $ref: '#/components/schemas/SyntheticsTestMonitorStatus' + type: object + SyntheticsBrowserTestResultShortResult: + description: Object with the result of the last browser test run. + properties: + device: + $ref: '#/components/schemas/SyntheticsDevice' + duration: + description: Length in milliseconds of the browser test run. format: double type: number - type: object - NotifyEndState: - description: A notification end state. - enum: - - alert - - no data - - warn - example: alert - type: string - x-enum-varnames: - - ALERT - - NO_DATA - - WARN - NotifyEndStates: - default: - - alert - - no data - - warn - description: States for which `notify_end_types` sends out notifications for. - example: - - alert - - no data - - warn - items: - $ref: '#/components/schemas/NotifyEndState' - type: array - NotifyEndType: - description: A notification end type. - enum: - - canceled - - expired - example: expired - type: string - x-enum-varnames: - - CANCELED - - EXPIRED - NotifyEndTypes: - default: - - expired - description: 'If set, notifies if a monitor is in an alert-worthy state (`ALERT`, - `WARNING`, or `NO DATA`) + errorCount: + description: Amount of errors collected for a single browser test run. + format: int64 + type: integer + stepCountCompleted: + description: Amount of browser test steps completed before failing. + format: int64 + type: integer + stepCountTotal: + description: Total amount of browser test steps. + format: int64 + type: integer + type: object + SyntheticsBrowserTestRumSettings: + description: 'The RUM data collection settings for the Synthetic browser test. - when this downtime expires or is canceled. Applied to monitors that change - states during + **Note:** There are 3 ways to format RUM settings: - the downtime (such as from `OK` to `ALERT`, `WARNING`, or `NO DATA`), and - to monitors that - already have an alert-worthy state when downtime begins.' + `{ isEnabled: false }` + + RUM data is not collected. + + + `{ isEnabled: true }` + + RUM data is collected from the Synthetic test''s default application. + + + `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + clientTokenId: 12345 }` + + RUM data is collected using the specified application.' example: - - canceled - - expired - items: - $ref: '#/components/schemas/NotifyEndType' - type: array - OrgDowngradedResponse: - description: Status of downgrade + applicationId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + clientTokenId: 12345 + isEnabled: true properties: - message: - description: Information pertaining to the downgraded child organization. + applicationId: + description: RUM application ID used to collect RUM data for the browser + test. + example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx type: string + clientTokenId: + description: RUM application API key ID used to collect RUM data for the + browser test. + example: 12345 + format: int64 + type: integer + isEnabled: + description: Determines whether RUM data is collected during test runs. + example: true + type: boolean + required: + - isEnabled type: object - Organization: - description: Create, edit, and manage organizations. + SyntheticsBrowserTestType: + default: browser + description: Type of the Synthetic test, `browser`. + enum: + - browser + example: browser + type: string + x-enum-varnames: + - BROWSER + SyntheticsBrowserVariable: + description: 'Object defining a variable that can be used in your browser test. + + See the [Recording Steps documentation](https://docs.datadoghq.com/synthetics/browser_tests/actions/?tab=testanelementontheactivepage#variables).' properties: - billing: - $ref: '#/components/schemas/OrganizationBilling' - created: - description: Date of the organization creation. - example: '2019-09-26T17:28:28Z' - readOnly: true + example: + description: Example for the variable. type: string - description: - description: Description of the organization. - example: some description + id: + description: ID for the variable. Global variables require an ID. type: string name: - description: The name of the new child-organization, limited to 32 characters. - example: New child org - maxLength: 32 + description: Name of the variable. + example: VARIABLE_NAME type: string - public_id: - description: The `public_id` of the organization you are operating within. - example: abcdef12345 + pattern: + description: Pattern of the variable. type: string - settings: - $ref: '#/components/schemas/OrganizationSettings' - subscription: - $ref: '#/components/schemas/OrganizationSubscription' - trial: - description: Only available for MSP customers. Allows child organizations - to be created on a trial plan. - example: false + secure: + description: Determines whether or not the browser test variable is obfuscated. + Can only be used with browser variables of type `text`. type: boolean - type: object - OrganizationBilling: - deprecated: true - description: A JSON array of billing type. - example: - type: parent_billing - properties: type: - description: The type of billing. Only `parent_billing` is supported. - type: string - type: object - OrganizationCreateBody: - description: Object describing an organization to create. - properties: - billing: - $ref: '#/components/schemas/OrganizationBilling' - name: - description: The name of the new child-organization, limited to 32 characters. - example: New child org - maxLength: 32 - type: string - subscription: - $ref: '#/components/schemas/OrganizationSubscription' + $ref: '#/components/schemas/SyntheticsBrowserVariableType' required: + - type - name type: object - OrganizationCreateResponse: - description: Response object for an organization creation. + SyntheticsBrowserVariableType: + description: Type of browser test variable. + enum: + - element + - email + - global + - javascript + - text + example: text + type: string + x-enum-varnames: + - ELEMENT + - EMAIL + - GLOBAL + - JAVASCRIPT + - TEXT + SyntheticsCIBatchMetadata: + description: Metadata for the Synthetic tests run. properties: - api_key: - $ref: '#/components/schemas/ApiKey' - application_key: - $ref: '#/components/schemas/ApplicationKey' - org: - $ref: '#/components/schemas/Organization' - user: - $ref: '#/components/schemas/User' + ci: + $ref: '#/components/schemas/SyntheticsCIBatchMetadataCI' + git: + $ref: '#/components/schemas/SyntheticsCIBatchMetadataGit' type: object - OrganizationListResponse: - description: Response with the list of organizations. + SyntheticsCIBatchMetadataCI: + description: Description of the CI provider. properties: - orgs: - description: Array of organization objects. - items: - $ref: '#/components/schemas/Organization' - type: array + pipeline: + $ref: '#/components/schemas/SyntheticsCIBatchMetadataPipeline' + provider: + $ref: '#/components/schemas/SyntheticsCIBatchMetadataProvider' type: object - OrganizationResponse: - description: Response with an organization. + SyntheticsCIBatchMetadataGit: + description: Git information. properties: - org: - $ref: '#/components/schemas/Organization' + branch: + description: Branch name. + type: string + commitSha: + description: The commit SHA. + type: string type: object - OrganizationSettings: - description: A JSON array of settings. + SyntheticsCIBatchMetadataPipeline: + description: Description of the CI pipeline. properties: - private_widget_share: - description: Whether or not the organization users can share widgets outside - of Datadog. - example: false - type: boolean - saml: - $ref: '#/components/schemas/OrganizationSettingsSaml' - saml_autocreate_access_role: - $ref: '#/components/schemas/AccessRole' - saml_autocreate_users_domains: - $ref: '#/components/schemas/OrganizationSettingsSamlAutocreateUsersDomains' - saml_can_be_enabled: - description: Whether or not SAML can be enabled for this organization. - example: false - type: boolean - saml_idp_endpoint: - description: Identity provider endpoint for SAML authentication. - example: https://my.saml.endpoint - type: string - saml_idp_initiated_login: - $ref: '#/components/schemas/OrganizationSettingsSamlIdpInitiatedLogin' - saml_idp_metadata_uploaded: - description: Whether or not a SAML identity provider metadata file was provided - to the Datadog organization. - example: false - type: boolean - saml_login_url: - description: URL for SAML logging. - example: https://my.saml.login.url + url: + description: URL of the pipeline. type: string - saml_strict_mode: - $ref: '#/components/schemas/OrganizationSettingsSamlStrictMode' type: object - OrganizationSettingsSaml: - description: 'Set the boolean property enabled to enable or disable single sign - on with SAML. - - See the SAML documentation for more information about all SAML settings.' + SyntheticsCIBatchMetadataProvider: + description: Description of the CI provider. properties: - enabled: - description: Whether or not SAML is enabled for this organization. - example: false - type: boolean + name: + description: Name of the CI provider. + type: string type: object - OrganizationSettingsSamlAutocreateUsersDomains: - description: Has two properties, `enabled` (boolean) and `domains`, which is - a list of domains without the @ symbol. + SyntheticsCITest: + description: Configuration for Continuous Testing. properties: - domains: - description: List of domains where the SAML automated user creation is enabled. + allowInsecureCertificates: + description: Disable certificate checks in API tests. + type: boolean + basicAuth: + $ref: '#/components/schemas/SyntheticsBasicAuth' + body: + description: Body to include in the test. + type: string + bodyType: + description: Type of the data sent in a Synthetic API test. + type: string + cookies: + description: Cookies for the request. + type: string + deviceIds: + description: For browser test, array with the different device IDs used + to run the test. items: - description: Domain to automate user creation from. - example: example.com - type: string + $ref: '#/components/schemas/SyntheticsDeviceID' type: array - enabled: - description: Whether or not the automated user creation based on SAML domain - is enabled. - example: false + followRedirects: + description: For API HTTP test, whether or not the test should follow redirects. type: boolean + headers: + $ref: '#/components/schemas/SyntheticsTestHeaders' + locations: + description: Array of locations used to run the test. + example: + - aws:eu-west-3 + items: + description: A location from which the test was run. + type: string + type: array + metadata: + $ref: '#/components/schemas/SyntheticsCIBatchMetadata' + public_id: + description: The public ID of the Synthetic test to trigger. + example: aaa-aaa-aaa + type: string + retry: + $ref: '#/components/schemas/SyntheticsTestOptionsRetry' + startUrl: + description: Starting URL for the browser test. + type: string + variables: + additionalProperties: + description: A single variable. + type: string + description: Variables to replace in the test. + type: object + required: + - public_id type: object - OrganizationSettingsSamlIdpInitiatedLogin: - description: Has one property enabled (boolean). + SyntheticsCITestBody: + description: Object describing the synthetics tests to trigger. properties: - enabled: - description: 'Whether SAML IdP initiated login is enabled, learn more - - in the [SAML documentation](https://docs.datadoghq.com/account_management/saml/#idp-initiated-login).' - example: false - type: boolean + tests: + description: Individual synthetics test. + items: + $ref: '#/components/schemas/SyntheticsCITest' + type: array type: object - OrganizationSettingsSamlStrictMode: - description: Has one property enabled (boolean). - properties: - enabled: - description: 'Whether or not the SAML strict mode is enabled. If true, all - users must log in with SAML. - - Learn more on the [SAML Strict documentation](https://docs.datadoghq.com/account_management/saml/#saml-strict).' + SyntheticsCheckType: + description: Type of assertion to apply in an API test. + enum: + - equals + - notEquals + - contains + - notContains + - startsWith + - notStartsWith + - greater + - lower + - greaterEquals + - lowerEquals + - matchRegex + - between + - isEmpty + - notIsEmpty + type: string + x-enum-varnames: + - EQUALS + - NOT_EQUALS + - CONTAINS + - NOT_CONTAINS + - STARTS_WITH + - NOT_STARTS_WITH + - GREATER + - LOWER + - GREATER_EQUALS + - LOWER_EQUALS + - MATCH_REGEX + - BETWEEN + - IS_EMPTY + - NOT_IS_EMPTY + SyntheticsConfigVariable: + description: Object defining a variable that can be used in your test configuration. + properties: + example: + description: Example for the variable. + type: string + id: + description: ID of the variable for global variables. + type: string + name: + description: Name of the variable. + example: VARIABLE_NAME + type: string + pattern: + description: Pattern of the variable. + type: string + secure: + description: Whether the value of this variable will be obfuscated in test + results. Only for config variables of type `text`. example: false type: boolean + type: + $ref: '#/components/schemas/SyntheticsConfigVariableType' + required: + - type + - name type: object - OrganizationSubscription: - deprecated: true - description: Subscription definition. - example: - type: pro + SyntheticsConfigVariableType: + description: Type of the configuration variable. + enum: + - global + - text + example: text + type: string + x-enum-varnames: + - GLOBAL + - TEXT + SyntheticsCoreWebVitals: + description: Core Web Vitals attached to a browser test step. properties: - type: - description: The subscription type. Types available are `trial`, `free`, - and `pro`. + cls: + description: Cumulative Layout Shift. + format: double + type: number + lcp: + description: Largest Contentful Paint in milliseconds. + format: double + type: number + url: + description: URL attached to the metrics. type: string type: object - PagerDutyService: - description: The PagerDuty service that is available for integration with Datadog. + SyntheticsDefaultLocations: + description: List of Synthetics default locations settings. + example: + - aws:eu-west-3 + items: + description: Name of the location. + type: string + type: array + SyntheticsDeleteTestsPayload: + description: 'A JSON list of the ID or IDs of the Synthetic tests that you want + + to delete.' properties: - service_key: - description: Your service key in PagerDuty. - example: '' - type: string - service_name: - description: Your service name associated with a service key in PagerDuty. - example: '' - type: string - required: - - service_name - - service_key + public_ids: + description: An array of Synthetic test IDs you want to delete. + example: [] + items: + description: A Synthetic test ID to delete. + example: abc-def-123 + type: string + type: array type: object - PagerDutyServiceKey: - description: PagerDuty service object key. + SyntheticsDeleteTestsResponse: + description: Response object for deleting Synthetic tests. properties: - service_key: - description: Your service key in PagerDuty. - example: '' - type: string - required: - - service_key + deleted_tests: + description: 'Array of objects containing a deleted Synthetic test ID with + + the associated deletion timestamp.' + items: + $ref: '#/components/schemas/SyntheticsDeletedTest' + type: array type: object - PagerDutyServiceName: - description: PagerDuty service object name. + SyntheticsDeletedTest: + description: 'Object containing a deleted Synthetic test ID with the associated + + deletion timestamp.' properties: - service_name: - description: Your service name associated service key in PagerDuty. - example: '' + deleted_at: + description: Deletion timestamp of the Synthetic test ID. + format: date-time + type: string + public_id: + description: The Synthetic test ID deleted. type: string - required: - - service_name type: object - Pagination: - description: Pagination object. + SyntheticsDevice: + description: Object describing the device used to perform the Synthetic test. properties: - total_count: - description: Total count. + height: + description: Screen height of the device. + example: 0 format: int64 type: integer - total_filtered_count: - description: Total count of elements matched by the filter. + id: + $ref: '#/components/schemas/SyntheticsDeviceID' + isMobile: + description: Whether or not the device is a mobile. + type: boolean + name: + description: The device name. + example: '' + type: string + width: + description: Screen width of the device. + example: 0 format: int64 type: integer + required: + - id + - name + - height + - width type: object - Point: - description: Array of timeseries points. - example: - - 1575317847.0 - - 0.5 - items: - description: 'Each point is of the form `[POSIX_timestamp, numeric_value]`. - - The timestamp should be in seconds and current. - - The numeric value format should be a 32bit float gauge-type value. - - Current is defined as not more than 10 minutes in the future or more than - 1 hour in the past.' - format: double - nullable: true - type: number - maxItems: 2 - minItems: 2 - type: array - QuerySortOrder: - default: desc - description: Direction of sort. + SyntheticsDeviceID: + description: The device ID. enum: - - asc - - desc + - laptop_large + - tablet + - mobile_small + - chrome.laptop_large + - chrome.tablet + - chrome.mobile_small + - firefox.laptop_large + - firefox.tablet + - firefox.mobile_small + - edge.laptop_large + - edge.tablet + - edge.mobile_small + example: laptop_large type: string x-enum-varnames: - - ASC - - DESC - ResponseMetaAttributes: - description: Object describing meta attributes of response. - properties: - page: - $ref: '#/components/schemas/Pagination' + - LAPTOP_LARGE + - TABLET + - MOBILE_SMALL + - CHROME_LAPTOP_LARGE + - CHROME_TABLET + - CHROME_MOBILE_SMALL + - FIREFOX_LAPTOP_LARGE + - FIREFOX_TABLET + - FIREFOX_MOBILE_SMALL + - EDGE_LAPTOP_LARGE + - EDGE_TABLET + - EDGE_MOBILE_SMALL + SyntheticsGetAPITestLatestResultsResponse: + description: Object with the latest Synthetic API test run. + properties: + last_timestamp_fetched: + description: Timestamp of the latest API test run. + format: int64 + type: integer + results: + description: Result of the latest API test run. + items: + $ref: '#/components/schemas/SyntheticsAPITestResultShort' + type: array type: object - SLOBulkDelete: - additionalProperties: - description: An array of all SLO timeframes. - items: - $ref: '#/components/schemas/SLOTimeframe' - type: array - description: 'A map of service level objective object IDs to arrays of timeframes, - - which indicate the thresholds to delete for each ID.' - example: - id1: - - 7d - - 30d - id2: - - 7d - - 30d + SyntheticsGetBrowserTestLatestResultsResponse: + description: Object with the latest Synthetic browser test run. + properties: + last_timestamp_fetched: + description: Timestamp of the latest browser test run. + format: int64 + type: integer + results: + description: Result of the latest browser test run. + items: + $ref: '#/components/schemas/SyntheticsBrowserTestResultShort' + type: array type: object - SLOBulkDeleteError: - description: Object describing the error. + SyntheticsGlobalVariable: + description: Synthetic global variable. properties: + attributes: + $ref: '#/components/schemas/SyntheticsGlobalVariableAttributes' + description: + description: Description of the global variable. + example: Example description + type: string id: - description: 'The ID of the service level objective object associated with - - this error.' - example: '' + description: Unique identifier of the global variable. + readOnly: true type: string - message: - description: The error message. - example: '' + name: + description: Name of the global variable. Unique across Synthetic global + variables. + example: MY_VARIABLE type: string - timeframe: - $ref: '#/components/schemas/SLOErrorTimeframe' + parse_test_options: + $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptions' + parse_test_public_id: + description: A Synthetic test ID to use as a test to generate the variable + value. + example: abc-def-123 + type: string + tags: + description: Tags of the global variable. + example: + - team:front + - test:workflow-1 + items: + description: Tag name. + type: string + type: array + value: + $ref: '#/components/schemas/SyntheticsGlobalVariableValue' required: - - id - - timeframe - - message + - description + - name + - tags + - value type: object - SLOBulkDeleteResponse: - description: 'The bulk partial delete service level objective object endpoint - - response. - - - This endpoint operates on multiple service level objective objects, so - - it may be partially successful. In such cases, the "data" and "error" + SyntheticsGlobalVariableAttributes: + description: Attributes of the global variable. + properties: + restricted_roles: + $ref: '#/components/schemas/SyntheticsRestrictedRoles' + type: object + SyntheticsGlobalVariableOptions: + description: Options for the Global Variable for MFA. + properties: + totp_parameters: + $ref: '#/components/schemas/SyntheticsGlobalVariableTOTPParameters' + type: object + SyntheticsGlobalVariableParseTestOptions: + description: Parser options to use for retrieving a Synthetic global variable + from a Synthetic test. Used in conjunction with `parse_test_public_id`. + properties: + field: + description: When type is `http_header`, name of the header to use to extract + the value. + example: content-type + type: string + localVariableName: + description: When type is `local_variable`, name of the local variable to + use to extract the value. + example: LOCAL_VARIABLE + type: string + parser: + $ref: '#/components/schemas/SyntheticsVariableParser' + type: + $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptionsType' + required: + - type + type: object + SyntheticsGlobalVariableParseTestOptionsType: + description: Property of the Synthetic Test Response to use for a Synthetic + global variable. + enum: + - http_body + - http_header + - local_variable + example: http_body + type: string + x-enum-varnames: + - HTTP_BODY + - HTTP_HEADER + - LOCAL_VARIABLE + SyntheticsGlobalVariableParserType: + description: Type of parser for a Synthetic global variable from a synthetics + test. + enum: + - raw + - json_path + - regex + - x_path + example: raw + type: string + x-enum-varnames: + - RAW + - JSON_PATH + - REGEX + - X_PATH + SyntheticsGlobalVariableTOTPParameters: + description: Parameters for the TOTP/MFA variable + properties: + digits: + description: Number of digits for the OTP code. + example: 6 + format: int32 + maximum: 10 + minimum: 4 + type: integer + refresh_interval: + description: Interval for which to refresh the token (in seconds). + example: 30 + format: int32 + maximum: 999 + minimum: 0 + type: integer + type: object + SyntheticsGlobalVariableValue: + description: Value of the global variable. + example: + secure: true + value: value + properties: + options: + $ref: '#/components/schemas/SyntheticsGlobalVariableOptions' + secure: + description: Determines if the value of the variable is hidden. + type: boolean + value: + description: 'Value of the global variable. When reading a global variable, - fields in this response indicate which deletions succeeded and failed.' + the value will not be present if the variable is hidden with the `secure` + property.' + example: example-value + type: string + type: object + SyntheticsListGlobalVariablesResponse: + description: Object containing an array of Synthetic global variables. properties: - data: - $ref: '#/components/schemas/SLOBulkDeleteResponseData' - errors: - description: Array of errors object returned. + variables: + description: Array of Synthetic global variables. items: - $ref: '#/components/schemas/SLOBulkDeleteError' + $ref: '#/components/schemas/SyntheticsGlobalVariable' type: array type: object - SLOBulkDeleteResponseData: - description: An array of service level objective objects. + SyntheticsListTestsResponse: + description: Object containing an array of Synthetic tests configuration. properties: - deleted: - description: 'An array of service level objective object IDs that indicates - - which objects that were completely deleted.' + tests: + description: Array of Synthetic tests configuration. items: - description: A deleted SLO ID. - type: string + $ref: '#/components/schemas/SyntheticsTestDetails' type: array - updated: - description: 'An array of service level objective object IDs that indicates - - which objects that were modified (objects for which at least one + type: object + SyntheticsLocation: + description: 'Synthetic location that can be used when creating or editing a - threshold was deleted, but that were not completely deleted).' + test.' + properties: + id: + description: Unique identifier of the location. + type: string + name: + description: Name of the location. + type: string + type: object + SyntheticsLocations: + description: List of Synthetic locations. + properties: + locations: + description: List of Synthetic locations. items: - description: An updated SLO ID. - type: string + $ref: '#/components/schemas/SyntheticsLocation' type: array type: object - SLOCorrection: - description: The response object of a list of SLO corrections. + SyntheticsParsingOptions: + description: Parsing options for variables to extract. + example: {} properties: - attributes: - $ref: '#/components/schemas/SLOCorrectionResponseAttributes' - id: - description: The ID of the SLO correction. + field: + description: When type is `http_header`, name of the header to use to extract + the value. + example: content-type type: string + name: + description: Name of the variable to extract. + type: string + parser: + $ref: '#/components/schemas/SyntheticsVariableParser' + secure: + description: Determines whether or not the extracted value will be obfuscated. + type: boolean type: - $ref: '#/components/schemas/SLOCorrectionType' + $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptionsType' type: object - SLOCorrectionCategory: - description: Category the SLO correction belongs to. + SyntheticsPatchTestBody: + description: Wrapper around an array of [JSON Patch](https://jsonpatch.com) + operations to perform on the test + properties: + data: + description: Array of [JSON Patch](https://jsonpatch.com) operations to + perform on the test + example: + - op: replace + path: /name + value: New test name + - op: remove + path: /config/assertions/0 + items: + $ref: '#/components/schemas/SyntheticsPatchTestOperation' + type: array + type: object + SyntheticsPatchTestOperation: + description: A single [JSON Patch](https://jsonpatch.com) operation to perform + on the test + properties: + op: + $ref: '#/components/schemas/SyntheticsPatchTestOperationName' + path: + description: The path to the value to modify + example: /name + type: string + value: + description: A value to use in a [JSON Patch](https://jsonpatch.com) operation + example: New Test Name + type: object + SyntheticsPatchTestOperationName: + description: The operation to perform enum: - - Scheduled Maintenance - - Outside Business Hours - - Deployment - - Other - example: Scheduled Maintenance + - add + - remove + - replace + - move + - copy + - test + example: replace type: string x-enum-varnames: - - SCHEDULED_MAINTENANCE - - OUTSIDE_BUSINESS_HOURS - - DEPLOYMENT - - OTHER - SLOCorrectionCreateData: - description: The data object associated with the SLO correction to be created. + - ADD + - REMOVE + - REPLACE + - MOVE + - COPY + - TEST + SyntheticsPlayingTab: + description: Navigate between different tabs for your browser test. + enum: + - -1 + - 0 + - 1 + - 2 + - 3 + format: int64 + type: integer + x-enum-varnames: + - MAIN_TAB + - NEW_TAB + - TAB_1 + - TAB_2 + - TAB_3 + SyntheticsPrivateLocation: + description: Object containing information about the private location to create. properties: - attributes: - $ref: '#/components/schemas/SLOCorrectionCreateRequestAttributes' - type: - $ref: '#/components/schemas/SLOCorrectionType' + description: + description: Description of the private location. + example: Description of private location + type: string + id: + description: Unique identifier of the private location. + readOnly: true + type: string + metadata: + $ref: '#/components/schemas/SyntheticsPrivateLocationMetadata' + name: + description: Name of the private location. + example: New private location + type: string + secrets: + $ref: '#/components/schemas/SyntheticsPrivateLocationSecrets' + tags: + description: Array of tags attached to the private location. + example: + - team:front + items: + description: A tag attached to the private location. + example: team:front + type: string + type: array required: - - type + - name + - description + - tags type: object - SLOCorrectionCreateRequest: - description: An object that defines a correction to be applied to an SLO. + SyntheticsPrivateLocationCreationResponse: + description: Object that contains the new private location, the public key for + result encryption, and the configuration skeleton. properties: - data: - $ref: '#/components/schemas/SLOCorrectionCreateData' + config: + description: Configuration skeleton for the private location. See installation + instructions of the private location on how to use this configuration. + type: object + private_location: + $ref: '#/components/schemas/SyntheticsPrivateLocation' + result_encryption: + $ref: '#/components/schemas/SyntheticsPrivateLocationCreationResponseResultEncryption' type: object - SLOCorrectionCreateRequestAttributes: - description: The attribute object associated with the SLO correction to be created. + SyntheticsPrivateLocationCreationResponseResultEncryption: + description: Public key for the result encryption. properties: - category: - $ref: '#/components/schemas/SLOCorrectionCategory' - description: - description: Description of the correction being made. + id: + description: Fingerprint for the encryption key. type: string - duration: - description: Length of time (in seconds) for a specified `rrule` recurring - SLO correction. - example: 1600000000 - format: int64 - type: integer - end: - description: Ending time of the correction in epoch seconds. - example: 1600000000 - format: int64 - type: integer - rrule: - description: 'The recurrence rules as defined in the iCalendar RFC 5545. - The supported rules for SLO corrections - - are `FREQ`, `INTERVAL`, `COUNT` and `UNTIL`.' - example: FREQ=DAILY;INTERVAL=10;COUNT=5 + key: + description: Public key for result encryption. type: string - slo_id: - description: ID of the SLO that this correction applies to. - example: sloId + type: object + SyntheticsPrivateLocationMetadata: + description: Object containing metadata about the private location. + properties: + restricted_roles: + $ref: '#/components/schemas/SyntheticsRestrictedRoles' + type: object + SyntheticsPrivateLocationSecrets: + description: Secrets for the private location. Only present in the response + when creating the private location. + properties: + authentication: + $ref: '#/components/schemas/SyntheticsPrivateLocationSecretsAuthentication' + config_decryption: + $ref: '#/components/schemas/SyntheticsPrivateLocationSecretsConfigDecryption' + readOnly: true + type: object + SyntheticsPrivateLocationSecretsAuthentication: + description: Authentication part of the secrets. + properties: + id: + description: Access key for the private location. + readOnly: true type: string - start: - description: Starting time of the correction in epoch seconds. - example: 1600000000 - format: int64 - type: integer - timezone: - description: The timezone to display in the UI for the correction times - (defaults to "UTC"). - example: UTC + key: + description: Secret access key for the private location. + readOnly: true type: string - required: - - slo_id - - start - - category type: object - SLOCorrectionListResponse: - description: A list of SLO correction objects. + SyntheticsPrivateLocationSecretsConfigDecryption: + description: Private key for the private location. properties: - data: - description: The list of of SLO corrections objects. - items: - $ref: '#/components/schemas/SLOCorrection' - type: array - meta: - $ref: '#/components/schemas/ResponseMetaAttributes' + key: + description: Private key for the private location. + readOnly: true + type: string type: object - SLOCorrectionResponse: - description: The response object of an SLO correction. + SyntheticsRestrictedRoles: + description: A list of role identifiers that can be pulled from the Roles API, + for restricting read and write access. + example: + - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + items: + description: UUID for a role. + example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + type: string + type: array + SyntheticsSSLCertificate: + description: Object describing the SSL certificate used for a Synthetic test. properties: - data: - $ref: '#/components/schemas/SLOCorrection' + cipher: + description: Cipher used for the connection. + type: string + exponent: + description: Exponent associated to the certificate. + format: double + type: number + extKeyUsage: + description: Array of extensions and details used for the certificate. + items: + description: An extension or detail used for the certificate. + type: string + type: array + fingerprint: + description: MD5 digest of the DER-encoded Certificate information. + type: string + fingerprint256: + description: SHA-1 digest of the DER-encoded Certificate information. + type: string + issuer: + $ref: '#/components/schemas/SyntheticsSSLCertificateIssuer' + modulus: + description: Modulus associated to the SSL certificate private key. + type: string + protocol: + description: TLS protocol used for the test. + type: string + serialNumber: + description: Serial Number assigned by Symantec to the SSL certificate. + type: string + subject: + $ref: '#/components/schemas/SyntheticsSSLCertificateSubject' + validFrom: + description: Date from which the SSL certificate is valid. + format: date-time + type: string + validTo: + description: Date until which the SSL certificate is valid. + format: date-time + type: string type: object - SLOCorrectionResponseAttributes: - description: The attribute object associated with the SLO correction. + SyntheticsSSLCertificateIssuer: + description: Object describing the issuer of a SSL certificate. properties: - category: - $ref: '#/components/schemas/SLOCorrectionCategory' - created_at: - description: The epoch timestamp of when the correction was created at. - format: int64 - nullable: true - type: integer - creator: - $ref: '#/components/schemas/Creator' - description: - description: Description of the correction being made. + C: + description: Country Name that issued the certificate. type: string - duration: - description: Length of time (in seconds) for a specified `rrule` recurring - SLO correction. - example: 3600 - format: int64 - nullable: true - type: integer - end: - description: Ending time of the correction in epoch seconds. - format: int64 - nullable: true - type: integer - modified_at: - description: The epoch timestamp of when the correction was modified at. - format: int64 - nullable: true - type: integer - modifier: - $ref: '#/components/schemas/SLOCorrectionResponseAttributesModifier' - rrule: - description: 'The recurrence rules as defined in the iCalendar RFC 5545. - The supported rules for SLO corrections - - are `FREQ`, `INTERVAL`, `COUNT`, and `UNTIL`.' - example: FREQ=DAILY;INTERVAL=10;COUNT=5 - nullable: true + CN: + description: Common Name that issued certificate. type: string - slo_id: - description: ID of the SLO that this correction applies to. + L: + description: Locality that issued the certificate. type: string - start: - description: Starting time of the correction in epoch seconds. - format: int64 - type: integer - timezone: - description: The timezone to display in the UI for the correction times - (defaults to "UTC"). + O: + description: Organization that issued the certificate. + type: string + OU: + description: Organizational Unit that issued the certificate. + type: string + ST: + description: State Or Province Name that issued the certificate. type: string type: object - SLOCorrectionResponseAttributesModifier: - description: Modifier of the object. - nullable: true + SyntheticsSSLCertificateSubject: + description: Object describing the SSL certificate used for the test. properties: - email: - description: Email of the Modifier. + C: + description: Country Name associated with the certificate. type: string - handle: - description: Handle of the Modifier. + CN: + description: Common Name that associated with the certificate. type: string - name: - description: Name of the Modifier. + L: + description: Locality associated with the certificate. + type: string + O: + description: Organization associated with the certificate. + type: string + OU: + description: Organizational Unit associated with the certificate. + type: string + ST: + description: State Or Province Name associated with the certificate. + type: string + altName: + description: Subject Alternative Name associated with the certificate. type: string type: object - SLOCorrectionType: - default: correction - description: SLO correction resource type. + SyntheticsStatus: + description: Determines whether or not the batch has passed, failed, or is in + progress. enum: - - correction - example: correction + - passed + - skipped + - failed type: string x-enum-varnames: - - CORRECTION - SLOCorrectionUpdateData: - description: The data object associated with the SLO correction to be updated. - properties: - attributes: - $ref: '#/components/schemas/SLOCorrectionUpdateRequestAttributes' + - PASSED + - skipped + - failed + SyntheticsStep: + description: The steps used in a Synthetic browser test. + properties: + allowFailure: + description: A boolean set to allow this step to fail. + type: boolean + isCritical: + description: A boolean to use in addition to `allowFailure` to determine + if the test should be marked as failed when the step fails. + type: boolean + name: + description: The name of the step. + type: string + noScreenshot: + description: A boolean set to not take a screenshot for the step. + type: boolean + params: + description: The parameters of the step. + type: object + timeout: + description: The time before declaring a step failed. + format: int64 + type: integer type: - $ref: '#/components/schemas/SLOCorrectionType' - type: object - SLOCorrectionUpdateRequest: - description: An object that defines a correction to be applied to an SLO. - properties: - data: - $ref: '#/components/schemas/SLOCorrectionUpdateData' + $ref: '#/components/schemas/SyntheticsStepType' type: object - SLOCorrectionUpdateRequestAttributes: - description: The attribute object associated with the SLO correction to be updated. + SyntheticsStepDetail: + description: Object describing a step for a Synthetic test. properties: - category: - $ref: '#/components/schemas/SLOCorrectionCategory' + browserErrors: + description: Array of errors collected for a browser test. + items: + $ref: '#/components/schemas/SyntheticsBrowserError' + type: array + checkType: + $ref: '#/components/schemas/SyntheticsCheckType' description: - description: Description of the correction being made. + description: Description of the test. type: string duration: - description: Length of time (in seconds) for a specified `rrule` recurring - SLO correction. - example: 3600 - format: int64 - type: integer - end: - description: Ending time of the correction in epoch seconds. - example: 1600000000 + description: Total duration in millisecond of the test. + format: double + type: number + error: + description: Error returned by the test. + type: string + playingTab: + $ref: '#/components/schemas/SyntheticsPlayingTab' + screenshotBucketKey: + description: Whether or not screenshots where collected by the test. + type: boolean + skipped: + description: Whether or not to skip this step. + type: boolean + snapshotBucketKey: + description: Whether or not snapshots where collected by the test. + type: boolean + stepId: + description: The step ID. format: int64 type: integer - rrule: - description: 'The recurrence rules as defined in the iCalendar RFC 5545. - The supported rules for SLO corrections + subTestStepDetails: + description: 'If this step includes a sub-test. - are `FREQ`, `INTERVAL`, `COUNT`, and `UNTIL`.' - example: FREQ=DAILY;INTERVAL=10;COUNT=5 + [Subtests documentation](https://docs.datadoghq.com/synthetics/browser_tests/advanced_options/#subtests).' + items: + $ref: '#/components/schemas/SyntheticsStepDetail' + type: array + timeToInteractive: + description: Time before starting the step. + format: double + type: number + type: + $ref: '#/components/schemas/SyntheticsStepType' + url: + description: URL to perform the step against. type: string - start: - description: Starting time of the correction in epoch seconds. - example: 1600000000 - format: int64 - type: integer - timezone: - description: The timezone to display in the UI for the correction times - (defaults to "UTC"). - example: UTC + value: + description: Value for the step. + vitalsMetrics: + description: Array of Core Web Vitals metrics for the step. + items: + $ref: '#/components/schemas/SyntheticsCoreWebVitals' + type: array + warnings: + description: Warning collected that didn't failed the step. + items: + $ref: '#/components/schemas/SyntheticsStepDetailWarning' + type: array + type: object + SyntheticsStepDetailWarning: + description: Object collecting warnings for a given step. + properties: + message: + description: Message for the warning. + example: '' type: string + type: + $ref: '#/components/schemas/SyntheticsWarningType' + required: + - message + - type + type: object + SyntheticsStepType: + description: Step type used in your Synthetic test. + enum: + - assertCurrentUrl + - assertElementAttribute + - assertElementContent + - assertElementPresent + - assertEmail + - assertFileDownload + - assertFromJavascript + - assertPageContains + - assertPageLacks + - click + - extractFromJavascript + - extractVariable + - goToEmailLink + - goToUrl + - goToUrlAndMeasureTti + - hover + - playSubTest + - pressKey + - refresh + - runApiTest + - scroll + - selectOption + - typeText + - uploadFiles + - wait + example: assertElementContent + type: string + x-enum-varnames: + - ASSERT_CURRENT_URL + - ASSERT_ELEMENT_ATTRIBUTE + - ASSERT_ELEMENT_CONTENT + - ASSERT_ELEMENT_PRESENT + - ASSERT_EMAIL + - ASSERT_FILE_DOWNLOAD + - ASSERT_FROM_JAVASCRIPT + - ASSERT_PAGE_CONTAINS + - ASSERT_PAGE_LACKS + - CLICK + - EXTRACT_FROM_JAVASCRIPT + - EXTRACT_VARIABLE + - GO_TO_EMAIL_LINK + - GO_TO_URL + - GO_TO_URL_AND_MEASURE_TTI + - HOVER + - PLAY_SUB_TEST + - PRESS_KEY + - REFRESH + - RUN_API_TEST + - SCROLL + - SELECT_OPTION + - TYPE_TEXT + - UPLOAD_FILES + - WAIT + SyntheticsTestCallType: + description: The type of gRPC call to perform. + enum: + - healthcheck + - unary + example: unary + type: string + x-enum-varnames: + - HEALTHCHECK + - UNARY + SyntheticsTestCiOptions: + description: CI/CD options for a Synthetic test. + properties: + executionRule: + $ref: '#/components/schemas/SyntheticsTestExecutionRule' + type: object + SyntheticsTestConfig: + description: Configuration object for a Synthetic test. + properties: + assertions: + default: [] + description: Array of assertions used for the test. Required for single + API tests. + example: [] + items: + $ref: '#/components/schemas/SyntheticsAssertion' + type: array + configVariables: + description: Array of variables used for the test. + items: + $ref: '#/components/schemas/SyntheticsConfigVariable' + type: array + request: + $ref: '#/components/schemas/SyntheticsTestRequest' + variables: + description: Browser tests only - array of variables used for the test steps. + items: + $ref: '#/components/schemas/SyntheticsBrowserVariable' + type: array type: object - SLOCreator: - description: The creator of the SLO - nullable: true + SyntheticsTestDetails: + description: Object containing details about your Synthetic test. properties: - email: - description: Email of the creator. + config: + $ref: '#/components/schemas/SyntheticsTestConfig' + creator: + $ref: '#/components/schemas/Creator' + locations: + description: Array of locations used to run the test. + example: + - aws:eu-west-3 + items: + description: A location from which the test was run. + type: string + type: array + message: + description: Notification message associated with the test. type: string - id: - description: User ID of the creator. + monitor_id: + description: The associated monitor ID. format: int64 + readOnly: true type: integer name: - description: Name of the creator. - nullable: true + description: Name of the test. type: string - type: object - SLODeleteResponse: - description: A response list of all service level objective deleted. - properties: - data: - description: An array containing the ID of the deleted service level objective - object. + options: + $ref: '#/components/schemas/SyntheticsTestOptions' + public_id: + description: The test public ID. + readOnly: true + type: string + status: + $ref: '#/components/schemas/SyntheticsTestPauseStatus' + steps: + description: For browser test, the steps of the test. items: - description: ID of a deleted SLO. - type: string + $ref: '#/components/schemas/SyntheticsStep' type: array - errors: - additionalProperties: - description: Error preventing the SLO deletion. + subtype: + $ref: '#/components/schemas/SyntheticsTestDetailsSubType' + tags: + description: Array of tags attached to the test. + items: + description: A tag attached to the test. type: string - description: An dictionary containing the ID of the SLO as key and a deletion - error as value. - type: object - type: object - SLOErrorBudgetRemainingData: - additionalProperties: - description: Remaining error budget. - format: double - type: number - description: A mapping of threshold `timeframe` to the remaining error budget. - example: - 7d: 100.0 + type: array + type: + $ref: '#/components/schemas/SyntheticsTestDetailsType' type: object - SLOErrorTimeframe: - description: 'The timeframe of the threshold associated with this error + SyntheticsTestDetailsSubType: + description: 'The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, - or "all" if all thresholds are affected.' + `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`.' enum: - - 7d - - 30d - - 90d - - all - example: 30d + - http + - ssl + - tcp + - dns + - multi + - icmp + - udp + - websocket + - grpc + example: http type: string x-enum-varnames: - - SEVEN_DAYS - - THIRTY_DAYS - - NINETY_DAYS - - ALL - SLOHistoryMetrics: - description: 'A `metric` based SLO history response. + - HTTP + - SSL + - TCP + - DNS + - MULTI + - ICMP + - UDP + - WEBSOCKET + - GRPC + SyntheticsTestDetailsType: + description: Type of the Synthetic test, either `api` or `browser`. + enum: + - api + - browser + type: string + x-enum-varnames: + - API + - BROWSER + SyntheticsTestExecutionRule: + description: Execution rule for a Synthetic test. + enum: + - blocking + - non_blocking + - skipped + type: string + x-enum-varnames: + - BLOCKING + - NON_BLOCKING + - SKIPPED + SyntheticsTestHeaders: + additionalProperties: + description: A single Header. + type: string + description: Headers to include when performing the test. + type: object + SyntheticsTestMetadata: + additionalProperties: + description: A single Metadatum. + type: string + description: Metadata to include when performing the gRPC test. + type: object + SyntheticsTestMonitorStatus: + description: 'The status of your Synthetic monitor. + * `O` for not triggered - This is not included in responses for `monitor` based SLOs.' + * `1` for triggered + + * `2` for no data' + enum: + - 0 + - 1 + - 2 + format: int64 + type: integer + x-enum-varnames: + - UNTRIGGERED + - TRIGGERED + - NO_DATA + SyntheticsTestOptions: + description: Object describing the extra options for a Synthetic test. properties: - denominator: - $ref: '#/components/schemas/SLOHistoryMetricsSeries' - interval: - description: The aggregated query interval for the series data. It's implicit - based on the query time window. - example: 0 + accept_self_signed: + description: 'For SSL test, whether or not the test should allow self signed + + certificates.' + type: boolean + allow_insecure: + description: Allows loading insecure content for an HTTP request in an API + test. + type: boolean + checkCertificateRevocation: + description: For SSL test, whether or not the test should fail on revoked + certificate in stapled OCSP. + type: boolean + ci: + $ref: '#/components/schemas/SyntheticsTestCiOptions' + device_ids: + description: For browser test, array with the different device IDs used + to run the test. + items: + $ref: '#/components/schemas/SyntheticsDeviceID' + type: array + disableCors: + description: Whether or not to disable CORS mechanism. + type: boolean + disableCsp: + description: Disable Content Security Policy for browser tests. + type: boolean + follow_redirects: + description: For API HTTP test, whether or not the test should follow redirects. + type: boolean + httpVersion: + $ref: '#/components/schemas/SyntheticsTestOptionsHTTPVersion' + ignoreServerCertificateError: + description: Ignore server certificate error for browser tests. + type: boolean + initialNavigationTimeout: + description: Timeout before declaring the initial step as failed (in seconds) + for browser tests. format: int64 type: integer - message: - description: Optional message if there are specific query issues/warnings. - example: '' - type: string - numerator: - $ref: '#/components/schemas/SLOHistoryMetricsSeries' - query: - description: The combined numerator and denominator query CSV. - example: '' - type: string - res_type: - description: The series result type. This mimics `batch_query` response - type. - example: '' + min_failure_duration: + description: Minimum amount of time in failure required to trigger an alert. + format: int64 + type: integer + min_location_failed: + description: 'Minimum number of locations in failure required to trigger + + an alert.' + format: int64 + type: integer + monitor_name: + description: The monitor name is used for the alert title as well as for + all monitor dashboard widgets and SLOs. type: string - resp_version: - description: The series response version type. This mimics `batch_query` - response type. - example: 0 + monitor_options: + $ref: '#/components/schemas/SyntheticsTestOptionsMonitorOptions' + monitor_priority: + description: Integer from 1 (high) to 5 (low) indicating alert severity. + format: int32 + maximum: 5 + minimum: 1 + type: integer + noScreenshot: + description: Prevents saving screenshots of the steps. + type: boolean + restricted_roles: + $ref: '#/components/schemas/SyntheticsRestrictedRoles' + retry: + $ref: '#/components/schemas/SyntheticsTestOptionsRetry' + rumSettings: + $ref: '#/components/schemas/SyntheticsBrowserTestRumSettings' + scheduling: + $ref: '#/components/schemas/SyntheticsTestOptionsScheduling' + tick_every: + description: The frequency at which to run the Synthetic test (in seconds). + format: int64 + maximum: 604800 + minimum: 30 + type: integer + type: object + SyntheticsTestOptionsHTTPVersion: + description: HTTP version to use for a Synthetic test. + enum: + - http1 + - http2 + - any + type: string + x-enum-varnames: + - HTTP1 + - HTTP2 + - ANY + SyntheticsTestOptionsMonitorOptions: + description: 'Object containing the options for a Synthetic test as a monitor + + (for example, renotification).' + properties: + renotify_interval: + description: 'Time interval before renotifying if the test is still failing + + (in minutes).' format: int64 + maximum: 1440 + minimum: 0 type: integer - times: - description: An array of query timestamps in EPOCH milliseconds. - example: [] - items: - description: A timestamp in EPOCH milliseconds. - format: double - type: number - type: array - required: - - res_type - - interval - - resp_version - - query - - times - - numerator - - denominator type: object - SLOHistoryMetricsSeries: - description: 'A representation of `metric` based SLO time series for the provided - queries. - - This is the same response type from `batch_query` endpoint.' + SyntheticsTestOptionsRetry: + description: Object describing the retry strategy to apply to a Synthetic test. properties: count: - description: Count of submitted metrics. - example: 0 + description: 'Number of times a test needs to be retried before marking + a + + location as failed. Defaults to 0.' format: int64 type: integer - metadata: - $ref: '#/components/schemas/SLOHistoryMetricsSeriesMetadata' - sum: - description: Total sum of the query. - example: 0.0 + interval: + description: 'Time interval between retries (in milliseconds). Defaults + to + + 300ms.' format: double type: number - values: - description: The query values for each metric. - example: [] + type: object + SyntheticsTestOptionsScheduling: + description: Object containing timeframes and timezone used for advanced scheduling. + properties: + timeframes: + description: Array containing objects describing the scheduling pattern + to apply to each day. + example: + - day: 1 + from: 07:00 + to: '16:00' + - day: 3 + from: 07:00 + to: '16:00' items: - description: A metric name and its value. - format: double - type: number + $ref: '#/components/schemas/SyntheticsTestOptionsSchedulingTimeframe' type: array - required: - - count - - sum - - values + timezone: + description: Timezone in which the timeframe is based. + example: America/New_York + type: string type: object - SLOHistoryMetricsSeriesMetadata: - description: Query metadata. - example: {} + SyntheticsTestOptionsSchedulingTimeframe: + description: Object describing a timeframe. properties: - aggr: - description: Query aggregator function. - type: string - expression: - description: Query expression. - type: string - metric: - description: Query metric used. - type: string - query_index: - description: Query index from original combined query. - format: int64 + day: + description: Number representing the day of the week. + example: 1 + format: int32 + maximum: 7 + minimum: 1 type: integer - scope: - description: Query scope. + from: + description: The hour of the day on which scheduling starts. + example: 07:00 type: string - unit: - description: 'An array of metric units that contains up to two unit objects. - - For example, bytes represents one unit object and bytes per second represents - two unit objects. + to: + description: The hour of the day on which scheduling ends. + example: '16:00' + type: string + type: object + SyntheticsTestPauseStatus: + description: 'Define whether you want to start (`live`) or pause (`paused`) + a - If a metric query only has one unit object, the second array element is - null.' - example: - - family: bytes - id: 2 - name: byte - plural: bytes - scale_factor: 1.0 - short_name: B - - null + Synthetic test.' + enum: + - live + - paused + example: live + type: string + x-enum-varnames: + - LIVE + - PAUSED + SyntheticsTestProcessStatus: + description: Status of a Synthetic test. + enum: + - not_scheduled + - scheduled + - finished + - finished_with_error + type: string + x-enum-varnames: + - NOT_SCHEDULED + - SCHEDULED + - FINISHED + - FINISHED_WITH_ERROR + SyntheticsTestRequest: + description: Object describing the Synthetic test request. + properties: + allow_insecure: + description: Allows loading insecure content for an HTTP request in a multistep + test step. + type: boolean + basicAuth: + $ref: '#/components/schemas/SyntheticsBasicAuth' + body: + description: Body to include in the test. + type: string + bodyType: + $ref: '#/components/schemas/SyntheticsTestRequestBodyType' + callType: + $ref: '#/components/schemas/SyntheticsTestCallType' + certificate: + $ref: '#/components/schemas/SyntheticsTestRequestCertificate' + certificateDomains: + default: [] + description: By default, the client certificate is applied on the domain + of the starting URL for browser tests. If you want your client certificate + to be applied on other domains instead, add them in `certificateDomains`. items: - $ref: '#/components/schemas/SLOHistoryMetricsSeriesMetadataUnit' - nullable: true + description: Domain to apply the client certificate. + example: '' + type: string type: array - type: object - SLOHistoryMetricsSeriesMetadataUnit: - description: An Object of metric units. - nullable: true - properties: - family: - description: The family of metric unit, for example `bytes` is the family - for `kibibyte`, `byte`, and `bit` units. + compressedJsonDescriptor: + description: A protobuf JSON descriptor that needs to be gzipped first then + base64 encoded. type: string - id: - description: The ID of the metric unit. + dnsServer: + description: DNS server to use for DNS tests. + type: string + dnsServerPort: + description: DNS server port to use for DNS tests. + format: int32 + maximum: 65535 + minimum: 1 + type: integer + follow_redirects: + description: Specifies whether or not the request follows redirects. + type: boolean + headers: + $ref: '#/components/schemas/SyntheticsTestHeaders' + host: + description: Host name to perform the test with. + type: string + message: + description: Message to send for UDP or WebSocket tests. + type: string + metadata: + $ref: '#/components/schemas/SyntheticsTestMetadata' + method: + description: Either the HTTP method/verb to use or a gRPC method available + on the service set in the `service` field. Required if `subtype` is `HTTP` + or if `subtype` is `grpc` and `callType` is `unary`. + type: string + noSavingResponseBody: + description: Determines whether or not to save the response body. + type: boolean + numberOfPackets: + description: Number of pings to use per test. + format: int32 + maximum: 10 + minimum: 0 + type: integer + persistCookies: + description: Persist cookies across redirects. + type: boolean + port: + description: Port to use when performing the test. format: int64 type: integer - name: - description: The unit of the metric, for instance `byte`. + proxy: + $ref: '#/components/schemas/SyntheticsTestRequestProxy' + query: + description: Query to use for the test. + type: object + servername: + description: 'For SSL tests, it specifies on which server you want to initiate + the TLS handshake, + + allowing the server to present one of multiple possible certificates on + + the same IP address and TCP port number.' type: string - plural: - description: The plural Unit of metric, for instance `bytes`. - nullable: true + service: + description: The gRPC service on which you want to perform the gRPC call. + example: Greeter type: string - scale_factor: - description: The scale factor of metric unit, for instance `1.0`. + shouldTrackHops: + description: Turns on a traceroute probe to discover all gateways along + the path to the host destination. + type: boolean + timeout: + description: Timeout in seconds for the test. format: double type: number - short_name: - description: A shorter and abbreviated version of the metric unit, for instance - `B`. - nullable: true + url: + description: URL to perform the test with. + example: https://example.com type: string type: object - SLOHistoryMonitor: - description: 'An object that holds an SLI value and its associated data. It - can represent an SLO''s overall SLI value. - - This can also represent the SLI value for a specific monitor in multi-monitor - SLOs, or a group in grouped SLOs.' + SyntheticsTestRequestBodyType: + description: Type of the request body. + enum: + - text/plain + - application/json + - text/xml + - text/html + - application/x-www-form-urlencoded + - graphql + example: text/plain + type: string + x-enum-varnames: + - TEXT_PLAIN + - APPLICATION_JSON + - TEXT_XML + - TEXT_HTML + - APPLICATION_X_WWW_FORM_URLENCODED + - GRAPHQL + SyntheticsTestRequestCertificate: + description: Client certificate to use when performing the test request. + properties: + cert: + $ref: '#/components/schemas/SyntheticsTestRequestCertificateItem' + key: + $ref: '#/components/schemas/SyntheticsTestRequestCertificateItem' + type: object + SyntheticsTestRequestCertificateItem: + description: Define a request certificate. properties: - error_budget_remaining: - $ref: '#/components/schemas/SLOErrorBudgetRemainingData' - errors: - description: An array of error objects returned while querying the history - data for the service level objective. - items: - $ref: '#/components/schemas/SLOHistoryResponseErrorWithType' - type: array - group: - description: For groups in a grouped SLO, this is the group name. - example: name + content: + description: Content of the certificate or key. type: string - history: - description: For `monitor` based SLOs, this includes the aggregated history - as arrays that include time series and uptime data where `0=monitor` is - in `OK` state and `1=monitor` is in `alert` state. - example: - - - 1579212382 - - 0 - items: - description: Represents an array time series data. - example: - - 1579212382 - - 0 - items: - description: A time series data point which is a tuple of (timestamp, - value). - format: double - type: number - maxItems: 2 - minItems: 2 - type: array - type: array - monitor_modified: - description: For `monitor` based SLOs, this is the last modified timestamp - in epoch seconds of the monitor. - example: 1615867200 - format: int64 - type: integer - monitor_type: - description: For `monitor` based SLOs, this describes the type of monitor. - example: string + filename: + description: File name for the certificate or key. type: string - name: - description: For groups in a grouped SLO, this is the group name. For monitors - in a multi-monitor SLO, this is the monitor name. - example: string + updatedAt: + description: Date of update of the certificate or key, ISO format. type: string - precision: - deprecated: true - description: The amount of decimal places the SLI value is accurate to for - the given from `&&` to timestamp. Use `span_precision` instead. - example: 2.0 + type: object + SyntheticsTestRequestProxy: + description: The proxy to perform the test. + properties: + headers: + $ref: '#/components/schemas/SyntheticsTestHeaders' + url: + description: URL of the proxy to perform the test. + example: https://example.com + type: string + required: + - url + type: object + SyntheticsTiming: + description: 'Object containing all metrics and their values collected for a + Synthetic API test. + + See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics/).' + properties: + dns: + description: The duration in millisecond of the DNS lookup. format: double type: number - preview: - description: 'For `monitor` based SLOs, when `true` this indicates that - a replay is in progress to give an accurate uptime - - calculation.' - example: true - type: boolean - sli_value: - description: The current SLI value of the SLO over the history window. - example: 99.99 + download: + description: The time in millisecond to download the response. format: double - nullable: true type: number - span_precision: - description: The amount of decimal places the SLI value is accurate to for - the given from `&&` to timestamp. - example: 2.0 + firstByte: + description: The time in millisecond to first byte. format: double type: number - uptime: - deprecated: true - description: Use `sli_value` instead. - example: 99.99 + handshake: + description: The duration in millisecond of the TLS handshake. + format: double + type: number + redirect: + description: The time in millisecond spent during redirections. + format: double + type: number + ssl: + description: The duration in millisecond of the TLS handshake. + format: double + type: number + tcp: + description: Time in millisecond to establish the TCP connection. + format: double + type: number + total: + description: The overall time in millisecond the request took to be processed. + format: double + type: number + wait: + description: Time spent in millisecond waiting for a response. format: double type: number type: object - SLOHistoryResponse: - description: A service level objective history response. + SyntheticsTriggerBody: + description: Object describing the Synthetic tests to trigger. properties: - data: - $ref: '#/components/schemas/SLOHistoryResponseData' - errors: - description: A list of errors while querying the history data for the service - level objective. + tests: + description: Individual Synthetic test. items: - $ref: '#/components/schemas/SLOHistoryResponseError' - nullable: true + $ref: '#/components/schemas/SyntheticsTriggerTest' type: array + required: + - tests type: object - SLOHistoryResponseData: - description: An array of service level objective objects. + SyntheticsTriggerCITestLocation: + description: Synthetic location. properties: - from_ts: - description: The `from` timestamp in epoch seconds. - example: 1615323990 + id: + description: Unique identifier of the location. format: int64 type: integer - group_by: - description: 'For `metric` based SLOs where the query includes a group-by - clause, this represents the list of grouping parameters. - - - This is not included in responses for `monitor` based SLOs.' + name: + description: Name of the location. + type: string + type: object + SyntheticsTriggerCITestRunResult: + description: Information about a single test run. + properties: + device: + $ref: '#/components/schemas/SyntheticsDeviceID' + location: + description: The location ID of the test run. + format: int64 + type: integer + public_id: + description: The public ID of the Synthetic test. + type: string + result_id: + description: ID of the result. + type: string + type: object + SyntheticsTriggerCITestsResponse: + description: Object containing information about the tests triggered. + properties: + batch_id: + description: The public ID of the batch triggered. + nullable: true + type: string + locations: + description: List of Synthetic locations. items: - description: A grouping parameter. + $ref: '#/components/schemas/SyntheticsTriggerCITestLocation' + type: array + results: + description: Information about the tests runs. + items: + $ref: '#/components/schemas/SyntheticsTriggerCITestRunResult' + type: array + triggered_check_ids: + description: The public IDs of the Synthetic test triggered. + items: + description: The public ID of the Synthetic test. type: string type: array - groups: - description: 'For grouped SLOs, this represents SLI data for specific groups. - - - This is not included in the responses for `metric` based SLOs.' + type: object + SyntheticsTriggerTest: + description: Test configuration for Synthetics + properties: + metadata: + $ref: '#/components/schemas/SyntheticsCIBatchMetadata' + public_id: + description: The public ID of the Synthetic test to trigger. + example: aaa-aaa-aaa + type: string + required: + - public_id + type: object + SyntheticsUpdateTestPauseStatusPayload: + description: Object to start or pause an existing Synthetic test. + properties: + new_status: + $ref: '#/components/schemas/SyntheticsTestPauseStatus' + type: object + SyntheticsVariableParser: + description: Details of the parser to use for the global variable. + example: + type: regex + value: .* + properties: + type: + $ref: '#/components/schemas/SyntheticsGlobalVariableParserType' + value: + description: Regex or JSON path used for the parser. Not used with type + `raw`. + type: string + required: + - type + type: object + SyntheticsWarningType: + description: User locator used. + enum: + - user_locator + example: user_locator + type: string + x-enum-varnames: + - USER_LOCATOR + TableWidgetCellDisplayMode: + description: Define a display mode for the table cell. + enum: + - number + - bar + example: number + type: string + x-enum-varnames: + - NUMBER + - BAR + TableWidgetDefinition: + description: The table visualization is available on timeboards and screenboards. + It displays columns of metrics grouped by tag key. + properties: + custom_links: + description: List of custom links. items: - $ref: '#/components/schemas/SLOHistoryMonitor' + $ref: '#/components/schemas/WidgetCustomLink' type: array - monitors: - description: 'For multi-monitor SLOs, this represents SLI data for specific - monitors. + has_search_bar: + $ref: '#/components/schemas/TableWidgetHasSearchBar' + requests: + description: Widget definition. + example: + - q/apm_query/log_query: {} + items: + $ref: '#/components/schemas/TableWidgetRequest' + type: array + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/TableWidgetDefinitionType' + required: + - type + - requests + type: object + TableWidgetDefinitionType: + default: query_table + description: Type of the table widget. + enum: + - query_table + example: query_table + type: string + x-enum-varnames: + - QUERY_TABLE + TableWidgetHasSearchBar: + description: Controls the display of the search bar. + enum: + - always + - never + - auto + example: auto + type: string + x-enum-varnames: + - ALWAYS + - NEVER + - AUTO + TableWidgetRequest: + description: Updated table widget. + properties: + aggregator: + $ref: '#/components/schemas/WidgetAggregator' + alias: + description: The column name (defaults to the metric name). + type: string + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + apm_stats_query: + $ref: '#/components/schemas/ApmStatsQueryDefinition' + cell_display_mode: + description: A list of display modes for each table cell. + items: + $ref: '#/components/schemas/TableWidgetCellDisplayMode' + type: array + conditional_formats: + description: List of conditional formats. + items: + $ref: '#/components/schemas/WidgetConditionalFormat' + type: array + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + formulas: + description: List of formulas that operate on queries. + items: + $ref: '#/components/schemas/WidgetFormula' + type: array + limit: + description: For metric queries, the number of lines to show in the table. + Only one request should have this property. + format: int64 + type: integer + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + order: + $ref: '#/components/schemas/WidgetSort' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Query definition. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + type: object + TagToHosts: + description: In this object, the key is the tag, the value is a list of host + names that are reporting that tag. + properties: + tags: + additionalProperties: + description: A list of additional properties for tags. + items: + description: A given tag in a list. + example: test.metric.host + type: string + type: array + description: A list of tags to apply to the host. + type: object + type: object + TargetFormatType: + description: 'If the `target_type` of the remapper is `attribute`, try to cast + the value to a new specific type. + If the cast is not possible, the original type is kept. `string`, `integer`, + or `double` are the possible types. - This is not included in the responses for `metric` based SLOs.' + If the `target_type` is `tag`, this parameter may not be specified.' + enum: + - auto + - string + - integer + - double + type: string + x-enum-varnames: + - AUTO + - STRING + - INTEGER + - DOUBLE + TimeseriesBackground: + description: Set a timeseries on the widget background. + properties: + type: + $ref: '#/components/schemas/TimeseriesBackgroundType' + yaxis: + $ref: '#/components/schemas/WidgetAxis' + required: + - type + type: object + TimeseriesBackgroundType: + default: area + description: Timeseries is made using an area or bars. + enum: + - bars + - area + example: bars + type: string + x-enum-varnames: + - BARS + - AREA + TimeseriesWidgetDefinition: + description: The timeseries visualization allows you to display the evolution + of one or more metrics, log events, or Indexed Spans over time. + properties: + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + events: + description: List of widget events. + items: + $ref: '#/components/schemas/WidgetEvent' + type: array + legend_columns: + description: Columns displayed in the legend. + items: + $ref: '#/components/schemas/TimeseriesWidgetLegendColumn' + type: array + legend_layout: + $ref: '#/components/schemas/TimeseriesWidgetLegendLayout' + legend_size: + $ref: '#/components/schemas/WidgetLegendSize' + markers: + description: List of markers. items: - $ref: '#/components/schemas/SLOHistoryMonitor' + $ref: '#/components/schemas/WidgetMarker' type: array - overall: - $ref: '#/components/schemas/SLOHistorySLIData' - series: - $ref: '#/components/schemas/SLOHistoryMetrics' - thresholds: - additionalProperties: - $ref: '#/components/schemas/SLOThreshold' - description: mapping of string timeframe to the SLO threshold. + requests: + description: List of timeseries widget requests. example: - my_service: - target: 95 - timeframe: 7d - type: object - to_ts: - description: The `to` timestamp in epoch seconds. - example: 1615928790 - format: int64 - type: integer - type: - $ref: '#/components/schemas/SLOType' - type_id: - $ref: '#/components/schemas/SLOTypeNumeric' - type: object - SLOHistoryResponseError: - description: A list of errors while querying the history data for the service - level objective. - properties: - error: - description: Human readable error. + - q/apm_query/log_query: {} + items: + $ref: '#/components/schemas/TimeseriesWidgetRequest' + minItems: 1 + type: array + right_yaxis: + $ref: '#/components/schemas/WidgetAxis' + show_legend: + description: (screenboard only) Show the legend for this widget. + type: boolean + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. type: string + type: + $ref: '#/components/schemas/TimeseriesWidgetDefinitionType' + yaxis: + $ref: '#/components/schemas/WidgetAxis' + required: + - type + - requests type: object - SLOHistoryResponseErrorWithType: - description: An object describing the error with error type and error message. + TimeseriesWidgetDefinitionType: + default: timeseries + description: Type of the timeseries widget. + enum: + - timeseries + example: timeseries + type: string + x-enum-varnames: + - TIMESERIES + TimeseriesWidgetExpressionAlias: + description: Define an expression alias. properties: - error_message: - description: A message with more details about the error. - example: '' + alias_name: + description: Expression alias. type: string - error_type: - description: Type of the error. + expression: + description: Expression name. example: '' type: string required: - - error_type - - error_message + - expression type: object - SLOHistorySLIData: - description: 'An object that holds an SLI value and its associated data. It - can represent an SLO''s overall SLI value. - - This can also represent the SLI value for a specific monitor in multi-monitor - SLOs, or a group in grouped SLOs.' - properties: - error_budget_remaining: - $ref: '#/components/schemas/SLOErrorBudgetRemainingData' - errors: - description: An array of error objects returned while querying the history - data for the service level objective. + TimeseriesWidgetLegendColumn: + description: Legend column. + enum: + - value + - avg + - sum + - min + - max + type: string + x-enum-varnames: + - VALUE + - AVG + - SUM + - MIN + - MAX + TimeseriesWidgetLegendLayout: + description: Layout of the legend. + enum: + - auto + - horizontal + - vertical + type: string + x-enum-varnames: + - AUTO + - HORIZONTAL + - VERTICAL + TimeseriesWidgetRequest: + description: Updated timeseries widget. + properties: + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + audit_query: + $ref: '#/components/schemas/LogQueryDefinition' + display_type: + $ref: '#/components/schemas/WidgetDisplayType' + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + formulas: + description: List of formulas that operate on queries. items: - $ref: '#/components/schemas/SLOHistoryResponseErrorWithType' + $ref: '#/components/schemas/WidgetFormula' type: array - group: - description: For groups in a grouped SLO, this is the group name. - example: name - type: string - history: - description: For `monitor` based SLOs, this includes the aggregated history - as arrays that include time series and uptime data where `0=monitor` is - in `OK` state and `1=monitor` is in `alert` state. + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + metadata: + description: Used to define expression aliases. + items: + $ref: '#/components/schemas/TimeseriesWidgetExpressionAlias' + type: array + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + on_right_yaxis: + description: Whether or not to display a second y-axis on the right. + type: boolean + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Widget query. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + style: + $ref: '#/components/schemas/WidgetRequestStyle' + type: object + ToplistWidgetDefinition: + description: The top list visualization enables you to display a list of Tag + value like hostname or service with the most or least of any metric value, + such as highest consumers of CPU, hosts with the least disk space, etc. + properties: + custom_links: + description: List of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + requests: + description: List of top list widget requests. example: - - - 1579212382 - - 0 + - q: system.load.1 items: - description: Represents an array time series data. - example: - - 1579212382 - - 0 - items: - description: A time series data point which is a tuple of (timestamp, - value). - format: double - type: number - maxItems: 2 - minItems: 2 - type: array + $ref: '#/components/schemas/ToplistWidgetRequest' type: array - monitor_modified: - description: For `monitor` based SLOs, this is the last modified timestamp - in epoch seconds of the monitor. - example: 1615867200 - format: int64 - type: integer - monitor_type: - description: For `monitor` based SLOs, this describes the type of monitor. - example: string + style: + $ref: '#/components/schemas/ToplistWidgetStyle' + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. type: string - name: - description: For groups in a grouped SLO, this is the group name. For monitors - in a multi-monitor SLO, this is the monitor name. - example: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. type: string - precision: - additionalProperties: - description: The number of accurate decimals. - format: double - type: number - description: A mapping of threshold `timeframe` to number of accurate decimals, - regardless of the from && to timestamp. - example: - 30d: 1 - 7d: 2 - type: object - preview: - description: 'For `monitor` based SLOs, when `true` this indicates that - a replay is in progress to give an accurate uptime - - calculation.' - example: true - type: boolean - sli_value: - description: The current SLI value of the SLO over the history window. - example: 99.99 - format: double - nullable: true - type: number - span_precision: - description: The amount of decimal places the SLI value is accurate to for - the given from `&&` to timestamp. - example: 2.0 - format: double - type: number - uptime: - deprecated: true - description: Use `sli_value` instead. - example: 99.99 - format: double - nullable: true - type: number + type: + $ref: '#/components/schemas/ToplistWidgetDefinitionType' + required: + - type + - requests type: object - SLOListResponse: - description: A response with one or more service level objective. + ToplistWidgetDefinitionType: + default: toplist + description: Type of the top list widget. + enum: + - toplist + example: toplist + type: string + x-enum-varnames: + - TOPLIST + ToplistWidgetDisplay: + description: Top list widget display options. + oneOf: + - $ref: '#/components/schemas/ToplistWidgetStacked' + - $ref: '#/components/schemas/ToplistWidgetFlat' + ToplistWidgetFlat: + description: Top list widget flat display. properties: - data: - description: An array of service level objective objects. + type: + $ref: '#/components/schemas/ToplistWidgetFlatType' + required: + - type + type: object + ToplistWidgetFlatType: + default: flat + description: Top list widget flat display type. + enum: + - flat + example: flat + type: string + x-enum-varnames: + - FLAT + ToplistWidgetLegend: + description: Top list widget stacked legend behavior. + enum: + - automatic + - inline + - none + example: automatic + type: string + x-enum-varnames: + - AUTOMATIC + - INLINE + - NONE + ToplistWidgetRequest: + description: Updated top list widget. + properties: + apm_query: + $ref: '#/components/schemas/LogQueryDefinition' + audit_query: + $ref: '#/components/schemas/LogQueryDefinition' + conditional_formats: + description: List of conditional formats. + example: + - comparator: '>=' + palette: blue + value: 1.0 items: - $ref: '#/components/schemas/ServiceLevelObjective' + $ref: '#/components/schemas/WidgetConditionalFormat' + minItems: 1 type: array - errors: - description: 'An array of error messages. Each endpoint documents how/whether - this field is - - used.' + event_query: + $ref: '#/components/schemas/LogQueryDefinition' + formulas: + description: List of formulas that operate on queries. items: - description: The error message. - type: string + $ref: '#/components/schemas/WidgetFormula' type: array - metadata: - $ref: '#/components/schemas/SLOListResponseMetadata' - type: object - SLOListResponseMetadata: - description: The metadata object containing additional information about the - list of SLOs. - properties: - page: - $ref: '#/components/schemas/SLOListResponseMetadataPage' - type: object - SLOListResponseMetadataPage: - description: The object containing information about the pages of the list of - SLOs. - properties: - total_count: - description: The total number of resources that could be retrieved ignoring - the parameters and filters in the request. - format: int64 - type: integer - total_filtered_count: - description: The total number of resources that match the parameters and - filters in the request. This attribute can be used by a client to determine - the total number of pages. - format: int64 - type: integer - type: object - SLOOverallStatuses: - description: Overall status of the SLO by timeframes. - properties: - error: - description: Error message if SLO status or error budget could not be calculated. - nullable: true - type: string - error_budget_remaining: - description: Remaining error budget of the SLO in percentage. - example: 100 - format: double - nullable: true - type: number - indexed_at: - description: 'timestamp (UNIX time in seconds) of when the SLO status and - error budget - - were calculated.' - example: 1662496260 - format: int64 - type: integer - raw_error_budget_remaining: - $ref: '#/components/schemas/SLORawErrorBudgetRemaining' - span_precision: - description: The amount of decimal places the SLI value is accurate to. - example: 2 - format: int64 - nullable: true - type: integer - state: - $ref: '#/components/schemas/SLOState' - status: - description: The status of the SLO. - example: 100 - format: double - nullable: true - type: number - target: - description: The target of the SLO. - example: 99 - format: double - type: number - timeframe: - $ref: '#/components/schemas/SLOTimeframe' + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + network_query: + $ref: '#/components/schemas/LogQueryDefinition' + process_query: + $ref: '#/components/schemas/ProcessQueryDefinition' + profile_metrics_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: Widget query. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + security_query: + $ref: '#/components/schemas/LogQueryDefinition' + style: + $ref: '#/components/schemas/WidgetRequestStyle' + type: object + ToplistWidgetScaling: + description: Top list widget scaling definition. + enum: + - absolute + - relative + type: string + x-enum-varnames: + - ABSOLUTE + - RELATIVE + ToplistWidgetStacked: + description: Top list widget stacked display options. + properties: + legend: + $ref: '#/components/schemas/ToplistWidgetLegend' + type: + $ref: '#/components/schemas/ToplistWidgetStackedType' + required: + - type + - legend type: object - SLORawErrorBudgetRemaining: - description: Error budget remaining for an SLO. - nullable: true + ToplistWidgetStackedType: + default: stacked + description: Top list widget stacked display type. + enum: + - stacked + example: stacked + type: string + x-enum-varnames: + - STACKED + ToplistWidgetStyle: + description: Style customization for a top list widget. properties: - unit: - description: Error budget remaining unit. - example: requests - type: string - value: - description: Error budget remaining value. - example: 60 - format: double - type: number + display: + $ref: '#/components/schemas/ToplistWidgetDisplay' + scaling: + $ref: '#/components/schemas/ToplistWidgetScaling' type: object - SLOResponse: - description: A service level objective response containing a single service - level objective. + TopologyMapWidgetDefinition: + description: This widget displays a topology of nodes and edges for different + data sources. It replaces the service map widget. properties: - data: - $ref: '#/components/schemas/SLOResponseData' - errors: - description: 'An array of error messages. Each endpoint documents how/whether - this field is - - used.' + custom_links: + description: List of custom links. items: - description: The error message. - type: string + $ref: '#/components/schemas/WidgetCustomLink' type: array - type: object - SLOResponseData: - description: 'A service level objective object includes a service level indicator, - thresholds - - for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).' - properties: - configured_alert_ids: - description: A list of SLO monitors IDs that reference this SLO. This field - is returned only when `with_configured_alert_ids` parameter is true in - query. - example: - - 123 - - 456 - - 789 + requests: + description: One or more Topology requests. items: - description: A monitor ID. - format: int64 - type: integer + $ref: '#/components/schemas/TopologyRequest' + minItems: 1 type: array - created_at: - description: 'Creation timestamp (UNIX time in seconds) - - - Always included in service level objective responses.' - format: int64 - readOnly: true - type: integer - creator: - $ref: '#/components/schemas/Creator' - description: - description: 'A user-defined description of the service level objective. - - - Always included in service level objective responses (but may be `null`). - - Optional in create/update requests.' - nullable: true + title: + description: Title of your widget. type: string - groups: - description: 'A list of (up to 20) monitor groups that narrow the scope - of a monitor service level objective. - - - Included in service level objective responses if it is not empty. Optional - in - - create/update requests for monitor service level objectives, but may only - be - - used when then length of the `monitor_ids` field is one.' + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/TopologyMapWidgetDefinitionType' + required: + - type + - requests + type: object + TopologyMapWidgetDefinitionType: + default: topology_map + description: Type of the topology map widget. + enum: + - topology_map + example: topology_map + type: string + x-enum-varnames: + - TOPOLOGY_MAP + TopologyQuery: + description: Query to service-based topology data sources like the service map + or data streams. + properties: + data_source: + $ref: '#/components/schemas/TopologyQueryDataSource' + filters: + description: Your environment and primary tag (or * if enabled for your + account). example: - env:prod - - role:mysql + - az:us-east items: - description: A group name, for instance `env:prod`. + description: Environment or primary tag, generally in a key:value format type: string + minItems: 1 type: array - id: - description: 'A unique identifier for the service level objective object. - - - Always included in service level objective responses.' - readOnly: true + service: + description: Name of the service + example: myService type: string - modified_at: - description: 'Modification timestamp (UNIX time in seconds) - - - Always included in service level objective responses.' - format: int64 - readOnly: true - type: integer - monitor_ids: - description: 'A list of monitor ids that defines the scope of a monitor - service level - - objective. **Required if type is `monitor`**.' + type: object + TopologyQueryDataSource: + description: Name of the data source + enum: + - data_streams + - service_map + type: string + x-enum-varnames: + - DATA_STREAMS + - SERVICE_MAP + TopologyRequest: + description: Request that will return nodes and edges to be used by topology + map. + properties: + query: + $ref: '#/components/schemas/TopologyQuery' + request_type: + $ref: '#/components/schemas/TopologyRequestType' + type: object + TopologyRequestType: + description: Widget request type. + enum: + - topology + type: string + x-enum-varnames: + - TOPOLOGY + TreeMapColorBy: + default: user + deprecated: true + description: (deprecated) The attribute formerly used to determine color in + the widget. + enum: + - user + example: user + type: string + x-enum-varnames: + - USER + TreeMapGroupBy: + deprecated: true + description: (deprecated) The attribute formerly used to group elements in the + widget. + enum: + - user + - family + - process + example: user + type: string + x-enum-varnames: + - USER + - FAMILY + - PROCESS + TreeMapSizeBy: + deprecated: true + description: (deprecated) The attribute formerly used to determine size in the + widget. + enum: + - pct_cpu + - pct_mem + example: pct_cpu + type: string + x-enum-varnames: + - PCT_CPU + - PCT_MEM + TreeMapWidgetDefinition: + description: The treemap visualization enables you to display hierarchical and + nested data. It is well suited for queries that describe part-whole relationships, + such as resource usage by availability zone, data center, or team. + properties: + color_by: + $ref: '#/components/schemas/TreeMapColorBy' + custom_links: + description: List of custom links. items: - description: A monitor ID. - format: int64 - type: integer + $ref: '#/components/schemas/WidgetCustomLink' type: array - monitor_tags: - description: 'The union of monitor tags for all monitors referenced by the - `monitor_ids` - - field. - - Always included in service level objective responses for monitor service - level - - objectives (but may be empty). Ignored in create/update requests. Does - not - - affect which monitors are included in the service level objective (that - is - - determined entirely by the `monitor_ids` field).' + group_by: + $ref: '#/components/schemas/TreeMapGroupBy' + requests: + description: List of treemap widget requests. + example: + - aggregator: sum + data_source: metrics + name: query1 + query: sum:system.mem.total{*} by {service} items: - description: A monitor tag. - type: string + $ref: '#/components/schemas/TreeMapWidgetRequest' + maxItems: 1 + minItems: 1 type: array - name: - description: The name of the service level objective object. - example: Custom Metric SLO + size_by: + $ref: '#/components/schemas/TreeMapSizeBy' + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. type: string - query: - $ref: '#/components/schemas/ServiceLevelObjectiveQuery' - tags: - description: 'A list of tags associated with this service level objective. - - Always included in service level objective responses (but may be empty). - - Optional in create/update requests.' - example: - - env:prod - - app:core + type: + $ref: '#/components/schemas/TreeMapWidgetDefinitionType' + required: + - type + - requests + type: object + TreeMapWidgetDefinitionType: + default: treemap + description: Type of the treemap widget. + enum: + - treemap + example: treemap + type: string + x-enum-varnames: + - TREEMAP + TreeMapWidgetRequest: + description: An updated treemap widget. + properties: + formulas: + description: List of formulas that operate on queries. items: - description: A tag to apply to your SLO. - type: string + $ref: '#/components/schemas/WidgetFormula' type: array - target_threshold: - description: 'The target threshold such that when the service level indicator - is above this - - threshold over the given timeframe, the objective is being met.' - example: 99.9 - format: double - type: number - thresholds: - description: 'The thresholds (timeframes and associated targets) for this - service level - - objective object.' - example: - - target: 95 - timeframe: 7d - - target: 95 - timeframe: 30d - warning: 97 + q: + description: The widget metrics query. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. items: - $ref: '#/components/schemas/SLOThreshold' + $ref: '#/components/schemas/FormulaAndFunctionQueryDefinition' + type: array + response_format: + $ref: '#/components/schemas/FormulaAndFunctionResponseFormat' + type: object + UsageAnalyzedLogsHour: + description: The number of analyzed logs for each hour for a given organization. + properties: + analyzed_logs: + description: Contains the number of analyzed logs. + format: int64 + nullable: true + type: integer + hour: + description: The hour for the usage. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageAnalyzedLogsResponse: + description: A response containing the number of analyzed logs for each hour + for a given organization. + properties: + usage: + description: Get hourly usage for analyzed logs. + items: + $ref: '#/components/schemas/UsageAnalyzedLogsHour' type: array - timeframe: - $ref: '#/components/schemas/SLOTimeframe' - type: - $ref: '#/components/schemas/SLOType' - warning_threshold: - description: 'The optional warning threshold such that when the service - level indicator is - - below this value for the given threshold, but above the target threshold, - the - - objective appears in a "warning" state. This value must be greater than - the target - - threshold.' - example: 99.95 - format: double - type: number type: object - SLOState: - description: State of the SLO. - enum: - - breached - - warning - - ok - - no_data - example: ok - type: string - x-enum-varnames: - - BREACHED - - WARNING - - OK - - NO_DATA - SLOStatus: - description: Status of the SLO's primary timeframe. + UsageAttributionAggregates: + description: An array of available aggregates. + items: + $ref: '#/components/schemas/UsageAttributionAggregatesBody' + type: array + UsageAttributionAggregatesBody: + description: The object containing the aggregates. properties: - calculation_error: - description: Error message if SLO status or error budget could not be calculated. - nullable: true + agg_type: + description: The aggregate type. + example: sum type: string - error_budget_remaining: - description: Remaining error budget of the SLO in percentage. - example: 100 + field: + description: The field. + example: custom_timeseries_usage + type: string + value: + description: The value for a given field. format: double - nullable: true type: number - indexed_at: - description: 'timestamp (UNIX time in seconds) of when the SLO status and - error budget - - were calculated.' - example: 1662496260 + type: object + UsageAttributionBody: + description: Usage Summary by tag for a given organization. + properties: + month: + description: 'Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM].' + format: date-time + type: string + org_name: + description: The name of the organization. + type: string + public_id: + description: The organization public ID. + type: string + tag_config_source: + description: The source of the usage attribution tag configuration and the + selected tags in the format `::://////`. + type: string + tags: + $ref: '#/components/schemas/UsageAttributionTagNames' + updated_at: + description: Shows the the most recent hour in the current months for all + organizations for which all usages were calculated. + type: string + values: + $ref: '#/components/schemas/UsageAttributionValues' + type: object + UsageAttributionLimit: + default: 5000 + description: Maximum number of records to be returned. + format: int64 + type: integer + UsageAttributionMetadata: + description: The object containing document metadata. + properties: + aggregates: + $ref: '#/components/schemas/UsageAttributionAggregates' + pagination: + $ref: '#/components/schemas/UsageAttributionPagination' + type: object + UsageAttributionOffset: + default: 0 + description: Number of records to skip before beginning to return. + format: int64 + type: integer + UsageAttributionPagination: + description: The metadata for the current pagination. + properties: + limit: + description: Maximum amount of records to be returned. format: int64 type: integer - raw_error_budget_remaining: - $ref: '#/components/schemas/SLORawErrorBudgetRemaining' - sli: - description: The current service level indicator (SLI) of the SLO, also - known as 'status'. This is a percentage value from 0-100 (inclusive). - example: 100 - format: double - nullable: true - type: number - span_precision: - description: The number of decimal places the SLI value is accurate to. - example: 2 + offset: + description: Records to be skipped before beginning to return. + format: int64 + type: integer + sort_direction: + description: Direction to sort by. + type: string + sort_name: + description: Field to sort by. + type: string + total_number_of_records: + description: Total number of records. format: int64 - nullable: true type: integer - state: - $ref: '#/components/schemas/SLOState' type: object - SLOThreshold: - description: SLO thresholds (target and optionally warning) for a single time - window. + UsageAttributionResponse: + description: Response containing the Usage Summary by tag(s). properties: - target: - description: 'The target value for the service level indicator within the - corresponding - - timeframe.' - example: 99.9 - format: double - type: number - target_display: - description: 'A string representation of the target that indicates its precision. - - It uses trailing zeros to show significant decimal places (for example - `98.00`). - - - Always included in service level objective responses. Ignored in - - create/update requests.' - example: '99.9' - type: string - timeframe: - $ref: '#/components/schemas/SLOTimeframe' - warning: - description: The warning value for the service level objective. - example: 90.0 - format: double - type: number - warning_display: - description: 'A string representation of the warning target (see the description - of + metadata: + $ref: '#/components/schemas/UsageAttributionMetadata' + usage: + description: Get usage summary by tag(s). + items: + $ref: '#/components/schemas/UsageAttributionBody' + type: array + type: object + UsageAttributionSort: + default: custom_timeseries_usage + description: The field to sort by. + enum: + - api_percentage + - snmp_usage + - apm_host_usage + - api_usage + - appsec_usage + - appsec_percentage + - container_usage + - custom_timeseries_percentage + - container_percentage + - apm_host_percentage + - npm_host_percentage + - browser_percentage + - browser_usage + - infra_host_percentage + - snmp_percentage + - npm_host_usage + - infra_host_usage + - custom_timeseries_usage + - lambda_functions_usage + - lambda_functions_percentage + - lambda_invocations_usage + - lambda_invocations_percentage + - estimated_indexed_logs_usage + - estimated_indexed_logs_percentage + - estimated_ingested_logs_usage + - estimated_ingested_logs_percentage + - estimated_indexed_spans_usage + - estimated_indexed_spans_percentage + - estimated_ingested_spans_usage + - estimated_ingested_spans_percentage + - apm_fargate_usage + - apm_fargate_percentage + - appsec_fargate_usage + - appsec_fargate_percentage + - estimated_rum_usage_attribution_usage + - estimated_rum_usage_attribution_percentage + type: string + x-enum-varnames: + - API_PERCENTAGE + - SNMP_USAGE + - APM_HOST_USAGE + - API_USAGE + - APPSEC_USAGE + - APPSEC_PERCENTAGE + - CONTAINER_USAGE + - CUSTOM_TIMESERIES_PERCENTAGE + - CONTAINER_PERCENTAGE + - APM_HOST_PERCENTAGE + - NPM_HOST_PERCENTAGE + - BROWSER_PERCENTAGE + - BROWSER_USAGE + - INFRA_HOST_PERCENTAGE + - SNMP_PERCENTAGE + - NPM_HOST_USAGE + - INFRA_HOST_USAGE + - CUSTOM_TIMESERIES_USAGE + - LAMBDA_FUNCTIONS_USAGE + - LAMBDA_FUNCTIONS_PERCENTAGE + - LAMBDA_INVOCATIONS_USAGE + - LAMBDA_INVOCATIONS_PERCENTAGE + - ESTIMATED_INDEXED_LOGS_USAGE + - ESTIMATED_INDEXED_LOGS_PERCENTAGE + - ESTIMATED_INGESTED_LOGS_USAGE + - ESTIMATED_INGESTED_LOGS_PERCENTAGE + - ESTIMATED_INDEXED_SPANS_USAGE + - ESTIMATED_INDEXED_SPANS_PERCENTAGE + - ESTIMATED_INGESTED_SPANS_USAGE + - ESTIMATED_INGESTED_SPANS_PERCENTAGE + - APM_FARGATE_USAGE + - APM_FARGATE_PERCENTAGE + - APPSEC_FARGATE_USAGE + - APPSEC_FARGATE_PERCENTAGE + - ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE + - ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE + UsageAttributionSupportedMetrics: + description: Supported fields for usage attribution requests (valid requests + contain one or more metrics, or `*` for all). + enum: + - custom_timeseries_usage + - container_usage + - snmp_percentage + - apm_host_usage + - browser_usage + - npm_host_percentage + - infra_host_usage + - custom_timeseries_percentage + - container_percentage + - api_usage + - apm_host_percentage + - infra_host_percentage + - snmp_usage + - browser_percentage + - api_percentage + - npm_host_usage + - lambda_functions_usage + - lambda_functions_percentage + - lambda_invocations_usage + - lambda_invocations_percentage + - fargate_usage + - fargate_percentage + - profiled_host_usage + - profiled_host_percentage + - profiled_container_usage + - profiled_container_percentage + - dbm_hosts_usage + - dbm_hosts_percentage + - dbm_queries_usage + - dbm_queries_percentage + - estimated_indexed_logs_usage + - estimated_indexed_logs_percentage + - estimated_ingested_logs_usage + - estimated_ingested_logs_percentage + - appsec_usage + - appsec_percentage + - estimated_indexed_spans_usage + - estimated_indexed_spans_percentage + - estimated_ingested_spans_usage + - estimated_ingested_spans_percentage + - apm_fargate_usage + - apm_fargate_percentage + - appsec_fargate_usage + - appsec_fargate_percentage + - estimated_rum_usage_attribution_usage + - estimated_rum_usage_attribution_percentage + - '*' + type: string + x-enum-varnames: + - CUSTOM_TIMESERIES_USAGE + - CONTAINER_USAGE + - SNMP_PERCENTAGE + - APM_HOST_USAGE + - BROWSER_USAGE + - NPM_HOST_PERCENTAGE + - INFRA_HOST_USAGE + - CUSTOM_TIMESERIES_PERCENTAGE + - CONTAINER_PERCENTAGE + - API_USAGE + - APM_HOST_PERCENTAGE + - INFRA_HOST_PERCENTAGE + - SNMP_USAGE + - BROWSER_PERCENTAGE + - API_PERCENTAGE + - NPM_HOST_USAGE + - LAMBDA_FUNCTIONS_USAGE + - LAMBDA_FUNCTIONS_PERCENTAGE + - LAMBDA_INVOCATIONS_USAGE + - LAMBDA_INVOCATIONS_PERCENTAGE + - FARGATE_USAGE + - FARGATE_PERCENTAGE + - PROFILED_HOST_USAGE + - PROFILED_HOST_PERCENTAGE + - PROFILED_CONTAINER_USAGE + - PROFILED_CONTAINER_PERCENTAGE + - DBM_HOSTS_USAGE + - DBM_HOSTS_PERCENTAGE + - DBM_QUERIES_USAGE + - DBM_QUERIES_PERCENTAGE + - ESTIMATED_INDEXED_LOGS_USAGE + - ESTIMATED_INDEXED_LOGS_PERCENTAGE + - ESTIMATED_INGESTED_LOGS_USAGE + - ESTIMATED_INGESTED_LOGS_PERCENTAGE + - APPSEC_USAGE + - APPSEC_PERCENTAGE + - ESTIMATED_INDEXED_SPANS_USAGE + - ESTIMATED_INDEXED_SPANS_PERCENTAGE + - ESTIMATED_INGESTED_SPANS_USAGE + - ESTIMATED_INGESTED_SPANS_PERCENTAGE + - APM_FARGATE_USAGE + - APM_FARGATE_PERCENTAGE + - APPSEC_FARGATE_USAGE + - APPSEC_FARGATE_PERCENTAGE + - ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE + - ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE + - ALL + UsageAttributionTagNames: + additionalProperties: + description: 'A list of values that are associated with each tag key. - the `target_display` field for details). + - An empty list means the resource use wasn''t tagged with the respective + tag. - Included in service level objective responses if a warning target exists. + - Multiple values means the respective tag was applied multiple times on + the resource. - Ignored in create/update requests.' - example: '90.0' + - An `` value means the resource was tagged with the respective tag + but did not have a value.' + items: + description: A given tag in a list. + example: datadog-integrations-lab type: string - required: - - timeframe - - target - type: object - SLOTimeframe: - description: The SLO time window options. - enum: - - 7d - - 30d - - 90d - - custom - example: 30d - type: string - x-enum-varnames: - - SEVEN_DAYS - - THIRTY_DAYS - - NINETY_DAYS - - CUSTOM - SLOType: - description: The type of the service level objective. - enum: - - metric - - monitor - example: metric - type: string - x-enum-varnames: - - METRIC - - MONITOR - SLOTypeNumeric: - description: 'A numeric representation of the type of the service level objective - (`0` for + type: array + description: 'Tag keys and values. - monitor, `1` for metric). Always included in service level objective responses. - Ignored in create/update requests.' - enum: - - 0 - - 1 - example: 0 - format: int32 - type: integer - x-enum-varnames: - - MONITOR - - METRIC - SearchSLOQuery: - description: 'A metric-based SLO. **Required if type is `metric`**. Note that - Datadog only allows the sum by aggregator + A `null` value here means that the requested tag breakdown cannot be applied + because it does not match the [tags - to be used because this will sum up all request counts instead of averaging - them, or taking the max or + configured for usage attribution](https://docs.datadoghq.com/account_management/billing/usage_attribution/#getting-started). - min of all of those requests.' + In this scenario the API returns the total usage, not broken down by tags.' nullable: true - properties: - denominator: - description: A Datadog metric query for total (valid) events. - example: sum:my.custom.metric{*}.as_count() - type: string - metrics: - description: 'Metric names used in the query''s numerator and denominator. - - This field will return null and will be implemented in the next version - of this endpoint.' - example: - - my.custom.metric - - my.other.custom.metric - items: - description: Metric name. - type: string - nullable: true - type: array - numerator: - description: A Datadog metric query for good events. - example: sum:my.custom.metric{type:good}.as_count() - type: string - type: object - SearchSLOResponse: - description: A search SLO response containing results from the search query. - properties: - data: - $ref: '#/components/schemas/SearchSLOResponseData' - links: - $ref: '#/components/schemas/SearchSLOResponseLinks' - meta: - $ref: '#/components/schemas/SearchSLOResponseMeta' - type: object - SearchSLOResponseData: - description: Data from search SLO response. - properties: - attributes: - $ref: '#/components/schemas/SearchSLOResponseDataAttributes' - type: - description: Type of service level objective result. - example: '' - type: string - type: object - SearchSLOResponseDataAttributes: - description: Attributes - properties: - facets: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacets' - slos: - description: SLOs - items: - $ref: '#/components/schemas/SearchServiceLevelObjective' - type: array - type: object - SearchSLOResponseDataAttributesFacets: - description: Facets - properties: - all_tags: - description: All tags associated with an SLO. - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' - type: array - creator_name: - description: Creator of an SLO. - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' - type: array - env_tags: - description: Tags with the `env` tag key. - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' - type: array - service_tags: - description: Tags with the `service` tag key. - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' - type: array - slo_type: - description: Type of SLO. - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectInt' - type: array - target: - description: SLO Target - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectInt' - type: array - team_tags: - description: Tags with the `team` tag key. - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' - type: array - timeframe: - description: Timeframes of SLOs. - items: - $ref: '#/components/schemas/SearchSLOResponseDataAttributesFacetsObjectString' - type: array type: object - SearchSLOResponseDataAttributesFacetsObjectInt: - description: Facet + UsageAttributionValues: + description: Fields in Usage Summary by tag(s). properties: - count: - description: Count - format: int64 - type: integer - name: - description: Facet + api_percentage: + description: The percentage of synthetic API test usage by tag(s). format: double type: number - type: object - SearchSLOResponseDataAttributesFacetsObjectString: - description: Facet - properties: - count: - description: Count - format: int64 - type: integer - name: - description: Facet - type: string - type: object - SearchSLOResponseLinks: - description: Pagination links. - properties: - first: - description: Link to last page. - type: string - last: - description: Link to first page. - nullable: true - type: string - next: - description: Link to the next page. - type: string - prev: - description: Link to previous page. - nullable: true - type: string - self: - description: Link to current page. - type: string - type: object - SearchSLOResponseMeta: - description: Searches metadata returned by the API. - properties: - pagination: - $ref: '#/components/schemas/SearchSLOResponseMetaPage' - type: object - SearchSLOResponseMetaPage: - description: Pagination metadata returned by the API. - properties: - first_number: - description: The first number. - format: int64 - type: integer - last_number: - description: The last number. - format: int64 - type: integer - next_number: - description: The next number. - format: int64 - type: integer - number: - description: The page number. - format: int64 - type: integer - prev_number: - description: The previous page number. - format: int64 - type: integer - size: - description: The size of the response. - format: int64 - type: integer - total: - description: The total number of SLOs in the response. - format: int64 - type: integer - type: - description: Type of pagination. - type: string - type: object - SearchSLOThreshold: - description: SLO thresholds (target and optionally warning) for a single time - window. - properties: - target: - description: 'The target value for the service level indicator within the - corresponding - - timeframe.' - example: 99.9 + api_usage: + description: The synthetic API test usage by tag(s). + format: double + type: number + apm_fargate_percentage: + description: The percentage of APM ECS Fargate task usage by tag(s). + format: double + type: number + apm_fargate_usage: + description: The APM ECS Fargate task usage by tag(s). + format: double + type: number + apm_host_percentage: + description: The percentage of APM host usage by tag(s). + format: double + type: number + apm_host_usage: + description: The APM host usage by tag(s). + format: double + type: number + appsec_fargate_percentage: + description: The percentage of Application Security Monitoring ECS Fargate + task usage by tag(s). + format: double + type: number + appsec_fargate_usage: + description: The Application Security Monitoring ECS Fargate task usage + by tag(s). + format: double + type: number + appsec_percentage: + description: The percentage of Application Security Monitoring host usage + by tag(s). + format: double + type: number + appsec_usage: + description: The Application Security Monitoring host usage by tag(s). + format: double + type: number + browser_percentage: + description: The percentage of synthetic browser test usage by tag(s). + format: double + type: number + browser_usage: + description: The synthetic browser test usage by tag(s). + format: double + type: number + container_percentage: + description: The percentage of container usage by tag(s). + format: double + type: number + container_usage: + description: The container usage by tag(s). + format: double + type: number + cspm_container_percentage: + description: The percentage of Cloud Security Management Pro container usage + by tag(s) + format: double + type: number + cspm_container_usage: + description: The Cloud Security Management Pro container usage by tag(s) + format: double + type: number + cspm_host_percentage: + description: The percentage of Cloud Security Management Pro host usage + by tag(s) + format: double + type: number + cspm_host_usage: + description: The Cloud Security Management Pro host usage by tag(s) + format: double + type: number + custom_timeseries_percentage: + description: The percentage of custom metrics usage by tag(s). + format: double + type: number + custom_timeseries_usage: + description: The custom metrics usage by tag(s). + format: double + type: number + cws_container_percentage: + description: The percentage of Cloud Workload Security container usage by + tag(s) + format: double + type: number + cws_container_usage: + description: The Cloud Workload Security container usage by tag(s) + format: double + type: number + cws_host_percentage: + description: The percentage of Cloud Workload Security host usage by tag(s) + format: double + type: number + cws_host_usage: + description: The Cloud Workload Security host usage by tag(s) + format: double + type: number + dbm_hosts_percentage: + description: The percentage of Database Monitoring host usage by tag(s). + format: double + type: number + dbm_hosts_usage: + description: The Database Monitoring host usage by tag(s). + format: double + type: number + dbm_queries_percentage: + description: The percentage of Database Monitoring normalized queries usage + by tag(s). + format: double + type: number + dbm_queries_usage: + description: The Database Monitoring normalized queries usage by tag(s). + format: double + type: number + estimated_indexed_logs_percentage: + description: The percentage of estimated live indexed logs usage by tag(s). + format: double + type: number + estimated_indexed_logs_usage: + description: The estimated live indexed logs usage by tag(s). + format: double + type: number + estimated_indexed_spans_percentage: + description: The percentage of estimated indexed spans usage by tag(s). + format: double + type: number + estimated_indexed_spans_usage: + description: The estimated indexed spans usage by tag(s). + format: double + type: number + estimated_ingested_logs_percentage: + description: The percentage of estimated live ingested logs usage by tag(s). + format: double + type: number + estimated_ingested_logs_usage: + description: The estimated live ingested logs usage by tag(s). + format: double + type: number + estimated_ingested_spans_percentage: + description: The percentage of estimated ingested spans usage by tag(s). + format: double + type: number + estimated_ingested_spans_usage: + description: The estimated ingested spans usage by tag(s). + format: double + type: number + estimated_rum_sessions_percentage: + description: The percentage of estimated rum sessions usage by tag(s). + format: double + type: number + estimated_rum_sessions_usage: + description: The estimated rum sessions usage by tag(s). + format: double + type: number + infra_host_percentage: + description: The percentage of infrastructure host usage by tag(s). + format: double + type: number + infra_host_usage: + description: The infrastructure host usage by tag(s). format: double type: number - target_display: - description: 'A string representation of the target that indicates its precision. - - It uses trailing zeros to show significant decimal places (for example - `98.00`). - - - Always included in service level objective responses. Ignored in - - create/update requests.' - example: '99.9' - type: string - timeframe: - $ref: '#/components/schemas/SearchSLOTimeframe' - warning: - description: The warning value for the service level objective. - example: 90.0 + lambda_functions_percentage: + description: The percentage of Lambda function usage by tag(s). + format: double + type: number + lambda_functions_usage: + description: The Lambda function usage by tag(s). + format: double + type: number + lambda_invocations_percentage: + description: The percentage of Lambda invocation usage by tag(s). + format: double + type: number + lambda_invocations_usage: + description: The Lambda invocation usage by tag(s). + format: double + type: number + npm_host_percentage: + description: The percentage of network host usage by tag(s). + format: double + type: number + npm_host_usage: + description: The network host usage by tag(s). + format: double + type: number + profiled_container_percentage: + description: The percentage of profiled containers usage by tag(s). + format: double + type: number + profiled_container_usage: + description: The profiled container usage by tag(s). + format: double + type: number + profiled_hosts_percentage: + description: The percentage of profiled hosts usage by tag(s). + format: double + type: number + profiled_hosts_usage: + description: The profiled host usage by tag(s). + format: double + type: number + snmp_percentage: + description: The percentage of network device usage by tag(s). + format: double + type: number + snmp_usage: + description: The network device usage by tag(s). format: double - nullable: true type: number - warning_display: - description: 'A string representation of the warning target (see the description - of - - the `target_display` field for details). - - - Included in service level objective responses if a warning target exists. - - Ignored in create/update requests.' - example: '90.0' - nullable: true - type: string - required: - - timeframe - - target type: object - SearchSLOTimeframe: - description: The SLO time window options. - enum: - - 7d - - 30d - - 90d - example: 30d - type: string - x-enum-varnames: - - SEVEN_DAYS - - THIRTY_DAYS - - NINETY_DAYS - SearchServiceLevelObjective: - description: A service level objective data container. + UsageAuditLogsHour: + description: Audit logs usage for a given organization for a given hour. properties: - data: - $ref: '#/components/schemas/SearchServiceLevelObjectiveData' + hour: + description: The hour for the usage. + format: date-time + type: string + lines_indexed: + description: The total number of audit logs lines indexed during a given + hour. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object - SearchServiceLevelObjectiveAttributes: - description: 'A service level objective object includes a service level indicator, - thresholds - - for one or more timeframes, and metadata (`name`, `description`, and `tags`).' + UsageAuditLogsResponse: + description: Response containing the audit logs usage for each hour for a given + organization. properties: - all_tags: - description: 'A list of tags associated with this service level objective. - - Always included in service level objective responses (but may be empty).' - example: - - env:prod - - app:core + usage: + description: Get hourly usage for audit logs. items: - type: string + $ref: '#/components/schemas/UsageAuditLogsHour' type: array - created_at: - description: 'Creation timestamp (UNIX time in seconds) - - - Always included in service level objective responses.' + type: object + UsageBillableSummaryBody: + description: Response with properties for each aggregated usage type. + properties: + account_billable_usage: + description: The total account usage. format: int64 - readOnly: true type: integer - creator: - $ref: '#/components/schemas/SLOCreator' - description: - description: 'A user-defined description of the service level objective. - - - Always included in service level objective responses (but may be `null`). - - Optional in create/update requests.' - nullable: true - type: string - env_tags: - description: Tags with the `env` tag key. - items: - type: string - type: array - groups: - description: 'A list of (up to 100) monitor groups that narrow the scope - of a monitor service level objective. - - Included in service level objective responses if it is not empty.' - example: - - env:prod - - role:mysql - items: - description: A group name, for instance `env:prod`. - type: string - nullable: true - type: array - modified_at: - description: 'Modification timestamp (UNIX time in seconds) - - - Always included in service level objective responses.' + elapsed_usage_hours: + description: Elapsed usage hours for some billable product. format: int64 - readOnly: true type: integer - monitor_ids: - description: 'A list of monitor ids that defines the scope of a monitor - service level - - objective.' - items: - description: A monitor ID. - format: int64 - type: integer - nullable: true - type: array - name: - description: The name of the service level objective object. - example: Custom Metric SLO + first_billable_usage_hour: + description: The first billable hour for the org. + format: date-time type: string - overall_status: - description: calculated status and error budget remaining. - items: - $ref: '#/components/schemas/SLOOverallStatuses' - type: array - query: - $ref: '#/components/schemas/SearchSLOQuery' - service_tags: - description: Tags with the `service` tag key. - items: - type: string - type: array - slo_type: - $ref: '#/components/schemas/SLOType' - status: - $ref: '#/components/schemas/SLOStatus' - team_tags: - description: Tags with the `team` tag key. - items: - type: string - type: array - thresholds: - description: 'The thresholds (timeframes and associated targets) for this - service level - - objective object.' - example: - - target: 95 - target_display: '95' - timeframe: 7d - - target: 95 - target_display: '95' - timeframe: 30d - warning: 97 - warning_display: '97' - items: - $ref: '#/components/schemas/SearchSLOThreshold' - type: array - type: object - SearchServiceLevelObjectiveData: - description: A service level objective ID and attributes. - properties: - attributes: - $ref: '#/components/schemas/SearchServiceLevelObjectiveAttributes' - id: - description: 'A unique identifier for the service level objective object. - - - Always included in service level objective responses.' - readOnly: true + last_billable_usage_hour: + description: The last billable hour for the org. + format: date-time type: string - type: - description: The type of the object, must be `slo`. + org_billable_usage: + description: The number of units used within the billable timeframe. + format: int64 + type: integer + percentage_in_account: + description: The percentage of account usage the org represents. + format: double + type: number + usage_unit: + description: Units pertaining to the usage. type: string type: object - Series: - description: 'A metric to submit to Datadog. - - See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties).' + UsageBillableSummaryHour: + description: Response with monthly summary of data billed by Datadog. properties: - host: - description: The name of the host that produced the metric. - example: test.example.com + billing_plan: + description: The billing plan. type: string - interval: - default: null - description: If the type of the metric is rate or count, define the corresponding - interval. - example: 20 + end_date: + description: Shows the last date of usage. + format: date-time + type: string + num_orgs: + description: The number of organizations. format: int64 - nullable: true type: integer - metric: - description: The name of the timeseries. - example: system.load.1 + org_name: + description: The organization name. type: string - points: - description: Points relating to a metric. All points must be tuples with - timestamp and a scalar value (cannot be a string). Timestamps should be - in POSIX time in seconds, and cannot be more than ten minutes in the future - or more than one hour in the past. - items: - $ref: '#/components/schemas/Point' - type: array - tags: - description: A list of tags associated with the metric. - example: - - environment:test - items: - description: Individual tags. - type: string - type: array - type: - default: '' - description: The type of the metric. Valid types are "",`count`, `gauge`, - and `rate`. - example: rate + public_id: + description: The organization public ID. type: string - required: - - metric - - points + ratio_in_month: + description: Shows usage aggregation for a billing period. + format: double + type: number + region: + description: The region of the organization. + type: string + start_date: + description: Shows the first date of usage. + format: date-time + type: string + usage: + $ref: '#/components/schemas/UsageBillableSummaryKeys' + type: object + UsageBillableSummaryKeys: + description: Response with aggregated usage types. + properties: + apm_fargate_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + apm_fargate_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + apm_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + apm_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + apm_profiler_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + apm_profiler_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + apm_trace_search_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + application_security_fargate_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + application_security_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + application_security_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ci_pipeline_indexed_spans_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ci_pipeline_maximum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ci_pipeline_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ci_test_indexed_spans_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ci_testing_maximum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ci_testing_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cloud_cost_management_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cloud_cost_management_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cspm_container_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cspm_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cspm_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + custom_event_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cws_container_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cws_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + cws_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + dbm_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + dbm_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + dbm_normalized_queries_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + dbm_normalized_queries_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + fargate_container_apm_and_profiler_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + fargate_container_apm_and_profiler_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + fargate_container_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + fargate_container_profiler_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + fargate_container_profiler_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + fargate_container_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + incident_management_maximum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + incident_management_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + infra_and_apm_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + infra_and_apm_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + infra_container_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + infra_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + infra_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ingested_spans_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ingested_timeseries_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + ingested_timeseries_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + iot_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + iot_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + lambda_function_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + lambda_function_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_forwarding_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_15day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_180day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_30day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_360day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_3day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_45day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_60day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_7day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_90day_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_custom_retention_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_indexed_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + logs_ingested_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + network_device_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + network_device_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + npm_flow_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + npm_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + npm_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + observability_pipeline_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + online_archive_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + prof_container_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + prof_host_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + prof_host_top99p: + $ref: '#/components/schemas/UsageBillableSummaryBody' + rum_lite_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + rum_replay_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + rum_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + rum_units_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + sensitive_data_scanner_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + serverless_apm_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + serverless_infra_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + serverless_infra_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + serverless_invocation_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + siem_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + standard_timeseries_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + synthetics_api_tests_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + synthetics_app_testing_maximum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + synthetics_browser_checks_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' + timeseries_average: + $ref: '#/components/schemas/UsageBillableSummaryBody' + timeseries_sum: + $ref: '#/components/schemas/UsageBillableSummaryBody' type: object - ServiceCheck: - description: An object containing service check and status. + UsageBillableSummaryResponse: + description: Response with monthly summary of data billed by Datadog. properties: - check: - description: The check. - example: app.ok - type: string - host_name: - description: The host name correlated with the check. - example: app.host1 - type: string - message: - description: Message containing check status. - example: app is running - type: string - status: - $ref: '#/components/schemas/ServiceCheckStatus' - tags: - description: Tags related to a check. - example: - - environment:test + usage: + description: An array of objects regarding usage of billable summary. items: - description: Items related to a check. - type: string + $ref: '#/components/schemas/UsageBillableSummaryHour' type: array - timestamp: - description: Time of check. - format: int64 - type: integer - required: - - check - - status - - tags - - host_name type: object - ServiceCheckStatus: - description: The status of a service check. Set to `0` for OK, `1` for warning, - `2` for critical, and `3` for unknown. - enum: - - 0 - - 1 - - 2 - - 3 - example: 0 - format: int32 - type: integer - x-enum-varnames: - - OK - - WARNING - - CRITICAL - - UNKNOWN - ServiceChecks: - description: The service checks. - items: - $ref: '#/components/schemas/ServiceCheck' - type: array - ServiceLevelObjective: - description: 'A service level objective object includes a service level indicator, - thresholds - - for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).' + UsageCIVisibilityHour: + description: CI visibility usage in a given hour. properties: - created_at: - description: 'Creation timestamp (UNIX time in seconds) - - - Always included in service level objective responses.' + ci_pipeline_indexed_spans: + description: The number of spans for pipelines in the queried hour. format: int64 - readOnly: true + nullable: true type: integer - creator: - $ref: '#/components/schemas/Creator' - description: - description: 'A user-defined description of the service level objective. - - - Always included in service level objective responses (but may be `null`). - - Optional in create/update requests.' + ci_test_indexed_spans: + description: The number of spans for tests in the queried hour. + format: int64 nullable: true - type: string - groups: - description: 'A list of (up to 100) monitor groups that narrow the scope - of a monitor service level objective. - - - Included in service level objective responses if it is not empty. Optional - in - - create/update requests for monitor service level objectives, but may only - be - - used when then length of the `monitor_ids` field is one.' - example: - - env:prod - - role:mysql - items: - description: A group name, for instance `env:prod`. - type: string - type: array - id: - description: 'A unique identifier for the service level objective object. - - - Always included in service level objective responses.' - readOnly: true - type: string - modified_at: - description: 'Modification timestamp (UNIX time in seconds) - - - Always included in service level objective responses.' + type: integer + ci_visibility_itr_committers: + description: Shows the total count of all active Git committers for Intelligent + Test Runner in the current month. A committer is active if they commit + at least 3 times in a given month. format: int64 - readOnly: true + nullable: true type: integer - monitor_ids: - description: 'A list of monitor ids that defines the scope of a monitor - service level - - objective. **Required if type is `monitor`**.' - items: - description: A monitor ID. - format: int64 - type: integer - type: array - monitor_tags: - description: 'The union of monitor tags for all monitors referenced by the - `monitor_ids` - - field. - - Always included in service level objective responses for monitor-based - service level - - objectives (but may be empty). Ignored in create/update requests. Does - not - - affect which monitors are included in the service level objective (that - is - - determined entirely by the `monitor_ids` field).' - items: - description: A monitor tag. - type: string - type: array - name: - description: The name of the service level objective object. - example: Custom Metric SLO - type: string - query: - $ref: '#/components/schemas/ServiceLevelObjectiveQuery' - tags: - description: 'A list of tags associated with this service level objective. - - Always included in service level objective responses (but may be empty). - - Optional in create/update requests.' - example: - - env:prod - - app:core - items: - description: A tag to apply to your SLO. - type: string - type: array - target_threshold: - description: 'The target threshold such that when the service level indicator - is above this - - threshold over the given timeframe, the objective is being met.' - example: 99.9 - format: double - type: number - thresholds: - description: 'The thresholds (timeframes and associated targets) for this - service level - - objective object.' - example: - - target: 95 - timeframe: 7d - - target: 95 - timeframe: 30d - warning: 97 - items: - $ref: '#/components/schemas/SLOThreshold' - type: array - timeframe: - $ref: '#/components/schemas/SLOTimeframe' - type: - $ref: '#/components/schemas/SLOType' - warning_threshold: - description: 'The optional warning threshold such that when the service - level indicator is - - below this value for the given threshold, but above the target threshold, - the - - objective appears in a "warning" state. This value must be greater than - the target - - threshold.' - example: 99.95 - format: double - type: number - required: - - name - - thresholds - - type - type: object - ServiceLevelObjectiveQuery: - description: 'A metric-based SLO. **Required if type is `metric`**. Note that - Datadog only allows the sum by aggregator - - to be used because this will sum up all request counts instead of averaging - them, or taking the max or - - min of all of those requests.' - properties: - denominator: - description: A Datadog metric query for total (valid) events. - example: sum:my.custom.metric{*}.as_count() - type: string - numerator: - description: A Datadog metric query for good events. - example: sum:my.custom.metric{type:good}.as_count() - type: string - required: - - numerator - - denominator - type: object - ServiceLevelObjectiveRequest: - description: 'A service level objective object includes a service level indicator, - thresholds - - for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).' - properties: - description: - description: 'A user-defined description of the service level objective. - - - Always included in service level objective responses (but may be `null`). - - Optional in create/update requests.' + ci_visibility_pipeline_committers: + description: Shows the total count of all active Git committers for Pipelines + in the current month. A committer is active if they commit at least 3 + times in a given month. + format: int64 + nullable: true + type: integer + ci_visibility_test_committers: + description: The total count of all active Git committers for tests in the + current month. A committer is active if they commit at least 3 times in + a given month. + format: int64 nullable: true + type: integer + org_name: + description: The organization name. type: string - groups: - description: 'A list of (up to 100) monitor groups that narrow the scope - of a monitor service level objective. - - - Included in service level objective responses if it is not empty. Optional - in - - create/update requests for monitor service level objectives, but may only - be - - used when then length of the `monitor_ids` field is one.' - example: - - env:prod - - role:mysql - items: - description: A group name, for instance `env:prod`. - type: string - type: array - monitor_ids: - description: 'A list of monitor IDs that defines the scope of a monitor - service level - - objective. **Required if type is `monitor`**.' + public_id: + description: The organization public ID. + type: string + type: object + UsageCIVisibilityResponse: + description: CI visibility usage response + properties: + usage: + description: Response containing CI visibility usage. items: - description: A monitor ID. - format: int64 - type: integer + $ref: '#/components/schemas/UsageCIVisibilityHour' type: array - name: - description: The name of the service level objective object. - example: Custom Metric SLO + type: object + UsageCWSHour: + description: Cloud Workload Security usage for a given organization for a given + hour. + properties: + cws_container_count: + description: "The total number of Cloud Workload Security container hours + from the start of the given hour\u2019s month until the given hour." + format: int64 + nullable: true + type: integer + cws_host_count: + description: "The total number of Cloud Workload Security host hours from + the start of the given hour\u2019s month until the given hour." + format: int64 + nullable: true + type: integer + hour: + description: The hour for the usage. + format: date-time type: string - query: - $ref: '#/components/schemas/ServiceLevelObjectiveQuery' - tags: - description: 'A list of tags associated with this service level objective. - - Always included in service level objective responses (but may be empty). - - Optional in create/update requests.' - example: - - env:prod - - app:core + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageCWSResponse: + description: Response containing the Cloud Workload Security usage for each + hour for a given organization. + properties: + usage: + description: Get hourly usage for Cloud Workload Security. items: - description: A tag to apply to your SLO. - type: string + $ref: '#/components/schemas/UsageCWSHour' type: array - target_threshold: - description: 'The target threshold such that when the service level indicator - is above this - - threshold over the given timeframe, the objective is being met.' - example: 99.9 + type: object + UsageCloudSecurityPostureManagementHour: + description: Cloud Security Management Pro usage for a given organization for + a given hour. + properties: + aas_host_count: + description: The number of Cloud Security Management Pro Azure app services + hosts during a given hour. format: double + nullable: true type: number - thresholds: - description: 'The thresholds (timeframes and associated targets) for this - service level - - objective object.' - example: - - target: 95 - timeframe: 7d - - target: 95 - timeframe: 30d - warning: 97 - items: - $ref: '#/components/schemas/SLOThreshold' - type: array - timeframe: - $ref: '#/components/schemas/SLOTimeframe' - type: - $ref: '#/components/schemas/SLOType' - warning_threshold: - description: 'The optional warning threshold such that when the service - level indicator is - - below this value for the given threshold, but above the target threshold, - the - - objective appears in a "warning" state. This value must be greater than - the target - - threshold.' - example: 99.95 + aws_host_count: + description: The number of Cloud Security Management Pro AWS hosts during + a given hour. format: double + nullable: true type: number - required: - - name - - thresholds - - type + azure_host_count: + description: The number of Cloud Security Management Pro Azure hosts during + a given hour. + format: double + nullable: true + type: number + compliance_host_count: + description: The number of Cloud Security Management Pro hosts during a + given hour. + format: double + nullable: true + type: number + container_count: + description: The total number of Cloud Security Management Pro containers + during a given hour. + format: double + nullable: true + type: number + gcp_host_count: + description: The number of Cloud Security Management Pro GCP hosts during + a given hour. + format: double + nullable: true + type: number + host_count: + description: The total number of Cloud Security Management Pro hosts during + a given hour. + format: double + nullable: true + type: number + hour: + description: The hour for the usage. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object - SignalArchiveReason: - description: Reason why a signal has been archived. - enum: - - none - - false_positive - - testing_or_maintenance - - investigated_case_opened - - other - type: string - x-enum-varnames: - - NONE - - FALSE_POSITIVE - - TESTING_OR_MAINTENANCE - - INVESTIGATED_CASE_OPENED - - OTHER - SignalAssigneeUpdateRequest: - description: Attributes describing an assignee update operation over a security - signal. + UsageCloudSecurityPostureManagementResponse: + description: The response containing the Cloud Security Management Pro usage + for each hour for a given organization. properties: - assignee: - description: The UUID of the user being assigned. Use empty string to return - signal to unassigned. - example: 773b045d-ccf8-4808-bd3b-955ef6a8c940 - type: string - version: - $ref: '#/components/schemas/Version' - required: - - assignee + usage: + description: Get hourly usage for Cloud Security Management Pro. + items: + $ref: '#/components/schemas/UsageCloudSecurityPostureManagementHour' + type: array type: object - SignalStateUpdateRequest: - description: Attributes describing the change of state for a given state. + UsageCustomReportsAttributes: + description: The response containing attributes for custom reports. properties: - archiveComment: - description: Optional comment to explain why a signal is being archived. + computed_on: + description: The date the specified custom report was computed. type: string - archiveReason: - $ref: '#/components/schemas/SignalArchiveReason' - state: - $ref: '#/components/schemas/SignalTriageState' - version: - $ref: '#/components/schemas/Version' - required: - - state + end_date: + description: The ending date of custom report. + type: string + size: + description: size + format: int64 + type: integer + start_date: + description: The starting date of custom report. + type: string + tags: + description: A list of tags to apply to custom reports. + items: + description: A given tag in a list. + example: env + type: string + type: array type: object - SignalTriageState: - description: The new triage state of the signal. - enum: - - open - - archived - - under_review - example: open - type: string - x-enum-varnames: - - OPEN - - ARCHIVED - - UNDER_REVIEW - SlackIntegrationChannel: - description: The Slack channel configuration. + UsageCustomReportsData: + description: The response containing the date and type for custom reports. properties: - display: - $ref: '#/components/schemas/SlackIntegrationChannelDisplay' - name: - description: Your channel name. - example: '#general' + attributes: + $ref: '#/components/schemas/UsageCustomReportsAttributes' + id: + description: The date for specified custom reports. type: string + type: + $ref: '#/components/schemas/UsageReportsType' type: object - SlackIntegrationChannelDisplay: - description: Configuration options for what is shown in an alert event message. + UsageCustomReportsMeta: + description: The object containing document metadata. properties: - message: - default: true - description: Show the main body of the alert event. - type: boolean - notified: - default: true - description: Show the list of @-handles in the alert event. - type: boolean - snapshot: - default: true - description: Show the alert event's snapshot image. - type: boolean - tags: - default: true - description: Show the scopes on which the monitor alerted. - type: boolean + page: + $ref: '#/components/schemas/UsageCustomReportsPage' type: object - SlackIntegrationChannels: - description: A list of configured Slack channels. - example: - - display: - message: true - notified: true - snapshot: true - tags: true - name: '#channel_name_main_account' - - display: - message: true - notified: true - snapshot: false - tags: true - name: '#channel_name_doghouse' - items: - $ref: '#/components/schemas/SlackIntegrationChannel' - type: array - SuccessfulSignalUpdateResponse: - description: Updated signal data following a successfully performed update. + UsageCustomReportsPage: + description: The object containing page total count. properties: - status: - description: Status of the response. - type: string + total_count: + description: Total page count. + format: int64 + type: integer type: object - TagToHosts: - description: In this object, the key is the tag, the value is a list of host - names that are reporting that tag. + UsageCustomReportsResponse: + description: Response containing available custom reports. properties: - tags: - additionalProperties: - description: A list of additional properties for tags. - items: - description: A given tag in a list. - example: test.metric.host - type: string - type: array - description: A list of tags to apply to the host. - type: object + data: + description: An array of available custom reports. + items: + $ref: '#/components/schemas/UsageCustomReportsData' + type: array + meta: + $ref: '#/components/schemas/UsageCustomReportsMeta' type: object - UsageAnalyzedLogsHour: - description: The number of analyzed logs for each hour for a given organization. + UsageDBMHour: + description: Database Monitoring usage for a given organization for a given + hour. properties: - analyzed_logs: - description: Contains the number of analyzed logs. + dbm_host_count: + description: "The total number of Database Monitoring host hours from the + start of the given hour\u2019s month until the given hour." + format: int64 + nullable: true + type: integer + dbm_queries_count: + description: "The total number of normalized Database Monitoring queries + from the start of the given hour\u2019s month until the given hour." format: int64 nullable: true type: integer @@ -6246,550 +17579,396 @@ components: description: The organization public ID. type: string type: object - UsageAnalyzedLogsResponse: - description: A response containing the number of analyzed logs for each hour + UsageDBMResponse: + description: Response containing the Database Monitoring usage for each hour for a given organization. properties: usage: - description: Get hourly usage for analyzed logs. + description: Get hourly usage for Database Monitoring items: - $ref: '#/components/schemas/UsageAnalyzedLogsHour' + $ref: '#/components/schemas/UsageDBMHour' type: array type: object - UsageAttributionAggregates: - description: An array of available aggregates. - items: - $ref: '#/components/schemas/UsageAttributionAggregatesBody' - type: array - UsageAttributionAggregatesBody: - description: The object containing the aggregates. - properties: - agg_type: - description: The aggregate type. - example: sum - type: string - field: - description: The field. - example: custom_timeseries_usage - type: string - value: - description: The value for a given field. - format: double - type: number - type: object - UsageAttributionBody: - description: Usage Summary by tag for a given organization. + UsageFargateHour: + description: Number of Fargate tasks run and hourly usage. properties: - month: - description: 'Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM].' + apm_fargate_count: + description: The high-water mark of APM ECS Fargate tasks during the given + hour. + format: int64 + nullable: true + type: integer + appsec_fargate_count: + description: The Application Security Monitoring ECS Fargate tasks during + the given hour. + format: int64 + nullable: true + type: integer + avg_profiled_fargate_tasks: + description: The average profiled task count for Fargate Profiling. + format: int64 + nullable: true + type: integer + hour: + description: The hour for the usage. format: date-time type: string org_name: - description: The name of the organization. + description: The organization name. type: string public_id: description: The organization public ID. type: string - tag_config_source: - description: The source of the usage attribution tag configuration and the - selected tags in the format `::://////`. - type: string - tags: - $ref: '#/components/schemas/UsageAttributionTagNames' - updated_at: - description: Shows the the most recent hour in the current months for all - organizations for which all usages were calculated. - type: string - values: - $ref: '#/components/schemas/UsageAttributionValues' + tasks_count: + description: The number of Fargate tasks run. + format: int64 + nullable: true + type: integer type: object - UsageAttributionLimit: - default: 5000 - description: Maximum number of records to be returned. - format: int64 - type: integer - UsageAttributionMetadata: - description: The object containing document metadata. + UsageFargateResponse: + description: Response containing the number of Fargate tasks run and hourly + usage. properties: - aggregates: - $ref: '#/components/schemas/UsageAttributionAggregates' - pagination: - $ref: '#/components/schemas/UsageAttributionPagination' + usage: + description: Array with the number of hourly Fargate tasks recorded for + a given organization. + items: + $ref: '#/components/schemas/UsageFargateHour' + type: array type: object - UsageAttributionOffset: - default: 0 - description: Number of records to skip before beginning to return. - format: int64 - type: integer - UsageAttributionPagination: - description: The metadata for the current pagination. + UsageHostHour: + description: Number of hosts/containers recorded for each hour for a given organization. properties: - limit: - description: Maximum amount of records to be returned. + agent_host_count: + description: 'Contains the total number of infrastructure hosts reporting + + during a given hour that were running the Datadog Agent.' + format: int64 + nullable: true + type: integer + alibaba_host_count: + description: 'Contains the total number of hosts that reported through Alibaba + integration + + (and were NOT running the Datadog Agent).' + format: int64 + nullable: true + type: integer + apm_azure_app_service_host_count: + description: Contains the total number of Azure App Services hosts using + APM. + format: int64 + nullable: true + type: integer + apm_host_count: + description: 'Shows the total number of hosts using APM during the hour, + + these are counted as billable (except during trial periods).' + format: int64 + nullable: true + type: integer + aws_host_count: + description: 'Contains the total number of hosts that reported through the + AWS integration + + (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer - offset: - description: Records to be skipped before beginning to return. + azure_host_count: + description: 'Contains the total number of hosts that reported through Azure + integration + + (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer - sort_direction: - description: Direction to sort by. - type: string - sort_name: - description: Field to sort by. - type: string - total_number_of_records: - description: Total number of records. + container_count: + description: Shows the total number of containers reported by the Docker + integration during the hour. format: int64 + nullable: true type: integer - type: object - UsageAttributionResponse: - description: Response containing the Usage Summary by tag(s). - properties: - metadata: - $ref: '#/components/schemas/UsageAttributionMetadata' - usage: - description: Get usage summary by tag(s). - items: - $ref: '#/components/schemas/UsageAttributionBody' - type: array - type: object - UsageAttributionSort: - default: custom_timeseries_usage - description: The field to sort by. - enum: - - api_percentage - - snmp_usage - - apm_host_usage - - api_usage - - appsec_usage - - appsec_percentage - - container_usage - - custom_timeseries_percentage - - container_percentage - - apm_host_percentage - - npm_host_percentage - - browser_percentage - - browser_usage - - infra_host_percentage - - snmp_percentage - - npm_host_usage - - infra_host_usage - - custom_timeseries_usage - - lambda_functions_usage - - lambda_functions_percentage - - lambda_invocations_usage - - lambda_invocations_percentage - - estimated_indexed_logs_usage - - estimated_indexed_logs_percentage - - estimated_ingested_logs_usage - - estimated_ingested_logs_percentage - - estimated_indexed_spans_usage - - estimated_indexed_spans_percentage - - estimated_ingested_spans_usage - - estimated_ingested_spans_percentage - - apm_fargate_usage - - apm_fargate_percentage - - appsec_fargate_usage - - appsec_fargate_percentage - - estimated_rum_usage_attribution_usage - - estimated_rum_usage_attribution_percentage - type: string - x-enum-varnames: - - API_PERCENTAGE - - SNMP_USAGE - - APM_HOST_USAGE - - API_USAGE - - APPSEC_USAGE - - APPSEC_PERCENTAGE - - CONTAINER_USAGE - - CUSTOM_TIMESERIES_PERCENTAGE - - CONTAINER_PERCENTAGE - - APM_HOST_PERCENTAGE - - NPM_HOST_PERCENTAGE - - BROWSER_PERCENTAGE - - BROWSER_USAGE - - INFRA_HOST_PERCENTAGE - - SNMP_PERCENTAGE - - NPM_HOST_USAGE - - INFRA_HOST_USAGE - - CUSTOM_TIMESERIES_USAGE - - LAMBDA_FUNCTIONS_USAGE - - LAMBDA_FUNCTIONS_PERCENTAGE - - LAMBDA_INVOCATIONS_USAGE - - LAMBDA_INVOCATIONS_PERCENTAGE - - ESTIMATED_INDEXED_LOGS_USAGE - - ESTIMATED_INDEXED_LOGS_PERCENTAGE - - ESTIMATED_INGESTED_LOGS_USAGE - - ESTIMATED_INGESTED_LOGS_PERCENTAGE - - ESTIMATED_INDEXED_SPANS_USAGE - - ESTIMATED_INDEXED_SPANS_PERCENTAGE - - ESTIMATED_INGESTED_SPANS_USAGE - - ESTIMATED_INGESTED_SPANS_PERCENTAGE - - APM_FARGATE_USAGE - - APM_FARGATE_PERCENTAGE - - APPSEC_FARGATE_USAGE - - APPSEC_FARGATE_PERCENTAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE - UsageAttributionSupportedMetrics: - description: Supported fields for usage attribution requests (valid requests - contain one or more metrics, or `*` for all). - enum: - - custom_timeseries_usage - - container_usage - - snmp_percentage - - apm_host_usage - - browser_usage - - npm_host_percentage - - infra_host_usage - - custom_timeseries_percentage - - container_percentage - - api_usage - - apm_host_percentage - - infra_host_percentage - - snmp_usage - - browser_percentage - - api_percentage - - npm_host_usage - - lambda_functions_usage - - lambda_functions_percentage - - lambda_invocations_usage - - lambda_invocations_percentage - - fargate_usage - - fargate_percentage - - profiled_host_usage - - profiled_host_percentage - - profiled_container_usage - - profiled_container_percentage - - dbm_hosts_usage - - dbm_hosts_percentage - - dbm_queries_usage - - dbm_queries_percentage - - estimated_indexed_logs_usage - - estimated_indexed_logs_percentage - - estimated_ingested_logs_usage - - estimated_ingested_logs_percentage - - appsec_usage - - appsec_percentage - - estimated_indexed_spans_usage - - estimated_indexed_spans_percentage - - estimated_ingested_spans_usage - - estimated_ingested_spans_percentage - - apm_fargate_usage - - apm_fargate_percentage - - appsec_fargate_usage - - appsec_fargate_percentage - - estimated_rum_usage_attribution_usage - - estimated_rum_usage_attribution_percentage - - '*' - type: string - x-enum-varnames: - - CUSTOM_TIMESERIES_USAGE - - CONTAINER_USAGE - - SNMP_PERCENTAGE - - APM_HOST_USAGE - - BROWSER_USAGE - - NPM_HOST_PERCENTAGE - - INFRA_HOST_USAGE - - CUSTOM_TIMESERIES_PERCENTAGE - - CONTAINER_PERCENTAGE - - API_USAGE - - APM_HOST_PERCENTAGE - - INFRA_HOST_PERCENTAGE - - SNMP_USAGE - - BROWSER_PERCENTAGE - - API_PERCENTAGE - - NPM_HOST_USAGE - - LAMBDA_FUNCTIONS_USAGE - - LAMBDA_FUNCTIONS_PERCENTAGE - - LAMBDA_INVOCATIONS_USAGE - - LAMBDA_INVOCATIONS_PERCENTAGE - - FARGATE_USAGE - - FARGATE_PERCENTAGE - - PROFILED_HOST_USAGE - - PROFILED_HOST_PERCENTAGE - - PROFILED_CONTAINER_USAGE - - PROFILED_CONTAINER_PERCENTAGE - - DBM_HOSTS_USAGE - - DBM_HOSTS_PERCENTAGE - - DBM_QUERIES_USAGE - - DBM_QUERIES_PERCENTAGE - - ESTIMATED_INDEXED_LOGS_USAGE - - ESTIMATED_INDEXED_LOGS_PERCENTAGE - - ESTIMATED_INGESTED_LOGS_USAGE - - ESTIMATED_INGESTED_LOGS_PERCENTAGE - - APPSEC_USAGE - - APPSEC_PERCENTAGE - - ESTIMATED_INDEXED_SPANS_USAGE - - ESTIMATED_INDEXED_SPANS_PERCENTAGE - - ESTIMATED_INGESTED_SPANS_USAGE - - ESTIMATED_INGESTED_SPANS_PERCENTAGE - - APM_FARGATE_USAGE - - APM_FARGATE_PERCENTAGE - - APPSEC_FARGATE_USAGE - - APPSEC_FARGATE_PERCENTAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE - - ALL - UsageAttributionTagNames: - additionalProperties: - description: 'A list of values that are associated with each tag key. - - - - An empty list means the resource use wasn''t tagged with the respective - tag. - - - Multiple values means the respective tag was applied multiple times on - the resource. - - - An `` value means the resource was tagged with the respective tag - but did not have a value.' - items: - description: A given tag in a list. - example: datadog-integrations-lab - type: string - type: array - description: 'Tag keys and values. + gcp_host_count: + description: 'Contains the total number of hosts that reported through the + Google Cloud integration + (and were NOT running the Datadog Agent).' + format: int64 + nullable: true + type: integer + heroku_host_count: + description: Contains the total number of Heroku dynos reported by the Datadog + Agent. + format: int64 + nullable: true + type: integer + host_count: + description: 'Contains the total number of billable infrastructure hosts + reporting during a given hour. - A `null` value here means that the requested tag breakdown cannot be applied - because it does not match the [tags + This is the sum of `agent_host_count`, `aws_host_count`, and `gcp_host_count`.' + format: int64 + nullable: true + type: integer + hour: + description: The hour for the usage. + format: date-time + nullable: true + type: string + infra_azure_app_service: + description: 'Contains the total number of hosts that reported through the + Azure App Services integration - configured for usage attribution](https://docs.datadoghq.com/account_management/billing/usage_attribution/#getting-started). + (and were NOT running the Datadog Agent).' + format: int64 + nullable: true + type: integer + opentelemetry_apm_host_count: + description: Contains the total number of hosts using APM reported by Datadog + exporter for the OpenTelemetry Collector. + format: int64 + nullable: true + type: integer + opentelemetry_host_count: + description: Contains the total number of hosts reported by Datadog exporter + for the OpenTelemetry Collector. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + vsphere_host_count: + description: 'Contains the total number of hosts that reported through vSphere + integration - In this scenario the API returns the total usage, not broken down by tags.' - nullable: true + (and were NOT running the Datadog Agent).' + format: int64 + nullable: true + type: integer type: object - UsageAttributionValues: - description: Fields in Usage Summary by tag(s). - properties: - api_percentage: - description: The percentage of synthetic API test usage by tag(s). - format: double - type: number - api_usage: - description: The synthetic API test usage by tag(s). - format: double - type: number - apm_fargate_percentage: - description: The percentage of APM ECS Fargate task usage by tag(s). - format: double - type: number - apm_fargate_usage: - description: The APM ECS Fargate task usage by tag(s). - format: double - type: number - apm_host_percentage: - description: The percentage of APM host usage by tag(s). - format: double - type: number - apm_host_usage: - description: The APM host usage by tag(s). - format: double - type: number - appsec_fargate_percentage: - description: The percentage of Application Security Monitoring ECS Fargate - task usage by tag(s). - format: double - type: number - appsec_fargate_usage: - description: The Application Security Monitoring ECS Fargate task usage - by tag(s). - format: double - type: number - appsec_percentage: - description: The percentage of Application Security Monitoring host usage - by tag(s). - format: double - type: number - appsec_usage: - description: The Application Security Monitoring host usage by tag(s). - format: double - type: number - browser_percentage: - description: The percentage of synthetic browser test usage by tag(s). - format: double - type: number - browser_usage: - description: The synthetic browser test usage by tag(s). - format: double - type: number - container_percentage: - description: The percentage of container usage by tag(s). - format: double - type: number - container_usage: - description: The container usage by tag(s). - format: double - type: number - cspm_container_percentage: - description: The percentage of Cloud Security Management Pro container usage - by tag(s) - format: double - type: number - cspm_container_usage: - description: The Cloud Security Management Pro container usage by tag(s) - format: double - type: number - cspm_host_percentage: - description: The percentage of Cloud Security Management Pro host usage - by tag(s) - format: double - type: number - cspm_host_usage: - description: The Cloud Security Management Pro host usage by tag(s) - format: double - type: number - custom_timeseries_percentage: - description: The percentage of custom metrics usage by tag(s). - format: double - type: number - custom_timeseries_usage: - description: The custom metrics usage by tag(s). - format: double - type: number - cws_container_percentage: - description: The percentage of Cloud Workload Security container usage by - tag(s) - format: double - type: number - cws_container_usage: - description: The Cloud Workload Security container usage by tag(s) - format: double - type: number - cws_host_percentage: - description: The percentage of Cloud Workload Security host usage by tag(s) - format: double - type: number - cws_host_usage: - description: The Cloud Workload Security host usage by tag(s) - format: double - type: number - dbm_hosts_percentage: - description: The percentage of Database Monitoring host usage by tag(s). - format: double - type: number - dbm_hosts_usage: - description: The Database Monitoring host usage by tag(s). - format: double - type: number - dbm_queries_percentage: - description: The percentage of Database Monitoring normalized queries usage - by tag(s). - format: double - type: number - dbm_queries_usage: - description: The Database Monitoring normalized queries usage by tag(s). - format: double - type: number - estimated_indexed_logs_percentage: - description: The percentage of estimated live indexed logs usage by tag(s). - format: double - type: number - estimated_indexed_logs_usage: - description: The estimated live indexed logs usage by tag(s). - format: double - type: number - estimated_indexed_spans_percentage: - description: The percentage of estimated indexed spans usage by tag(s). - format: double - type: number - estimated_indexed_spans_usage: - description: The estimated indexed spans usage by tag(s). - format: double - type: number - estimated_ingested_logs_percentage: - description: The percentage of estimated live ingested logs usage by tag(s). - format: double - type: number - estimated_ingested_logs_usage: - description: The estimated live ingested logs usage by tag(s). - format: double - type: number - estimated_ingested_spans_percentage: - description: The percentage of estimated ingested spans usage by tag(s). - format: double - type: number - estimated_ingested_spans_usage: - description: The estimated ingested spans usage by tag(s). - format: double - type: number - estimated_rum_sessions_percentage: - description: The percentage of estimated rum sessions usage by tag(s). - format: double - type: number - estimated_rum_sessions_usage: - description: The estimated rum sessions usage by tag(s). - format: double - type: number - infra_host_percentage: - description: The percentage of infrastructure host usage by tag(s). - format: double - type: number - infra_host_usage: - description: The infrastructure host usage by tag(s). - format: double - type: number - lambda_functions_percentage: - description: The percentage of Lambda function usage by tag(s). - format: double - type: number - lambda_functions_usage: - description: The Lambda function usage by tag(s). - format: double - type: number - lambda_invocations_percentage: - description: The percentage of Lambda invocation usage by tag(s). - format: double - type: number - lambda_invocations_usage: - description: The Lambda invocation usage by tag(s). - format: double - type: number - npm_host_percentage: - description: The percentage of network host usage by tag(s). - format: double - type: number - npm_host_usage: - description: The network host usage by tag(s). - format: double - type: number - profiled_container_percentage: - description: The percentage of profiled containers usage by tag(s). - format: double - type: number - profiled_container_usage: - description: The profiled container usage by tag(s). - format: double - type: number - profiled_hosts_percentage: - description: The percentage of profiled hosts usage by tag(s). - format: double - type: number - profiled_hosts_usage: - description: The profiled host usage by tag(s). - format: double - type: number - snmp_percentage: - description: The percentage of network device usage by tag(s). - format: double - type: number - snmp_usage: - description: The network device usage by tag(s). - format: double - type: number + UsageHostsResponse: + description: Host usage response. + properties: + usage: + description: An array of objects related to host usage. + items: + $ref: '#/components/schemas/UsageHostHour' + type: array type: object - UsageAuditLogsHour: - description: Audit logs usage for a given organization for a given hour. + UsageIncidentManagementHour: + description: Incident management usage for a given organization for a given + hour. properties: hour: description: The hour for the usage. format: date-time type: string - lines_indexed: - description: The total number of audit logs lines indexed during a given + monthly_active_users: + description: Contains the total number monthly active users from the start + of the given hour's month until the given hour. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageIncidentManagementResponse: + description: Response containing the incident management usage for each hour + for a given organization. + properties: + usage: + description: Get hourly usage for incident management. + items: + $ref: '#/components/schemas/UsageIncidentManagementHour' + type: array + type: object + UsageIndexedSpansHour: + description: The hours of indexed spans usage. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + indexed_events_count: + description: Contains the number of spans indexed. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageIndexedSpansResponse: + description: A response containing indexed spans usage. + properties: + usage: + description: Array with the number of hourly traces indexed for a given + organization. + items: + $ref: '#/components/schemas/UsageIndexedSpansHour' + type: array + type: object + UsageIngestedSpansHour: + description: Ingested spans usage for a given organization for a given hour. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + ingested_events_bytes: + description: Contains the total number of bytes ingested for APM spans during + a given hour. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageIngestedSpansResponse: + description: Response containing the ingested spans usage for each hour for + a given organization. + properties: + usage: + description: Get hourly usage for ingested spans. + items: + $ref: '#/components/schemas/UsageIngestedSpansHour' + type: array + type: object + UsageIoTHour: + description: IoT usage for a given organization for a given hour. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + iot_device_count: + description: The total number of IoT devices during a given hour. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageIoTResponse: + description: Response containing the IoT usage for each hour for a given organization. + properties: + usage: + description: Get hourly usage for IoT. + items: + $ref: '#/components/schemas/UsageIoTHour' + type: array + type: object + UsageLambdaHour: + description: 'Number of lambda functions and sum of the invocations of all lambda + functions + + for each hour for a given organization.' + properties: + func_count: + description: Contains the number of different functions for each region + and AWS account. + format: int64 + nullable: true + type: integer + hour: + description: The hour for the usage. + format: date-time + type: string + invocations_sum: + description: Contains the sum of invocations of all functions. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageLambdaResponse: + description: 'Response containing the number of lambda functions and sum of + the invocations of all lambda functions + + for each hour for a given organization.' + properties: + usage: + description: Get hourly usage for Lambda. + items: + $ref: '#/components/schemas/UsageLambdaHour' + type: array + type: object + UsageLogsByIndexHour: + description: Number of indexed logs for each hour and index for a given organization. + properties: + event_count: + description: The total number of indexed logs for the queried hour. + format: int64 + type: integer + hour: + description: The hour for the usage. + format: date-time + type: string + index_id: + description: The index ID for this usage. + type: string + index_name: + description: The user specified name for this index ID. + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + retention: + description: The retention period (in days) for this index ID. + format: int64 + type: integer + type: object + UsageLogsByIndexResponse: + description: Response containing the number of indexed logs for each hour and + index for a given organization. + properties: + usage: + description: An array of objects regarding hourly usage of logs by index + response. + items: + $ref: '#/components/schemas/UsageLogsByIndexHour' + type: array + type: object + UsageLogsByRetentionHour: + description: The number of indexed logs for each hour for a given organization + broken down by retention period. + properties: + indexed_events_count: + description: Total logs indexed with this retention period during a given + hour. + format: int64 + nullable: true + type: integer + live_indexed_events_count: + description: Live logs indexed with this retention period during a given hour. format: int64 nullable: true @@ -6800,61 +17979,79 @@ components: public_id: description: The organization public ID. type: string + rehydrated_indexed_events_count: + description: Rehydrated logs indexed with this retention period during a + given hour. + format: int64 + nullable: true + type: integer + retention: + description: The retention period in days or "custom" for all custom retention + usage. + nullable: true + type: string type: object - UsageAuditLogsResponse: - description: Response containing the audit logs usage for each hour for a given - organization. + UsageLogsByRetentionResponse: + description: Response containing the indexed logs usage broken down by retention + period for an organization during a given hour. properties: usage: - description: Get hourly usage for audit logs. + description: Get hourly usage for indexed logs by retention period. items: - $ref: '#/components/schemas/UsageAuditLogsHour' + $ref: '#/components/schemas/UsageLogsByRetentionHour' type: array type: object - UsageBillableSummaryBody: - description: Response with properties for each aggregated usage type. + UsageLogsHour: + description: Hour usage for logs. properties: - account_billable_usage: - description: The total account usage. + billable_ingested_bytes: + description: Contains the number of billable log bytes ingested. + format: int64 + nullable: true + type: integer + hour: + description: The hour for the usage. + format: date-time + type: string + indexed_events_count: + description: Contains the number of log events indexed. + format: int64 + nullable: true + type: integer + ingested_events_bytes: + description: Contains the number of log bytes ingested. format: int64 + nullable: true type: integer - elapsed_usage_hours: - description: Elapsed usage hours for some billable product. + logs_forwarding_events_bytes: + description: Contains the number of logs forwarded bytes (data available + as of April 1st 2023) format: int64 + nullable: true type: integer - first_billable_usage_hour: - description: The first billable hour for the org. - format: date-time - type: string - last_billable_usage_hour: - description: The last billable hour for the org. - format: date-time - type: string - org_billable_usage: - description: The number of units used within the billable timeframe. + logs_live_indexed_count: + description: Contains the number of live log events indexed (data available + as of December 1, 2020). format: int64 + nullable: true type: integer - percentage_in_account: - description: The percentage of account usage the org represents. - format: double - type: number - usage_unit: - description: Units pertaining to the usage. - type: string - type: object - UsageBillableSummaryHour: - description: Response with monthly summary of data billed by Datadog. - properties: - billing_plan: - description: The billing plan. - type: string - end_date: - description: Shows the last date of usage. - format: date-time - type: string - num_orgs: - description: The number of organizations. + logs_live_ingested_bytes: + description: Contains the number of live log bytes ingested (data available + as of December 1, 2020). + format: int64 + nullable: true + type: integer + logs_rehydrated_indexed_count: + description: Contains the number of rehydrated log events indexed (data + available as of December 1, 2020). + format: int64 + nullable: true + type: integer + logs_rehydrated_ingested_bytes: + description: Contains the number of rehydrated log bytes ingested (data + available as of December 1, 2020). format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -6862,243 +18059,135 @@ components: public_id: description: The organization public ID. type: string - ratio_in_month: - description: Shows usage aggregation for a billing period. - format: double - type: number - region: - description: The region of the organization. - type: string - start_date: - description: Shows the first date of usage. - format: date-time - type: string - usage: - $ref: '#/components/schemas/UsageBillableSummaryKeys' type: object - UsageBillableSummaryKeys: - description: Response with aggregated usage types. + UsageLogsResponse: + description: Response containing the number of logs for each hour. properties: - apm_fargate_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - apm_fargate_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - apm_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - apm_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - apm_profiler_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - apm_profiler_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - apm_trace_search_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - application_security_fargate_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - application_security_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - application_security_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ci_pipeline_indexed_spans_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ci_pipeline_maximum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ci_pipeline_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ci_test_indexed_spans_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ci_testing_maximum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ci_testing_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cloud_cost_management_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cloud_cost_management_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cspm_container_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cspm_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cspm_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - custom_event_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cws_container_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cws_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - cws_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - dbm_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - dbm_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - dbm_normalized_queries_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - dbm_normalized_queries_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - fargate_container_apm_and_profiler_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - fargate_container_apm_and_profiler_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - fargate_container_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - fargate_container_profiler_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - fargate_container_profiler_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - fargate_container_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - incident_management_maximum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - incident_management_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - infra_and_apm_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - infra_and_apm_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - infra_container_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - infra_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - infra_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ingested_spans_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ingested_timeseries_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - ingested_timeseries_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - iot_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - iot_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - lambda_function_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - lambda_function_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_forwarding_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_15day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_180day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_30day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_360day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_3day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_45day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_60day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_7day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_90day_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_custom_retention_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_indexed_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - logs_ingested_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - network_device_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - network_device_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - npm_flow_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - npm_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - npm_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - observability_pipeline_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - online_archive_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - prof_container_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - prof_host_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - prof_host_top99p: - $ref: '#/components/schemas/UsageBillableSummaryBody' - rum_lite_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - rum_replay_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - rum_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - rum_units_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - sensitive_data_scanner_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - serverless_apm_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - serverless_infra_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - serverless_infra_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - serverless_invocation_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - siem_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - standard_timeseries_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - synthetics_api_tests_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - synthetics_app_testing_maximum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - synthetics_browser_checks_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' - timeseries_average: - $ref: '#/components/schemas/UsageBillableSummaryBody' - timeseries_sum: - $ref: '#/components/schemas/UsageBillableSummaryBody' + usage: + description: An array of objects regarding hourly usage of logs. + items: + $ref: '#/components/schemas/UsageLogsHour' + type: array type: object - UsageBillableSummaryResponse: - description: Response with monthly summary of data billed by Datadog. + UsageMetricCategory: + description: Contains the metric category. + enum: + - standard + - custom + type: string + x-enum-varnames: + - STANDARD + - CUSTOM + UsageNetworkFlowsHour: + description: Number of netflow events indexed for each hour for a given organization. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + indexed_events_count: + description: Contains the number of netflow events indexed. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageNetworkFlowsResponse: + description: Response containing the number of netflow events indexed for each + hour for a given organization. properties: usage: - description: An array of objects regarding usage of billable summary. + description: Get hourly usage for Network Flows. items: - $ref: '#/components/schemas/UsageBillableSummaryHour' + $ref: '#/components/schemas/UsageNetworkFlowsHour' type: array type: object - UsageCIVisibilityHour: - description: CI visibility usage in a given hour. + UsageNetworkHostsHour: + description: Number of active NPM hosts for each hour for a given organization. properties: - ci_pipeline_indexed_spans: - description: The number of spans for pipelines in the queried hour. + host_count: + description: Contains the number of active NPM hosts. format: int64 nullable: true type: integer - ci_test_indexed_spans: - description: The number of spans for tests in the queried hour. + hour: + description: The hour for the usage. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageNetworkHostsResponse: + description: Response containing the number of active NPM hosts for each hour + for a given organization. + properties: + usage: + description: Get hourly usage for NPM hosts. + items: + $ref: '#/components/schemas/UsageNetworkHostsHour' + type: array + type: object + UsageOnlineArchiveHour: + description: Online Archive usage in a given hour. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + online_archive_events_count: + description: Total count of online archived events within the hour. format: int64 nullable: true type: integer - ci_visibility_itr_committers: - description: Shows the total count of all active Git committers for Intelligent - Test Runner in the current month. A committer is active if they commit - at least 3 times in a given month. + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageOnlineArchiveResponse: + description: Online Archive usage response. + properties: + usage: + description: Response containing Online Archive usage. + items: + $ref: '#/components/schemas/UsageOnlineArchiveHour' + type: array + type: object + UsageProfilingHour: + description: The number of profiled hosts for each hour for a given organization. + properties: + aas_count: + description: Contains the total number of profiled Azure app services reporting + during a given hour. format: int64 nullable: true type: integer - ci_visibility_pipeline_committers: - description: Shows the total count of all active Git committers for Pipelines - in the current month. A committer is active if they commit at least 3 - times in a given month. + avg_container_agent_count: + description: Get average number of container agents for that hour. format: int64 nullable: true type: integer - ci_visibility_test_committers: - description: The total count of all active Git committers for tests in the - current month. A committer is active if they commit at least 3 times in - a given month. + host_count: + description: Contains the total number of profiled hosts reporting during + a given hour. format: int64 nullable: true type: integer + hour: + description: The hour for the usage. + format: date-time + type: string org_name: description: The organization name. type: string @@ -7106,28 +18195,134 @@ components: description: The organization public ID. type: string type: object - UsageCIVisibilityResponse: - description: CI visibility usage response + UsageProfilingResponse: + description: Response containing the number of profiled hosts for each hour + for a given organization. properties: usage: - description: Response containing CI visibility usage. + description: Get hourly usage for profiled hosts. items: - $ref: '#/components/schemas/UsageCIVisibilityHour' + $ref: '#/components/schemas/UsageProfilingHour' type: array type: object - UsageCWSHour: - description: Cloud Workload Security usage for a given organization for a given + UsageReportsType: + default: reports + description: The type of reports. + enum: + - reports + example: reports + type: string + x-enum-varnames: + - REPORTS + UsageRumSessionsHour: + description: Number of RUM Sessions recorded for each hour for a given organization. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + replay_session_count: + description: Contains the number of RUM Replay Sessions (data available + beginning November 1, 2021). + format: int64 + type: integer + session_count: + description: Contains the number of browser RUM Lite Sessions. + format: int64 + nullable: true + type: integer + session_count_android: + description: Contains the number of mobile RUM Sessions on Android (data + available beginning December 1, 2020). + format: int64 + nullable: true + type: integer + session_count_flutter: + description: Contains the number of mobile RUM Sessions on Flutter (data + available beginning March 1, 2023). + format: int64 + nullable: true + type: integer + session_count_ios: + description: Contains the number of mobile RUM Sessions on iOS (data available + beginning December 1, 2020). + format: int64 + nullable: true + type: integer + session_count_reactnative: + description: Contains the number of mobile RUM Sessions on React Native + (data available beginning May 1, 2022). + format: int64 + nullable: true + type: integer + type: object + UsageRumSessionsResponse: + description: Response containing the number of RUM Sessions for each hour for + a given organization. + properties: + usage: + description: Get hourly usage for RUM Sessions. + items: + $ref: '#/components/schemas/UsageRumSessionsHour' + type: array + type: object + UsageRumUnitsHour: + description: Number of RUM Units used for each hour for a given organization + (data available as of November 1, 2021). + properties: + browser_rum_units: + description: The number of browser RUM units. + format: int64 + nullable: true + type: integer + mobile_rum_units: + description: The number of mobile RUM units. + format: int64 + nullable: true + type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + rum_units: + description: Total RUM units across mobile and browser RUM. + format: int64 + nullable: true + type: integer + type: object + UsageRumUnitsResponse: + description: Response containing the number of RUM Units for each hour for a + given organization. + properties: + usage: + description: Get hourly usage for RUM Units. + items: + $ref: '#/components/schemas/UsageRumUnitsHour' + type: array + type: object + UsageSDSHour: + description: Sensitive Data Scanner usage for a given organization for a given hour. properties: - cws_container_count: - description: "The total number of Cloud Workload Security container hours - from the start of the given hour\u2019s month until the given hour." + apm_scanned_bytes: + description: "The total number of bytes scanned of APM usage across all + usage types by the Sensitive Data Scanner from the start of the given + hour\u2019s month until the given hour." format: int64 nullable: true type: integer - cws_host_count: - description: "The total number of Cloud Workload Security host hours from - the start of the given hour\u2019s month until the given hour." + events_scanned_bytes: + description: "The total number of bytes scanned of Events usage across all + usage types by the Sensitive Data Scanner from the start of the given + hour\u2019s month until the given hour." format: int64 nullable: true type: integer @@ -7135,69 +18330,47 @@ components: description: The hour for the usage. format: date-time type: string + logs_scanned_bytes: + description: "The total number of bytes scanned of logs usage by the Sensitive + Data Scanner from the start of the given hour\u2019s month until the given + hour." + format: int64 + nullable: true + type: integer org_name: description: The organization name. type: string public_id: description: The organization public ID. type: string + rum_scanned_bytes: + description: "The total number of bytes scanned of RUM usage across all + usage types by the Sensitive Data Scanner from the start of the given + hour\u2019s month until the given hour." + format: int64 + nullable: true + type: integer + total_scanned_bytes: + description: "The total number of bytes scanned across all usage types by + the Sensitive Data Scanner from the start of the given hour\u2019s month + until the given hour." + format: int64 + nullable: true + type: integer type: object - UsageCWSResponse: - description: Response containing the Cloud Workload Security usage for each - hour for a given organization. + UsageSDSResponse: + description: Response containing the Sensitive Data Scanner usage for each hour + for a given organization. properties: usage: - description: Get hourly usage for Cloud Workload Security. + description: Get hourly usage for Sensitive Data Scanner. items: - $ref: '#/components/schemas/UsageCWSHour' + $ref: '#/components/schemas/UsageSDSHour' type: array type: object - UsageCloudSecurityPostureManagementHour: - description: Cloud Security Management Pro usage for a given organization for - a given hour. + UsageSNMPHour: + description: The number of SNMP devices for each hour for a given organization. properties: - aas_host_count: - description: The number of Cloud Security Management Pro Azure app services - hosts during a given hour. - format: double - nullable: true - type: number - aws_host_count: - description: The number of Cloud Security Management Pro AWS hosts during - a given hour. - format: double - nullable: true - type: number - azure_host_count: - description: The number of Cloud Security Management Pro Azure hosts during - a given hour. - format: double - nullable: true - type: number - compliance_host_count: - description: The number of Cloud Security Management Pro hosts during a - given hour. - format: double - nullable: true - type: number - container_count: - description: The total number of Cloud Security Management Pro containers - during a given hour. - format: double - nullable: true - type: number - gcp_host_count: - description: The number of Cloud Security Management Pro GCP hosts during - a given hour. - format: double - nullable: true - type: number - host_count: - description: The total number of Cloud Security Management Pro hosts during - a given hour. - format: double - nullable: true - type: number hour: description: The hour for the usage. format: date-time @@ -7208,1044 +18381,669 @@ components: public_id: description: The organization public ID. type: string + snmp_devices: + description: Contains the number of SNMP devices. + format: int64 + nullable: true + type: integer type: object - UsageCloudSecurityPostureManagementResponse: - description: The response containing the Cloud Security Management Pro usage - for each hour for a given organization. + UsageSNMPResponse: + description: Response containing the number of SNMP devices for each hour for + a given organization. properties: usage: - description: Get hourly usage for Cloud Security Management Pro. + description: Get hourly usage for SNMP devices. items: - $ref: '#/components/schemas/UsageCloudSecurityPostureManagementHour' + $ref: '#/components/schemas/UsageSNMPHour' type: array type: object - UsageCustomReportsAttributes: - description: The response containing attributes for custom reports. + UsageSort: + default: start_date + description: The field to sort by. + enum: + - computed_on + - size + - start_date + - end_date + type: string + x-enum-varnames: + - COMPUTED_ON + - SIZE + - START_DATE + - END_DATE + UsageSortDirection: + default: desc + description: The direction to sort by. + enum: + - desc + - asc + type: string + x-enum-varnames: + - DESC + - ASC + UsageSpecifiedCustomReportsAttributes: + description: The response containing attributes for specified custom reports. properties: computed_on: description: The date the specified custom report was computed. type: string end_date: - description: The ending date of custom report. + description: The ending date of specified custom report. + type: string + location: + description: A downloadable file for the specified custom reporting file. + example: https://an-s3-or-gs-bucket.s3.amazonaws.com type: string size: description: size format: int64 type: integer - start_date: - description: The starting date of custom report. - type: string - tags: - description: A list of tags to apply to custom reports. - items: - description: A given tag in a list. - example: env - type: string - type: array - type: object - UsageCustomReportsData: - description: The response containing the date and type for custom reports. - properties: - attributes: - $ref: '#/components/schemas/UsageCustomReportsAttributes' - id: - description: The date for specified custom reports. - type: string - type: - $ref: '#/components/schemas/UsageReportsType' - type: object - UsageCustomReportsMeta: - description: The object containing document metadata. - properties: - page: - $ref: '#/components/schemas/UsageCustomReportsPage' - type: object - UsageCustomReportsPage: - description: The object containing page total count. - properties: - total_count: - description: Total page count. + start_date: + description: The starting date of specified custom report. + type: string + tags: + description: A list of tags to apply to specified custom reports. + items: + description: A given tag in a list. + example: env + type: string + type: array + type: object + UsageSpecifiedCustomReportsData: + description: Response containing date and type for specified custom reports. + properties: + attributes: + $ref: '#/components/schemas/UsageSpecifiedCustomReportsAttributes' + id: + description: The date for specified custom reports. + type: string + type: + $ref: '#/components/schemas/UsageReportsType' + type: object + UsageSpecifiedCustomReportsMeta: + description: The object containing document metadata. + properties: + page: + $ref: '#/components/schemas/UsageSpecifiedCustomReportsPage' + type: object + UsageSpecifiedCustomReportsPage: + description: The object containing page total count for specified ID. + properties: + total_count: + description: Total page count. + format: int64 + type: integer + type: object + UsageSpecifiedCustomReportsResponse: + description: Returns available specified custom reports. + properties: + data: + $ref: '#/components/schemas/UsageSpecifiedCustomReportsData' + meta: + $ref: '#/components/schemas/UsageSpecifiedCustomReportsMeta' + type: object + UsageSummaryDate: + description: Response with hourly report of all data billed by Datadog all organizations. + properties: + agent_host_top99p: + description: Shows the 99th percentile of all agent hosts over all hours + in the current date for all organizations. + format: int64 + type: integer + apm_azure_app_service_host_top99p: + description: Shows the 99th percentile of all Azure app services using APM + over all hours in the current date all organizations. + format: int64 + type: integer + apm_fargate_count_avg: + description: Shows the average of all APM ECS Fargate tasks over all hours + in the current date for all organizations. + format: int64 + type: integer + apm_host_top99p: + description: Shows the 99th percentile of all distinct APM hosts over all + hours in the current date for all organizations. + format: int64 + type: integer + appsec_fargate_count_avg: + description: Shows the average of all Application Security Monitoring ECS + Fargate tasks over all hours in the current date for all organizations. + format: int64 + type: integer + audit_logs_lines_indexed_sum: + deprecated: true + description: Shows the sum of audit logs lines indexed over all hours in + the current date for all organizations. + format: int64 + type: integer + audit_trail_enabled_hwm: + description: Shows the number of organizations that had Audit Trail enabled + in the current date. + format: int64 + type: integer + avg_profiled_fargate_tasks: + description: The average profiled task count for Fargate Profiling. + format: int64 + type: integer + aws_host_top99p: + description: Shows the 99th percentile of all AWS hosts over all hours in + the current date for all organizations. + format: int64 + type: integer + aws_lambda_func_count: + description: Shows the average of the number of functions that executed + 1 or more times each hour in the current date for all organizations. + format: int64 + type: integer + aws_lambda_invocations_sum: + description: Shows the sum of all AWS Lambda invocations over all hours + in the current date for all organizations. + format: int64 + type: integer + azure_app_service_top99p: + description: Shows the 99th percentile of all Azure app services over all + hours in the current date for all organizations. + format: int64 + type: integer + billable_ingested_bytes_sum: + description: Shows the sum of all log bytes ingested over all hours in the + current date for all organizations. + format: int64 + type: integer + browser_rum_lite_session_count_sum: + description: Shows the sum of all browser lite sessions over all hours in + the current date for all organizations. + format: int64 + type: integer + browser_rum_replay_session_count_sum: + description: Shows the sum of all browser replay sessions over all hours + in the current date for all organizations. + format: int64 + type: integer + browser_rum_units_sum: + description: Shows the sum of all browser RUM units over all hours in the + current date for all organizations. + format: int64 + type: integer + ci_pipeline_indexed_spans_sum: + description: Shows the sum of all CI pipeline indexed spans over all hours + in the current month for all organizations. + format: int64 + type: integer + ci_test_indexed_spans_sum: + description: Shows the sum of all CI test indexed spans over all hours in + the current month for all organizations. + format: int64 + type: integer + ci_visibility_itr_committers_hwm: + description: Shows the high-water mark of all CI visibility intelligent + test runner committers over all hours in the current month for all organizations. format: int64 type: integer - type: object - UsageCustomReportsResponse: - description: Response containing available custom reports. - properties: - data: - description: An array of available custom reports. - items: - $ref: '#/components/schemas/UsageCustomReportsData' - type: array - meta: - $ref: '#/components/schemas/UsageCustomReportsMeta' - type: object - UsageDBMHour: - description: Database Monitoring usage for a given organization for a given - hour. - properties: - dbm_host_count: - description: "The total number of Database Monitoring host hours from the - start of the given hour\u2019s month until the given hour." + ci_visibility_pipeline_committers_hwm: + description: Shows the high-water mark of all CI visibility pipeline committers + over all hours in the current month for all organizations. format: int64 - nullable: true type: integer - dbm_queries_count: - description: "The total number of normalized Database Monitoring queries - from the start of the given hour\u2019s month until the given hour." + ci_visibility_test_committers_hwm: + description: Shows the high-water mark of all CI visibility test committers + over all hours in the current month for all organizations. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageDBMResponse: - description: Response containing the Database Monitoring usage for each hour - for a given organization. - properties: - usage: - description: Get hourly usage for Database Monitoring - items: - $ref: '#/components/schemas/UsageDBMHour' - type: array - type: object - UsageFargateHour: - description: Number of Fargate tasks run and hourly usage. - properties: - apm_fargate_count: - description: The high-water mark of APM ECS Fargate tasks during the given - hour. + cloud_cost_management_aws_host_count_avg: + description: Host count average of Cloud Cost Management for AWS for the + given date and given organization. format: int64 - nullable: true type: integer - appsec_fargate_count: - description: The Application Security Monitoring ECS Fargate tasks during - the given hour. + cloud_cost_management_azure_host_count_avg: + description: Host count average of Cloud Cost Management for Azure for the + given date and given organization. format: int64 - nullable: true type: integer - avg_profiled_fargate_tasks: - description: The average profiled task count for Fargate Profiling. + cloud_cost_management_host_count_avg: + description: Host count average of Cloud Cost Management for all cloud providers + for the given date and given organization. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - tasks_count: - description: The number of Fargate tasks run. + cloud_siem_events_sum: + description: Shows the sum of all Cloud Security Information and Event Management + events over all hours in the current date for the given org. format: int64 - nullable: true type: integer - type: object - UsageFargateResponse: - description: Response containing the number of Fargate tasks run and hourly - usage. - properties: - usage: - description: Array with the number of hourly Fargate tasks recorded for - a given organization. - items: - $ref: '#/components/schemas/UsageFargateHour' - type: array - type: object - UsageHostHour: - description: Number of hosts/containers recorded for each hour for a given organization. - properties: - agent_host_count: - description: 'Contains the total number of infrastructure hosts reporting - - during a given hour that were running the Datadog Agent.' + container_avg: + description: Shows the average of all distinct containers over all hours + in the current date for all organizations. format: int64 - nullable: true type: integer - alibaba_host_count: - description: 'Contains the total number of hosts that reported through Alibaba - integration - - (and were NOT running the Datadog Agent).' + container_excl_agent_avg: + description: Shows the average of containers without the Datadog Agent over + all hours in the current date for all organizations. format: int64 - nullable: true type: integer - apm_azure_app_service_host_count: - description: Contains the total number of Azure App Services hosts using - APM. + container_hwm: + description: Shows the high-water mark of all distinct containers over all + hours in the current date for all organizations. format: int64 - nullable: true type: integer - apm_host_count: - description: 'Shows the total number of hosts using APM during the hour, - - these are counted as billable (except during trial periods).' + csm_container_enterprise_compliance_count_sum: + description: Shows the sum of all Cloud Security Management Enterprise compliance + containers over all hours in the current date for the given org. format: int64 - nullable: true type: integer - aws_host_count: - description: 'Contains the total number of hosts that reported through the - AWS integration - - (and were NOT running the Datadog Agent).' + csm_container_enterprise_cws_count_sum: + description: Shows the sum of all Cloud Security Management Enterprise Cloud + Workload Security containers over all hours in the current date for the + given org. format: int64 - nullable: true type: integer - azure_host_count: - description: 'Contains the total number of hosts that reported through Azure - integration - - (and were NOT running the Datadog Agent).' + csm_container_enterprise_total_count_sum: + description: Shows the sum of all Cloud Security Management Enterprise containers + over all hours in the current date for the given org. format: int64 - nullable: true type: integer - container_count: - description: Shows the total number of containers reported by the Docker - integration during the hour. + csm_host_enterprise_aas_host_count_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise Azure app services hosts over all hours in the current date + for the given org. format: int64 - nullable: true type: integer - gcp_host_count: - description: 'Contains the total number of hosts that reported through the - Google Cloud integration - - (and were NOT running the Datadog Agent).' + csm_host_enterprise_aws_host_count_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise AWS hosts over all hours in the current date for the given + org. format: int64 - nullable: true type: integer - heroku_host_count: - description: Contains the total number of Heroku dynos reported by the Datadog - Agent. + csm_host_enterprise_azure_host_count_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise Azure hosts over all hours in the current date for the given + org. + format: int64 + type: integer + csm_host_enterprise_compliance_host_count_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise compliance hosts over all hours in the current date for the + given org. + format: int64 + type: integer + csm_host_enterprise_cws_host_count_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise Cloud Workload Security hosts over all hours in the current + date for the given org. + format: int64 + type: integer + csm_host_enterprise_gcp_host_count_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise GCP hosts over all hours in the current date for the given + org. + format: int64 + type: integer + csm_host_enterprise_total_host_count_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise hosts over all hours in the current date for the given org. + format: int64 + type: integer + cspm_aas_host_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Pro Azure app services hosts over all hours in the current date for all + organizations. + format: int64 + type: integer + cspm_aws_host_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Pro AWS hosts over all hours in the current date for all organizations. + format: int64 + type: integer + cspm_azure_host_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Pro Azure hosts over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - host_count: - description: 'Contains the total number of billable infrastructure hosts - reporting during a given hour. - - This is the sum of `agent_host_count`, `aws_host_count`, and `gcp_host_count`.' + cspm_container_avg: + description: Shows the average number of Cloud Security Management Pro containers + over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - nullable: true - type: string - infra_azure_app_service: - description: 'Contains the total number of hosts that reported through the - Azure App Services integration - - (and were NOT running the Datadog Agent).' + cspm_container_hwm: + description: Shows the high-water mark of Cloud Security Management Pro + containers over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - opentelemetry_apm_host_count: - description: Contains the total number of hosts using APM reported by Datadog - exporter for the OpenTelemetry Collector. + cspm_gcp_host_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Pro GCP hosts over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - opentelemetry_host_count: - description: Contains the total number of hosts reported by Datadog exporter - for the OpenTelemetry Collector. + cspm_host_top99p: + description: Shows the 99th percentile of all Cloud Security Management + Pro hosts over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - vsphere_host_count: - description: 'Contains the total number of hosts that reported through vSphere - integration - - (and were NOT running the Datadog Agent).' + custom_ts_avg: + description: Shows the average number of distinct custom metrics over all + hours in the current date for all organizations. format: int64 - nullable: true type: integer - type: object - UsageHostsResponse: - description: Host usage response. - properties: - usage: - description: An array of objects related to host usage. - items: - $ref: '#/components/schemas/UsageHostHour' - type: array - type: object - UsageIncidentManagementHour: - description: Incident management usage for a given organization for a given - hour. - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - monthly_active_users: - description: Contains the total number monthly active users from the start - of the given hour's month until the given hour. + cws_container_count_avg: + description: Shows the average of all distinct Cloud Workload Security containers + over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageIncidentManagementResponse: - description: Response containing the incident management usage for each hour - for a given organization. - properties: - usage: - description: Get hourly usage for incident management. - items: - $ref: '#/components/schemas/UsageIncidentManagementHour' - type: array - type: object - UsageIndexedSpansHour: - description: The hours of indexed spans usage. - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - indexed_events_count: - description: Contains the number of spans indexed. + cws_host_top99p: + description: Shows the 99th percentile of all Cloud Workload Security hosts + over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageIndexedSpansResponse: - description: A response containing indexed spans usage. - properties: - usage: - description: Array with the number of hourly traces indexed for a given - organization. - items: - $ref: '#/components/schemas/UsageIndexedSpansHour' - type: array - type: object - UsageIngestedSpansHour: - description: Ingested spans usage for a given organization for a given hour. - properties: - hour: - description: The hour for the usage. + date: + description: The date for the usage. format: date-time type: string - ingested_events_bytes: - description: Contains the total number of bytes ingested for APM spans during - a given hour. + dbm_host_top99p: + description: Shows the 99th percentile of all Database Monitoring hosts + over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageIngestedSpansResponse: - description: Response containing the ingested spans usage for each hour for - a given organization. - properties: - usage: - description: Get hourly usage for ingested spans. - items: - $ref: '#/components/schemas/UsageIngestedSpansHour' - type: array - type: object - UsageIoTHour: - description: IoT usage for a given organization for a given hour. - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - iot_device_count: - description: The total number of IoT devices during a given hour. + dbm_queries_count_avg: + description: Shows the average of all normalized Database Monitoring queries + over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageIoTResponse: - description: Response containing the IoT usage for each hour for a given organization. - properties: - usage: - description: Get hourly usage for IoT. - items: - $ref: '#/components/schemas/UsageIoTHour' - type: array - type: object - UsageLambdaHour: - description: 'Number of lambda functions and sum of the invocations of all lambda - functions - - for each hour for a given organization.' - properties: - func_count: - description: Contains the number of different functions for each region - and AWS account. + fargate_tasks_count_avg: + description: Shows the high-watermark of all Fargate tasks over all hours + in the current date for all organizations. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - invocations_sum: - description: Contains the sum of invocations of all functions. + fargate_tasks_count_hwm: + description: Shows the average of all Fargate tasks over all hours in the + current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageLambdaResponse: - description: 'Response containing the number of lambda functions and sum of - the invocations of all lambda functions - - for each hour for a given organization.' - properties: - usage: - description: Get hourly usage for Lambda. - items: - $ref: '#/components/schemas/UsageLambdaHour' - type: array - type: object - UsageLogsByIndexHour: - description: Number of indexed logs for each hour and index for a given organization. - properties: - event_count: - description: The total number of indexed logs for the queried hour. + forwarding_events_bytes_sum: + description: Shows the sum of all log bytes forwarded over all hours in + the current date for all organizations. format: int64 type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - index_id: - description: The index ID for this usage. - type: string - index_name: - description: The user specified name for this index ID. - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - retention: - description: The retention period (in days) for this index ID. + gcp_host_top99p: + description: Shows the 99th percentile of all GCP hosts over all hours in + the current date for all organizations. format: int64 type: integer - type: object - UsageLogsByIndexResponse: - description: Response containing the number of indexed logs for each hour and - index for a given organization. - properties: - usage: - description: An array of objects regarding hourly usage of logs by index - response. - items: - $ref: '#/components/schemas/UsageLogsByIndexHour' - type: array - type: object - UsageLogsByRetentionHour: - description: The number of indexed logs for each hour for a given organization - broken down by retention period. - properties: - indexed_events_count: - description: Total logs indexed with this retention period during a given - hour. + heroku_host_top99p: + description: Shows the 99th percentile of all Heroku dynos over all hours + in the current date for all organizations. format: int64 - nullable: true type: integer - live_indexed_events_count: - description: Live logs indexed with this retention period during a given - hour. + incident_management_monthly_active_users_hwm: + description: Shows the high-water mark of incident management monthly active + users over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - rehydrated_indexed_events_count: - description: Rehydrated logs indexed with this retention period during a - given hour. + indexed_events_count_sum: + description: Shows the sum of all log events indexed over all hours in the + current date for all organizations. format: int64 - nullable: true type: integer - retention: - description: The retention period in days or "custom" for all custom retention - usage. - nullable: true - type: string - type: object - UsageLogsByRetentionResponse: - description: Response containing the indexed logs usage broken down by retention - period for an organization during a given hour. - properties: - usage: - description: Get hourly usage for indexed logs by retention period. - items: - $ref: '#/components/schemas/UsageLogsByRetentionHour' - type: array - type: object - UsageLogsHour: - description: Hour usage for logs. - properties: - billable_ingested_bytes: - description: Contains the number of billable log bytes ingested. + infra_host_top99p: + description: Shows the 99th percentile of all distinct infrastructure hosts + over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - indexed_events_count: - description: Contains the number of log events indexed. + ingested_events_bytes_sum: + description: Shows the sum of all log bytes ingested over all hours in the + current date for all organizations. format: int64 - nullable: true type: integer - ingested_events_bytes: - description: Contains the number of log bytes ingested. + iot_device_sum: + description: Shows the sum of all IoT devices over all hours in the current + date for all organizations. format: int64 - nullable: true type: integer - logs_forwarding_events_bytes: - description: Contains the number of logs forwarded bytes (data available - as of April 1st 2023) + iot_device_top99p: + description: Shows the 99th percentile of all IoT devices over all hours + in the current date all organizations. format: int64 - nullable: true type: integer - logs_live_indexed_count: - description: Contains the number of live log events indexed (data available - as of December 1, 2020). + mobile_rum_lite_session_count_sum: + description: Shows the sum of all mobile lite sessions over all hours in + the current date for all organizations. format: int64 - nullable: true type: integer - logs_live_ingested_bytes: - description: Contains the number of live log bytes ingested (data available - as of December 1, 2020). + mobile_rum_session_count_android_sum: + description: Shows the sum of all mobile RUM Sessions on Android over all + hours in the current date for all organizations. format: int64 - nullable: true type: integer - logs_rehydrated_indexed_count: - description: Contains the number of rehydrated log events indexed (data - available as of December 1, 2020). + mobile_rum_session_count_flutter_sum: + description: Shows the sum of all mobile RUM Sessions on Flutter over all + hours in the current date for all organizations. format: int64 - nullable: true type: integer - logs_rehydrated_ingested_bytes: - description: Contains the number of rehydrated log bytes ingested (data - available as of December 1, 2020). + mobile_rum_session_count_ios_sum: + description: Shows the sum of all mobile RUM Sessions on iOS over all hours + in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageLogsResponse: - description: Response containing the number of logs for each hour. - properties: - usage: - description: An array of objects regarding hourly usage of logs. - items: - $ref: '#/components/schemas/UsageLogsHour' - type: array - type: object - UsageMetricCategory: - description: Contains the metric category. - enum: - - standard - - custom - type: string - x-enum-varnames: - - STANDARD - - CUSTOM - UsageNetworkFlowsHour: - description: Number of netflow events indexed for each hour for a given organization. - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - indexed_events_count: - description: Contains the number of netflow events indexed. + mobile_rum_session_count_reactnative_sum: + description: Shows the sum of all mobile RUM Sessions on React Native over + all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageNetworkFlowsResponse: - description: Response containing the number of netflow events indexed for each - hour for a given organization. - properties: - usage: - description: Get hourly usage for Network Flows. - items: - $ref: '#/components/schemas/UsageNetworkFlowsHour' - type: array - type: object - UsageNetworkHostsHour: - description: Number of active NPM hosts for each hour for a given organization. - properties: - host_count: - description: Contains the number of active NPM hosts. + mobile_rum_session_count_roku_sum: + description: Shows the sum of all mobile RUM Sessions on Roku over all hours + in the current date for all organizations. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageNetworkHostsResponse: - description: Response containing the number of active NPM hosts for each hour - for a given organization. - properties: - usage: - description: Get hourly usage for NPM hosts. - items: - $ref: '#/components/schemas/UsageNetworkHostsHour' - type: array - type: object - UsageOnlineArchiveHour: - description: Online Archive usage in a given hour. - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - online_archive_events_count: - description: Total count of online archived events within the hour. + mobile_rum_session_count_sum: + description: Shows the sum of all mobile RUM Sessions over all hours in + the current date for all organizations format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageOnlineArchiveResponse: - description: Online Archive usage response. - properties: - usage: - description: Response containing Online Archive usage. - items: - $ref: '#/components/schemas/UsageOnlineArchiveHour' - type: array - type: object - UsageProfilingHour: - description: The number of profiled hosts for each hour for a given organization. - properties: - aas_count: - description: Contains the total number of profiled Azure app services reporting - during a given hour. + mobile_rum_units_sum: + description: Shows the sum of all mobile RUM units over all hours in the + current date for all organizations. + format: int64 + type: integer + ndm_netflow_events_sum: + description: Shows the sum of all Network Device Monitoring NetFlow events + over all hours in the current date for the given org. + format: int64 + type: integer + netflow_indexed_events_count_sum: + description: Shows the sum of all Network flows indexed over all hours in + the current date for all organizations. + format: int64 + type: integer + npm_host_top99p: + description: Shows the 99th percentile of all distinct Networks hosts over + all hours in the current date for all organizations. format: int64 - nullable: true type: integer - avg_container_agent_count: - description: Get average number of container agents for that hour. + observability_pipelines_bytes_processed_sum: + description: Sum of all observability pipelines bytes processed over all + hours in the current date for the given org. format: int64 - nullable: true type: integer - host_count: - description: Contains the total number of profiled hosts reporting during - a given hour. + online_archive_events_count_sum: + description: Sum of all online archived events over all hours in the current + date for all organizations. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageProfilingResponse: - description: Response containing the number of profiled hosts for each hour - for a given organization. - properties: - usage: - description: Get hourly usage for profiled hosts. + opentelemetry_apm_host_top99p: + description: Shows the 99th percentile of APM hosts reported by the Datadog + exporter for the OpenTelemetry Collector over all hours in the current + date for all organizations. + format: int64 + type: integer + opentelemetry_host_top99p: + description: Shows the 99th percentile of all hosts reported by the Datadog + exporter for the OpenTelemetry Collector over all hours in the current + date for all organizations. + format: int64 + type: integer + orgs: + description: Organizations associated with a user. items: - $ref: '#/components/schemas/UsageProfilingHour' + $ref: '#/components/schemas/UsageSummaryDateOrg' type: array - type: object - UsageReportsType: - default: reports - description: The type of reports. - enum: - - reports - example: reports - type: string - x-enum-varnames: - - REPORTS - UsageRumSessionsHour: - description: Number of RUM Sessions recorded for each hour for a given organization. - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - replay_session_count: - description: Contains the number of RUM Replay Sessions (data available - beginning November 1, 2021). + profiling_aas_count_top99p: + description: Shows the 99th percentile of all profiled Azure app services + over all hours in the current date for all organizations. format: int64 type: integer - session_count: - description: Contains the number of browser RUM Lite Sessions. + profiling_host_top99p: + description: Shows the 99th percentile of all profiled hosts over all hours + in the current date for all organizations. format: int64 - nullable: true type: integer - session_count_android: - description: Contains the number of mobile RUM Sessions on Android (data - available beginning December 1, 2020). + rum_browser_and_mobile_session_count: + description: Shows the sum of all mobile sessions and all browser lite and + legacy sessions over all hours in the current month for all organizations. format: int64 - nullable: true type: integer - session_count_flutter: - description: Contains the number of mobile RUM Sessions on Flutter (data - available beginning March 1, 2023). + rum_session_count_sum: + description: Shows the sum of all browser RUM Lite Sessions over all hours + in the current date for all organizations format: int64 - nullable: true type: integer - session_count_ios: - description: Contains the number of mobile RUM Sessions on iOS (data available - beginning December 1, 2020). + rum_total_session_count_sum: + description: Shows the sum of RUM Sessions (browser and mobile) over all + hours in the current date for all organizations. format: int64 - nullable: true type: integer - session_count_reactnative: - description: Contains the number of mobile RUM Sessions on React Native - (data available beginning May 1, 2022). + rum_units_sum: + description: Shows the sum of all browser and mobile RUM units over all + hours in the current date for all organizations. format: int64 - nullable: true type: integer - type: object - UsageRumSessionsResponse: - description: Response containing the number of RUM Sessions for each hour for - a given organization. - properties: - usage: - description: Get hourly usage for RUM Sessions. - items: - $ref: '#/components/schemas/UsageRumSessionsHour' - type: array - type: object - UsageRumUnitsHour: - description: Number of RUM Units used for each hour for a given organization - (data available as of November 1, 2021). - properties: - browser_rum_units: - description: The number of browser RUM units. + sds_apm_scanned_bytes_sum: + description: Sum of all APM bytes scanned with sensitive data scanner over + all hours in the current date for all organizations. format: int64 - nullable: true type: integer - mobile_rum_units: - description: The number of mobile RUM units. + sds_events_scanned_bytes_sum: + description: Sum of all event stream events bytes scanned with sensitive + data scanner over all hours in the current date for all organizations. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - rum_units: - description: Total RUM units across mobile and browser RUM. + sds_logs_scanned_bytes_sum: + description: Shows the sum of all bytes scanned of logs usage by the Sensitive + Data Scanner over all hours in the current month for all organizations. format: int64 - nullable: true type: integer - type: object - UsageRumUnitsResponse: - description: Response containing the number of RUM Units for each hour for a - given organization. - properties: - usage: - description: Get hourly usage for RUM Units. - items: - $ref: '#/components/schemas/UsageRumUnitsHour' - type: array - type: object - UsageSDSHour: - description: Sensitive Data Scanner usage for a given organization for a given - hour. - properties: - apm_scanned_bytes: - description: "The total number of bytes scanned of APM usage across all - usage types by the Sensitive Data Scanner from the start of the given - hour\u2019s month until the given hour." + sds_rum_scanned_bytes_sum: + description: Sum of all RUM bytes scanned with sensitive data scanner over + all hours in the current date for all organizations. format: int64 - nullable: true type: integer - events_scanned_bytes: - description: "The total number of bytes scanned of Events usage across all - usage types by the Sensitive Data Scanner from the start of the given - hour\u2019s month until the given hour." + sds_total_scanned_bytes_sum: + description: Shows the sum of all bytes scanned across all usage types by + the Sensitive Data Scanner over all hours in the current month for all + organizations. format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - logs_scanned_bytes: - description: "The total number of bytes scanned of logs usage by the Sensitive - Data Scanner from the start of the given hour\u2019s month until the given - hour." + serverless_apps_azure_count_avg: + description: Shows the average of the number of Serverless Apps for Azure + for the given date and given org. format: int64 - nullable: true type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - rum_scanned_bytes: - description: "The total number of bytes scanned of RUM usage across all - usage types by the Sensitive Data Scanner from the start of the given - hour\u2019s month until the given hour." + serverless_apps_google_count_avg: + description: Shows the average of the number of Serverless Apps for Google + Cloud for the given date and given org. format: int64 - nullable: true type: integer - total_scanned_bytes: - description: "The total number of bytes scanned across all usage types by - the Sensitive Data Scanner from the start of the given hour\u2019s month - until the given hour." + serverless_apps_total_count_avg: + description: Shows the average of the number of Serverless Apps for Azure + and Google Cloud for the given date and given org. format: int64 - nullable: true type: integer - type: object - UsageSDSResponse: - description: Response containing the Sensitive Data Scanner usage for each hour - for a given organization. - properties: - usage: - description: Get hourly usage for Sensitive Data Scanner. - items: - $ref: '#/components/schemas/UsageSDSHour' - type: array - type: object - UsageSNMPHour: - description: The number of SNMP devices for each hour for a given organization. - properties: - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - snmp_devices: - description: Contains the number of SNMP devices. + synthetics_browser_check_calls_count_sum: + description: Shows the sum of all Synthetic browser tests over all hours + in the current date for all organizations. + format: int64 + type: integer + synthetics_check_calls_count_sum: + description: Shows the sum of all Synthetic API tests over all hours in + the current date for all organizations. + format: int64 + type: integer + synthetics_mobile_test_runs_sum: + description: Shows the sum of all Synthetic mobile application tests over + all hours in the current date for all organizations. format: int64 - nullable: true type: integer - type: object - UsageSNMPResponse: - description: Response containing the number of SNMP devices for each hour for - a given organization. - properties: - usage: - description: Get hourly usage for SNMP devices. - items: - $ref: '#/components/schemas/UsageSNMPHour' - type: array - type: object - UsageSort: - default: start_date - description: The field to sort by. - enum: - - computed_on - - size - - start_date - - end_date - type: string - x-enum-varnames: - - COMPUTED_ON - - SIZE - - START_DATE - - END_DATE - UsageSortDirection: - default: desc - description: The direction to sort by. - enum: - - desc - - asc - type: string - x-enum-varnames: - - DESC - - ASC - UsageSpecifiedCustomReportsAttributes: - description: The response containing attributes for specified custom reports. - properties: - computed_on: - description: The date the specified custom report was computed. - type: string - end_date: - description: The ending date of specified custom report. - type: string - location: - description: A downloadable file for the specified custom reporting file. - example: https://an-s3-or-gs-bucket.s3.amazonaws.com - type: string - size: - description: size + synthetics_parallel_testing_max_slots_hwm: + description: Shows the high-water mark of used synthetics parallel testing + slots over all hours in the current date for all organizations. format: int64 type: integer - start_date: - description: The starting date of specified custom report. - type: string - tags: - description: A list of tags to apply to specified custom reports. - items: - description: A given tag in a list. - example: env - type: string - type: array - type: object - UsageSpecifiedCustomReportsData: - description: Response containing date and type for specified custom reports. - properties: - attributes: - $ref: '#/components/schemas/UsageSpecifiedCustomReportsAttributes' - id: - description: The date for specified custom reports. - type: string - type: - $ref: '#/components/schemas/UsageReportsType' - type: object - UsageSpecifiedCustomReportsMeta: - description: The object containing document metadata. - properties: - page: - $ref: '#/components/schemas/UsageSpecifiedCustomReportsPage' - type: object - UsageSpecifiedCustomReportsPage: - description: The object containing page total count for specified ID. - properties: - total_count: - description: Total page count. + trace_search_indexed_events_count_sum: + description: Shows the sum of all Indexed Spans indexed over all hours in + the current date for all organizations. + format: int64 + type: integer + twol_ingested_events_bytes_sum: + description: Shows the sum of all ingested APM span bytes over all hours + in the current date for all organizations. + format: int64 + type: integer + universal_service_monitoring_host_top99p: + description: Shows the 99th percentile of all universal service management + hosts over all hours in the current date for the given org. + format: int64 + type: integer + vsphere_host_top99p: + description: Shows the 99th percentile of all vSphere hosts over all hours + in the current date for all organizations. + format: int64 + type: integer + vuln_management_host_count_top99p: + description: Shows the 99th percentile of all Application Vulnerability + Management hosts over all hours in the current date for the given org. + format: int64 + type: integer + workflow_executions_usage_sum: + description: Sum of all workflows executed over all hours in the current + date for all organizations. format: int64 type: integer type: object - UsageSpecifiedCustomReportsResponse: - description: Returns available specified custom reports. - properties: - data: - $ref: '#/components/schemas/UsageSpecifiedCustomReportsData' - meta: - $ref: '#/components/schemas/UsageSpecifiedCustomReportsMeta' - type: object - UsageSummaryDate: - description: Response with hourly report of all data billed by Datadog all organizations. + UsageSummaryDateOrg: + description: Global hourly report of all data billed by Datadog for a given + organization. properties: agent_host_top99p: description: Shows the 99th percentile of all agent hosts over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer apm_azure_app_service_host_top99p: description: Shows the 99th percentile of all Azure app services using APM - over all hours in the current date all organizations. + over all hours in the current date for the given org. format: int64 type: integer apm_fargate_count_avg: description: Shows the average of all APM ECS Fargate tasks over all hours - in the current date for all organizations. + in the current months for the given org. format: int64 type: integer apm_host_top99p: description: Shows the 99th percentile of all distinct APM hosts over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer appsec_fargate_count_avg: description: Shows the average of all Application Security Monitoring ECS - Fargate tasks over all hours in the current date for all organizations. + Fargate tasks over all hours in the current months for the given org. format: int64 type: integer audit_logs_lines_indexed_sum: deprecated: true - description: Shows the sum of audit logs lines indexed over all hours in - the current date for all organizations. + description: Shows the sum of all audit logs lines indexed over all hours + in the current date for the given org. format: int64 type: integer audit_trail_enabled_hwm: - description: Shows the number of organizations that had Audit Trail enabled - in the current date. + description: Shows whether Audit Trail is enabled for the current date for + the given org. format: int64 type: integer avg_profiled_fargate_tasks: @@ -8254,82 +19052,83 @@ components: type: integer aws_host_top99p: description: Shows the 99th percentile of all AWS hosts over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer aws_lambda_func_count: - description: Shows the average of the number of functions that executed - 1 or more times each hour in the current date for all organizations. + description: Shows the sum of all AWS Lambda invocations over all hours + in the current date for the given org. format: int64 type: integer aws_lambda_invocations_sum: description: Shows the sum of all AWS Lambda invocations over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer azure_app_service_top99p: description: Shows the 99th percentile of all Azure app services over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer billable_ingested_bytes_sum: description: Shows the sum of all log bytes ingested over all hours in the - current date for all organizations. + current date for the given org. format: int64 type: integer browser_rum_lite_session_count_sum: description: Shows the sum of all browser lite sessions over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer browser_rum_replay_session_count_sum: description: Shows the sum of all browser replay sessions over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer browser_rum_units_sum: description: Shows the sum of all browser RUM units over all hours in the - current date for all organizations. + current date for the given org. format: int64 type: integer ci_pipeline_indexed_spans_sum: description: Shows the sum of all CI pipeline indexed spans over all hours - in the current month for all organizations. + in the current date for the given org. format: int64 type: integer ci_test_indexed_spans_sum: description: Shows the sum of all CI test indexed spans over all hours in - the current month for all organizations. + the current date for the given org. format: int64 type: integer ci_visibility_itr_committers_hwm: description: Shows the high-water mark of all CI visibility intelligent - test runner committers over all hours in the current month for all organizations. + test runner committers over all hours in the current date for the given + org. format: int64 type: integer ci_visibility_pipeline_committers_hwm: description: Shows the high-water mark of all CI visibility pipeline committers - over all hours in the current month for all organizations. + over all hours in the current date for the given org. format: int64 type: integer ci_visibility_test_committers_hwm: description: Shows the high-water mark of all CI visibility test committers - over all hours in the current month for all organizations. + over all hours in the current date for the given org. format: int64 type: integer cloud_cost_management_aws_host_count_avg: description: Host count average of Cloud Cost Management for AWS for the - given date and given organization. + given date and given org. format: int64 type: integer cloud_cost_management_azure_host_count_avg: description: Host count average of Cloud Cost Management for Azure for the - given date and given organization. + given date and given org. format: int64 type: integer cloud_cost_management_host_count_avg: description: Host count average of Cloud Cost Management for all cloud providers - for the given date and given organization. + for the given date and given org. format: int64 type: integer cloud_siem_events_sum: @@ -8339,17 +19138,17 @@ components: type: integer container_avg: description: Shows the average of all distinct containers over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer container_excl_agent_avg: description: Shows the average of containers without the Datadog Agent over - all hours in the current date for all organizations. + all hours in the current date for the given organization. format: int64 type: integer container_hwm: description: Shows the high-water mark of all distinct containers over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer csm_container_enterprise_compliance_count_sum: @@ -8411,164 +19210,175 @@ components: type: integer cspm_aas_host_top99p: description: Shows the 99th percentile of all Cloud Security Management - Pro Azure app services hosts over all hours in the current date for all - organizations. + Pro Azure app services hosts over all hours in the current date for the + given org. format: int64 type: integer cspm_aws_host_top99p: description: Shows the 99th percentile of all Cloud Security Management - Pro AWS hosts over all hours in the current date for all organizations. + Pro AWS hosts over all hours in the current date for the given org. format: int64 type: integer cspm_azure_host_top99p: description: Shows the 99th percentile of all Cloud Security Management - Pro Azure hosts over all hours in the current date for all organizations. + Pro Azure hosts over all hours in the current date for the given org. format: int64 type: integer cspm_container_avg: description: Shows the average number of Cloud Security Management Pro containers - over all hours in the current date for all organizations. + over all hours in the current date for the given org. format: int64 type: integer cspm_container_hwm: description: Shows the high-water mark of Cloud Security Management Pro - containers over all hours in the current date for all organizations. + containers over all hours in the current date for the given org. format: int64 type: integer cspm_gcp_host_top99p: description: Shows the 99th percentile of all Cloud Security Management - Pro GCP hosts over all hours in the current date for all organizations. + Pro GCP hosts over all hours in the current date for the given org. format: int64 type: integer cspm_host_top99p: description: Shows the 99th percentile of all Cloud Security Management - Pro hosts over all hours in the current date for all organizations. + Pro hosts over all hours in the current date for the given org. + format: int64 + type: integer + custom_historical_ts_avg: + description: Shows the average number of distinct historical custom metrics + over all hours in the current date for the given org. + format: int64 + type: integer + custom_live_ts_avg: + description: Shows the average number of distinct live custom metrics over + all hours in the current date for the given org. format: int64 type: integer custom_ts_avg: description: Shows the average number of distinct custom metrics over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer cws_container_count_avg: description: Shows the average of all distinct Cloud Workload Security containers - over all hours in the current date for all organizations. + over all hours in the current date for the given org. format: int64 type: integer cws_host_top99p: description: Shows the 99th percentile of all Cloud Workload Security hosts - over all hours in the current date for all organizations. + over all hours in the current date for the given org. format: int64 type: integer - date: - description: The date for the usage. - format: date-time - type: string - dbm_host_top99p: + dbm_host_top99p_sum: description: Shows the 99th percentile of all Database Monitoring hosts - over all hours in the current date for all organizations. + over all hours in the current month for the given org. format: int64 type: integer - dbm_queries_count_avg: - description: Shows the average of all normalized Database Monitoring queries - over all hours in the current date for all organizations. + dbm_queries_avg_sum: + description: Shows the average of all distinct Database Monitoring normalized + queries over all hours in the current month for the given org. format: int64 type: integer fargate_tasks_count_avg: - description: Shows the high-watermark of all Fargate tasks over all hours - in the current date for all organizations. + description: The average task count for Fargate. format: int64 type: integer fargate_tasks_count_hwm: - description: Shows the average of all Fargate tasks over all hours in the - current date for all organizations. + description: Shows the high-water mark of all Fargate tasks over all hours + in the current date for the given org. format: int64 type: integer forwarding_events_bytes_sum: description: Shows the sum of all log bytes forwarded over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer gcp_host_top99p: description: Shows the 99th percentile of all GCP hosts over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer heroku_host_top99p: description: Shows the 99th percentile of all Heroku dynos over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer + id: + description: The organization id. + type: string incident_management_monthly_active_users_hwm: description: Shows the high-water mark of incident management monthly active - users over all hours in the current date for all organizations. + users over all hours in the current date for the given org. format: int64 type: integer indexed_events_count_sum: description: Shows the sum of all log events indexed over all hours in the - current date for all organizations. + current date for the given org. format: int64 type: integer infra_host_top99p: description: Shows the 99th percentile of all distinct infrastructure hosts - over all hours in the current date for all organizations. + over all hours in the current date for the given org. format: int64 type: integer ingested_events_bytes_sum: description: Shows the sum of all log bytes ingested over all hours in the - current date for all organizations. + current date for the given org. format: int64 type: integer - iot_device_sum: + iot_device_agg_sum: description: Shows the sum of all IoT devices over all hours in the current - date for all organizations. + date for the given org. format: int64 type: integer - iot_device_top99p: + iot_device_top99p_sum: description: Shows the 99th percentile of all IoT devices over all hours - in the current date all organizations. + in the current date for the given org. format: int64 type: integer mobile_rum_lite_session_count_sum: description: Shows the sum of all mobile lite sessions over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer mobile_rum_session_count_android_sum: description: Shows the sum of all mobile RUM Sessions on Android over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer mobile_rum_session_count_flutter_sum: description: Shows the sum of all mobile RUM Sessions on Flutter over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer mobile_rum_session_count_ios_sum: description: Shows the sum of all mobile RUM Sessions on iOS over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer mobile_rum_session_count_reactnative_sum: description: Shows the sum of all mobile RUM Sessions on React Native over - all hours in the current date for all organizations. + all hours in the current date for the given org. format: int64 type: integer mobile_rum_session_count_roku_sum: description: Shows the sum of all mobile RUM Sessions on Roku over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer mobile_rum_session_count_sum: description: Shows the sum of all mobile RUM Sessions over all hours in - the current date for all organizations + the current date for the given org. format: int64 type: integer mobile_rum_units_sum: description: Shows the sum of all mobile RUM units over all hours in the - current date for all organizations. + current date for the given org. format: int64 type: integer + name: + description: The organization name. + type: string ndm_netflow_events_sum: description: Shows the sum of all Network Device Monitoring NetFlow events over all hours in the current date for the given org. @@ -8576,12 +19386,12 @@ components: type: integer netflow_indexed_events_count_sum: description: Shows the sum of all Network flows indexed over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer npm_host_top99p: description: Shows the 99th percentile of all distinct Networks hosts over - all hours in the current date for all organizations. + all hours in the current date for the given org. format: int64 type: integer observability_pipelines_bytes_processed_sum: @@ -8591,26 +19401,21 @@ components: type: integer online_archive_events_count_sum: description: Sum of all online archived events over all hours in the current - date for all organizations. + date for the given org. format: int64 type: integer opentelemetry_apm_host_top99p: description: Shows the 99th percentile of APM hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current - date for all organizations. + date for the given org. format: int64 type: integer opentelemetry_host_top99p: description: Shows the 99th percentile of all hosts reported by the Datadog exporter for the OpenTelemetry Collector over all hours in the current - date for all organizations. + date for the given org. format: int64 type: integer - orgs: - description: Organizations associated with a user. - items: - $ref: '#/components/schemas/UsageSummaryDateOrg' - type: array profiling_aas_count_top99p: description: Shows the 99th percentile of all profiled Azure app services over all hours in the current date for all organizations. @@ -8618,53 +19423,59 @@ components: type: integer profiling_host_top99p: description: Shows the 99th percentile of all profiled hosts over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer + public_id: + description: The organization public id. + type: string + region: + description: The region of the organization. + type: string rum_browser_and_mobile_session_count: description: Shows the sum of all mobile sessions and all browser lite and - legacy sessions over all hours in the current month for all organizations. + legacy sessions over all hours in the current date for the given org. format: int64 type: integer rum_session_count_sum: description: Shows the sum of all browser RUM Lite Sessions over all hours - in the current date for all organizations + in the current date for the given org. format: int64 type: integer rum_total_session_count_sum: description: Shows the sum of RUM Sessions (browser and mobile) over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer rum_units_sum: description: Shows the sum of all browser and mobile RUM units over all - hours in the current date for all organizations. + hours in the current date for the given org. format: int64 type: integer sds_apm_scanned_bytes_sum: description: Sum of all APM bytes scanned with sensitive data scanner over - all hours in the current date for all organizations. + all hours in the current date for the given org. format: int64 type: integer sds_events_scanned_bytes_sum: description: Sum of all event stream events bytes scanned with sensitive - data scanner over all hours in the current date for all organizations. + data scanner over all hours in the current date for the given org. format: int64 type: integer sds_logs_scanned_bytes_sum: description: Shows the sum of all bytes scanned of logs usage by the Sensitive - Data Scanner over all hours in the current month for all organizations. + Data Scanner over all hours in the current month for the given org. format: int64 type: integer sds_rum_scanned_bytes_sum: description: Sum of all RUM bytes scanned with sensitive data scanner over - all hours in the current date for all organizations. + all hours in the current date for the given org. format: int64 type: integer sds_total_scanned_bytes_sum: description: Shows the sum of all bytes scanned across all usage types by - the Sensitive Data Scanner over all hours in the current month for all - organizations. + the Sensitive Data Scanner over all hours in the current month for the + given org. format: int64 type: integer serverless_apps_azure_count_avg: @@ -8684,42 +19495,42 @@ components: type: integer synthetics_browser_check_calls_count_sum: description: Shows the sum of all Synthetic browser tests over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer synthetics_check_calls_count_sum: description: Shows the sum of all Synthetic API tests over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer synthetics_mobile_test_runs_sum: description: Shows the sum of all Synthetic mobile application tests over - all hours in the current date for all organizations. + all hours in the current date for the given org. format: int64 type: integer synthetics_parallel_testing_max_slots_hwm: description: Shows the high-water mark of used synthetics parallel testing - slots over all hours in the current date for all organizations. + slots over all hours in the current date for the given org. format: int64 type: integer trace_search_indexed_events_count_sum: description: Shows the sum of all Indexed Spans indexed over all hours in - the current date for all organizations. + the current date for the given org. format: int64 type: integer twol_ingested_events_bytes_sum: description: Shows the sum of all ingested APM span bytes over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer universal_service_monitoring_host_top99p: - description: Shows the 99th percentile of all universal service management + description: Shows the 99th percentile of all Universal Service Monitoring hosts over all hours in the current date for the given org. format: int64 type: integer vsphere_host_top99p: description: Shows the 99th percentile of all vSphere hosts over all hours - in the current date for all organizations. + in the current date for the given org. format: int64 type: integer vuln_management_host_count_top99p: @@ -8729,1697 +19540,4727 @@ components: type: integer workflow_executions_usage_sum: description: Sum of all workflows executed over all hours in the current - date for all organizations. + date for the given org. format: int64 type: integer type: object - UsageSummaryDateOrg: - description: Global hourly report of all data billed by Datadog for a given - organization. + UsageSummaryResponse: + description: Response summarizing all usage aggregated across the months in + the request for all organizations, and broken down by month and by organization. properties: - agent_host_top99p: + agent_host_top99p_sum: description: Shows the 99th percentile of all agent hosts over all hours - in the current date for the given org. + in the current months for all organizations. format: int64 type: integer - apm_azure_app_service_host_top99p: + apm_azure_app_service_host_top99p_sum: description: Shows the 99th percentile of all Azure app services using APM - over all hours in the current date for the given org. + over all hours in the current months all organizations. format: int64 type: integer - apm_fargate_count_avg: + apm_fargate_count_avg_sum: description: Shows the average of all APM ECS Fargate tasks over all hours - in the current months for the given org. + in the current months for all organizations. format: int64 type: integer - apm_host_top99p: + apm_host_top99p_sum: description: Shows the 99th percentile of all distinct APM hosts over all - hours in the current date for the given org. + hours in the current months for all organizations. format: int64 type: integer - appsec_fargate_count_avg: + appsec_fargate_count_avg_sum: description: Shows the average of all Application Security Monitoring ECS - Fargate tasks over all hours in the current months for the given org. + Fargate tasks over all hours in the current months for all organizations. format: int64 type: integer - audit_logs_lines_indexed_sum: + audit_logs_lines_indexed_agg_sum: deprecated: true description: Shows the sum of all audit logs lines indexed over all hours - in the current date for the given org. - format: int64 - type: integer - audit_trail_enabled_hwm: - description: Shows whether Audit Trail is enabled for the current date for - the given org. - format: int64 - type: integer - avg_profiled_fargate_tasks: - description: The average profiled task count for Fargate Profiling. - format: int64 - type: integer - aws_host_top99p: - description: Shows the 99th percentile of all AWS hosts over all hours in - the current date for the given org. - format: int64 - type: integer - aws_lambda_func_count: - description: Shows the sum of all AWS Lambda invocations over all hours - in the current date for the given org. - format: int64 - type: integer - aws_lambda_invocations_sum: - description: Shows the sum of all AWS Lambda invocations over all hours - in the current date for the given org. - format: int64 - type: integer - azure_app_service_top99p: - description: Shows the 99th percentile of all Azure app services over all - hours in the current date for the given org. - format: int64 - type: integer - billable_ingested_bytes_sum: - description: Shows the sum of all log bytes ingested over all hours in the - current date for the given org. - format: int64 - type: integer - browser_rum_lite_session_count_sum: - description: Shows the sum of all browser lite sessions over all hours in - the current date for the given org. - format: int64 - type: integer - browser_rum_replay_session_count_sum: - description: Shows the sum of all browser replay sessions over all hours - in the current date for the given org. - format: int64 - type: integer - browser_rum_units_sum: - description: Shows the sum of all browser RUM units over all hours in the - current date for the given org. - format: int64 - type: integer - ci_pipeline_indexed_spans_sum: - description: Shows the sum of all CI pipeline indexed spans over all hours - in the current date for the given org. - format: int64 - type: integer - ci_test_indexed_spans_sum: - description: Shows the sum of all CI test indexed spans over all hours in - the current date for the given org. - format: int64 - type: integer - ci_visibility_itr_committers_hwm: - description: Shows the high-water mark of all CI visibility intelligent - test runner committers over all hours in the current date for the given - org. - format: int64 - type: integer - ci_visibility_pipeline_committers_hwm: - description: Shows the high-water mark of all CI visibility pipeline committers - over all hours in the current date for the given org. - format: int64 - type: integer - ci_visibility_test_committers_hwm: - description: Shows the high-water mark of all CI visibility test committers - over all hours in the current date for the given org. - format: int64 - type: integer - cloud_cost_management_aws_host_count_avg: - description: Host count average of Cloud Cost Management for AWS for the - given date and given org. - format: int64 - type: integer - cloud_cost_management_azure_host_count_avg: - description: Host count average of Cloud Cost Management for Azure for the - given date and given org. - format: int64 - type: integer - cloud_cost_management_host_count_avg: - description: Host count average of Cloud Cost Management for all cloud providers - for the given date and given org. - format: int64 - type: integer - cloud_siem_events_sum: - description: Shows the sum of all Cloud Security Information and Event Management - events over all hours in the current date for the given org. - format: int64 - type: integer - container_avg: - description: Shows the average of all distinct containers over all hours - in the current date for the given org. - format: int64 - type: integer - container_excl_agent_avg: - description: Shows the average of containers without the Datadog Agent over - all hours in the current date for the given organization. - format: int64 - type: integer - container_hwm: - description: Shows the high-water mark of all distinct containers over all - hours in the current date for the given org. - format: int64 - type: integer - csm_container_enterprise_compliance_count_sum: - description: Shows the sum of all Cloud Security Management Enterprise compliance - containers over all hours in the current date for the given org. - format: int64 - type: integer - csm_container_enterprise_cws_count_sum: - description: Shows the sum of all Cloud Security Management Enterprise Cloud - Workload Security containers over all hours in the current date for the - given org. - format: int64 - type: integer - csm_container_enterprise_total_count_sum: - description: Shows the sum of all Cloud Security Management Enterprise containers - over all hours in the current date for the given org. - format: int64 - type: integer - csm_host_enterprise_aas_host_count_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise Azure app services hosts over all hours in the current date - for the given org. + in the current months for all organizations. format: int64 type: integer - csm_host_enterprise_aws_host_count_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise AWS hosts over all hours in the current date for the given - org. + audit_trail_enabled_hwm_sum: + description: Shows the total number of organizations that had Audit Trail + enabled over a specific number of months. format: int64 type: integer - csm_host_enterprise_azure_host_count_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise Azure hosts over all hours in the current date for the given - org. + avg_profiled_fargate_tasks_sum: + description: Shows the average of all profiled Fargate tasks over all hours + in the current months for all organizations. format: int64 type: integer - csm_host_enterprise_compliance_host_count_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise compliance hosts over all hours in the current date for the - given org. + aws_host_top99p_sum: + description: Shows the 99th percentile of all AWS hosts over all hours in + the current months for all organizations. format: int64 type: integer - csm_host_enterprise_cws_host_count_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise Cloud Workload Security hosts over all hours in the current - date for the given org. + aws_lambda_func_count: + description: Shows the average of the number of functions that executed + 1 or more times each hour in the current months for all organizations. format: int64 type: integer - csm_host_enterprise_gcp_host_count_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise GCP hosts over all hours in the current date for the given - org. + aws_lambda_invocations_sum: + description: Shows the sum of all AWS Lambda invocations over all hours + in the current months for all organizations. format: int64 type: integer - csm_host_enterprise_total_host_count_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise hosts over all hours in the current date for the given org. + azure_app_service_top99p_sum: + description: Shows the 99th percentile of all Azure app services over all + hours in the current months for all organizations. format: int64 type: integer - cspm_aas_host_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Pro Azure app services hosts over all hours in the current date for the - given org. + azure_host_top99p_sum: + description: Shows the 99th percentile of all Azure hosts over all hours + in the current months for all organizations. format: int64 type: integer - cspm_aws_host_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Pro AWS hosts over all hours in the current date for the given org. + billable_ingested_bytes_agg_sum: + description: Shows the sum of all log bytes ingested over all hours in the + current months for all organizations. format: int64 type: integer - cspm_azure_host_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Pro Azure hosts over all hours in the current date for the given org. + browser_rum_lite_session_count_agg_sum: + description: Shows the sum of all browser lite sessions over all hours in + the current months for all organizations. format: int64 type: integer - cspm_container_avg: - description: Shows the average number of Cloud Security Management Pro containers - over all hours in the current date for the given org. + browser_rum_replay_session_count_agg_sum: + description: Shows the sum of all browser replay sessions over all hours + in the current months for all organizations. format: int64 type: integer - cspm_container_hwm: - description: Shows the high-water mark of Cloud Security Management Pro - containers over all hours in the current date for the given org. + browser_rum_units_agg_sum: + description: Shows the sum of all browser RUM units over all hours in the + current months for all organizations. format: int64 type: integer - cspm_gcp_host_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Pro GCP hosts over all hours in the current date for the given org. + ci_pipeline_indexed_spans_agg_sum: + description: Shows the sum of all CI pipeline indexed spans over all hours + in the current months for all organizations. format: int64 type: integer - cspm_host_top99p: - description: Shows the 99th percentile of all Cloud Security Management - Pro hosts over all hours in the current date for the given org. + ci_test_indexed_spans_agg_sum: + description: Shows the sum of all CI test indexed spans over all hours in + the current months for all organizations. format: int64 type: integer - custom_ts_avg: - description: Shows the average number of distinct custom metrics over all - hours in the current date for the given org. + ci_visibility_itr_committers_hwm_sum: + description: Shows the high-water mark of all CI visibility intelligent + test runner committers over all hours in the current months for all organizations. format: int64 type: integer - cws_container_count_avg: - description: Shows the average of all distinct Cloud Workload Security containers - over all hours in the current date for the given org. + ci_visibility_pipeline_committers_hwm_sum: + description: Shows the high-water mark of all CI visibility pipeline committers + over all hours in the current months for all organizations. format: int64 type: integer - cws_host_top99p: - description: Shows the 99th percentile of all Cloud Workload Security hosts - over all hours in the current date for the given org. + ci_visibility_test_committers_hwm_sum: + description: Shows the high-water mark of all CI visibility test committers + over all hours in the current months for all organizations. format: int64 type: integer - dbm_host_top99p_sum: - description: Shows the 99th percentile of all Database Monitoring hosts - over all hours in the current month for the given org. + cloud_cost_management_aws_host_count_avg_sum: + description: Sum of the host count average for Cloud Cost Management for + AWS. format: int64 type: integer - dbm_queries_avg_sum: - description: Shows the average of all distinct Database Monitoring normalized - queries over all hours in the current month for the given org. + cloud_cost_management_azure_host_count_avg_sum: + description: Sum of the host count average for Cloud Cost Management for + Azure. format: int64 type: integer - fargate_tasks_count_avg: - description: The average task count for Fargate. + cloud_cost_management_host_count_avg_sum: + description: Sum of the host count average for Cloud Cost Management for + all cloud providers. format: int64 type: integer - fargate_tasks_count_hwm: - description: Shows the high-water mark of all Fargate tasks over all hours - in the current date for the given org. + cloud_siem_events_agg_sum: + description: Shows the sum of all Cloud Security Information and Event Management + events over all hours in the current months for all organizations. format: int64 type: integer - forwarding_events_bytes_sum: - description: Shows the sum of all log bytes forwarded over all hours in - the current date for the given org. + container_avg_sum: + description: Shows the average of all distinct containers over all hours + in the current months for all organizations. format: int64 type: integer - gcp_host_top99p: - description: Shows the 99th percentile of all GCP hosts over all hours in - the current date for the given org. + container_excl_agent_avg_sum: + description: Shows the average of the containers without the Datadog Agent + over all hours in the current month for all organizations. format: int64 type: integer - heroku_host_top99p: - description: Shows the 99th percentile of all Heroku dynos over all hours - in the current date for the given org. + container_hwm_sum: + description: Shows the sum of the high-water marks of all distinct containers + over all hours in the current months for all organizations. format: int64 type: integer - id: - description: The organization id. - type: string - incident_management_monthly_active_users_hwm: - description: Shows the high-water mark of incident management monthly active - users over all hours in the current date for the given org. + csm_container_enterprise_compliance_count_agg_sum: + description: Shows the sum of all Cloud Security Management Enterprise compliance + containers over all hours in the current months for all organizations. format: int64 type: integer - indexed_events_count_sum: - description: Shows the sum of all log events indexed over all hours in the - current date for the given org. + csm_container_enterprise_cws_count_agg_sum: + description: Shows the sum of all Cloud Security Management Enterprise Cloud + Workload Security containers over all hours in the current months for + all organizations. format: int64 type: integer - infra_host_top99p: - description: Shows the 99th percentile of all distinct infrastructure hosts - over all hours in the current date for the given org. + csm_container_enterprise_total_count_agg_sum: + description: Shows the sum of all Cloud Security Management Enterprise containers + over all hours in the current months for all organizations. format: int64 type: integer - ingested_events_bytes_sum: - description: Shows the sum of all log bytes ingested over all hours in the - current date for the given org. + csm_host_enterprise_aas_host_count_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise Azure app services hosts over all hours in the current months + for all organizations. format: int64 type: integer - iot_device_agg_sum: - description: Shows the sum of all IoT devices over all hours in the current - date for the given org. + csm_host_enterprise_aws_host_count_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise AWS hosts over all hours in the current months for all organizations. format: int64 type: integer - iot_device_top99p_sum: - description: Shows the 99th percentile of all IoT devices over all hours - in the current date for the given org. + csm_host_enterprise_azure_host_count_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise Azure hosts over all hours in the current months for all organizations. format: int64 type: integer - mobile_rum_lite_session_count_sum: - description: Shows the sum of all mobile lite sessions over all hours in - the current date for the given org. + csm_host_enterprise_compliance_host_count_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise compliance hosts over all hours in the current months for all + organizations. format: int64 type: integer - mobile_rum_session_count_android_sum: - description: Shows the sum of all mobile RUM Sessions on Android over all - hours in the current date for the given org. + csm_host_enterprise_cws_host_count_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise Cloud Workload Security hosts over all hours in the current + months for all organizations. format: int64 type: integer - mobile_rum_session_count_flutter_sum: - description: Shows the sum of all mobile RUM Sessions on Flutter over all - hours in the current date for the given org. + csm_host_enterprise_gcp_host_count_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise GCP hosts over all hours in the current months for all organizations. format: int64 type: integer - mobile_rum_session_count_ios_sum: - description: Shows the sum of all mobile RUM Sessions on iOS over all hours - in the current date for the given org. + csm_host_enterprise_total_host_count_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Enterprise hosts over all hours in the current months for all organizations. format: int64 type: integer - mobile_rum_session_count_reactnative_sum: - description: Shows the sum of all mobile RUM Sessions on React Native over - all hours in the current date for the given org. + cspm_aas_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Pro Azure app services hosts over all hours in the current months for + all organizations. format: int64 type: integer - mobile_rum_session_count_roku_sum: - description: Shows the sum of all mobile RUM Sessions on Roku over all hours - in the current date for the given org. + cspm_aws_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Pro AWS hosts over all hours in the current months for all organizations. format: int64 type: integer - mobile_rum_session_count_sum: - description: Shows the sum of all mobile RUM Sessions over all hours in - the current date for the given org. + cspm_azure_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Pro Azure hosts over all hours in the current months for all organizations. format: int64 type: integer - mobile_rum_units_sum: - description: Shows the sum of all mobile RUM units over all hours in the - current date for the given org. + cspm_container_avg_sum: + description: Shows the average number of Cloud Security Management Pro containers + over all hours in the current months for all organizations. format: int64 type: integer - name: - description: The organization name. - type: string - ndm_netflow_events_sum: - description: Shows the sum of all Network Device Monitoring NetFlow events - over all hours in the current date for the given org. + cspm_container_hwm_sum: + description: Shows the sum of the the high-water marks of Cloud Security + Management Pro containers over all hours in the current months for all + organizations. format: int64 type: integer - netflow_indexed_events_count_sum: - description: Shows the sum of all Network flows indexed over all hours in - the current date for the given org. + cspm_gcp_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Pro GCP hosts over all hours in the current months for all organizations. format: int64 type: integer - npm_host_top99p: - description: Shows the 99th percentile of all distinct Networks hosts over - all hours in the current date for the given org. + cspm_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Security Management + Pro hosts over all hours in the current months for all organizations. format: int64 type: integer - observability_pipelines_bytes_processed_sum: - description: Sum of all observability pipelines bytes processed over all - hours in the current date for the given org. + custom_historical_ts_sum: + description: Shows the average number of distinct historical custom metrics + over all hours in the current months for all organizations. + format: int64 + type: integer + custom_live_ts_sum: + description: Shows the average number of distinct live custom metrics over + all hours in the current months for all organizations. format: int64 type: integer - online_archive_events_count_sum: - description: Sum of all online archived events over all hours in the current - date for the given org. + custom_ts_sum: + description: Shows the average number of distinct custom metrics over all + hours in the current months for all organizations. format: int64 type: integer - opentelemetry_apm_host_top99p: - description: Shows the 99th percentile of APM hosts reported by the Datadog - exporter for the OpenTelemetry Collector over all hours in the current - date for the given org. + cws_containers_avg_sum: + description: Shows the average of all distinct Cloud Workload Security containers + over all hours in the current months for all organizations. format: int64 type: integer - opentelemetry_host_top99p: - description: Shows the 99th percentile of all hosts reported by the Datadog - exporter for the OpenTelemetry Collector over all hours in the current - date for the given org. + cws_host_top99p_sum: + description: Shows the 99th percentile of all Cloud Workload Security hosts + over all hours in the current months for all organizations. format: int64 type: integer - profiling_aas_count_top99p: - description: Shows the 99th percentile of all profiled Azure app services - over all hours in the current date for all organizations. + dbm_host_top99p_sum: + description: Shows the 99th percentile of all Database Monitoring hosts + over all hours in the current month for all organizations. format: int64 type: integer - profiling_host_top99p: - description: Shows the 99th percentile of all profiled hosts over all hours - in the current date for the given org. + dbm_queries_avg_sum: + description: Shows the average of all distinct Database Monitoring Normalized + Queries over all hours in the current month for all organizations. format: int64 type: integer - public_id: - description: The organization public id. - type: string - region: - description: The region of the organization. + end_date: + description: Shows the last date of usage in the current months for all + organizations. + format: date-time type: string - rum_browser_and_mobile_session_count: - description: Shows the sum of all mobile sessions and all browser lite and - legacy sessions over all hours in the current date for the given org. + fargate_tasks_count_avg_sum: + description: Shows the average of all Fargate tasks over all hours in the + current months for all organizations. format: int64 type: integer - rum_session_count_sum: - description: Shows the sum of all browser RUM Lite Sessions over all hours - in the current date for the given org. + fargate_tasks_count_hwm_sum: + description: Shows the sum of the high-water marks of all Fargate tasks + over all hours in the current months for all organizations. format: int64 type: integer - rum_total_session_count_sum: - description: Shows the sum of RUM Sessions (browser and mobile) over all - hours in the current date for the given org. + forwarding_events_bytes_agg_sum: + description: Shows the sum of all logs forwarding bytes over all hours in + the current months for all organizations (data available as of April 1, + 2023) format: int64 type: integer - rum_units_sum: - description: Shows the sum of all browser and mobile RUM units over all - hours in the current date for the given org. + gcp_host_top99p_sum: + description: Shows the 99th percentile of all GCP hosts over all hours in + the current months for all organizations. format: int64 type: integer - sds_apm_scanned_bytes_sum: - description: Sum of all APM bytes scanned with sensitive data scanner over - all hours in the current date for the given org. + heroku_host_top99p_sum: + description: Shows the 99th percentile of all Heroku dynos over all hours + in the current months for all organizations. format: int64 type: integer - sds_events_scanned_bytes_sum: - description: Sum of all event stream events bytes scanned with sensitive - data scanner over all hours in the current date for the given org. + incident_management_monthly_active_users_hwm_sum: + description: Shows sum of the the high-water marks of incident management + monthly active users in the current months for all organizations. format: int64 type: integer - sds_logs_scanned_bytes_sum: - description: Shows the sum of all bytes scanned of logs usage by the Sensitive - Data Scanner over all hours in the current month for the given org. + indexed_events_count_agg_sum: + description: Shows the sum of all log events indexed over all hours in the + current months for all organizations. format: int64 type: integer - sds_rum_scanned_bytes_sum: - description: Sum of all RUM bytes scanned with sensitive data scanner over - all hours in the current date for the given org. + infra_host_top99p_sum: + description: Shows the 99th percentile of all distinct infrastructure hosts + over all hours in the current months for all organizations. format: int64 type: integer - sds_total_scanned_bytes_sum: - description: Shows the sum of all bytes scanned across all usage types by - the Sensitive Data Scanner over all hours in the current month for the - given org. + ingested_events_bytes_agg_sum: + description: Shows the sum of all log bytes ingested over all hours in the + current months for all organizations. format: int64 type: integer - serverless_apps_azure_count_avg: - description: Shows the average of the number of Serverless Apps for Azure - for the given date and given org. + iot_device_agg_sum: + description: Shows the sum of all IoT devices over all hours in the current + months for all organizations. format: int64 type: integer - serverless_apps_google_count_avg: - description: Shows the average of the number of Serverless Apps for Google - Cloud for the given date and given org. + iot_device_top99p_sum: + description: Shows the 99th percentile of all IoT devices over all hours + in the current months of all organizations. format: int64 type: integer - serverless_apps_total_count_avg: - description: Shows the average of the number of Serverless Apps for Azure - and Google Cloud for the given date and given org. + last_updated: + description: Shows the the most recent hour in the current months for all + organizations for which all usages were calculated. + format: date-time + type: string + live_indexed_events_agg_sum: + description: Shows the sum of all live logs indexed over all hours in the + current months for all organizations (data available as of December 1, + 2020). format: int64 type: integer - synthetics_browser_check_calls_count_sum: - description: Shows the sum of all Synthetic browser tests over all hours - in the current date for the given org. + live_ingested_bytes_agg_sum: + description: Shows the sum of all live logs bytes ingested over all hours + in the current months for all organizations (data available as of December + 1, 2020). format: int64 type: integer - synthetics_check_calls_count_sum: - description: Shows the sum of all Synthetic API tests over all hours in - the current date for the given org. + logs_by_retention: + $ref: '#/components/schemas/LogsByRetention' + mobile_rum_lite_session_count_agg_sum: + description: Shows the sum of all mobile lite sessions over all hours in + the current months for all organizations. format: int64 type: integer - synthetics_mobile_test_runs_sum: - description: Shows the sum of all Synthetic mobile application tests over - all hours in the current date for the given org. + mobile_rum_session_count_agg_sum: + description: Shows the sum of all mobile RUM Sessions over all hours in + the current months for all organizations. format: int64 type: integer - synthetics_parallel_testing_max_slots_hwm: - description: Shows the high-water mark of used synthetics parallel testing - slots over all hours in the current date for the given org. + mobile_rum_session_count_android_agg_sum: + description: Shows the sum of all mobile RUM Sessions on Android over all + hours in the current months for all organizations. format: int64 type: integer - trace_search_indexed_events_count_sum: - description: Shows the sum of all Indexed Spans indexed over all hours in - the current date for the given org. + mobile_rum_session_count_flutter_agg_sum: + description: Shows the sum of all mobile RUM Sessions on Flutter over all + hours in the current months for all organizations. format: int64 type: integer - twol_ingested_events_bytes_sum: - description: Shows the sum of all ingested APM span bytes over all hours - in the current date for the given org. + mobile_rum_session_count_ios_agg_sum: + description: Shows the sum of all mobile RUM Sessions on iOS over all hours + in the current months for all organizations. format: int64 type: integer - universal_service_monitoring_host_top99p: - description: Shows the 99th percentile of all Universal Service Monitoring - hosts over all hours in the current date for the given org. + mobile_rum_session_count_reactnative_agg_sum: + description: Shows the sum of all mobile RUM Sessions on React Native over + all hours in the current months for all organizations. format: int64 type: integer - vsphere_host_top99p: - description: Shows the 99th percentile of all vSphere hosts over all hours - in the current date for the given org. + mobile_rum_session_count_roku_agg_sum: + description: Shows the sum of all mobile RUM Sessions on Roku over all hours + in the current months for all organizations. format: int64 type: integer - vuln_management_host_count_top99p: - description: Shows the 99th percentile of all Application Vulnerability - Management hosts over all hours in the current date for the given org. + mobile_rum_units_agg_sum: + description: Shows the sum of all mobile RUM units over all hours in the + current months for all organizations. format: int64 type: integer - workflow_executions_usage_sum: - description: Sum of all workflows executed over all hours in the current - date for the given org. + ndm_netflow_events_agg_sum: + description: Shows the sum of all Network Device Monitoring NetFlow events + over all hours in the current months for all organizations. format: int64 type: integer - type: object - UsageSummaryResponse: - description: Response summarizing all usage aggregated across the months in - the request for all organizations, and broken down by month and by organization. - properties: - agent_host_top99p_sum: - description: Shows the 99th percentile of all agent hosts over all hours - in the current months for all organizations. + netflow_indexed_events_count_agg_sum: + description: Shows the sum of all Network flows indexed over all hours in + the current months for all organizations. format: int64 type: integer - apm_azure_app_service_host_top99p_sum: - description: Shows the 99th percentile of all Azure app services using APM - over all hours in the current months all organizations. + npm_host_top99p_sum: + description: Shows the 99th percentile of all distinct Networks hosts over + all hours in the current months for all organizations. format: int64 type: integer - apm_fargate_count_avg_sum: - description: Shows the average of all APM ECS Fargate tasks over all hours - in the current months for all organizations. + observability_pipelines_bytes_processed_agg_sum: + description: Sum of all observability pipelines bytes processed over all + hours in the current months for all organizations. format: int64 type: integer - apm_host_top99p_sum: - description: Shows the 99th percentile of all distinct APM hosts over all - hours in the current months for all organizations. + online_archive_events_count_agg_sum: + description: Sum of all online archived events over all hours in the current + months for all organizations. format: int64 type: integer - appsec_fargate_count_avg_sum: - description: Shows the average of all Application Security Monitoring ECS - Fargate tasks over all hours in the current months for all organizations. + opentelemetry_apm_host_top99p_sum: + description: Shows the 99th percentile of APM hosts reported by the Datadog + exporter for the OpenTelemetry Collector over all hours in the current + months for all organizations. format: int64 type: integer - audit_logs_lines_indexed_agg_sum: - deprecated: true - description: Shows the sum of all audit logs lines indexed over all hours - in the current months for all organizations. + opentelemetry_host_top99p_sum: + description: Shows the 99th percentile of all hosts reported by the Datadog + exporter for the OpenTelemetry Collector over all hours in the current + months for all organizations. format: int64 type: integer - audit_trail_enabled_hwm_sum: - description: Shows the total number of organizations that had Audit Trail - enabled over a specific number of months. + profiling_aas_count_top99p_sum: + description: Shows the 99th percentile of all profiled Azure app services + over all hours in the current months for all organizations. format: int64 type: integer - avg_profiled_fargate_tasks_sum: - description: Shows the average of all profiled Fargate tasks over all hours + profiling_container_agent_count_avg: + description: Shows the average number of profiled containers over all hours in the current months for all organizations. format: int64 type: integer - aws_host_top99p_sum: - description: Shows the 99th percentile of all AWS hosts over all hours in - the current months for all organizations. + profiling_host_count_top99p_sum: + description: Shows the 99th percentile of all profiled hosts over all hours + in the current months for all organizations. format: int64 type: integer - aws_lambda_func_count: - description: Shows the average of the number of functions that executed - 1 or more times each hour in the current months for all organizations. + rehydrated_indexed_events_agg_sum: + description: Shows the sum of all rehydrated logs indexed over all hours + in the current months for all organizations (data available as of December + 1, 2020). format: int64 type: integer - aws_lambda_invocations_sum: - description: Shows the sum of all AWS Lambda invocations over all hours - in the current months for all organizations. + rehydrated_ingested_bytes_agg_sum: + description: Shows the sum of all rehydrated logs bytes ingested over all + hours in the current months for all organizations (data available as of + December 1, 2020). format: int64 type: integer - azure_app_service_top99p_sum: - description: Shows the 99th percentile of all Azure app services over all - hours in the current months for all organizations. + rum_browser_and_mobile_session_count: + description: Shows the sum of all mobile sessions and all browser lite and + legacy sessions over all hours in the current month for all organizations. format: int64 type: integer - azure_host_top99p_sum: - description: Shows the 99th percentile of all Azure hosts over all hours + rum_session_count_agg_sum: + description: Shows the sum of all browser RUM Lite Sessions over all hours in the current months for all organizations. format: int64 type: integer - billable_ingested_bytes_agg_sum: - description: Shows the sum of all log bytes ingested over all hours in the - current months for all organizations. + rum_total_session_count_agg_sum: + description: Shows the sum of RUM Sessions (browser and mobile) over all + hours in the current months for all organizations. format: int64 type: integer - browser_rum_lite_session_count_agg_sum: - description: Shows the sum of all browser lite sessions over all hours in - the current months for all organizations. + rum_units_agg_sum: + description: Shows the sum of all browser and mobile RUM units over all + hours in the current months for all organizations. format: int64 type: integer - browser_rum_replay_session_count_agg_sum: - description: Shows the sum of all browser replay sessions over all hours - in the current months for all organizations. + sds_apm_scanned_bytes_sum: + description: Sum of all APM bytes scanned with sensitive data scanner in + the current months for all organizations. format: int64 type: integer - browser_rum_units_agg_sum: - description: Shows the sum of all browser RUM units over all hours in the - current months for all organizations. + sds_events_scanned_bytes_sum: + description: Sum of all event stream events bytes scanned with sensitive + data scanner in the current months for all organizations. format: int64 type: integer - ci_pipeline_indexed_spans_agg_sum: - description: Shows the sum of all CI pipeline indexed spans over all hours - in the current months for all organizations. + sds_logs_scanned_bytes_sum: + description: Shows the sum of all bytes scanned of logs usage by the Sensitive + Data Scanner over all hours in the current month for all organizations. format: int64 type: integer - ci_test_indexed_spans_agg_sum: - description: Shows the sum of all CI test indexed spans over all hours in + sds_rum_scanned_bytes_sum: + description: Sum of all RUM bytes scanned with sensitive data scanner in the current months for all organizations. format: int64 type: integer - ci_visibility_itr_committers_hwm_sum: - description: Shows the high-water mark of all CI visibility intelligent - test runner committers over all hours in the current months for all organizations. - format: int64 - type: integer - ci_visibility_pipeline_committers_hwm_sum: - description: Shows the high-water mark of all CI visibility pipeline committers - over all hours in the current months for all organizations. + sds_total_scanned_bytes_sum: + description: Shows the sum of all bytes scanned across all usage types by + the Sensitive Data Scanner over all hours in the current month for all + organizations. format: int64 type: integer - ci_visibility_test_committers_hwm_sum: - description: Shows the high-water mark of all CI visibility test committers - over all hours in the current months for all organizations. + serverless_apps_azure_count_avg_sum: + description: Sum of the average number of Serverless Apps for Azure in the + current months for all organizations. format: int64 type: integer - cloud_cost_management_aws_host_count_avg_sum: - description: Sum of the host count average for Cloud Cost Management for - AWS. + serverless_apps_google_count_avg_sum: + description: Sum of the average number of Serverless Apps for Google Cloud + in the current months for all organizations. format: int64 type: integer - cloud_cost_management_azure_host_count_avg_sum: - description: Sum of the host count average for Cloud Cost Management for - Azure. + serverless_apps_total_count_avg_sum: + description: Sum of the average number of Serverless Apps for Azure and + Google Cloud in the current months for all organizations. format: int64 type: integer - cloud_cost_management_host_count_avg_sum: - description: Sum of the host count average for Cloud Cost Management for - all cloud providers. + start_date: + description: Shows the first date of usage in the current months for all + organizations. + format: date-time + type: string + synthetics_browser_check_calls_count_agg_sum: + description: Shows the sum of all Synthetic browser tests over all hours + in the current months for all organizations. format: int64 type: integer - cloud_siem_events_agg_sum: - description: Shows the sum of all Cloud Security Information and Event Management - events over all hours in the current months for all organizations. + synthetics_check_calls_count_agg_sum: + description: Shows the sum of all Synthetic API tests over all hours in + the current months for all organizations. format: int64 type: integer - container_avg_sum: - description: Shows the average of all distinct containers over all hours - in the current months for all organizations. + synthetics_mobile_test_runs_agg_sum: + description: Shows the sum of Synthetic mobile application tests over all + hours in the current months for all organizations. format: int64 type: integer - container_excl_agent_avg_sum: - description: Shows the average of the containers without the Datadog Agent - over all hours in the current month for all organizations. + synthetics_parallel_testing_max_slots_hwm_sum: + description: Shows the sum of the high-water marks of used synthetics parallel + testing slots over all hours in the current month for all organizations. format: int64 type: integer - container_hwm_sum: - description: Shows the sum of the high-water marks of all distinct containers - over all hours in the current months for all organizations. + trace_search_indexed_events_count_agg_sum: + description: Shows the sum of all Indexed Spans indexed over all hours in + the current months for all organizations. format: int64 type: integer - csm_container_enterprise_compliance_count_agg_sum: - description: Shows the sum of all Cloud Security Management Enterprise compliance - containers over all hours in the current months for all organizations. + twol_ingested_events_bytes_agg_sum: + description: Shows the sum of all ingested APM span bytes over all hours + in the current months for all organizations. format: int64 type: integer - csm_container_enterprise_cws_count_agg_sum: - description: Shows the sum of all Cloud Security Management Enterprise Cloud - Workload Security containers over all hours in the current months for - all organizations. + universal_service_monitoring_host_top99p_sum: + description: Shows the 99th percentile of all Universal Service Monitoring + hosts over all hours in the current months for all organizations. format: int64 type: integer - csm_container_enterprise_total_count_agg_sum: - description: Shows the sum of all Cloud Security Management Enterprise containers - over all hours in the current months for all organizations. + usage: + description: An array of objects regarding hourly usage. + items: + $ref: '#/components/schemas/UsageSummaryDate' + type: array + vsphere_host_top99p_sum: + description: Shows the 99th percentile of all vSphere hosts over all hours + in the current months for all organizations. format: int64 type: integer - csm_host_enterprise_aas_host_count_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise Azure app services hosts over all hours in the current months - for all organizations. + vuln_management_host_count_top99p_sum: + description: Shows the 99th percentile of all Application Vulnerability + Management hosts over all hours in the current months for all organizations. format: int64 type: integer - csm_host_enterprise_aws_host_count_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise AWS hosts over all hours in the current months for all organizations. + workflow_executions_usage_agg_sum: + description: Sum of all workflows executed over all hours in the current + months for all organizations. format: int64 type: integer - csm_host_enterprise_azure_host_count_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise Azure hosts over all hours in the current months for all organizations. + type: object + UsageSyntheticsAPIHour: + description: Number of Synthetics API tests run for each hour for a given organization. + properties: + check_calls_count: + description: Contains the number of Synthetics API tests run. format: int64 + nullable: true type: integer - csm_host_enterprise_compliance_host_count_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise compliance hosts over all hours in the current months for all - organizations. + hour: + description: The hour for the usage. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageSyntheticsAPIResponse: + description: Response containing the number of Synthetics API tests run for + each hour for a given organization. + properties: + usage: + description: Get hourly usage for Synthetics API tests. + items: + $ref: '#/components/schemas/UsageSyntheticsAPIHour' + type: array + type: object + UsageSyntheticsBrowserHour: + description: Number of Synthetics Browser tests run for each hour for a given + organization. + properties: + browser_check_calls_count: + description: Contains the number of Synthetics Browser tests run. format: int64 + nullable: true type: integer - csm_host_enterprise_cws_host_count_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise Cloud Workload Security hosts over all hours in the current - months for all organizations. + hour: + description: The hour for the usage. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageSyntheticsBrowserResponse: + description: Response containing the number of Synthetics Browser tests run + for each hour for a given organization. + properties: + usage: + description: Get hourly usage for Synthetics Browser tests. + items: + $ref: '#/components/schemas/UsageSyntheticsBrowserHour' + type: array + type: object + UsageSyntheticsHour: + description: The number of synthetics tests run for each hour for a given organization. + properties: + check_calls_count: + description: Contains the number of Synthetics API tests run. format: int64 type: integer - csm_host_enterprise_gcp_host_count_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise GCP hosts over all hours in the current months for all organizations. + hour: + description: The hour for the usage. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageSyntheticsResponse: + description: Response containing the number of Synthetics API tests run for + each hour for a given organization. + properties: + usage: + description: Array with the number of hourly Synthetics test run for a given + organization. + items: + $ref: '#/components/schemas/UsageSyntheticsHour' + type: array + type: object + UsageTimeseriesHour: + description: The hourly usage of timeseries. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + num_custom_input_timeseries: + description: Contains the number of custom metrics that are inputs for aggregations + (metric configured is custom). format: int64 type: integer - csm_host_enterprise_total_host_count_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Enterprise hosts over all hours in the current months for all organizations. + num_custom_output_timeseries: + description: Contains the number of custom metrics that are outputs for + aggregations (metric configured is custom). format: int64 type: integer - cspm_aas_host_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Pro Azure app services hosts over all hours in the current months for - all organizations. + num_custom_timeseries: + description: Contains sum of non-aggregation custom metrics and custom metrics + that are outputs for aggregations. format: int64 type: integer - cspm_aws_host_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Pro AWS hosts over all hours in the current months for all organizations. + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + type: object + UsageTimeseriesResponse: + description: Response containing hourly usage of timeseries. + properties: + usage: + description: An array of objects regarding hourly usage of timeseries. + items: + $ref: '#/components/schemas/UsageTimeseriesHour' + type: array + type: object + UsageTopAvgMetricsHour: + description: Number of hourly recorded custom metrics for a given organization. + properties: + avg_metric_hour: + description: Average number of timeseries per hour in which the metric occurs. format: int64 type: integer - cspm_azure_host_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Pro Azure hosts over all hours in the current months for all organizations. + max_metric_hour: + description: Maximum number of timeseries per hour in which the metric occurs. format: int64 type: integer - cspm_container_avg_sum: - description: Shows the average number of Cloud Security Management Pro containers - over all hours in the current months for all organizations. + metric_category: + $ref: '#/components/schemas/UsageMetricCategory' + metric_name: + description: Contains the custom metric name. + type: string + type: object + UsageTopAvgMetricsMetadata: + description: The object containing document metadata. + properties: + day: + description: The day value from the user request that contains the returned + usage data. (If day was used the request) + format: date-time + type: string + month: + description: The month value from the user request that contains the returned + usage data. (If month was used the request) + format: date-time + type: string + pagination: + $ref: '#/components/schemas/UsageTopAvgMetricsPagination' + type: object + UsageTopAvgMetricsPagination: + description: The metadata for the current pagination. + properties: + limit: + description: Maximum amount of records to be returned. format: int64 type: integer - cspm_container_hwm_sum: - description: Shows the sum of the the high-water marks of Cloud Security - Management Pro containers over all hours in the current months for all - organizations. + next_record_id: + description: The cursor to get the next results (if any). To make the next + request, use the same parameters and add `next_record_id`. + nullable: true + type: string + total_number_of_records: + description: Total number of records. format: int64 + nullable: true type: integer - cspm_gcp_host_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Pro GCP hosts over all hours in the current months for all organizations. + type: object + UsageTopAvgMetricsResponse: + description: Response containing the number of hourly recorded custom metrics + for a given organization. + properties: + metadata: + $ref: '#/components/schemas/UsageTopAvgMetricsMetadata' + usage: + description: Number of hourly recorded custom metrics for a given organization. + items: + $ref: '#/components/schemas/UsageTopAvgMetricsHour' + type: array + type: object + User: + description: Create, edit, and disable users. + properties: + access_role: + $ref: '#/components/schemas/AccessRole' + disabled: + description: The new disabled status of the user. + example: false + type: boolean + email: + description: The new email of the user. + example: test@datadoghq.com + format: email + type: string + handle: + description: The user handle, must be a valid email. + example: test@datadoghq.com + format: email + type: string + icon: + description: Gravatar icon associated to the user. + example: /path/to/matching/gravatar/icon + readOnly: true + type: string + name: + description: The name of the user. + example: test user + type: string + verified: + description: Whether or not the user logged in Datadog at least once. + example: true + readOnly: true + type: boolean + type: object + UserDisableResponse: + description: Array of user disabled for a given organization. + properties: + message: + description: Information pertaining to a user disabled for a given organization. + type: string + type: object + UserListResponse: + description: Array of Datadog users for a given organization. + properties: + users: + description: Array of users. + items: + $ref: '#/components/schemas/User' + type: array + type: object + UserResponse: + description: A Datadog User. + properties: + user: + $ref: '#/components/schemas/User' + type: object + Version: + description: Version of the updated signal. If server side version is higher, + update will be rejected. + format: int64 + type: integer + WebhooksIntegration: + description: Datadog-Webhooks integration. + properties: + custom_headers: + description: 'If `null`, uses no header. + + If given a JSON payload, these will be headers attached to your webhook.' + nullable: true + type: string + encode_as: + $ref: '#/components/schemas/WebhooksIntegrationEncoding' + name: + description: 'The name of the webhook. It corresponds with ``. + + Learn more on how to use it in + + [monitor notifications](https://docs.datadoghq.com/monitors/notify).' + example: WEBHOOK_NAME + type: string + payload: + description: 'If `null`, uses the default payload. + + If given a JSON payload, the webhook returns the payload + + specified by the given payload. + + [Webhooks variable usage](https://docs.datadoghq.com/integrations/webhooks/#usage).' + nullable: true + type: string + url: + description: URL of the webhook. + example: https://example.com/webhook + type: string + required: + - name + - url + type: object + WebhooksIntegrationCustomVariable: + description: Custom variable for Webhook integration. + properties: + is_secret: + description: 'Make custom variable is secret or not. + + If the custom variable is secret, the value is not returned in the response + payload.' + example: true + type: boolean + name: + description: The name of the variable. It corresponds with ``. + example: CUSTOM_VARIABLE_NAME + type: string + value: + description: Value of the custom variable. + example: CUSTOM_VARIABLE_VALUE + type: string + required: + - name + - value + - is_secret + type: object + WebhooksIntegrationCustomVariableResponse: + description: Custom variable for Webhook integration. + properties: + is_secret: + description: 'Make custom variable is secret or not. + + If the custom variable is secret, the value is not returned in the response + payload.' + example: true + type: boolean + name: + description: The name of the variable. It corresponds with ``. + It must only contains upper-case characters, integers or underscores. + example: CUSTOM_VARIABLE_NAME + type: string + value: + description: Value of the custom variable. It won't be returned if the variable + is secret. + example: CUSTOM_VARIABLE_VALUE + type: string + required: + - name + - is_secret + type: object + WebhooksIntegrationCustomVariableUpdateRequest: + description: 'Update request of a custom variable object. + + + *All properties are optional.*' + properties: + is_secret: + description: 'Make custom variable is secret or not. + + If the custom variable is secret, the value is not returned in the response + payload.' + type: boolean + name: + description: The name of the variable. It corresponds with ``. + It must only contains upper-case characters, integers or underscores. + example: CUSTOM_VARIABLE_NAME + type: string + value: + description: Value of the custom variable. + example: CUSTOM_VARIABLE_VALUE + type: string + type: object + WebhooksIntegrationEncoding: + default: json + description: Encoding type. Can be given either `json` or `form`. + enum: + - json + - form + type: string + x-enum-varnames: + - JSON + - FORM + WebhooksIntegrationUpdateRequest: + description: 'Update request of a Webhooks integration object. + + + *All properties are optional.*' + properties: + custom_headers: + description: 'If `null`, uses no header. + + If given a JSON payload, these will be headers attached to your webhook.' + type: string + encode_as: + $ref: '#/components/schemas/WebhooksIntegrationEncoding' + name: + description: 'The name of the webhook. It corresponds with ``. + + Learn more on how to use it in + + [monitor notifications](https://docs.datadoghq.com/monitors/notify).' + example: WEBHOOK_NAME + type: string + payload: + description: 'If `null`, uses the default payload. + + If given a JSON payload, the webhook returns the payload + + specified by the given payload. + + [Webhooks variable usage](https://docs.datadoghq.com/integrations/webhooks/#usage).' + nullable: true + type: string + url: + description: URL of the webhook. + example: https://example.com/webhook + type: string + type: object + Widget: + description: "Information about widget.\n\n**Note**: The `layout` property is + required for widgets in dashboards with `free` `layout_type`.\n For the + **new dashboard layout**, the `layout` property depends on the `reflow_type` + of the dashboard.\n - If `reflow_type` is `fixed`, `layout` is required.\n + \ - If `reflow_type` is `auto`, `layout` should not be set." + properties: + definition: + $ref: '#/components/schemas/WidgetDefinition' + id: + description: ID of the widget. format: int64 type: integer - cspm_host_top99p_sum: - description: Shows the 99th percentile of all Cloud Security Management - Pro hosts over all hours in the current months for all organizations. + layout: + $ref: '#/components/schemas/WidgetLayout' + required: + - definition + type: object + WidgetAggregator: + description: Aggregator used for the request. + enum: + - avg + - last + - max + - min + - sum + - percentile + type: string + x-enum-varnames: + - AVERAGE + - LAST + - MAXIMUM + - MINIMUM + - SUM + - PERCENTILE + WidgetAxis: + description: Axis controls for the widget. + properties: + include_zero: + description: Set to `true` to include zero. + type: boolean + label: + description: The label of the axis to display on the graph. Only usable + on Scatterplot Widgets. + type: string + max: + default: auto + description: Specifies maximum numeric value to show on the axis. Defaults + to `auto`. + type: string + min: + default: auto + description: Specifies minimum numeric value to show on the axis. Defaults + to `auto`. + type: string + scale: + default: linear + description: Specifies the scale type. Possible values are `linear`, `log`, + `sqrt`, and `pow##` (for example `pow2` or `pow0.5`). + type: string + type: object + WidgetChangeType: + description: Show the absolute or the relative change. + enum: + - absolute + - relative + type: string + x-enum-varnames: + - ABSOLUTE + - RELATIVE + WidgetColorPreference: + description: Which color to use on the widget. + enum: + - background + - text + type: string + x-enum-varnames: + - BACKGROUND + - TEXT + WidgetComparator: + description: Comparator to apply. + enum: + - '=' + - '>' + - '>=' + - < + - <= + example: '>' + type: string + x-enum-varnames: + - EQUAL_TO + - GREATER_THAN + - GREATER_THAN_OR_EQUAL_TO + - LESS_THAN + - LESS_THAN_OR_EQUAL_TO + WidgetCompareTo: + description: Timeframe used for the change comparison. + enum: + - hour_before + - day_before + - week_before + - month_before + type: string + x-enum-varnames: + - HOUR_BEFORE + - DAY_BEFORE + - WEEK_BEFORE + - MONTH_BEFORE + WidgetConditionalFormat: + description: Define a conditional format for the widget. + properties: + comparator: + $ref: '#/components/schemas/WidgetComparator' + custom_bg_color: + description: Color palette to apply to the background, same values available + as palette. + type: string + custom_fg_color: + description: Color palette to apply to the foreground, same values available + as palette. + type: string + hide_value: + description: True hides values. + type: boolean + image_url: + description: Displays an image as the background. + type: string + metric: + description: Metric from the request to correlate this conditional format + with. + type: string + palette: + $ref: '#/components/schemas/WidgetPalette' + timeframe: + description: Defines the displayed timeframe. + type: string + value: + description: Value for the comparator. + example: 0.0 + format: double + type: number + required: + - comparator + - value + - palette + type: object + WidgetCustomLink: + description: Custom links help you connect a data value to a URL, like a Datadog + page or your AWS console. + properties: + is_hidden: + description: The flag for toggling context menu link visibility. + type: boolean + label: + description: The label for the custom link URL. Keep the label short and + descriptive. Use metrics and tags as variables. + example: Search logs for {{host}} + type: string + link: + description: The URL of the custom link. URL must include `http` or `https`. + A relative URL must start with `/`. + example: https://app.datadoghq.com/logs?query={{host}} + type: string + override_label: + description: The label ID that refers to a context menu link. Can be `logs`, + `hosts`, `traces`, `profiles`, `processes`, `containers`, or `rum`. + example: logs + type: string + type: object + WidgetDefinition: + description: '[Definition of the widget](https://docs.datadoghq.com/dashboards/widgets/).' + oneOf: + - $ref: '#/components/schemas/AlertGraphWidgetDefinition' + - $ref: '#/components/schemas/AlertValueWidgetDefinition' + - $ref: '#/components/schemas/ChangeWidgetDefinition' + - $ref: '#/components/schemas/CheckStatusWidgetDefinition' + - $ref: '#/components/schemas/DistributionWidgetDefinition' + - $ref: '#/components/schemas/EventStreamWidgetDefinition' + - $ref: '#/components/schemas/EventTimelineWidgetDefinition' + - $ref: '#/components/schemas/FreeTextWidgetDefinition' + - $ref: '#/components/schemas/FunnelWidgetDefinition' + - $ref: '#/components/schemas/GeomapWidgetDefinition' + - $ref: '#/components/schemas/GroupWidgetDefinition' + - $ref: '#/components/schemas/HeatMapWidgetDefinition' + - $ref: '#/components/schemas/HostMapWidgetDefinition' + - $ref: '#/components/schemas/IFrameWidgetDefinition' + - $ref: '#/components/schemas/ImageWidgetDefinition' + - $ref: '#/components/schemas/ListStreamWidgetDefinition' + - $ref: '#/components/schemas/LogStreamWidgetDefinition' + - $ref: '#/components/schemas/MonitorSummaryWidgetDefinition' + - $ref: '#/components/schemas/NoteWidgetDefinition' + - $ref: '#/components/schemas/PowerpackWidgetDefinition' + - $ref: '#/components/schemas/QueryValueWidgetDefinition' + - $ref: '#/components/schemas/RunWorkflowWidgetDefinition' + - $ref: '#/components/schemas/SLOListWidgetDefinition' + - $ref: '#/components/schemas/SLOWidgetDefinition' + - $ref: '#/components/schemas/ScatterPlotWidgetDefinition' + - $ref: '#/components/schemas/ServiceMapWidgetDefinition' + - $ref: '#/components/schemas/ServiceSummaryWidgetDefinition' + - $ref: '#/components/schemas/SplitGraphWidgetDefinition' + - $ref: '#/components/schemas/SunburstWidgetDefinition' + - $ref: '#/components/schemas/TableWidgetDefinition' + - $ref: '#/components/schemas/TimeseriesWidgetDefinition' + - $ref: '#/components/schemas/ToplistWidgetDefinition' + - $ref: '#/components/schemas/TopologyMapWidgetDefinition' + - $ref: '#/components/schemas/TreeMapWidgetDefinition' + WidgetDisplayType: + description: Type of display to use for the request. + enum: + - area + - bars + - line + - overlay + type: string + x-enum-varnames: + - AREA + - BARS + - LINE + - OVERLAY + WidgetEvent: + description: 'Event overlay control options. + + + See the dedicated [Events JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/widget_json/#events-schema) + + to learn how to build the ``.' + properties: + q: + description: Query definition. + example: '' + type: string + tags_execution: + description: The execution method for multi-value filters. + type: string + required: + - q + type: object + WidgetEventSize: + description: Size to use to display an event. + enum: + - s + - l + type: string + x-enum-varnames: + - SMALL + - LARGE + WidgetFieldSort: + description: Which column and order to sort by + properties: + column: + description: Facet path for the column + example: '' + type: string + order: + $ref: '#/components/schemas/WidgetSort' + required: + - column + - order + type: object + WidgetFormula: + description: Formula to be used in a widget query. + properties: + alias: + description: Expression alias. + type: string + cell_display_mode: + $ref: '#/components/schemas/TableWidgetCellDisplayMode' + conditional_formats: + description: List of conditional formats. + items: + $ref: '#/components/schemas/WidgetConditionalFormat' + type: array + formula: + description: String expression built from queries, formulas, and functions. + example: func(a) + b + type: string + limit: + $ref: '#/components/schemas/WidgetFormulaLimit' + style: + $ref: '#/components/schemas/WidgetFormulaStyle' + required: + - formula + type: object + WidgetFormulaLimit: + description: Options for limiting results returned. + properties: + count: + description: Number of results to return. format: int64 type: integer - custom_ts_sum: - description: Shows the average number of distinct custom metrics over all - hours in the current months for all organizations. + order: + $ref: '#/components/schemas/QuerySortOrder' + type: object + WidgetFormulaStyle: + description: Styling options for widget formulas. + properties: + palette: + description: The color palette used to display the formula. A guide to the + available color palettes can be found at https://docs.datadoghq.com/dashboards/guide/widget_colors + example: classic + type: string + palette_index: + description: Index specifying which color to use within the palette. + example: 1 format: int64 type: integer - cws_containers_avg_sum: - description: Shows the average of all distinct Cloud Workload Security containers - over all hours in the current months for all organizations. + type: object + WidgetGrouping: + description: The kind of grouping to use. + enum: + - check + - cluster + example: check + type: string + x-enum-varnames: + - CHECK + - CLUSTER + WidgetHorizontalAlign: + description: Horizontal alignment. + enum: + - center + - left + - right + type: string + x-enum-varnames: + - CENTER + - LEFT + - RIGHT + WidgetImageSizing: + description: 'How to size the image on the widget. The values are based on the + image `object-fit` CSS properties. + + **Note**: `zoom`, `fit` and `center` values are deprecated.' + enum: + - fill + - contain + - cover + - none + - scale-down + - zoom + - fit + - center + type: string + x-enum-varnames: + - FILL + - CONTAIN + - COVER + - NONE + - SCALEDOWN + - ZOOM + - FIT + - CENTER + WidgetLayout: + description: The layout for a widget on a `free` or **new dashboard layout** + dashboard. + properties: + height: + description: The height of the widget. Should be a non-negative integer. + example: 0 format: int64 + minimum: 0 type: integer - cws_host_top99p_sum: - description: Shows the 99th percentile of all Cloud Workload Security hosts - over all hours in the current months for all organizations. + is_column_break: + description: 'Whether the widget should be the first one on the second column + in high density or not. + + **Note**: Only for the **new dashboard layout** and only one widget in + the dashboard should have this property set to `true`.' + type: boolean + width: + description: The width of the widget. Should be a non-negative integer. + example: 0 format: int64 + minimum: 0 type: integer - dbm_host_top99p_sum: - description: Shows the 99th percentile of all Database Monitoring hosts - over all hours in the current month for all organizations. + x: + description: The position of the widget on the x (horizontal) axis. Should + be a non-negative integer. + example: 0 format: int64 + minimum: 0 type: integer - dbm_queries_avg_sum: - description: Shows the average of all distinct Database Monitoring Normalized - Queries over all hours in the current month for all organizations. + y: + description: The position of the widget on the y (vertical) axis. Should + be a non-negative integer. + example: 0 format: int64 + minimum: 0 type: integer - end_date: - description: Shows the last date of usage in the current months for all - organizations. - format: date-time + required: + - x + - y + - width + - height + type: object + WidgetLayoutType: + description: Layout type of the group. + enum: + - ordered + example: ordered + type: string + x-enum-varnames: + - ORDERED + WidgetLegendSize: + description: Available legend sizes for a widget. Should be one of "0", "2", + "4", "8", "16", or "auto". + type: string + WidgetLineType: + description: Type of lines displayed. + enum: + - dashed + - dotted + - solid + type: string + x-enum-varnames: + - DASHED + - DOTTED + - SOLID + WidgetLineWidth: + description: Width of line displayed. + enum: + - normal + - thick + - thin + type: string + x-enum-varnames: + - NORMAL + - THICK + - THIN + WidgetLiveSpan: + description: The available timeframes depend on the widget you are using. + enum: + - 1m + - 5m + - 10m + - 15m + - 30m + - 1h + - 4h + - 1d + - 2d + - 1w + - 1mo + - 3mo + - 6mo + - week_to_date + - month_to_date + - 1y + - alert + example: 5m + type: string + x-enum-varnames: + - PAST_ONE_MINUTE + - PAST_FIVE_MINUTES + - PAST_TEN_MINUTES + - PAST_FIFTEEN_MINUTES + - PAST_THIRTY_MINUTES + - PAST_ONE_HOUR + - PAST_FOUR_HOURS + - PAST_ONE_DAY + - PAST_TWO_DAYS + - PAST_ONE_WEEK + - PAST_ONE_MONTH + - PAST_THREE_MONTHS + - PAST_SIX_MONTHS + - WEEK_TO_DATE + - MONTH_TO_DATE + - PAST_ONE_YEAR + - ALERT + WidgetMargin: + description: 'Size of the margins around the image. + + **Note**: `small` and `large` values are deprecated.' + enum: + - sm + - md + - lg + - small + - large + type: string + x-enum-varnames: + - SM + - MD + - LG + - SMALL + - LARGE + WidgetMarker: + description: Markers allow you to add visual conditional formatting for your + graphs. + properties: + display_type: + description: "Combination of:\n - A severity error, warning, ok, or info\n + \ - A line type: dashed, solid, or bold\nIn this case of a Distribution + widget, this can be set to be `x_axis_percentile`.\n" + example: error dashed + type: string + label: + description: Label to display over the marker. + example: Error threshold + type: string + time: + description: Timestamp for the widget. + type: string + value: + description: Value to apply. Can be a single value y = 15 or a range of + values 0 < y < 10. + example: y = 15 + type: string + required: + - value + type: object + WidgetMessageDisplay: + description: Amount of log lines to display + enum: + - inline + - expanded-md + - expanded-lg + type: string + x-enum-varnames: + - INLINE + - EXPANDED_MEDIUM + - EXPANDED_LARGE + WidgetMonitorSummaryDisplayFormat: + description: What to display on the widget. + enum: + - counts + - countsAndList + - list + type: string + x-enum-varnames: + - COUNTS + - COUNTS_AND_LIST + - LIST + WidgetMonitorSummarySort: + description: Widget sorting methods. + enum: + - name + - group + - status + - tags + - triggered + - group,asc + - group,desc + - name,asc + - name,desc + - status,asc + - status,desc + - tags,asc + - tags,desc + - triggered,asc + - triggered,desc + - priority,asc + - priority,desc + example: name,asc + type: string + x-enum-varnames: + - NAME + - GROUP + - STATUS + - TAGS + - TRIGGERED + - GROUP_ASCENDING + - GROUP_DESCENDING + - NAME_ASCENDING + - NAME_DESCENDING + - STATUS_ASCENDING + - STATUS_DESCENDING + - TAGS_ASCENDING + - TAGS_DESCENDING + - TRIGGERED_ASCENDING + - TRIGGERED_DESCENDING + - PRIORITY_ASCENDING + - PRIORITY_DESCENDING + WidgetNodeType: + description: Which type of node to use in the map. + enum: + - host + - container + type: string + x-enum-varnames: + - HOST + - CONTAINER + WidgetOrderBy: + description: What to order by. + enum: + - change + - name + - present + - past + type: string + x-enum-varnames: + - CHANGE + - NAME + - PRESENT + - PAST + WidgetPalette: + description: Color palette to apply. + enum: + - blue + - custom_bg + - custom_image + - custom_text + - gray_on_white + - grey + - green + - orange + - red + - red_on_white + - white_on_gray + - white_on_green + - green_on_white + - white_on_red + - white_on_yellow + - yellow_on_white + - black_on_light_yellow + - black_on_light_green + - black_on_light_red + example: blue + type: string + x-enum-varnames: + - BLUE + - CUSTOM_BACKGROUND + - CUSTOM_IMAGE + - CUSTOM_TEXT + - GRAY_ON_WHITE + - GREY + - GREEN + - ORANGE + - RED + - RED_ON_WHITE + - WHITE_ON_GRAY + - WHITE_ON_GREEN + - GREEN_ON_WHITE + - WHITE_ON_RED + - WHITE_ON_YELLOW + - YELLOW_ON_WHITE + - BLACK_ON_LIGHT_YELLOW + - BLACK_ON_LIGHT_GREEN + - BLACK_ON_LIGHT_RED + WidgetRequestStyle: + description: Define request widget style. + properties: + line_type: + $ref: '#/components/schemas/WidgetLineType' + line_width: + $ref: '#/components/schemas/WidgetLineWidth' + palette: + description: Color palette to apply to the widget. + type: string + type: object + WidgetServiceSummaryDisplayFormat: + description: Number of columns to display. + enum: + - one_column + - two_column + - three_column + type: string + x-enum-varnames: + - ONE_COLUMN + - TWO_COLUMN + - THREE_COLUMN + WidgetSizeFormat: + description: Size of the widget. + enum: + - small + - medium + - large + type: string + x-enum-varnames: + - SMALL + - MEDIUM + - LARGE + WidgetSort: + description: Widget sorting methods. + enum: + - asc + - desc + example: desc + type: string + x-enum-varnames: + - ASCENDING + - DESCENDING + WidgetStyle: + description: Widget style definition. + properties: + palette: + description: Color palette to apply to the widget. + type: string + type: object + WidgetSummaryType: + description: Which summary type should be used. + enum: + - monitors + - groups + - combined + type: string + x-enum-varnames: + - MONITORS + - GROUPS + - COMBINED + WidgetTextAlign: + description: How to align the text on the widget. + enum: + - center + - left + - right + type: string + x-enum-varnames: + - CENTER + - LEFT + - RIGHT + WidgetTickEdge: + description: Define how you want to align the text on the widget. + enum: + - bottom + - left + - right + - top + type: string + x-enum-varnames: + - BOTTOM + - LEFT + - RIGHT + - TOP + WidgetTime: + description: Time setting for the widget. + properties: + live_span: + $ref: '#/components/schemas/WidgetLiveSpan' + type: object + WidgetTimeWindows: + description: Define a time window. + enum: + - 7d + - 30d + - 90d + - week_to_date + - previous_week + - month_to_date + - previous_month + - global_time + type: string + x-enum-varnames: + - SEVEN_DAYS + - THIRTY_DAYS + - NINETY_DAYS + - WEEK_TO_DATE + - PREVIOUS_WEEK + - MONTH_TO_DATE + - PREVIOUS_MONTH + - GLOBAL_TIME + WidgetVerticalAlign: + description: Vertical alignment. + enum: + - center + - top + - bottom + type: string + x-enum-varnames: + - CENTER + - TOP + - BOTTOM + WidgetViewMode: + description: Define how you want the SLO to be displayed. + enum: + - overall + - component + - both + type: string + x-enum-varnames: + - OVERALL + - COMPONENT + - BOTH + WidgetVizType: + description: Whether to display the Alert Graph as a timeseries or a top list. + enum: + - timeseries + - toplist + example: timeseries + type: string + x-enum-varnames: + - TIMESERIES + - TOPLIST + securitySchemes: + AuthZ: + description: This API uses OAuth 2 with the implicit grant flow. + flows: + authorizationCode: + authorizationUrl: /oauth2/v1/authorize + scopes: + apm_service_catalog_read: View service catalog and service definitions. + apm_service_catalog_write: Add, modify, and delete service catalog definitions + when those definitions are maintained by Datadog. + ci_visibility_pipelines_write: Create CI Visibility pipeline spans using + the API. + ci_visibility_read: View CI Visibility. + create_webhooks: Create webhooks integrations. + dashboards_public_share: Generate public and authenticated links to share + dashboards or embeddable graphs externally. + dashboards_read: View dashboards. + dashboards_write: Create and change dashboards. + events_read: Read Events data. + incident_notification_settings_write: Configure Incidents Notification + settings. + incident_read: View incidents in Datadog. + incident_settings_write: Configure Incident Settings. + incident_write: Create, view, and manage incidents in Datadog. + metrics_read: View custom metrics. + monitors_downtime: Set downtimes to suppress alerts from any monitor in + an organization. Mute and unmute hosts. The ability to write monitors + is not required to set downtimes. + monitors_read: View monitors. + monitors_write: Edit and delete individual monitors. + security_monitoring_filters_read: Read Security Filters. + security_monitoring_filters_write: Create, edit, and delete Security Filters. + security_monitoring_findings_read: View CSPM Findings. + security_monitoring_rules_read: Read Detection Rules. + security_monitoring_rules_write: Create and edit Detection Rules. + security_monitoring_signals_read: View Security Signals. + security_monitoring_suppressions_read: Read Rule Suppressions. + security_monitoring_suppressions_write: Write Rule Suppressions. + slos_corrections: Apply, edit, and delete SLO status corrections. A user + with this permission can make status corrections, even if they do not + have permission to edit those SLOs. + slos_read: View SLOs and status corrections. + slos_write: Create, edit, and delete SLOs. + synthetics_global_variable_read: View, search, and use Synthetics global + variables. + synthetics_global_variable_write: Create, edit, and delete global variables + for Synthetics. + synthetics_private_location_read: View, search, and use Synthetics private + locations. + synthetics_private_location_write: Create and delete private locations + in addition to having access to the associated installation guidelines. + synthetics_read: List and view configured Synthetic tests and test results. + synthetics_write: Create, edit, and delete Synthetic tests. + teams_manage: Manage Teams. Create, delete, rename, and edit metadata + of all Teams. To control Team membership across all Teams, use the User + Access Manage permission. + teams_read: Read Teams data. A User with this permission can view Team + names, metadata, and which Users are on each Team. + timeseries_query: Query Timeseries data. + usage_read: View your organization's usage and usage attribution. + user_access_invite: Invite other users to your organization. + user_access_manage: Disable users, manage user roles, manage SAML-to-role + mappings, and configure logs restriction queries. + user_access_read: View users and their roles and settings. + tokenUrl: /oauth2/v1/token + type: oauth2 + apiKeyAuth: + description: Your Datadog API Key. + in: header + name: DD-API-KEY + type: apiKey + x-env-name: DD_API_KEY + apiKeyAuthQuery: + description: Deprecated API Key as query argument. + in: query + name: api_key + type: apiKey + x-auth-id-alias: apiKeyAuth + x-env-name: DD_API_KEY + appKeyAuth: + description: Your Datadog APP Key. + in: header + name: DD-APPLICATION-KEY + type: apiKey + x-env-name: DD_APP_KEY + appKeyAuthQuery: + description: Deprecated APP Key as query argument. + in: query + name: application_key + type: apiKey + x-auth-id-alias: appKeyAuth + x-env-name: DD_APP_KEY +info: + contact: + email: support@datadoghq.com + name: Datadog Support + url: https://www.datadoghq.com/support/ + description: Collection of all Datadog Public endpoints. + title: Datadog API V1 Collection + version: '1.0' +openapi: 3.0.0 +paths: + /: + get: + description: Get information about Datadog IP ranges. + operationId: GetIPRanges + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IPRanges' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + servers: + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: The regional site for Datadog customers. + enum: + - datadoghq.com + - us3.datadoghq.com + - us5.datadoghq.com + - ap1.datadoghq.com + - datadoghq.eu + - ddog-gov.com + subdomain: + default: ip-ranges + description: The subdomain where the API is deployed. + - url: '{protocol}://{name}' + variables: + name: + default: ip-ranges.datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.datadoghq.com + variables: + subdomain: + default: ip-ranges + description: The subdomain where the API is deployed. + summary: List IP Ranges + tags: + - IP Ranges + /api/v1/api_key: + get: + description: Get all API keys available for your account. + operationId: ListAPIKeys + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyListResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all API keys + tags: + - Key Management + post: + description: Creates an API key with a given name. + operationId: CreateAPIKey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an API key + tags: + - Key Management + x-codegen-request-body-name: body + /api/v1/api_key/{key}: + delete: + description: Delete a given API key. + operationId: DeleteAPIKey + parameters: + - description: The specific API key you are working with. + in: path + name: key + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an API key + tags: + - Key Management + get: + description: Get a given API key. + operationId: GetAPIKey + parameters: + - description: The specific API key you are working with. + in: path + name: key + required: true + schema: type: string - fargate_tasks_count_avg_sum: - description: Shows the average of all Fargate tasks over all hours in the - current months for all organizations. - format: int64 - type: integer - fargate_tasks_count_hwm_sum: - description: Shows the sum of the high-water marks of all Fargate tasks - over all hours in the current months for all organizations. - format: int64 - type: integer - forwarding_events_bytes_agg_sum: - description: Shows the sum of all logs forwarding bytes over all hours in - the current months for all organizations (data available as of April 1, - 2023) - format: int64 - type: integer - gcp_host_top99p_sum: - description: Shows the 99th percentile of all GCP hosts over all hours in - the current months for all organizations. - format: int64 - type: integer - heroku_host_top99p_sum: - description: Shows the 99th percentile of all Heroku dynos over all hours - in the current months for all organizations. - format: int64 - type: integer - incident_management_monthly_active_users_hwm_sum: - description: Shows sum of the the high-water marks of incident management - monthly active users in the current months for all organizations. - format: int64 - type: integer - indexed_events_count_agg_sum: - description: Shows the sum of all log events indexed over all hours in the - current months for all organizations. - format: int64 - type: integer - infra_host_top99p_sum: - description: Shows the 99th percentile of all distinct infrastructure hosts - over all hours in the current months for all organizations. - format: int64 - type: integer - ingested_events_bytes_agg_sum: - description: Shows the sum of all log bytes ingested over all hours in the - current months for all organizations. - format: int64 - type: integer - iot_device_agg_sum: - description: Shows the sum of all IoT devices over all hours in the current - months for all organizations. - format: int64 - type: integer - iot_device_top99p_sum: - description: Shows the 99th percentile of all IoT devices over all hours - in the current months of all organizations. - format: int64 - type: integer - last_updated: - description: Shows the the most recent hour in the current months for all - organizations for which all usages were calculated. - format: date-time + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get API key + tags: + - Key Management + put: + description: Edit an API key name. + operationId: UpdateAPIKey + parameters: + - description: The specific API key you are working with. + in: path + name: key + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKey' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApiKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Edit an API key + tags: + - Key Management + x-codegen-request-body-name: body + /api/v1/application_key: + get: + description: Get all application keys available for your Datadog account. + operationId: ListApplicationKeys + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyListResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all application keys + tags: + - Key Management + post: + description: Create an application key with a given name. + operationId: CreateApplicationKey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKey' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an application key + tags: + - Key Management + x-codegen-request-body-name: body + /api/v1/application_key/{key}: + delete: + description: Delete a given application key. + operationId: DeleteApplicationKey + parameters: + - description: The specific APP key you are working with. + in: path + name: key + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an application key + tags: + - Key Management + get: + description: Get a given application key. + operationId: GetApplicationKey + parameters: + - description: The specific APP key you are working with. + in: path + name: key + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get an application key + tags: + - Key Management + put: + description: Edit an application key name. + operationId: UpdateApplicationKey + parameters: + - description: The specific APP key you are working with. + in: path + name: key + required: true + schema: type: string - live_indexed_events_agg_sum: - description: Shows the sum of all live logs indexed over all hours in the - current months for all organizations (data available as of December 1, - 2020). - format: int64 - type: integer - live_ingested_bytes_agg_sum: - description: Shows the sum of all live logs bytes ingested over all hours - in the current months for all organizations (data available as of December - 1, 2020). - format: int64 - type: integer - logs_by_retention: - $ref: '#/components/schemas/LogsByRetention' - mobile_rum_lite_session_count_agg_sum: - description: Shows the sum of all mobile lite sessions over all hours in - the current months for all organizations. - format: int64 - type: integer - mobile_rum_session_count_agg_sum: - description: Shows the sum of all mobile RUM Sessions over all hours in - the current months for all organizations. - format: int64 - type: integer - mobile_rum_session_count_android_agg_sum: - description: Shows the sum of all mobile RUM Sessions on Android over all - hours in the current months for all organizations. - format: int64 - type: integer - mobile_rum_session_count_flutter_agg_sum: - description: Shows the sum of all mobile RUM Sessions on Flutter over all - hours in the current months for all organizations. - format: int64 - type: integer - mobile_rum_session_count_ios_agg_sum: - description: Shows the sum of all mobile RUM Sessions on iOS over all hours - in the current months for all organizations. - format: int64 - type: integer - mobile_rum_session_count_reactnative_agg_sum: - description: Shows the sum of all mobile RUM Sessions on React Native over - all hours in the current months for all organizations. - format: int64 - type: integer - mobile_rum_session_count_roku_agg_sum: - description: Shows the sum of all mobile RUM Sessions on Roku over all hours - in the current months for all organizations. - format: int64 - type: integer - mobile_rum_units_agg_sum: - description: Shows the sum of all mobile RUM units over all hours in the - current months for all organizations. - format: int64 - type: integer - ndm_netflow_events_agg_sum: - description: Shows the sum of all Network Device Monitoring NetFlow events - over all hours in the current months for all organizations. - format: int64 - type: integer - netflow_indexed_events_count_agg_sum: - description: Shows the sum of all Network flows indexed over all hours in - the current months for all organizations. - format: int64 - type: integer - npm_host_top99p_sum: - description: Shows the 99th percentile of all distinct Networks hosts over - all hours in the current months for all organizations. - format: int64 - type: integer - observability_pipelines_bytes_processed_agg_sum: - description: Sum of all observability pipelines bytes processed over all - hours in the current months for all organizations. - format: int64 - type: integer - online_archive_events_count_agg_sum: - description: Sum of all online archived events over all hours in the current - months for all organizations. - format: int64 - type: integer - opentelemetry_apm_host_top99p_sum: - description: Shows the 99th percentile of APM hosts reported by the Datadog - exporter for the OpenTelemetry Collector over all hours in the current - months for all organizations. - format: int64 - type: integer - opentelemetry_host_top99p_sum: - description: Shows the 99th percentile of all hosts reported by the Datadog - exporter for the OpenTelemetry Collector over all hours in the current - months for all organizations. - format: int64 - type: integer - profiling_aas_count_top99p_sum: - description: Shows the 99th percentile of all profiled Azure app services - over all hours in the current months for all organizations. - format: int64 - type: integer - profiling_container_agent_count_avg: - description: Shows the average number of profiled containers over all hours - in the current months for all organizations. - format: int64 - type: integer - profiling_host_count_top99p_sum: - description: Shows the 99th percentile of all profiled hosts over all hours - in the current months for all organizations. - format: int64 - type: integer - rehydrated_indexed_events_agg_sum: - description: Shows the sum of all rehydrated logs indexed over all hours - in the current months for all organizations (data available as of December - 1, 2020). - format: int64 - type: integer - rehydrated_ingested_bytes_agg_sum: - description: Shows the sum of all rehydrated logs bytes ingested over all - hours in the current months for all organizations (data available as of - December 1, 2020). - format: int64 - type: integer - rum_browser_and_mobile_session_count: - description: Shows the sum of all mobile sessions and all browser lite and - legacy sessions over all hours in the current month for all organizations. - format: int64 - type: integer - rum_session_count_agg_sum: - description: Shows the sum of all browser RUM Lite Sessions over all hours - in the current months for all organizations. - format: int64 - type: integer - rum_total_session_count_agg_sum: - description: Shows the sum of RUM Sessions (browser and mobile) over all - hours in the current months for all organizations. - format: int64 - type: integer - rum_units_agg_sum: - description: Shows the sum of all browser and mobile RUM units over all - hours in the current months for all organizations. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKey' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Edit an application key + tags: + - Key Management + x-codegen-request-body-name: body + /api/v1/check_run: + post: + description: 'Submit a list of Service Checks. + + + **Notes**: + + - A valid API key is required. + + - Service checks can be submitted up to 10 minutes in the past.' + operationId: SubmitServiceCheck + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceChecks' + description: Service Check request body. + required: true + responses: + '202': + content: + text/json: + schema: + $ref: '#/components/schemas/IntakePayloadAccepted' + description: Payload accepted + '400': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '408': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Request timeout + '413': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Payload too large + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + summary: Submit a Service Check + tags: + - Service Checks + x-codegen-request-body-name: body + /api/v1/daily_custom_reports: + get: + deprecated: true + description: 'Get daily custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' + operationId: GetDailyCustomReports + parameters: + - description: The number of files to return in the response. `[default=60]`. + in: query + name: page[size] + required: false + schema: format: int64 type: integer - sds_apm_scanned_bytes_sum: - description: Sum of all APM bytes scanned with sensitive data scanner in - the current months for all organizations. + - description: The identifier of the first page to return. This parameter is + used for the pagination feature `[default=0]`. + in: query + name: page[number] + required: false + schema: format: int64 type: integer - sds_events_scanned_bytes_sum: - description: Sum of all event stream events bytes scanned with sensitive - data scanner in the current months for all organizations. + - description: 'The direction to sort by: `[desc, asc]`.' + in: query + name: sort_dir + required: false + schema: + $ref: '#/components/schemas/UsageSortDirection' + - description: 'The field to sort by: `[computed_on, size, start_date, end_date]`.' + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/UsageSort' + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/UsageCustomReportsResponse' + description: OK + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + '429': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get the list of available daily custom reports + tags: + - Usage Metering + /api/v1/daily_custom_reports/{report_id}: + get: + deprecated: true + description: 'Get specified daily custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' + operationId: GetSpecifiedDailyCustomReports + parameters: + - description: Date of the report in the format `YYYY-MM-DD`. + in: path + name: report_id + required: true + schema: + type: string + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/UsageSpecifiedCustomReportsResponse' + description: OK + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + '404': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get specified daily custom reports + tags: + - Usage Metering + /api/v1/dashboard: + delete: + description: Delete dashboards using the specified IDs. If there are any failures, + no dashboards will be deleted (partial success is not allowed). + operationId: DeleteDashboards + requestBody: + content: + application/json: + examples: + json-request-body: + value: + data: + - id: 123-abc-456 + type: dashboard + - id: 789-def-101 + type: dashboard + schema: + $ref: '#/components/schemas/DashboardBulkDeleteRequest' + description: Delete dashboards request body. + required: true + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Dashboards Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Delete dashboards + tags: + - Dashboards + x-codegen-request-body-name: body + get: + description: 'Get all dashboards. + + + **Note**: This query will only return custom created or cloned dashboards. + + This query will not return preset dashboards.' + operationId: ListDashboards + parameters: + - description: 'When `true`, this query only returns shared custom created + + or cloned dashboards.' + in: query + name: filter[shared] + required: false + schema: + type: boolean + - description: 'When `true`, this query returns only deleted custom-created + + or cloned dashboards. This parameter is incompatible with `filter[shared]`.' + in: query + name: filter[deleted] + required: false + schema: + type: boolean + - description: The maximum number of dashboards returned in the list. + in: query + name: count + required: false + schema: + default: 100 format: int64 type: integer - sds_logs_scanned_bytes_sum: - description: Shows the sum of all bytes scanned of logs usage by the Sensitive - Data Scanner over all hours in the current month for all organizations. + - description: The specific offset to use as the beginning of the returned response. + in: query + name: start + required: false + schema: format: int64 type: integer - sds_rum_scanned_bytes_sum: - description: Sum of all RUM bytes scanned with sensitive data scanner in - the current months for all organizations. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardSummary' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get all dashboards + tags: + - Dashboards + x-pagination: + limitParam: count + pageOffsetParam: start + resultsPath: dashboards + patch: + description: Restore dashboards using the specified IDs. If there are any failures, + no dashboards will be restored (partial success is not allowed). + operationId: RestoreDashboards + requestBody: + content: + application/json: + examples: + json-request-body: + value: + data: + - id: 123-abc-456 + type: dashboard + - id: 789-def-101 + type: dashboard + schema: + $ref: '#/components/schemas/DashboardRestoreRequest' + description: Restore dashboards request body. + required: true + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Dashboards Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Restore deleted dashboards + tags: + - Dashboards + x-codegen-request-body-name: body + post: + description: 'Create a dashboard using the specified options. When defining + queries in your widgets, take note of which queries should have the `as_count()` + or `as_rate()` modifiers appended. + + Refer to the following [documentation](https://docs.datadoghq.com/developers/metrics/type_modifiers/?tab=count#in-application-modifiers) + for more information on these modifiers.' + operationId: CreateDashboard + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: Create a dashboard request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Create a new dashboard + tags: + - Dashboards + x-codegen-request-body-name: body + /api/v1/dashboard/lists/manual: + get: + description: Fetch all of your existing dashboard list definitions. + operationId: ListDashboardLists + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListListResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get all dashboard lists + tags: + - Dashboard Lists + post: + description: Create an empty dashboard list. + operationId: CreateDashboardList + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardList' + description: Create a dashboard list request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardList' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Create a dashboard list + tags: + - Dashboard Lists + x-codegen-request-body-name: body + /api/v1/dashboard/lists/manual/{list_id}: + delete: + description: Delete a dashboard list. + operationId: DeleteDashboardList + parameters: + - description: ID of the dashboard list to delete. + in: path + name: list_id + required: true + schema: format: int64 type: integer - sds_total_scanned_bytes_sum: - description: Shows the sum of all bytes scanned across all usage types by - the Sensitive Data Scanner over all hours in the current month for all - organizations. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListDeleteResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Delete a dashboard list + tags: + - Dashboard Lists + get: + description: Fetch an existing dashboard list's definition. + operationId: GetDashboardList + parameters: + - description: ID of the dashboard list to fetch. + in: path + name: list_id + required: true + schema: format: int64 type: integer - serverless_apps_azure_count_avg_sum: - description: Sum of the average number of Serverless Apps for Azure in the - current months for all organizations. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardList' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get a dashboard list + tags: + - Dashboard Lists + put: + description: Update the name of a dashboard list. + operationId: UpdateDashboardList + parameters: + - description: ID of the dashboard list to update. + in: path + name: list_id + required: true + schema: format: int64 type: integer - serverless_apps_google_count_avg_sum: - description: Sum of the average number of Serverless Apps for Google Cloud - in the current months for all organizations. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardList' + description: Update a dashboard list request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardList' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Update a dashboard list + tags: + - Dashboard Lists + x-codegen-request-body-name: body + /api/v1/dashboard/public: + post: + description: Share a specified private dashboard, generating a URL at which + it can be publicly viewed. + operationId: CreatePublicDashboard + requestBody: + content: + application/json: + examples: + json-request-body: + value: + dashboard_id: 123-abc-456 + dashboard_type: custom_timeboard + share_type: open + schema: + $ref: '#/components/schemas/SharedDashboard' + description: Create a shared dashboard request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SharedDashboard' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Dashboard Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_public_share + summary: Create a shared dashboard + tags: + - Dashboards + x-codegen-request-body-name: body + /api/v1/dashboard/public/{token}: + delete: + description: Revoke the public URL for a dashboard (rendering it private) associated + with the specified token. + operationId: DeletePublicDashboard + parameters: + - description: The token of the shared dashboard. + in: path + name: token + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteSharedDashboardResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Shared Dashboard Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_public_share + summary: Revoke a shared dashboard URL + tags: + - Dashboards + get: + description: Fetch an existing shared dashboard's sharing metadata associated + with the specified token. + operationId: GetPublicDashboard + parameters: + - description: The token of the shared dashboard. Generated when a dashboard + is shared. + in: path + name: token + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SharedDashboard' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Shared Dashboard Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get a shared dashboard + tags: + - Dashboards + put: + description: Update a shared dashboard associated with the specified token. + operationId: UpdatePublicDashboard + parameters: + - description: The token of the shared dashboard. + in: path + name: token + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + json-request-body: + value: + global_time: + live_span: 1h + selectable_template_vars: + - default_value: '*' + name: exampleVar + prefix: test + visible_tags: + - selectableValue1 + - selectableValue2 + share_list: + - test@datadoghq.com + - test2@datadoghq.com + share_type: invite + schema: + $ref: '#/components/schemas/SharedDashboardUpdateRequest' + description: Update Dashboard request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SharedDashboard' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_public_share + summary: Update a shared dashboard + tags: + - Dashboards + x-codegen-request-body-name: body + /api/v1/dashboard/public/{token}/invitation: + delete: + description: Revoke previously sent invitation emails and active sessions used + to access a given shared dashboard for specific email addresses. + operationId: DeletePublicDashboardInvitation + parameters: + - description: The token of the shared dashboard. + in: path + name: token + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + json-request-body: + value: + data: + attributes: + email: test@datadoghq.com + type: public_dashboard_invitation + schema: + $ref: '#/components/schemas/SharedDashboardInvites' + description: Shared Dashboard Invitation deletion request body. + required: true + responses: + '204': + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_public_share + summary: Revoke shared dashboard invitations + tags: + - Dashboards + x-codegen-request-body-name: body + get: + description: Describe the invitations that exist for the given shared dashboard + (paginated). + operationId: GetPublicDashboardInvitations + parameters: + - description: Token of the shared dashboard for which to fetch invitations. + in: path + name: token + required: true + schema: + type: string + - description: The number of records to return in a single request. + in: query + name: page_size + required: false + schema: format: int64 type: integer - serverless_apps_total_count_avg_sum: - description: Sum of the average number of Serverless Apps for Azure and - Google Cloud in the current months for all organizations. + - description: The page to access (base 0). + in: query + name: page_number + required: false + schema: format: int64 type: integer - start_date: - description: Shows the first date of usage in the current months for all - organizations. - format: date-time + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SharedDashboardInvites' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_public_share + summary: Get all invitations for a shared dashboard + tags: + - Dashboards + post: + description: Send emails to specified email addresses containing links to access + a given authenticated shared dashboard. Email addresses must already belong + to the authenticated shared dashboard's share_list. + operationId: SendPublicDashboardInvitation + parameters: + - description: The token of the shared dashboard. + in: path + name: token + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + json-request-body: + value: + data: + - attributes: + email: test@datadoghq.com + type: public_dashboard_invitation + schema: + $ref: '#/components/schemas/SharedDashboardInvites' + description: Shared Dashboard Invitation request body. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/SharedDashboardInvites' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_public_share + summary: Send shared dashboard invitation email + tags: + - Dashboards + x-codegen-request-body-name: body + /api/v1/dashboard/{dashboard_id}: + delete: + description: Delete a dashboard using the specified ID. + operationId: DeleteDashboard + parameters: + - description: The ID of the dashboard. + in: path + name: dashboard_id + required: true + schema: type: string - synthetics_browser_check_calls_count_agg_sum: - description: Shows the sum of all Synthetic browser tests over all hours - in the current months for all organizations. - format: int64 - type: integer - synthetics_check_calls_count_agg_sum: - description: Shows the sum of all Synthetic API tests over all hours in - the current months for all organizations. - format: int64 - type: integer - synthetics_mobile_test_runs_agg_sum: - description: Shows the sum of Synthetic mobile application tests over all - hours in the current months for all organizations. - format: int64 - type: integer - synthetics_parallel_testing_max_slots_hwm_sum: - description: Shows the sum of the high-water marks of used synthetics parallel - testing slots over all hours in the current month for all organizations. - format: int64 - type: integer - trace_search_indexed_events_count_agg_sum: - description: Shows the sum of all Indexed Spans indexed over all hours in - the current months for all organizations. - format: int64 - type: integer - twol_ingested_events_bytes_agg_sum: - description: Shows the sum of all ingested APM span bytes over all hours - in the current months for all organizations. - format: int64 - type: integer - universal_service_monitoring_host_top99p_sum: - description: Shows the 99th percentile of all Universal Service Monitoring - hosts over all hours in the current months for all organizations. - format: int64 - type: integer - usage: - description: An array of objects regarding hourly usage. - items: - $ref: '#/components/schemas/UsageSummaryDate' - type: array - vsphere_host_top99p_sum: - description: Shows the 99th percentile of all vSphere hosts over all hours - in the current months for all organizations. - format: int64 - type: integer - vuln_management_host_count_top99p_sum: - description: Shows the 99th percentile of all Application Vulnerability - Management hosts over all hours in the current months for all organizations. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardDeleteResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Dashboards Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Delete a dashboard + tags: + - Dashboards + get: + description: Get a dashboard using the specified ID. + operationId: GetDashboard + parameters: + - description: The ID of the dashboard. + in: path + name: dashboard_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get a dashboard + tags: + - Dashboards + put: + description: Update a dashboard using the specified ID. + operationId: UpdateDashboard + parameters: + - description: The ID of the dashboard. + in: path + name: dashboard_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: Update Dashboard request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Dashboard' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Update a dashboard + tags: + - Dashboards + x-codegen-request-body-name: body + /api/v1/distribution_points: + post: + description: "The distribution points end-point allows you to post distribution + data that can be graphed on Datadog\u2019s dashboards." + operationId: SubmitDistributionPoints + parameters: + - description: HTTP header used to compress the media-type. + in: header + name: Content-Encoding + required: false + schema: + $ref: '#/components/schemas/DistributionPointsContentEncoding' + requestBody: + content: + text/json: + examples: + dynamic-points: + description: "Post time-series data that can be graphed on Datadog\u2019s + dashboards." + externalValue: examples/metrics/distribution-points.json.sh + summary: Dynamic Points + x-variables: + NOW: $(date +%s) + schema: + $ref: '#/components/schemas/DistributionPointsPayload' + required: true + responses: + '202': + content: + text/json: + schema: + $ref: '#/components/schemas/IntakePayloadAccepted' + description: Payload accepted + '400': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '408': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Request timeout + '413': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Payload too large + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + summary: Submit distribution points + tags: + - Metrics + x-codegen-request-body-name: body + /api/v1/downtime: + get: + deprecated: true + description: Get all scheduled downtimes. **Note:** This endpoint has been deprecated. + Please use v2 endpoints. + operationId: ListDowntimes + parameters: + - description: Only return downtimes that are active when the request is made. + in: query + name: current_only + required: false + schema: + type: boolean + - description: Return creator information. + in: query + name: with_creator + required: false + schema: + type: boolean + responses: + '200': + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Downtime' + type: array + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Get all downtimes + tags: + - Downtimes + post: + deprecated: true + description: Schedule a downtime. **Note:** This endpoint has been deprecated. + Please use v2 endpoints. + operationId: CreateDowntime + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Downtime' + description: Schedule a downtime request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Downtime' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Schedule a downtime + tags: + - Downtimes + x-codegen-request-body-name: body + /api/v1/downtime/cancel/by_scope: + post: + deprecated: true + description: Delete all downtimes that match the scope of `X`. **Note:** This + only interacts with Downtimes created using v1 endpoints. This endpoint has + been deprecated and will not be replaced. Please use v2 endpoints to find + and cancel downtimes. + operationId: CancelDowntimesByScope + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CancelDowntimesByScopeRequest' + description: Scope to cancel downtimes for. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CanceledDowntimesIds' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Downtimes not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Cancel downtimes by scope + tags: + - Downtimes + x-codegen-request-body-name: body + /api/v1/downtime/{downtime_id}: + delete: + deprecated: true + description: Cancel a downtime. **Note:** This endpoint has been deprecated. + Please use v2 endpoints. + operationId: CancelDowntime + parameters: + - description: ID of the downtime to cancel. + in: path + name: downtime_id + required: true + schema: + example: 123456 format: int64 type: integer - workflow_executions_usage_agg_sum: - description: Sum of all workflows executed over all hours in the current - months for all organizations. + responses: + '204': + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Downtime not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Cancel a downtime + tags: + - Downtimes + get: + deprecated: true + description: Get downtime detail by `downtime_id`. **Note:** This endpoint has + been deprecated. Please use v2 endpoints. + operationId: GetDowntime + parameters: + - description: ID of the downtime to fetch. + in: path + name: downtime_id + required: true + schema: + example: 123456 format: int64 type: integer - type: object - UsageSyntheticsAPIHour: - description: Number of Synthetics API tests run for each hour for a given organization. - properties: - check_calls_count: - description: Contains the number of Synthetics API tests run. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Downtime' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Downtime not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Get a downtime + tags: + - Downtimes + put: + deprecated: true + description: Update a single downtime by `downtime_id`. **Note:** This endpoint + has been deprecated. Please use v2 endpoints. + operationId: UpdateDowntime + parameters: + - description: ID of the downtime to update. + in: path + name: downtime_id + required: true + schema: + example: 123456 format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageSyntheticsAPIResponse: - description: Response containing the number of Synthetics API tests run for - each hour for a given organization. - properties: - usage: - description: Get hourly usage for Synthetics API tests. - items: - $ref: '#/components/schemas/UsageSyntheticsAPIHour' - type: array - type: object - UsageSyntheticsBrowserHour: - description: Number of Synthetics Browser tests run for each hour for a given - organization. - properties: - browser_check_calls_count: - description: Contains the number of Synthetics Browser tests run. + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Downtime' + description: Update a downtime request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Downtime' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Downtime not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Update a downtime + tags: + - Downtimes + x-codegen-request-body-name: body + /api/v1/events: + get: + description: "The event stream can be queried and filtered by time, priority, + sources and tags.\n\n**Notes**:\n- If the event you\u2019re querying contains + markdown formatting of any kind,\nyou may see characters such as `%`,`\\`,`n` + in your output.\n\n- This endpoint returns a maximum of `1000` most recent + results. To return additional results,\nidentify the last timestamp of the + last result and set that as the `end` query time to\npaginate the results. + You can also use the page parameter to specify which set of `1000` results + to return." + operationId: ListEvents + parameters: + - description: POSIX timestamp. + in: query + name: start + required: true + schema: format: int64 - nullable: true type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageSyntheticsBrowserResponse: - description: Response containing the number of Synthetics Browser tests run - for each hour for a given organization. - properties: - usage: - description: Get hourly usage for Synthetics Browser tests. - items: - $ref: '#/components/schemas/UsageSyntheticsBrowserHour' - type: array - type: object - UsageSyntheticsHour: - description: The number of synthetics tests run for each hour for a given organization. - properties: - check_calls_count: - description: Contains the number of Synthetics API tests run. + - description: POSIX timestamp. + in: query + name: end + required: true + schema: format: int64 type: integer - hour: - description: The hour for the usage. - format: date-time - type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. + - description: Priority of your events, either `low` or `normal`. + in: query + name: priority + required: false + schema: + $ref: '#/components/schemas/EventPriority' + - description: A comma separated string of sources. + in: query + name: sources + schema: type: string - type: object - UsageSyntheticsResponse: - description: Response containing the number of Synthetics API tests run for - each hour for a given organization. - properties: - usage: - description: Array with the number of hourly Synthetics test run for a given - organization. - items: - $ref: '#/components/schemas/UsageSyntheticsHour' - type: array - type: object - UsageTimeseriesHour: - description: The hourly usage of timeseries. - properties: - hour: - description: The hour for the usage. - format: date-time + - description: A comma separated list indicating what tags, if any, should be + used to filter the list of events. + example: host:host0 + in: query + name: tags + required: false + schema: type: string - num_custom_input_timeseries: - description: Contains the number of custom metrics that are inputs for aggregations - (metric configured is custom). - format: int64 - type: integer - num_custom_output_timeseries: - description: Contains the number of custom metrics that are outputs for - aggregations (metric configured is custom). - format: int64 + - description: 'Set unaggregated to `true` to return all events within the specified + [`start`,`end`] timeframe. + + Otherwise if an event is aggregated to a parent event with a timestamp outside + of the timeframe, + + it won''t be available in the output. Aggregated events with `is_aggregate=true` + in the response will still be returned unless exclude_aggregate is set to + `true.`' + in: query + name: unaggregated + required: false + schema: + type: boolean + - description: 'Set `exclude_aggregate` to `true` to only return unaggregated + events where `is_aggregate=false` in the response. If the `exclude_aggregate` + parameter is set to `true`, + + then the unaggregated parameter is ignored and will be `true` by default.' + in: query + name: exclude_aggregate + required: false + schema: + type: boolean + - description: 'By default 1000 results are returned per request. Set page to + the number of the page to return with `0` being the first page. The page + parameter can only be used + + when either unaggregated or exclude_aggregate is set to `true.`' + in: query + name: page + required: false + schema: + format: int32 + maximum: 2147483647 type: integer - num_custom_timeseries: - description: Contains sum of non-aggregation custom metrics and custom metrics - that are outputs for aggregations. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - events_read + summary: Get a list of events + tags: + - Events + post: + description: 'This endpoint allows you to post events to the stream. + + Tag them, set priority and event aggregate them with other events.' + operationId: CreateEvent + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventCreateRequest' + description: Event request object + required: true + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/EventCreateResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + summary: Post an event + tags: + - Events + x-codegen-request-body-name: body + /api/v1/events/{event_id}: + get: + description: "This endpoint allows you to query for event details.\n\n**Note**: + If the event you\u2019re querying contains markdown formatting of any kind,\nyou + may see characters such as `%`,`\\`,`n` in your output." + operationId: GetEvent + parameters: + - description: The ID of the event. + in: path + name: event_id + required: true + schema: format: int64 type: integer - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - type: object - UsageTimeseriesResponse: - description: Response containing hourly usage of timeseries. - properties: - usage: - description: An array of objects regarding hourly usage of timeseries. - items: - $ref: '#/components/schemas/UsageTimeseriesHour' - type: array - type: object - UsageTopAvgMetricsHour: - description: Number of hourly recorded custom metrics for a given organization. - properties: - avg_metric_hour: - description: Average number of timeseries per hour in which the metric occurs. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - events_read + summary: Get an event + tags: + - Events + /api/v1/graph/snapshot: + get: + description: 'Take graph snapshots. + + **Note**: When a snapshot is created, there is some delay before it is available.' + operationId: GetGraphSnapshot + parameters: + - description: The metric query. + in: query + name: metric_query + schema: + type: string + - description: The POSIX timestamp of the start of the query in seconds. + in: query + name: start + required: true + schema: format: int64 type: integer - max_metric_hour: - description: Maximum number of timeseries per hour in which the metric occurs. + - description: The POSIX timestamp of the end of the query in seconds. + in: query + name: end + required: true + schema: format: int64 type: integer - metric_category: - $ref: '#/components/schemas/UsageMetricCategory' - metric_name: - description: Contains the custom metric name. + - description: A query that adds event bands to the graph. + in: query + name: event_query + required: false + schema: type: string - type: object - UsageTopAvgMetricsMetadata: - description: The object containing document metadata. - properties: - day: - description: The day value from the user request that contains the returned - usage data. (If day was used the request) - format: date-time + - description: 'A JSON document defining the graph. `graph_def` can be used + instead of `metric_query`. + + The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) + + and should be formatted to a single line then URL encoded.' + in: query + name: graph_def + required: false + schema: type: string - month: - description: The month value from the user request that contains the returned - usage data. (If month was used the request) - format: date-time + - description: A title for the graph. If no title is specified, the graph does + not have a title. + in: query + name: title + required: false + schema: type: string - pagination: - $ref: '#/components/schemas/UsageTopAvgMetricsPagination' - type: object - UsageTopAvgMetricsPagination: - description: The metadata for the current pagination. - properties: - limit: - description: Maximum amount of records to be returned. + - description: The height of the graph. If no height is specified, the graph's + original height is used. + in: query + name: height + required: false + schema: format: int64 type: integer - next_record_id: - description: The cursor to get the next results (if any). To make the next - request, use the same parameters and add `next_record_id`. - nullable: true - type: string - total_number_of_records: - description: Total number of records. + - description: The width of the graph. If no width is specified, the graph's + original width is used. + in: query + name: width + required: false + schema: format: int64 - nullable: true type: integer - type: object - UsageTopAvgMetricsResponse: - description: Response containing the number of hourly recorded custom metrics - for a given organization. - properties: - metadata: - $ref: '#/components/schemas/UsageTopAvgMetricsMetadata' - usage: - description: Number of hourly recorded custom metrics for a given organization. - items: - $ref: '#/components/schemas/UsageTopAvgMetricsHour' - type: array - type: object - User: - description: Create, edit, and disable users. - properties: - access_role: - $ref: '#/components/schemas/AccessRole' - disabled: - description: The new disabled status of the user. - example: false - type: boolean - email: - description: The new email of the user. - example: test@datadoghq.com - format: email - type: string - handle: - description: The user handle, must be a valid email. - example: test@datadoghq.com - format: email - type: string - icon: - description: Gravatar icon associated to the user. - example: /path/to/matching/gravatar/icon - readOnly: true - type: string - name: - description: The name of the user. - example: test user - type: string - verified: - description: Whether or not the user logged in Datadog at least once. - example: true - readOnly: true - type: boolean - type: object - UserDisableResponse: - description: Array of user disabled for a given organization. - properties: - message: - description: Information pertaining to a user disabled for a given organization. - type: string - type: object - UserListResponse: - description: Array of Datadog users for a given organization. - properties: - users: - description: Array of users. - items: - $ref: '#/components/schemas/User' - type: array - type: object - UserResponse: - description: A Datadog User. - properties: - user: - $ref: '#/components/schemas/User' - type: object - Version: - description: Version of the updated signal. If server side version is higher, - update will be rejected. - format: int64 - type: integer - WebhooksIntegration: - description: Datadog-Webhooks integration. - properties: - custom_headers: - description: 'If `null`, uses no header. - - If given a JSON payload, these will be headers attached to your webhook.' - nullable: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GraphSnapshot' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Take graph snapshots + tags: + - Snapshots + /api/v1/host/{host_name}/mute: + post: + description: Mute a host. **Note:** This creates a [Downtime V2](https://docs.datadoghq.com/api/latest/downtimes/#schedule-a-downtime) + for the host. + operationId: MuteHost + parameters: + - description: Name of the host to mute. + in: path + name: host_name + required: true + schema: type: string - encode_as: - $ref: '#/components/schemas/WebhooksIntegrationEncoding' - name: - description: 'The name of the webhook. It corresponds with ``. - - Learn more on how to use it in - - [monitor notifications](https://docs.datadoghq.com/monitors/notify).' - example: WEBHOOK_NAME + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/HostMuteSettings' + description: Mute a host request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HostMuteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Invalid Parameter Error + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Mute a host + tags: + - Hosts + x-codegen-request-body-name: body + /api/v1/host/{host_name}/unmute: + post: + description: Unmutes a host. This endpoint takes no JSON arguments. + operationId: UnmuteHost + parameters: + - description: Name of the host to unmute. + in: path + name: host_name + required: true + schema: type: string - payload: - description: 'If `null`, uses the default payload. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HostMuteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Invalid Parameter Error + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Unmute a host + tags: + - Hosts + x-codegen-request-body-name: body + /api/v1/hosts: + get: + description: 'This endpoint allows searching for hosts by name, alias, or tag. - If given a JSON payload, the webhook returns the payload + Hosts live within the past 3 hours are included by default. - specified by the given payload. + Retention is 7 days. - [Webhooks variable usage](https://docs.datadoghq.com/integrations/webhooks/#usage).' - nullable: true - type: string - url: - description: URL of the webhook. - example: https://example.com/webhook + Results are paginated with a max of 1000 results at a time.' + operationId: ListHosts + parameters: + - description: String to filter search results. + in: query + name: filter + required: false + schema: type: string - required: - - name - - url - type: object - WebhooksIntegrationCustomVariable: - description: Custom variable for Webhook integration. - properties: - is_secret: - description: 'Make custom variable is secret or not. - - If the custom variable is secret, the value is not returned in the response - payload.' - example: true - type: boolean - name: - description: The name of the variable. It corresponds with ``. - example: CUSTOM_VARIABLE_NAME + - description: Sort hosts by this field. + in: query + name: sort_field + required: false + schema: type: string - value: - description: Value of the custom variable. - example: CUSTOM_VARIABLE_VALUE + - description: Direction of sort. Options include `asc` and `desc`. + in: query + name: sort_dir + required: false + schema: type: string - required: - - name - - value - - is_secret - type: object - WebhooksIntegrationCustomVariableResponse: - description: Custom variable for Webhook integration. - properties: - is_secret: - description: 'Make custom variable is secret or not. - - If the custom variable is secret, the value is not returned in the response - payload.' - example: true + - description: Host result to start search from. + in: query + name: start + required: false + schema: + format: int64 + type: integer + - description: Number of hosts to return. Max 1000. + in: query + name: count + required: false + schema: + format: int64 + type: integer + - description: Number of seconds since UNIX epoch from which you want to search + your hosts. + in: query + name: from + required: false + schema: + format: int64 + type: integer + - description: Include information on the muted status of hosts and when the + mute expires. + in: query + name: include_muted_hosts_data + required: false + schema: type: boolean - name: - description: The name of the variable. It corresponds with ``. - It must only contains upper-case characters, integers or underscores. - example: CUSTOM_VARIABLE_NAME - type: string - value: - description: Value of the custom variable. It won't be returned if the variable - is secret. - example: CUSTOM_VARIABLE_VALUE - type: string - required: - - name - - is_secret - type: object - WebhooksIntegrationCustomVariableUpdateRequest: - description: 'Update request of a custom variable object. - - - *All properties are optional.*' - properties: - is_secret: - description: 'Make custom variable is secret or not. - - If the custom variable is secret, the value is not returned in the response - payload.' + - description: Include additional metadata about the hosts (agent_version, machine, + platform, processor, etc.). + in: query + name: include_hosts_metadata + required: false + schema: type: boolean - name: - description: The name of the variable. It corresponds with ``. - It must only contains upper-case characters, integers or underscores. - example: CUSTOM_VARIABLE_NAME - type: string - value: - description: Value of the custom variable. - example: CUSTOM_VARIABLE_VALUE + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HostListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Invalid Parameter Error + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get all hosts for your organization + tags: + - Hosts + /api/v1/hosts/totals: + get: + description: 'This endpoint returns the total number of active and up hosts + in your Datadog account. + + Active means the host has reported in the past hour, and up means it has reported + in the past two hours.' + operationId: GetHostTotals + parameters: + - description: Number of seconds from which you want to get total number of + active hosts. + in: query + name: from + required: false + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/HostTotals' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Invalid Parameter Error + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get the total number of active hosts + tags: + - Hosts + /api/v1/integration/aws: + delete: + description: Delete a Datadog-AWS integration matching the specified `account_id` + and `role_name parameters`. + operationId: DeleteAWSAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountDeleteRequest' + description: AWS request object + required: true + responses: + '200': + content: + application/json: + schema: + type: object + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an AWS integration + tags: + - AWS Integration + x-codegen-request-body-name: body + get: + description: List all Datadog-AWS integrations available in your Datadog organization. + operationId: ListAWSAccounts + parameters: + - description: Only return AWS accounts that matches this `account_id`. + in: query + name: account_id + required: false + schema: type: string - type: object - WebhooksIntegrationEncoding: - default: json - description: Encoding type. Can be given either `json` or `form`. - enum: - - json - - form - type: string - x-enum-varnames: - - JSON - - FORM - WebhooksIntegrationUpdateRequest: - description: 'Update request of a Webhooks integration object. - - - *All properties are optional.*' - properties: - custom_headers: - description: 'If `null`, uses no header. - - If given a JSON payload, these will be headers attached to your webhook.' + - description: Only return AWS accounts that matches this role_name. + in: query + name: role_name + required: false + schema: type: string - encode_as: - $ref: '#/components/schemas/WebhooksIntegrationEncoding' - name: - description: 'The name of the webhook. It corresponds with ``. - - Learn more on how to use it in - - [monitor notifications](https://docs.datadoghq.com/monitors/notify).' - example: WEBHOOK_NAME + - description: Only return AWS accounts that matches this `access_key_id`. + in: query + name: access_key_id + required: false + schema: type: string - payload: - description: 'If `null`, uses the default payload. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List all AWS integrations + tags: + - AWS Integration + post: + description: 'Create a Datadog-Amazon Web Services integration. - If given a JSON payload, the webhook returns the payload + Using the `POST` method updates your integration configuration - specified by the given payload. + by adding your new configuration to the existing one in your Datadog organization. - [Webhooks variable usage](https://docs.datadoghq.com/integrations/webhooks/#usage).' - nullable: true - type: string - url: - description: URL of the webhook. - example: https://example.com/webhook - type: string - type: object - securitySchemes: - AuthZ: - description: This API uses OAuth 2 with the implicit grant flow. - flows: - authorizationCode: - authorizationUrl: /oauth2/v1/authorize - scopes: - apm_service_catalog_read: View service catalog and service definitions. - apm_service_catalog_write: Add, modify, and delete service catalog definitions - when those definitions are maintained by Datadog. - ci_visibility_pipelines_write: Create CI Visibility pipeline spans using - the API. - ci_visibility_read: View CI Visibility. - create_webhooks: Create webhooks integrations. - dashboards_public_share: Generate public and authenticated links to share - dashboards or embeddable graphs externally. - dashboards_read: View dashboards. - dashboards_write: Create and change dashboards. - events_read: Read Events data. - incident_notification_settings_write: Configure Incidents Notification - settings. - incident_read: View incidents in Datadog. - incident_settings_write: Configure Incident Settings. - incident_write: Create, view, and manage incidents in Datadog. - metrics_read: View custom metrics. - monitors_downtime: Set downtimes to suppress alerts from any monitor in - an organization. Mute and unmute hosts. The ability to write monitors - is not required to set downtimes. - monitors_read: View monitors. - monitors_write: Edit, mute, and delete individual monitors. - security_monitoring_filters_read: Read Security Filters. - security_monitoring_filters_write: Create, edit, and delete Security Filters. - security_monitoring_findings_read: View CSPM Findings. - security_monitoring_rules_read: Read Detection Rules. - security_monitoring_rules_write: Create and edit Detection Rules. - security_monitoring_signals_read: View Security Signals. - security_monitoring_suppressions_read: Read Rule Suppressions. - security_monitoring_suppressions_write: Write Rule Suppressions. - slos_corrections: Apply, edit, and delete SLO status corrections. A user - with this permission can make status corrections, even if they do not - have permission to edit those SLOs. - slos_read: View SLOs and status corrections. - slos_write: Create, edit, and delete SLOs. - synthetics_global_variable_read: View, search, and use Synthetics global - variables. - synthetics_global_variable_write: Create, edit, and delete global variables - for Synthetics. - synthetics_private_location_read: View, search, and use Synthetics private - locations. - synthetics_private_location_write: Create and delete private locations - in addition to having access to the associated installation guidelines. - synthetics_read: List and view configured Synthetic tests and test results. - synthetics_write: Create, edit, and delete Synthetic tests. - teams_manage: Manage Teams. Create, delete, rename, and edit metadata - of all Teams. To control Team membership across all Teams, use the User - Access Manage permission. - teams_read: Read Teams data. A User with this permission can view Team - names, metadata, and which Users are on each Team. - timeseries_query: Query Timeseries data. - usage_read: View your organization's usage and usage attribution. - user_access_invite: Invite other users to your organization. - user_access_manage: Disable users, manage user roles, manage SAML-to-role - mappings, and configure logs restriction queries. - user_access_read: View users and their roles and settings. - tokenUrl: /oauth2/v1/token - type: oauth2 - apiKeyAuth: - description: Your Datadog API Key. - in: header - name: DD-API-KEY - type: apiKey - x-env-name: DD_API_KEY - apiKeyAuthQuery: - description: Deprecated API Key as query argument. - in: query - name: api_key - type: apiKey - x-auth-id-alias: apiKeyAuth - x-env-name: DD_API_KEY - appKeyAuth: - description: Your Datadog APP Key. - in: header - name: DD-APPLICATION-KEY - type: apiKey - x-env-name: DD_APP_KEY - appKeyAuthQuery: - description: Deprecated APP Key as query argument. - in: query - name: application_key - type: apiKey - x-auth-id-alias: appKeyAuth - x-env-name: DD_APP_KEY -info: - contact: - email: support@datadoghq.com - name: Datadog Support - url: https://www.datadoghq.com/support/ - description: Collection of all Datadog Public endpoints. - title: Datadog API V1 Collection - version: '1.0' -openapi: 3.0.0 -paths: - /: + A unique AWS Account ID for role based authentication.' + operationId: CreateAWSAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccount' + description: AWS Request Object + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountCreateResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an AWS integration + tags: + - AWS Integration + x-codegen-request-body-name: body + put: + description: Update a Datadog-Amazon Web Services integration. + operationId: UpdateAWSAccount + parameters: + - description: Only return AWS accounts that matches this `account_id`. + in: query + name: account_id + required: false + schema: + type: string + - description: 'Only return AWS accounts that match this `role_name`. + + Required if `account_id` is specified.' + in: query + name: role_name + required: false + schema: + type: string + - description: 'Only return AWS accounts that matches this `access_key_id`. + + Required if none of the other two options are specified.' + in: query + name: access_key_id + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccount' + description: AWS request object + required: true + responses: + '200': + content: + application/json: + schema: + type: object + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update an AWS integration + tags: + - AWS Integration + x-codegen-request-body-name: body + /api/v1/integration/aws/available_namespace_rules: get: - description: Get information about Datadog IP ranges. - operationId: GetIPRanges + description: List all namespace rules for a given Datadog-AWS integration. This + endpoint takes no arguments. + operationId: ListAvailableAWSNamespaces + responses: + '200': + content: + application/json: + schema: + example: + - namespace1 + - namespace2 + - namespace3 + items: + type: string + type: array + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List namespace rules + tags: + - AWS Integration + /api/v1/integration/aws/event_bridge: + delete: + description: Delete an Amazon EventBridge source. + operationId: DeleteAWSEventBridgeSource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeDeleteRequest' + description: Delete the Amazon EventBridge source with the given name, region, + and associated AWS account. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeDeleteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an Amazon EventBridge source + tags: + - AWS Integration + x-codegen-request-body-name: body + get: + description: Get all Amazon EventBridge sources. + operationId: ListAWSEventBridgeSources + parameters: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get all Amazon EventBridge sources + tags: + - AWS Integration + post: + description: Create an Amazon EventBridge source. + operationId: CreateAWSEventBridgeSource + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeCreateRequest' + description: Create an Amazon EventBridge source for an AWS account with a + given name and region. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSEventBridgeCreateResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an Amazon EventBridge source + tags: + - AWS Integration + x-codegen-request-body-name: body + /api/v1/integration/aws/filtering: + delete: + description: Delete a tag filtering entry. + operationId: DeleteAWSTagFilter + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSTagFilterDeleteRequest' + description: Delete a tag filtering entry for a given AWS account and `dd-aws` + namespace. + required: true + responses: + '200': + content: + application/json: + schema: + example: {} + type: object + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a tag filtering entry + tags: + - AWS Integration + x-codegen-request-body-name: body + get: + description: Get all AWS tag filters. + operationId: ListAWSTagFilters + parameters: + - description: Only return AWS filters that matches this `account_id`. + in: query + name: account_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSTagFilterListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all AWS tag filters + tags: + - AWS Integration + post: + description: Set an AWS tag filter. + operationId: CreateAWSTagFilter + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSTagFilterCreateRequest' + description: 'Set an AWS tag filter using an `aws_account_identifier`, `namespace`, + and filtering string. + + Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, + `rds`, `sqs`, and `custom`.' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/IPRanges' + example: {} + type: object description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: [] - servers: - - url: https://{subdomain}.{site} - variables: - site: - default: datadoghq.com - description: The regional site for Datadog customers. - enum: - - datadoghq.com - - us3.datadoghq.com - - us5.datadoghq.com - - ap1.datadoghq.com - - datadoghq.eu - - ddog-gov.com - subdomain: - default: ip-ranges - description: The subdomain where the API is deployed. - - url: '{protocol}://{name}' - variables: - name: - default: ip-ranges.datadoghq.com - description: Full site DNS name. - protocol: - default: https - description: The protocol for accessing the API. - - url: https://{subdomain}.datadoghq.com - variables: - subdomain: - default: ip-ranges - description: The subdomain where the API is deployed. - summary: List IP Ranges + summary: Set an AWS tag filter tags: - - IP Ranges - /api/v1/api_key: - get: - description: Get all API keys available for your account. - operationId: ListAPIKeys + - AWS Integration + x-codegen-request-body-name: body + /api/v1/integration/aws/generate_new_external_id: + put: + description: Generate a new AWS external ID for a given AWS account ID and role + name pair. + operationId: CreateNewAWSExternalID + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccount' + description: 'Your Datadog role delegation name. + + For more information about your AWS account Role name, + + see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApiKeyListResponse' + $ref: '#/components/schemas/AWSAccountCreateResponse' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all API keys + summary: Generate a new external ID tags: - - Key Management - post: - description: Creates an API key with a given name. - operationId: CreateAPIKey + - AWS Integration + x-codegen-request-body-name: body + /api/v1/integration/aws/logs: + delete: + description: Delete a Datadog-AWS logs configuration by removing the specific + Lambda ARN associated with a given AWS account. + operationId: DeleteAWSLambdaARN requestBody: content: application/json: schema: - $ref: '#/components/schemas/ApiKey' + $ref: '#/components/schemas/AWSAccountAndLambdaRequest' + description: Delete AWS Lambda ARN request body. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApiKeyResponse' + type: object description: OK '400': content: @@ -10432,30 +24273,35 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create an API key + summary: Delete an AWS Logs integration tags: - - Key Management + - AWS Logs Integration x-codegen-request-body-name: body - /api/v1/api_key/{key}: - delete: - description: Delete a given API key. - operationId: DeleteAPIKey - parameters: - - description: The specific API key you are working with. - in: path - name: key - required: true - schema: - type: string + get: + description: List all Datadog-AWS Logs integrations configured in your Datadog + account. + operationId: ListAWSLogsIntegrations responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApiKeyResponse' + example: + - account_id: '123456789101' + lambdas: [] + services: + - s3 + - elb + - elbv2 + - cloudfront + - redshift + - lambda + items: + $ref: '#/components/schemas/AWSLogsListResponse' + type: array description: OK '400': content: @@ -10468,74 +24314,160 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List all AWS Logs integrations + tags: + - AWS Logs Integration + post: + description: Attach the Lambda ARN of the Lambda created for the Datadog-AWS + log collection to your AWS account ID to enable log collection. + operationId: CreateAWSLambdaARN + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountAndLambdaRequest' + description: AWS Log Lambda Async request body. + required: true + responses: + '200': + content: + application/json: + schema: + type: object + description: OK + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an API key + summary: Add AWS Log Lambda ARN tags: - - Key Management - get: - description: Get a given API key. - operationId: GetAPIKey - parameters: - - description: The specific API key you are working with. - in: path - name: key + - AWS Logs Integration + x-codegen-request-body-name: body + /api/v1/integration/aws/logs/check_async: + post: + description: 'Test if permissions are present to add a log-forwarding triggers + for the given services and AWS account. The input + + is the same as for Enable an AWS service log collection. Subsequent requests + will always repeat the above, so this + + endpoint can be polled intermittently instead of blocking. + + + - Returns a status of ''created'' when it''s checking if the Lambda exists + in the account. + + - Returns a status of ''waiting'' while checking. + + - Returns a status of ''checked and ok'' if the Lambda exists. + + - Returns a status of ''error'' if the Lambda does not exist.' + operationId: CheckAWSLogsLambdaAsync + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSAccountAndLambdaRequest' + description: Check AWS Log Lambda Async request body. required: true - schema: - type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApiKeyResponse' + $ref: '#/components/schemas/AWSLogsAsyncResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Check that an AWS Lambda Function exists + tags: + - AWS Logs Integration + x-codegen-request-body-name: body + /api/v1/integration/aws/logs/services: + get: + description: Get the list of current AWS services that Datadog offers automatic + log collection. Use returned service IDs with the services parameter for the + Enable an AWS service log collection API endpoint. + operationId: ListAWSLogsServices + responses: + '200': + content: + application/json: + schema: + example: + - id: s3 + label: S3 Access Logs + - id: elb + label: Classic ELB Access Logs + - id: elbv2 + label: Application ELB Access Logs + - id: cloudfront + label: CloudFront Access Logs + - id: redshift + label: Redshift Logs + - id: lambda + label: Lambda Cloudwatch Logs + items: + $ref: '#/components/schemas/AWSLogsListServicesResponse' + type: array description: OK '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get API key + summary: Get list of AWS log ready services tags: - - Key Management - put: - description: Edit an API key name. - operationId: UpdateAPIKey - parameters: - - description: The specific API key you are working with. - in: path - name: key - required: true - schema: - type: string + - AWS Logs Integration + post: + description: Enable automatic log collection for a list of services. This should + be run after running `CreateAWSLambdaARN` to save the configuration. + operationId: EnableAWSLogServices requestBody: content: application/json: schema: - $ref: '#/components/schemas/ApiKey' + $ref: '#/components/schemas/AWSLogsServicesRequest' + description: Enable AWS Log Services request body. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApiKeyResponse' + type: object description: OK '400': content: @@ -10548,56 +24480,73 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Edit an API key + summary: Enable an AWS Logs integration tags: - - Key Management + - AWS Logs Integration x-codegen-request-body-name: body - /api/v1/application_key: - get: - description: Get all application keys available for your Datadog account. - operationId: ListApplicationKeys + /api/v1/integration/aws/logs/services_async: + post: + description: "Test if permissions are present to add log-forwarding triggers + for the\ngiven services and AWS account. Input is the same as for `EnableAWSLogServices`.\nDone + async, so can be repeatedly polled in a non-blocking fashion until\nthe async + request completes.\n\n- Returns a status of `created` when it's checking if + the permissions exists\n in the AWS account.\n- Returns a status of `waiting` + while checking.\n- Returns a status of `checked and ok` if the Lambda exists.\n- + Returns a status of `error` if the Lambda does not exist." + operationId: CheckAWSLogsServicesAsync + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AWSLogsServicesRequest' + description: Check AWS Logs Async Services request body. + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApplicationKeyListResponse' + $ref: '#/components/schemas/AWSLogsAsyncResponse' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all application keys + summary: Check permissions for log services tags: - - Key Management - post: - description: Create an application key with a given name. - operationId: CreateApplicationKey + - AWS Logs Integration + x-codegen-request-body-name: body + /api/v1/integration/azure: + delete: + description: Delete a given Datadog-Azure integration from your Datadog account. + operationId: DeleteAzureIntegration requestBody: content: application/json: schema: - $ref: '#/components/schemas/ApplicationKey' + $ref: '#/components/schemas/AzureAccount' + description: Delete a given Datadog-Azure integration request body. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApplicationKeyResponse' + example: {} + type: object description: OK '400': content: @@ -10610,110 +24559,114 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Conflict + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create an application key + summary: Delete an Azure integration tags: - - Key Management + - Azure Integration x-codegen-request-body-name: body - /api/v1/application_key/{key}: - delete: - description: Delete a given application key. - operationId: DeleteApplicationKey - parameters: - - description: The specific APP key you are working with. - in: path - name: key - required: true - schema: - type: string + get: + description: List all Datadog-Azure integrations configured in your Datadog + account. + operationId: ListAzureIntegration responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApplicationKeyResponse' + $ref: '#/components/schemas/AzureAccountListResponse' description: OK - '403': + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an application key + summary: List all Azure integrations tags: - - Key Management - get: - description: Get a given application key. - operationId: GetApplicationKey - parameters: - - description: The specific APP key you are working with. - in: path - name: key + - Azure Integration + post: + description: 'Create a Datadog-Azure integration. + + + Using the `POST` method updates your integration configuration by adding your + new + + configuration to the existing one in your Datadog organization. + + + Using the `PUT` method updates your integration configuration by replacing + your + + current configuration with the new one sent to your Datadog organization.' + operationId: CreateAzureIntegration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureAccount' + description: Create a Datadog-Azure integration for your Datadog account request + body. required: true - schema: - type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApplicationKeyResponse' + example: {} + type: object description: OK - '403': + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get an application key + summary: Create an Azure integration tags: - - Key Management + - Azure Integration + x-codegen-request-body-name: body put: - description: Edit an application key name. - operationId: UpdateApplicationKey - parameters: - - description: The specific APP key you are working with. - in: path - name: key - required: true - schema: - type: string + description: 'Update a Datadog-Azure integration. Requires an existing `tenant_name` + and `client_id`. + + Any other fields supplied will overwrite existing values. To overwrite `tenant_name` + or `client_id`, + + use `new_tenant_name` and `new_client_id`. To leave a field unchanged, do + not supply that field in the payload.' + operationId: UpdateAzureIntegration requestBody: content: application/json: schema: - $ref: '#/components/schemas/ApplicationKey' + $ref: '#/components/schemas/AzureAccount' + description: Update a Datadog-Azure integration request body. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ApplicationKeyResponse' + example: {} + type: object description: OK '400': content: @@ -10726,240 +24679,215 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update an Azure integration + tags: + - Azure Integration + x-codegen-request-body-name: body + /api/v1/integration/azure/host_filters: + post: + description: Update the defined list of host filters for a given Datadog-Azure + integration. + operationId: UpdateAzureHostFilters + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureAccount' + description: Update a Datadog-Azure integration's host filters request body. + required: true + responses: + '200': + content: + application/json: + schema: + example: {} + type: object + description: OK + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found - '409': + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Conflict + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Edit an application key + summary: Update Azure integration host filters tags: - - Key Management + - Azure Integration x-codegen-request-body-name: body - /api/v1/check_run: - post: - description: 'Submit a list of Service Checks. - - - **Notes**: - - - A valid API key is required. - - - Service checks can be submitted up to 10 minutes in the past.' - operationId: SubmitServiceCheck + /api/v1/integration/gcp: + delete: + deprecated: true + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + Delete a given Datadog-GCP integration." + operationId: DeleteGCPIntegration requestBody: content: application/json: schema: - $ref: '#/components/schemas/ServiceChecks' - description: Service Check request body. + $ref: '#/components/schemas/GCPAccount' + description: Delete a given Datadog-GCP integration. required: true responses: - '202': + '200': content: - text/json: + application/json: schema: - $ref: '#/components/schemas/IntakePayloadAccepted' - description: Payload accepted + example: {} + type: object + description: OK '400': content: - text/json: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: - text/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '408': - content: - text/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Request timeout - '413': - content: - text/json: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Payload too large + description: Authentication error '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - summary: Submit a Service Check + summary: Delete a GCP integration tags: - - Service Checks + - GCP Integration x-codegen-request-body-name: body - /api/v1/daily_custom_reports: get: deprecated: true - description: 'Get daily custom reports. - - **Note:** This endpoint will be fully deprecated on December 1, 2022. - - Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) - for the associated migration guide.' - operationId: GetDailyCustomReports - parameters: - - description: The number of files to return in the response. `[default=60]`. - in: query - name: page[size] - required: false - schema: - format: int64 - type: integer - - description: The identifier of the first page to return. This parameter is - used for the pagination feature `[default=0]`. - in: query - name: page[number] - required: false - schema: - format: int64 - type: integer - - description: 'The direction to sort by: `[desc, asc]`.' - in: query - name: sort_dir - required: false - schema: - $ref: '#/components/schemas/UsageSortDirection' - - description: 'The field to sort by: `[computed_on, size, start_date, end_date]`.' - in: query - name: sort - required: false - schema: - $ref: '#/components/schemas/UsageSort' + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + List all Datadog-GCP integrations configured in your Datadog account." + operationId: ListGCPIntegration responses: '200': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/UsageCustomReportsResponse' + $ref: '#/components/schemas/GCPAccountListResponse' description: OK - '403': + '400': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized - '429': + description: Bad Request + '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - usage_read - summary: Get the list of available daily custom reports + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List all GCP integrations tags: - - Usage Metering - /api/v1/daily_custom_reports/{report_id}: - get: + - GCP Integration + post: deprecated: true - description: 'Get specified daily custom reports. - - **Note:** This endpoint will be fully deprecated on December 1, 2022. - - Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) - for the associated migration guide.' - operationId: GetSpecifiedDailyCustomReports - parameters: - - description: Date of the report in the format `YYYY-MM-DD`. - in: path - name: report_id + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + Create a Datadog-GCP integration." + operationId: CreateGCPIntegration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GCPAccount' + description: Create a Datadog-GCP integration. required: true - schema: - type: string responses: '200': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/UsageSpecifiedCustomReportsResponse' + example: {} + type: object description: OK - '403': + '400': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized - '404': + description: Bad Request + '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Authentication error '429': - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - usage_read - summary: Get specified daily custom reports + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a GCP integration tags: - - Usage Metering - /api/v1/dashboard/lists/manual: - get: - description: Fetch all of your existing dashboard list definitions. - operationId: ListDashboardLists + - GCP Integration + x-codegen-request-body-name: body + put: + deprecated: true + description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. + Update a Datadog-GCP integrations host_filters and/or auto-mute.\nRequires + a `project_id` and `client_email`, however these fields cannot be updated.\nIf + you need to update these fields, delete and use the create (`POST`) endpoint.\nThe + unspecified fields will keep their original values." + operationId: UpdateGCPIntegration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GCPAccount' + description: Update a Datadog-GCP integration. + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/DashboardListListResponse' + example: {} + type: object description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_read - summary: Get all dashboard lists + summary: Update a GCP integration tags: - - Dashboard Lists + - GCP Integration + x-codegen-request-body-name: body + /api/v1/integration/pagerduty/configuration/services: post: - description: Create an empty dashboard list. - operationId: CreateDashboardList + description: Create a new service object in the PagerDuty integration. + operationId: CreatePagerDutyIntegrationService requestBody: content: application/json: schema: - $ref: '#/components/schemas/DashboardList' - description: Create a dashboard list request body. + $ref: '#/components/schemas/PagerDutyService' + description: Create a new service object request body. required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/DashboardList' + $ref: '#/components/schemas/PagerDutyServiceName' description: OK '400': content: @@ -10972,123 +24900,97 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_write - summary: Create a dashboard list + summary: Create a new service object tags: - - Dashboard Lists + - PagerDuty Integration x-codegen-request-body-name: body - /api/v1/dashboard/lists/manual/{list_id}: + /api/v1/integration/pagerduty/configuration/services/{service_name}: delete: - description: Delete a dashboard list. - operationId: DeleteDashboardList + description: Delete a single service object in the Datadog-PagerDuty integration. + operationId: DeletePagerDutyIntegrationService parameters: - - description: ID of the dashboard list to delete. + - description: The service name in: path - name: list_id + name: service_name required: true schema: - format: int64 - type: integer + type: string responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DashboardListDeleteResponse' - description: OK + '204': + description: No Content '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_write - summary: Delete a dashboard list + summary: Delete a single service object tags: - - Dashboard Lists + - PagerDuty Integration get: - description: Fetch an existing dashboard list's definition. - operationId: GetDashboardList + description: Get service name in the Datadog-PagerDuty integration. + operationId: GetPagerDutyIntegrationService parameters: - - description: ID of the dashboard list to fetch. + - description: The service name. in: path - name: list_id + name: service_name required: true schema: - format: int64 - type: integer + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/DashboardList' + $ref: '#/components/schemas/PagerDutyServiceName' description: OK '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_read - summary: Get a dashboard list + summary: Get a single service object tags: - - Dashboard Lists + - PagerDuty Integration put: - description: Update the name of a dashboard list. - operationId: UpdateDashboardList + description: Update a single service object in the Datadog-PagerDuty integration. + operationId: UpdatePagerDutyIntegrationService parameters: - - description: ID of the dashboard list to update. + - description: The service name in: path - name: list_id + name: service_name required: true schema: - format: int64 - type: integer + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/DashboardList' - description: Update a dashboard list request body. + $ref: '#/components/schemas/PagerDutyServiceKey' + description: Update an existing service object request body. required: true responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DashboardList' description: OK '400': content: @@ -11101,82 +25003,73 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_write - summary: Update a dashboard list + summary: Update a single service object tags: - - Dashboard Lists + - PagerDuty Integration x-codegen-request-body-name: body - /api/v1/downtime: + /api/v1/integration/slack/configuration/accounts/{account_name}/channels: get: - description: Get all scheduled downtimes. - operationId: ListDowntimes + description: Get a list of all channels configured for your Datadog-Slack integration. + operationId: GetSlackIntegrationChannels parameters: - - description: Only return downtimes that are active when the request is made. - in: query - name: current_only - required: false - schema: - type: boolean - - description: Return creator information. - in: query - name: with_creator - required: false - schema: - type: boolean + - $ref: '#/components/parameters/SlackAccountNamePathParameter' responses: '200': content: application/json: schema: - items: - $ref: '#/components/schemas/Downtime' - type: array + $ref: '#/components/schemas/SlackIntegrationChannels' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - monitors_read - summary: Get all downtimes + summary: Get all channels in a Slack integration tags: - - Downtimes + - Slack Integration post: - description: Schedule a downtime. - operationId: CreateDowntime + description: Add a channel to your Datadog-Slack integration. + operationId: CreateSlackIntegrationChannel + parameters: + - $ref: '#/components/parameters/SlackAccountNamePathParameter' requestBody: content: application/json: schema: - $ref: '#/components/schemas/Downtime' - description: Schedule a downtime request body. + $ref: '#/components/schemas/SlackIntegrationChannel' + description: Payload describing Slack channel to be created required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Downtime' + $ref: '#/components/schemas/SlackIntegrationChannel' description: OK '400': content: @@ -11189,36 +25082,29 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - monitors_downtime - summary: Schedule a downtime + summary: Create a Slack integration channel tags: - - Downtimes + - Slack Integration x-codegen-request-body-name: body - /api/v1/downtime/cancel/by_scope: - post: - description: Delete all downtimes that match the scope of `X`. - operationId: CancelDowntimesByScope - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CancelDowntimesByScopeRequest' - description: Scope to cancel downtimes for. - required: true + /api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}: + delete: + description: Remove a channel from your Datadog-Slack integration. + operationId: RemoveSlackIntegrationChannel + parameters: + - $ref: '#/components/parameters/SlackAccountNamePathParameter' + - $ref: '#/components/parameters/SlackChannelNamePathParameter' responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CanceledDowntimesIds' - description: OK + '204': + description: The channel was removed successfully. '400': content: application/json: @@ -11230,129 +25116,115 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Downtimes not found + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - monitors_downtime - summary: Cancel downtimes by scope + summary: Remove a Slack integration channel tags: - - Downtimes - x-codegen-request-body-name: body - /api/v1/downtime/{downtime_id}: - delete: - description: Cancel a downtime. - operationId: CancelDowntime + - Slack Integration + get: + description: Get a channel configured for your Datadog-Slack integration. + operationId: GetSlackIntegrationChannel parameters: - - description: ID of the downtime to cancel. - in: path - name: downtime_id - required: true - schema: - example: 123456 - format: int64 - type: integer + - $ref: '#/components/parameters/SlackAccountNamePathParameter' + - $ref: '#/components/parameters/SlackChannelNamePathParameter' responses: - '204': + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SlackIntegrationChannel' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Downtime not found + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - monitors_downtime - summary: Cancel a downtime + summary: Get a Slack integration channel tags: - - Downtimes - get: - description: Get downtime detail by `downtime_id`. - operationId: GetDowntime - parameters: - - description: ID of the downtime to fetch. - in: path - name: downtime_id + - Slack Integration + patch: + description: Update a channel used in your Datadog-Slack integration. + operationId: UpdateSlackIntegrationChannel + parameters: + - $ref: '#/components/parameters/SlackAccountNamePathParameter' + - $ref: '#/components/parameters/SlackChannelNamePathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SlackIntegrationChannel' + description: Payload describing fields and values to be updated. required: true - schema: - example: 123456 - format: int64 - type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/Downtime' + $ref: '#/components/schemas/SlackIntegrationChannel' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Downtime not found + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - monitors_read - summary: Get a downtime + summary: Update a Slack integration channel tags: - - Downtimes - put: - description: Update a single downtime by `downtime_id`. - operationId: UpdateDowntime - parameters: - - description: ID of the downtime to update. - in: path - name: downtime_id - required: true - schema: - example: 123456 - format: int64 - type: integer - style: simple + - Slack Integration + x-codegen-request-body-name: body + /api/v1/integration/webhooks/configuration/custom-variables: + post: + description: Creates an endpoint with the name ``. + operationId: CreateWebhooksIntegrationCustomVariable requestBody: content: application/json: schema: - $ref: '#/components/schemas/Downtime' - description: Update a downtime request body. + $ref: '#/components/schemas/WebhooksIntegrationCustomVariable' + description: Define a custom variable request body. required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/Downtime' + $ref: '#/components/schemas/WebhooksIntegrationCustomVariableResponse' description: OK '400': content: @@ -11365,111 +25237,65 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a custom variable + tags: + - Webhooks Integration + x-codegen-request-body-name: body + /api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}: + delete: + description: Deletes the endpoint with the name ``. + operationId: DeleteWebhooksIntegrationCustomVariable + parameters: + - description: The name of the custom variable. + in: path + name: custom_variable_name + required: true + schema: + type: string + responses: + '200': + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Downtime not found + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - monitors_downtime - summary: Update a downtime + summary: Delete a custom variable tags: - - Downtimes - x-codegen-request-body-name: body - /api/v1/events: + - Webhooks Integration get: - description: "The event stream can be queried and filtered by time, priority, - sources and tags.\n\n**Notes**:\n- If the event you\u2019re querying contains - markdown formatting of any kind,\nyou may see characters such as `%`,`\\`,`n` - in your output.\n\n- This endpoint returns a maximum of `1000` most recent - results. To return additional results,\nidentify the last timestamp of the - last result and set that as the `end` query time to\npaginate the results. - You can also use the page parameter to specify which set of `1000` results - to return." - operationId: ListEvents - parameters: - - description: POSIX timestamp. - in: query - name: start - required: true - schema: - format: int64 - type: integer - - description: POSIX timestamp. - in: query - name: end - required: true - schema: - format: int64 - type: integer - - description: Priority of your events, either `low` or `normal`. - in: query - name: priority - required: false - schema: - $ref: '#/components/schemas/EventPriority' - - description: A comma separated string of sources. - in: query - name: sources - schema: - type: string - - description: A comma separated list indicating what tags, if any, should be - used to filter the list of events. - example: host:host0 - in: query - name: tags - required: false - schema: - type: string - - description: 'Set unaggregated to `true` to return all events within the specified - [`start`,`end`] timeframe. - - Otherwise if an event is aggregated to a parent event with a timestamp outside - of the timeframe, + description: 'Shows the content of the custom variable with the name ``. - it won''t be available in the output. Aggregated events with `is_aggregate=true` - in the response will still be returned unless exclude_aggregate is set to - `true.`' - in: query - name: unaggregated - required: false - schema: - type: boolean - - description: 'Set `exclude_aggregate` to `true` to only return unaggregated - events where `is_aggregate=false` in the response. If the `exclude_aggregate` - parameter is set to `true`, - then the unaggregated parameter is ignored and will be `true` by default.' - in: query - name: exclude_aggregate - required: false - schema: - type: boolean - - description: 'By default 1000 results are returned per request. Set page to - the number of the page to return with `0` being the first page. The page - parameter can only be used + If the custom variable is secret, the value does not return in the - when either unaggregated or exclude_aggregate is set to `true.`' - in: query - name: page - required: false + response payload.' + operationId: GetWebhooksIntegrationCustomVariable + parameters: + - description: The name of the custom variable. + in: path + name: custom_variable_name + required: true schema: - format: int32 - maximum: 2147483647 - type: integer + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/EventListResponse' + $ref: '#/components/schemas/WebhooksIntegrationCustomVariableResponse' description: OK '400': content: @@ -11482,35 +25308,41 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - events_read - summary: Get a list of events + summary: Get a custom variable tags: - - Events - post: - description: 'This endpoint allows you to post events to the stream. - - Tag them, set priority and event aggregate them with other events.' - operationId: CreateEvent + - Webhooks Integration + put: + description: Updates the endpoint with the name ``. + operationId: UpdateWebhooksIntegrationCustomVariable + parameters: + - description: The name of the custom variable. + in: path + name: custom_variable_name + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/EventCreateRequest' - description: Event request object + $ref: '#/components/schemas/WebhooksIntegrationCustomVariableUpdateRequest' + description: Update an existing custom variable request body. required: true responses: - '202': + '200': content: application/json: schema: - $ref: '#/components/schemas/EventCreateResponse' + $ref: '#/components/schemas/WebhooksIntegrationCustomVariableResponse' description: OK '400': content: @@ -11518,308 +25350,246 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - summary: Post an event - tags: - - Events - x-codegen-request-body-name: body - /api/v1/events/{event_id}: - get: - description: "This endpoint allows you to query for event details.\n\n**Note**: - If the event you\u2019re querying contains markdown formatting of any kind,\nyou - may see characters such as `%`,`\\`,`n` in your output." - operationId: GetEvent - parameters: - - description: The ID of the event. - in: path - name: event_id + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a custom variable + tags: + - Webhooks Integration + x-codegen-request-body-name: body + /api/v1/integration/webhooks/configuration/webhooks: + post: + description: Creates an endpoint with the name ``. + operationId: CreateWebhooksIntegration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhooksIntegration' + description: Create a webhooks integration request body. required: true - schema: - format: int64 - type: integer responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/EventResponse' + $ref: '#/components/schemas/WebhooksIntegration' description: OK - '403': + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '404': + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Authentication error '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - events_read - summary: Get an event + - create_webhooks + summary: Create a webhooks integration tags: - - Events - /api/v1/graph/snapshot: - get: - description: 'Take graph snapshots. - - **Note**: When a snapshot is created, there is some delay before it is available.' - operationId: GetGraphSnapshot + - Webhooks Integration + x-codegen-request-body-name: body + /api/v1/integration/webhooks/configuration/webhooks/{webhook_name}: + delete: + description: Deletes the endpoint with the name ``. + operationId: DeleteWebhooksIntegration parameters: - - description: The metric query. - in: query - name: metric_query - schema: - type: string - - description: The POSIX timestamp of the start of the query in seconds. - in: query - name: start - required: true - schema: - format: int64 - type: integer - - description: The POSIX timestamp of the end of the query in seconds. - in: query - name: end + - description: The name of the webhook. + in: path + name: webhook_name required: true - schema: - format: int64 - type: integer - - description: A query that adds event bands to the graph. - in: query - name: event_query - required: false - schema: - type: string - - description: 'A JSON document defining the graph. `graph_def` can be used - instead of `metric_query`. - - The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) - - and should be formatted to a single line then URL encoded.' - in: query - name: graph_def - required: false - schema: - type: string - - description: A title for the graph. If no title is specified, the graph does - not have a title. - in: query - name: title - required: false schema: type: string - - description: The height of the graph. If no height is specified, the graph's - original height is used. - in: query - name: height - required: false - schema: - format: int64 - type: integer - - description: The width of the graph. If no width is specified, the graph's - original width is used. - in: query - name: width - required: false - schema: - format: int64 - type: integer responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/GraphSnapshot' description: OK - '400': + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Authentication error + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Take graph snapshots + summary: Delete a webhook tags: - - Snapshots - /api/v1/host/{host_name}/mute: - post: - description: Mute a host. - operationId: MuteHost + - Webhooks Integration + get: + description: Gets the content of the webhook with the name ``. + operationId: GetWebhooksIntegration parameters: - - description: Name of the host to mute. + - description: The name of the webhook. in: path - name: host_name + name: webhook_name required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/HostMuteSettings' - description: Mute a host request body. - required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/HostMuteResponse' + $ref: '#/components/schemas/WebhooksIntegration' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Invalid Parameter Error + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Mute a host + summary: Get a webhook integration tags: - - Hosts - x-codegen-request-body-name: body - /api/v1/host/{host_name}/unmute: - post: - description: Unmutes a host. This endpoint takes no JSON arguments. - operationId: UnmuteHost + - Webhooks Integration + put: + description: Updates the endpoint with the name ``. + operationId: UpdateWebhooksIntegration parameters: - - description: Name of the host to unmute. + - description: The name of the webhook. in: path - name: host_name + name: webhook_name required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WebhooksIntegrationUpdateRequest' + description: Update an existing Datadog-Webhooks integration. + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/HostMuteResponse' + $ref: '#/components/schemas/WebhooksIntegration' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Invalid Parameter Error + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Unmute a host - tags: - - Hosts - x-codegen-request-body-name: body - /api/v1/hosts: - get: - description: 'This endpoint allows searching for hosts by name, alias, or tag. - - Hosts live within the past 3 hours are included by default. - - Retention is 7 days. - - Results are paginated with a max of 1000 results at a time.' - operationId: ListHosts - parameters: - - description: String to filter search results. - in: query - name: filter - required: false - schema: - type: string - - description: Sort hosts by this field. - in: query - name: sort_field - required: false - schema: - type: string - - description: Direction of sort. Options include `asc` and `desc`. - in: query - name: sort_dir - required: false - schema: - type: string - - description: Host result to start search from. - in: query - name: start - required: false - schema: - format: int64 - type: integer - - description: Number of hosts to return. Max 1000. - in: query - name: count - required: false - schema: - format: int64 - type: integer - - description: Number of seconds since UNIX epoch from which you want to search - your hosts. - in: query - name: from - required: false - schema: - format: int64 - type: integer - - description: Include information on the muted status of hosts and when the - mute expires. - in: query - name: include_muted_hosts_data - required: false - schema: - type: boolean - - description: Include additional metadata about the hosts (agent_version, machine, - platform, processor, etc.). - in: query - name: include_hosts_metadata - required: false - schema: - type: boolean + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a webhook + tags: + - Webhooks Integration + x-codegen-request-body-name: body + /api/v1/logs-queries/list: + post: + description: 'List endpoint returns logs that match a log search query. + + [Results are paginated][1]. + + + **If you are considering archiving logs for your organization, + + consider use of the Datadog archive capabilities instead of the log list API. + + See [Datadog Logs Archive documentation][2].** + + + [1]: /logs/guide/collect-multiple-logs-with-pagination + + [2]: https://docs.datadoghq.com/logs/archives' + operationId: ListLogs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsListRequest' + description: Logs filter + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/HostListResponse' + $ref: '#/components/schemas/LogsListResponse' description: OK '400': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Invalid Parameter Error + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Search logs + tags: + - Logs + x-codegen-request-body-name: body + /api/v1/logs/config/index-order: + get: + description: Get the current order of your log indexes. This endpoint takes + no JSON arguments. + operationId: GetLogsIndexOrder + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsIndexesOrder' + description: OK '403': content: application/json: @@ -11832,39 +25602,60 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get all hosts for your organization + summary: Get indexes order tags: - - Hosts - /api/v1/hosts/totals: - get: - description: 'This endpoint returns the total number of active and up hosts - in your Datadog account. + - Logs Indexes + put: + description: 'This endpoint updates the index order of your organization. - Active means the host has reported in the past hour, and up means it has reported - in the past two hours.' - operationId: GetHostTotals - parameters: - - description: Number of seconds from which you want to get total number of - active hosts. - in: query - name: from - required: false - schema: - format: int64 - type: integer + It returns the index order object passed in the request body when the request + is successful.' + operationId: UpdateLogsIndexOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsIndexesOrder' + description: Object containing the new ordered list of index names + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/HostTotals' + $ref: '#/components/schemas/LogsIndexesOrder' description: OK '400': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Invalid Parameter Error + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update indexes order + tags: + - Logs Indexes + x-codegen-request-body-name: body + /api/v1/logs/config/indexes: + get: + description: 'The Index object describes the configuration of a log index. + + This endpoint returns an array of the `LogIndex` objects of your organization.' + operationId: ListLogIndexes + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsIndexListResponse' + description: OK '403': content: application/json: @@ -11877,72 +25668,55 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get the total number of active hosts + summary: Get all indexes tags: - - Hosts - /api/v1/integration/aws: - delete: - description: Delete a Datadog-AWS integration matching the specified `account_id` - and `role_name parameters`. - operationId: DeleteAWSAccount + - Logs Indexes + post: + description: Creates a new index. Returns the Index object passed in the request + body when the request is successful. + operationId: CreateLogsIndex requestBody: content: application/json: schema: - $ref: '#/components/schemas/AWSAccountDeleteRequest' - description: AWS request object + $ref: '#/components/schemas/LogsIndex' + description: Object containing the new index. required: true responses: '200': content: application/json: schema: - type: object + $ref: '#/components/schemas/LogsIndex' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Invalid Parameter Error '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Conflict Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an AWS integration + summary: Create an index tags: - - AWS Integration + - Logs Indexes x-codegen-request-body-name: body + /api/v1/logs/config/indexes/{name}: get: - description: List all Datadog-AWS integrations available in your Datadog organization. - operationId: ListAWSAccounts + description: Get one log index from your organization. This endpoint takes no + JSON arguments. + operationId: GetLogsIndex parameters: - - description: Only return AWS accounts that matches this `account_id`. - in: query - name: account_id - required: false - schema: - type: string - - description: Only return AWS accounts that matches this role_name. - in: query - name: role_name - required: false - schema: - type: string - - description: Only return AWS accounts that matches this `access_key_id`. - in: query - name: access_key_id - required: false + - description: Name of the log index. + in: path + name: name + required: true schema: type: string responses: @@ -11950,289 +25724,371 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AWSAccountListResponse' + $ref: '#/components/schemas/LogsIndex' description: OK - '400': + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Forbidden + '404': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List all AWS integrations + summary: Get an index tags: - - AWS Integration - post: - description: 'Create a Datadog-Amazon Web Services integration. - - Using the `POST` method updates your integration configuration - - by adding your new configuration to the existing one in your Datadog organization. - - A unique AWS Account ID for role based authentication.' - operationId: CreateAWSAccount + - Logs Indexes + put: + description: "Update an index as identified by its name.\nReturns the Index + object passed in the request body when the request is successful.\n\nUsing + the `PUT` method updates your index\u2019s configuration by **replacing**\nyour + current configuration with the new one sent to your Datadog organization." + operationId: UpdateLogsIndex + parameters: + - description: Name of the log index. + in: path + name: name + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/AWSAccount' - description: AWS Request Object + $ref: '#/components/schemas/LogsIndexUpdateRequest' + description: Object containing the new `LogsIndexUpdateRequest`. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AWSAccountCreateResponse' + $ref: '#/components/schemas/LogsIndex' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Invalid Parameter Error '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '409': + description: Forbidden + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Too Many Requests + summary: Update an index + tags: + - Logs Indexes + x-codegen-request-body-name: body + /api/v1/logs/config/pipeline-order: + get: + description: 'Get the current order of your pipelines. + + This endpoint takes no JSON arguments.' + operationId: GetLogsPipelineOrder + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsPipelinesOrder' + description: OK + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Conflict Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create an AWS integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get pipeline order tags: - - AWS Integration - x-codegen-request-body-name: body + - Logs Pipelines put: - description: Update a Datadog-Amazon Web Services integration. - operationId: UpdateAWSAccount - parameters: - - description: Only return AWS accounts that matches this `account_id`. - in: query - name: account_id - required: false - schema: - type: string - - description: 'Only return AWS accounts that match this `role_name`. + description: 'Update the order of your pipelines. Since logs are processed sequentially, + reordering a pipeline may change - Required if `account_id` is specified.' - in: query - name: role_name - required: false - schema: - type: string - - description: 'Only return AWS accounts that matches this `access_key_id`. + the structure and content of the data processed by other pipelines and their + processors. - Required if none of the other two options are specified.' - in: query - name: access_key_id - required: false - schema: - type: string + + **Note**: Using the `PUT` method updates your pipeline order by replacing + your current order + + with the new one sent to your Datadog organization.' + operationId: UpdateLogsPipelineOrder requestBody: content: application/json: schema: - $ref: '#/components/schemas/AWSAccount' - description: AWS request object + $ref: '#/components/schemas/LogsPipelinesOrder' + description: Object containing the new ordered list of pipeline IDs. required: true responses: '200': content: application/json: schema: - type: object + $ref: '#/components/schemas/LogsPipelinesOrder' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' + $ref: '#/components/schemas/LogsAPIErrorResponse' description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '409': + description: Forbidden + '422': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Conflict Error + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Unprocessable Entity '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update an AWS integration + summary: Update pipeline order tags: - - AWS Integration + - Logs Pipelines x-codegen-request-body-name: body - /api/v1/integration/aws/available_namespace_rules: + /api/v1/logs/config/pipelines: get: - description: List all namespace rules for a given Datadog-AWS integration. This - endpoint takes no arguments. - operationId: ListAvailableAWSNamespaces + description: 'Get all pipelines from your organization. + + This endpoint takes no JSON arguments.' + operationId: ListLogsPipelines responses: '200': content: application/json: schema: - example: - - namespace1 - - namespace2 - - namespace3 - items: - type: string - type: array + $ref: '#/components/schemas/LogsPipelineList' description: OK '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List namespace rules + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get all pipelines tags: - - AWS Integration - /api/v1/integration/aws/event_bridge: - delete: - description: Delete an Amazon EventBridge source. - operationId: DeleteAWSEventBridgeSource + - Logs Pipelines + post: + description: Create a pipeline in your organization. + operationId: CreateLogsPipeline requestBody: content: application/json: schema: - $ref: '#/components/schemas/AWSEventBridgeDeleteRequest' - description: Delete the Amazon EventBridge source with the given name, region, - and associated AWS account. + $ref: '#/components/schemas/LogsPipeline' + description: Definition of the new pipeline. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AWSEventBridgeDeleteResponse' + $ref: '#/components/schemas/LogsPipeline' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' + $ref: '#/components/schemas/LogsAPIErrorResponse' description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an Amazon EventBridge source + summary: Create a pipeline tags: - - AWS Integration + - Logs Pipelines x-codegen-request-body-name: body + /api/v1/logs/config/pipelines/{pipeline_id}: + delete: + description: 'Delete a given pipeline from your organization. + + This endpoint takes no JSON arguments.' + operationId: DeleteLogsPipeline + parameters: + - description: ID of the pipeline to delete. + in: path + name: pipeline_id + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a pipeline + tags: + - Logs Pipelines get: - description: Get all Amazon EventBridge sources. - operationId: ListAWSEventBridgeSources - parameters: [] + description: 'Get a specific pipeline from your organization. + + This endpoint takes no JSON arguments.' + operationId: GetLogsPipeline + parameters: + - description: ID of the pipeline to get. + in: path + name: pipeline_id + required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AWSEventBridgeListResponse' + $ref: '#/components/schemas/LogsPipeline' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' + $ref: '#/components/schemas/LogsAPIErrorResponse' description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get all Amazon EventBridge sources + summary: Get a pipeline tags: - - AWS Integration - post: - description: Create an Amazon EventBridge source. - operationId: CreateAWSEventBridgeSource + - Logs Pipelines + put: + description: "Update a given pipeline configuration to change it\u2019s processors + or their order.\n\n**Note**: Using this method updates your pipeline configuration + by **replacing**\nyour current configuration with the new one sent to your + Datadog organization." + operationId: UpdateLogsPipeline + parameters: + - description: ID of the pipeline to delete. + in: path + name: pipeline_id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/AWSEventBridgeCreateRequest' - description: Create an Amazon EventBridge source for an AWS account with a - given name and region. + $ref: '#/components/schemas/LogsPipeline' + description: New definition of the pipeline. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AWSEventBridgeCreateResponse' + $ref: '#/components/schemas/LogsPipeline' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' + $ref: '#/components/schemas/LogsAPIErrorResponse' description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create an Amazon EventBridge source + summary: Update a pipeline tags: - - AWS Integration + - Logs Pipelines x-codegen-request-body-name: body - /api/v1/integration/aws/filtering: - delete: - description: Delete a tag filtering entry. - operationId: DeleteAWSTagFilter - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AWSTagFilterDeleteRequest' - description: Delete a tag filtering entry for a given AWS account and `dd-aws` - namespace. + /api/v1/metrics: + get: + description: Get the list of actively reporting metrics from a given time until + now. + operationId: ListActiveMetrics + parameters: + - description: Seconds since the Unix epoch. + in: query + name: from required: true + schema: + format: int64 + type: integer + - description: 'Hostname for filtering the list of metrics returned. + + If set, metrics retrieved are those with the corresponding hostname tag.' + in: query + name: host + required: false + schema: + type: string + - description: 'Filter metrics that have been submitted with the given tags. + Supports boolean and wildcard expressions. + + Cannot be combined with other filters.' + example: env IN (staging,test) AND service:web + in: query + name: tag_filter + required: false + schema: + type: string responses: '200': content: application/json: schema: - example: {} - type: object + $ref: '#/components/schemas/MetricsListResponse' description: OK '400': content: @@ -12245,29 +26101,81 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a tag filtering entry + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: Get active metrics list tags: - - AWS Integration - x-codegen-request-body-name: body + - Metrics + /api/v1/metrics/{metric_name}: get: - description: Get all AWS tag filters. - operationId: ListAWSTagFilters + description: Get metadata about a specific metric. + operationId: GetMetricMetadata parameters: - - description: Only return AWS filters that matches this `account_id`. - in: query - name: account_id + - description: Name of the metric for which to get metadata. + in: path + name: metric_name + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricMetadata' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: Get metric metadata + tags: + - Metrics + put: + description: Edit metadata of a specific metric. Find out more about [supported + types](https://docs.datadoghq.com/developers/metrics). + operationId: UpdateMetricMetadata + parameters: + - description: Name of the metric for which to edit metadata. + in: path + name: metric_name required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MetricMetadata' + description: New metadata. + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AWSTagFilterListResponse' + $ref: '#/components/schemas/MetricMetadata' description: OK '400': content: @@ -12280,33 +26188,107 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all AWS tag filters + summary: Edit metric metadata tags: - - AWS Integration - post: - description: Set an AWS tag filter. - operationId: CreateAWSTagFilter - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AWSTagFilterCreateRequest' - description: 'Set an AWS tag filter using an `aws_account_identifier`, `namespace`, - and filtering string. + - Metrics + x-codegen-request-body-name: body + /api/v1/monitor: + get: + description: Get details about the specified monitor from your organization. + operationId: ListMonitors + parameters: + - description: 'When specified, shows additional information about the group + states. - Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, - `rds`, `sqs`, and `custom`.' - required: true + Choose one or more from `all`, `alert`, `warn`, and `no data`.' + in: query + name: group_states + required: false + schema: + example: alert + type: string + - description: A string to filter monitors by name. + in: query + name: name + required: false + schema: + type: string + - description: 'A comma separated list indicating what tags, if any, should + be used to filter the list of monitors by scope. + + For example, `host:host0`.' + in: query + name: tags + required: false + schema: + example: host:host0 + type: string + - description: 'A comma separated list indicating what service and/or custom + tags, if any, should be used to filter the list of monitors. + + Tags created in the Datadog UI automatically have the service key prepended. + For example, `service:my-app`.' + in: query + name: monitor_tags + required: false + schema: + example: service:my-app + type: string + - description: If this argument is set to true, then the returned data includes + all current active downtimes for each monitor. + in: query + name: with_downtimes + required: false + schema: + type: boolean + - description: Use this parameter for paginating through large sets of monitors. + Start with a value of zero, make a request, set the value to the last ID + of result set, and then repeat until the response is empty. + in: query + name: id_offset + required: false + schema: + format: int64 + type: integer + - description: The page to start paginating from. If this argument is not specified, + the request returns all monitors without pagination. + in: query + name: page + required: false + schema: + example: 0 + format: int64 + type: integer + - description: The number of monitors to return per page. If the page argument + is not specified, the default behavior returns all monitors without a `page_size` + limit. However, if page is specified and `page_size` is not, the argument + defaults to 100. + in: query + name: page_size + required: false + schema: + default: 100 + example: 20 + format: int32 + maximum: 1000 + type: integer responses: '200': content: application/json: schema: - example: {} - type: object + items: + $ref: '#/components/schemas/Monitor' + type: array description: OK '400': content: @@ -12319,72 +26301,414 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Set an AWS tag filter + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Get all monitor details tags: - - AWS Integration - x-codegen-request-body-name: body - /api/v1/integration/aws/generate_new_external_id: - put: - description: Generate a new AWS external ID for a given AWS account ID and role - name pair. - operationId: CreateNewAWSExternalID - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AWSAccount' - description: 'Your Datadog role delegation name. + - Monitors + x-pagination: + limitParam: page_size + pageParam: page + post: + description: 'Create a monitor using the specified options. + + + #### Monitor Types + + + The type of monitor chosen from: + + + - anomaly: `query alert` + + - APM: `query alert` or `trace-analytics alert` + + - composite: `composite` + + - custom: `service check` + + - event: `event alert` + + - forecast: `query alert` + + - host: `service check` + + - integration: `query alert` or `service check` + + - live process: `process alert` + + - logs: `log alert` + + - metric: `query alert` + + - network: `service check` + + - outlier: `query alert` + + - process: `service check` + + - rum: `rum alert` + + - SLO: `slo alert` + + - watchdog: `event-v2 alert` + + - event-v2: `event-v2 alert` + + - audit: `audit alert` + + - error-tracking: `error-tracking alert` + + - database-monitoring: `database-monitoring alert` + + + **Notes**: + + - Synthetic monitors are created through the Synthetics API. See the [Synthetics + API] (https://docs.datadoghq.com/api/latest/synthetics/) documentation for + more information. + + - Log monitors require an unscoped App Key. + + + #### Query Types + + + ##### Metric Alert Query + + + Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator + #` + + + - `time_aggr`: avg, sum, max, min, change, or pct_change + + - `time_window`: `last_#m` (with `#` between 1 and 10080 depending on the + monitor type) or `last_#h`(with `#` between 1 and 168 depending on the monitor + type) or `last_1d`, or `last_1w` + + - `space_aggr`: avg, sum, min, or max + + - `tags`: one or more tags (comma-separated), or * + + - `key`: a ''key'' in key:value tag syntax; defines a separate alert for each + tag in the group (multi-alert) + + - `operator`: <, <=, >, >=, ==, or != + + - `#`: an integer or decimal number used to set the threshold + + + If you are using the `_change_` or `_pct_change_` time aggregator, instead + use `change_aggr(time_aggr(time_window), + + timeshift):space_aggr:metric{tags} [by {key}] operator #` with: + + + - `change_aggr` change, pct_change + + - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/create/types/#define-the-conditions) + + - `time_window` last\_#m (between 1 and 2880 depending on the monitor type), + last\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or + 2) + + - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago + + + Use this to create an outlier monitor using the following query: + + `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, + ''dbscan'', 7) > 0` + + + ##### Service Check Query + + + Example: `"check".over(tags).last(count).by(group).count_by_status()` + + + - `check` name of the check, for example `datadog.agent.up` + + - `tags` one or more quoted tags (comma-separated), or "*". for example: `.over("env:prod", + "role:db")`; `over` cannot be blank. + + - `count` must be at greater than or equal to your max threshold (defined + in the `options`). It is limited to 100. + + For example, if you''ve specified to notify on 1 critical, 3 ok, and 2 warn + statuses, `count` should be at least 3. + + - `group` must be specified for check monitors. Per-check grouping is already + explicitly known for some service checks. + + For example, Postgres integration monitors are tagged by `db`, `host`, and + `port`, and Network monitors by `host`, `instance`, and `url`. See [Service + Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation + for more information. + + + ##### Event Alert Query + + + **Note:** The Event Alert Query has been replaced by the Event V2 Alert Query. + For more information, see the [Event Migration guide](https://docs.datadoghq.com/service_management/events/guides/migrating_to_new_events_features/). + + + ##### Event V2 Alert Query + + + Example: `events(query).rollup(rollup_method[, measure]).last(time_window) + operator #` + + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + + - `#` an integer or decimal number used to set the threshold. + + + ##### Process Alert Query + + + Example: `processes(search).over(tags).rollup(''count'').last(timeframe) operator + #` + + + - `search` free text search string for querying processes. + + Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) + page. + + - `tags` one or more tags (comma-separated) + + - `timeframe` the timeframe to roll up the counts. Examples: 10m, 4h. Supported + timeframes: s, m, h and d + + - `operator` <, <=, >, >=, ==, or != + + - `#` an integer or decimal number used to set the threshold + + + ##### Logs Alert Query + + + Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) + operator #` + + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `index_name` For multi-index organizations, the log index in which the request + is performed. + + - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + + - `#` an integer or decimal number used to set the threshold. + + + ##### Composite Query + + + Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite + monitors + + + * `name` [*required*, *default* = **dynamic, based on query**]: The name of + the alert. + + * `message` [*required*, *default* = **dynamic, based on query**]: A message + to include with notifications for this monitor. + + Email notifications can be sent to specific users by using the same ''@username'' + notation as events. + + * `tags` [*optional*, *default* = **empty list**]: A list of tags to associate + with your monitor. + + When getting all monitor details via the API, use the `monitor_tags` argument + to filter results by these tags. + + It is only available via the API and isn''t visible or editable in the Datadog + UI. + + + ##### SLO Alert Query + + + Example: `error_budget("slo_id").over("time_window") operator #` + + + - `slo_id`: The alphanumeric SLO ID of the SLO you are configuring the alert + for. + + - `time_window`: The time window of the SLO target you wish to alert on. Valid + options: `7d`, `30d`, `90d`. + + - `operator`: `>=` or `>` + + + ##### Audit Alert Query + + + Example: `audits(query).rollup(rollup_method[, measure]).last(time_window) + operator #` + + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + + - `#` an integer or decimal number used to set the threshold. + + + ##### CI Pipelines Alert Query + + + Example: `ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) + operator #` + + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `rollup_method` The stats roll-up method - supports `count`, `avg`, and + `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + + - `#` an integer or decimal number used to set the threshold. + + + ##### CI Tests Alert Query + + + Example: `ci-tests(query).rollup(rollup_method[, measure]).last(time_window) + operator #` + + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `rollup_method` The stats roll-up method - supports `count`, `avg`, and + `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. - For more information about your AWS account Role name, + - `#` an integer or decimal number used to set the threshold. - see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AWSAccountCreateResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Generate a new external ID - tags: - - AWS Integration - x-codegen-request-body-name: body - /api/v1/integration/aws/logs: - delete: - description: Delete a Datadog-AWS logs configuration by removing the specific - Lambda ARN associated with a given AWS account. - operationId: DeleteAWSLambdaARN + + ##### Error Tracking Alert Query + + + Example(RUM): `error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) + operator #` + + Example(APM Traces): `error-tracking-traces(query).rollup(rollup_method[, + measure]).last(time_window) operator #` + + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `rollup_method` The stats roll-up method - supports `count`, `avg`, and + `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + + - `#` an integer or decimal number used to set the threshold. + + + **Database Monitoring Alert Query** + + + Example: `database-monitoring(query).rollup(rollup_method[, measure]).last(time_window) + operator #` + + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `rollup_method` The stats roll-up method - supports `count`, `avg`, and + `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + + - `#` an integer or decimal number used to set the threshold. + + + **NOTE** Database Monitoring monitors are in alpha on US1.' + operationId: CreateMonitor requestBody: content: application/json: + examples: + json-request-body: + value: + message: You may need to add web hosts if this is consistently high. + name: Bytes received on host0 + options: + no_data_timeframe: 20 + notify_no_data: true + query: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100 + tags: + - app:webserver + - frontend + type: query alert schema: - $ref: '#/components/schemas/AWSAccountAndLambdaRequest' - description: Delete AWS Lambda ARN request body. + $ref: '#/components/schemas/Monitor' + description: Create a monitor request body. required: true responses: '200': content: application/json: schema: - type: object + $ref: '#/components/schemas/Monitor' description: OK '400': content: @@ -12397,35 +26721,41 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an AWS Logs integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_write + summary: Create a monitor tags: - - AWS Logs Integration + - Monitors x-codegen-request-body-name: body + /api/v1/monitor/can_delete: get: - description: List all Datadog-AWS Logs integrations configured in your Datadog - account. - operationId: ListAWSLogsIntegrations + description: Check if the given monitors can be deleted. + operationId: CheckCanDeleteMonitor + parameters: + - description: The IDs of the monitor to check. + explode: false + in: query + name: monitor_ids + required: true + schema: + items: + example: 666486743 + format: int64 + type: integer + type: array + style: form responses: '200': content: application/json: schema: - example: - - account_id: '123456789101' - lambdas: [] - services: - - s3 - - elb - - elbv2 - - cloudfront - - redshift - - lambda - items: - $ref: '#/components/schemas/AWSLogsListResponse' - type: array + $ref: '#/components/schemas/CheckCanDeleteMonitorResponse' description: OK '400': content: @@ -12438,160 +26768,86 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: List all AWS Logs integrations - tags: - - AWS Logs Integration - post: - description: Attach the Lambda ARN of the Lambda created for the Datadog-AWS - log collection to your AWS account ID to enable log collection. - operationId: CreateAWSLambdaARN - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AWSAccountAndLambdaRequest' - description: AWS Log Lambda Async request body. - required: true - responses: - '200': - content: - application/json: - schema: - type: object - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Forbidden + '409': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + $ref: '#/components/schemas/CheckCanDeleteMonitorResponse' + description: Deletion conflict error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add AWS Log Lambda ARN + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Check if a monitor can be deleted tags: - - AWS Logs Integration - x-codegen-request-body-name: body - /api/v1/integration/aws/logs/check_async: - post: - description: 'Test if permissions are present to add a log-forwarding triggers - for the given services and AWS account. The input + - Monitors + /api/v1/monitor/groups/search: + get: + description: Search and filter your monitor groups details. + operationId: SearchMonitorGroups + parameters: + - description: 'After entering a search query in your [Manage Monitor page][1] + use the query parameter value in the - is the same as for Enable an AWS service log collection. Subsequent requests - will always repeat the above, so this + URL of the page as value for this parameter. Consult the dedicated [manage + monitor documentation][2] - endpoint can be polled intermittently instead of blocking. + page to learn more. - - Returns a status of ''created'' when it''s checking if the Lambda exists - in the account. + The query can contain any number of space-separated monitor attributes, + for instance `query="type:metric status:alert"`. - - Returns a status of ''waiting'' while checking. - - Returns a status of ''checked and ok'' if the Lambda exists. + [1]: https://app.datadoghq.com/monitors/manage - - Returns a status of ''error'' if the Lambda does not exist.' - operationId: CheckAWSLogsLambdaAsync - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AWSAccountAndLambdaRequest' - description: Check AWS Log Lambda Async request body. - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AWSLogsAsyncResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Check that an AWS Lambda Function exists - tags: - - AWS Logs Integration - x-codegen-request-body-name: body - /api/v1/integration/aws/logs/services: - get: - description: Get the list of current AWS services that Datadog offers automatic - log collection. Use returned service IDs with the services parameter for the - Enable an AWS service log collection API endpoint. - operationId: ListAWSLogsServices - responses: - '200': - content: - application/json: - schema: - example: - - id: s3 - label: S3 Access Logs - - id: elb - label: Classic ELB Access Logs - - id: elbv2 - label: Application ELB Access Logs - - id: cloudfront - label: CloudFront Access Logs - - id: redshift - label: Redshift Logs - - id: lambda - label: Lambda Cloudwatch Logs - items: - $ref: '#/components/schemas/AWSLogsListServicesResponse' - type: array - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get list of AWS log ready services - tags: - - AWS Logs Integration - post: - description: Enable automatic log collection for a list of services. This should - be run after running `CreateAWSLambdaARN` to save the configuration. - operationId: EnableAWSLogServices - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AWSLogsServicesRequest' - description: Enable AWS Log Services request body. - required: true + [2]: /monitors/manage/#find-the-monitors' + in: query + name: query + required: false + schema: + type: string + - description: Page to start paginating from. + in: query + name: page + required: false + schema: + default: 0 + format: int64 + type: integer + - description: Number of monitors to return per page. + in: query + name: per_page + required: false + schema: + default: 30 + format: int64 + type: integer + - description: 'String for sort order, composed of field and sort order separate + by a comma, for example `name,asc`. Supported sort directions: `asc`, `desc`. + Supported fields: + + + * `name` + + * `status` + + * `tags`' + in: query + name: sort + required: false + schema: + type: string responses: '200': content: application/json: schema: - type: object + $ref: '#/components/schemas/MonitorGroupSearchResponse' description: OK '400': content: @@ -12604,36 +26860,80 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Enable an AWS Logs integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Monitors group search tags: - - AWS Logs Integration - x-codegen-request-body-name: body - /api/v1/integration/aws/logs/services_async: - post: - description: "Test if permissions are present to add log-forwarding triggers - for the\ngiven services and AWS account. Input is the same as for `EnableAWSLogServices`.\nDone - async, so can be repeatedly polled in a non-blocking fashion until\nthe async - request completes.\n\n- Returns a status of `created` when it's checking if - the permissions exists\n in the AWS account.\n- Returns a status of `waiting` - while checking.\n- Returns a status of `checked and ok` if the Lambda exists.\n- - Returns a status of `error` if the Lambda does not exist." - operationId: CheckAWSLogsServicesAsync - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AWSLogsServicesRequest' - description: Check AWS Logs Async Services request body. - required: true + - Monitors + /api/v1/monitor/search: + get: + description: Search and filter your monitors details. + operationId: SearchMonitors + parameters: + - description: 'After entering a search query in your [Manage Monitor page][1] + use the query parameter value in the + + URL of the page as value for this parameter. Consult the dedicated [manage + monitor documentation][2] + + page to learn more. + + + The query can contain any number of space-separated monitor attributes, + for instance `query="type:metric status:alert"`. + + + [1]: https://app.datadoghq.com/monitors/manage + + [2]: /monitors/manage/#find-the-monitors' + in: query + name: query + required: false + schema: + type: string + - description: Page to start paginating from. + in: query + name: page + required: false + schema: + default: 0 + format: int64 + type: integer + - description: Number of monitors to return per page. + in: query + name: per_page + required: false + schema: + default: 30 + format: int64 + type: integer + - description: 'String for sort order, composed of field and sort order separate + by a comma, for example `name,asc`. Supported sort directions: `asc`, `desc`. + Supported fields: + + + * `name` + + * `status` + + * `tags`' + in: query + name: sort + required: false + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AWSLogsAsyncResponse' + $ref: '#/components/schemas/MonitorSearchResponse' description: OK '400': content: @@ -12646,23 +26946,30 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Check permissions for log services + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Monitors search tags: - - AWS Logs Integration - x-codegen-request-body-name: body - /api/v1/integration/azure: - delete: - description: Delete a given Datadog-Azure integration from your Datadog account. - operationId: DeleteAzureIntegration + - Monitors + /api/v1/monitor/validate: + post: + description: 'Validate the monitor provided in the request. + + + **Note**: Log monitors require an unscoped App Key.' + operationId: ValidateMonitor requestBody: content: application/json: schema: - $ref: '#/components/schemas/AzureAccount' - description: Delete a given Datadog-Azure integration request body. + $ref: '#/components/schemas/Monitor' + description: Monitor request object required: true responses: '200': @@ -12677,29 +26984,51 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: Invalid JSON '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an Azure integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_write + summary: Validate a monitor tags: - - Azure Integration + - Monitors x-codegen-request-body-name: body - get: - description: List all Datadog-Azure integrations configured in your Datadog - account. - operationId: ListAzureIntegration + /api/v1/monitor/{monitor_id}: + delete: + description: Delete the specified monitor + operationId: DeleteMonitor + parameters: + - description: The ID of the monitor. + in: path + name: monitor_id + required: true + schema: + example: 666486743 + format: int64 + type: integer + - description: Delete the monitor even if it's referenced by other resources + (for example SLO, composite monitor). + in: query + name: force + required: false + schema: + example: 'false' + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AzureAccountListResponse' + $ref: '#/components/schemas/DeletedMonitor' description: OK '400': content: @@ -12707,47 +27036,66 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Item not found error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List all Azure integrations + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_write + summary: Delete a monitor tags: - - Azure Integration - post: - description: 'Create a Datadog-Azure integration. - - - Using the `POST` method updates your integration configuration by adding your - new - - configuration to the existing one in your Datadog organization. - - - Using the `PUT` method updates your integration configuration by replacing - your - - current configuration with the new one sent to your Datadog organization.' - operationId: CreateAzureIntegration - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AzureAccount' - description: Create a Datadog-Azure integration for your Datadog account request - body. + - Monitors + get: + description: Get details about the specified monitor from your organization. + operationId: GetMonitor + parameters: + - description: The ID of the monitor + in: path + name: monitor_id required: true + schema: + example: 666486743 + format: int64 + type: integer + - description: When specified, shows additional information about the group + states. Choose one or more from `all`, `alert`, `warn`, and `no data`. + in: query + name: group_states + required: false + schema: + type: string + - description: If this argument is set to true, then the returned data includes + all current active downtimes for the monitor. + in: query + name: with_downtimes + required: false + schema: + type: boolean responses: '200': content: application/json: schema: - example: {} - type: object + $ref: '#/components/schemas/Monitor' description: OK '400': content: @@ -12760,37 +27108,48 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Monitor Not Found error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create an Azure integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Get a monitor's details tags: - - Azure Integration - x-codegen-request-body-name: body + - Monitors put: - description: 'Update a Datadog-Azure integration. Requires an existing `tenant_name` - and `client_id`. - - Any other fields supplied will overwrite existing values. To overwrite `tenant_name` - or `client_id`, - - use `new_tenant_name` and `new_client_id`. To leave a field unchanged, do - not supply that field in the payload.' - operationId: UpdateAzureIntegration + description: Edit the specified monitor. + operationId: UpdateMonitor + parameters: + - description: The ID of the monitor. + in: path + name: monitor_id + required: true + schema: + example: 666486743 + format: int64 + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/AzureAccount' - description: Update a Datadog-Azure integration request body. + $ref: '#/components/schemas/MonitorUpdateRequest' + description: Edit a monitor request body. required: true responses: '200': content: application/json: schema: - example: {} - type: object + $ref: '#/components/schemas/Monitor' description: OK '400': content: @@ -12798,37 +27157,57 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Monitor Not Found error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update an Azure integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_write + summary: Edit a monitor tags: - - Azure Integration + - Monitors x-codegen-request-body-name: body - /api/v1/integration/azure/host_filters: - post: - description: Update the defined list of host filters for a given Datadog-Azure - integration. - operationId: UpdateAzureHostFilters - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AzureAccount' - description: Update a Datadog-Azure integration's host filters request body. + /api/v1/monitor/{monitor_id}/downtimes: + get: + deprecated: true + description: Get all active v1 downtimes for the specified monitor. **Note:** + This endpoint has been deprecated. Please use v2 endpoints. + operationId: ListMonitorDowntimes + parameters: + - description: The id of the monitor + in: path + name: monitor_id required: true + schema: + format: int64 + type: integer responses: '200': content: application/json: schema: - example: {} - type: object + items: + $ref: '#/components/schemas/Downtime' + type: array description: OK '400': content: @@ -12836,30 +27215,42 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request - '403': + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: Monitor Not Found error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update Azure integration host filters + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Get active downtimes for a monitor tags: - - Azure Integration + - Downtimes x-codegen-request-body-name: body - /api/v1/integration/gcp: - delete: - deprecated: true - description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. - Delete a given Datadog-GCP integration." - operationId: DeleteGCPIntegration + /api/v1/monitor/{monitor_id}/validate: + post: + description: Validate the monitor provided in the request. + operationId: ValidateExistingMonitor + parameters: + - description: The ID of the monitor + in: path + name: monitor_id + required: true + schema: + example: 666486743 + format: int64 + type: integer requestBody: content: application/json: schema: - $ref: '#/components/schemas/GCPAccount' - description: Delete a given Datadog-GCP integration. + $ref: '#/components/schemas/Monitor' + description: Monitor request object required: true responses: '200': @@ -12874,108 +27265,250 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: Invalid JSON '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a GCP integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_write + summary: Validate an existing monitor tags: - - GCP Integration + - Monitors x-codegen-request-body-name: body + /api/v1/monthly_custom_reports: get: deprecated: true - description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. - List all Datadog-GCP integrations configured in your Datadog account." - operationId: ListGCPIntegration + description: 'Get monthly custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' + operationId: GetMonthlyCustomReports + parameters: + - description: The number of files to return in the response `[default=60].` + in: query + name: page[size] + required: false + schema: + format: int64 + type: integer + - description: The identifier of the first page to return. This parameter is + used for the pagination feature `[default=0]`. + in: query + name: page[number] + required: false + schema: + format: int64 + type: integer + - description: 'The direction to sort by: `[desc, asc]`.' + in: query + name: sort_dir + required: false + schema: + $ref: '#/components/schemas/UsageSortDirection' + - description: 'The field to sort by: `[computed_on, size, start_date, end_date]`.' + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/UsageSort' responses: '200': content: - application/json: + application/json;datetime-format=rfc3339: schema: - $ref: '#/components/schemas/GCPAccountListResponse' + $ref: '#/components/schemas/UsageCustomReportsResponse' description: OK - '400': + '403': content: - application/json: + application/json;datetime-format=rfc3339: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Forbidden - User is not authorized + '429': content: - application/json: + application/json;datetime-format=rfc3339: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: List all GCP integrations + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get the list of available monthly custom reports tags: - - GCP Integration - post: + - Usage Metering + /api/v1/monthly_custom_reports/{report_id}: + get: deprecated: true - description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. - Create a Datadog-GCP integration." - operationId: CreateGCPIntegration - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GCPAccount' - description: Create a Datadog-GCP integration. + description: 'Get specified monthly custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' + operationId: GetSpecifiedMonthlyCustomReports + parameters: + - description: Date of the report in the format `YYYY-MM-DD`. + in: path + name: report_id required: true + schema: + type: string responses: '200': content: - application/json: + application/json;datetime-format=rfc3339: schema: - example: {} - type: object + $ref: '#/components/schemas/UsageSpecifiedCustomReportsResponse' description: OK '400': content: - application/json: + application/json;datetime-format=rfc3339: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: - application/json: + application/json;datetime-format=rfc3339: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Forbidden - User is not authorized + '404': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a GCP integration + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get specified monthly custom reports tags: - - GCP Integration - x-codegen-request-body-name: body - put: - deprecated: true - description: "This endpoint is deprecated \u2013 use the V2 endpoints instead. - Update a Datadog-GCP integrations host_filters and/or auto-mute.\nRequires - a `project_id` and `client_email`, however these fields cannot be updated.\nIf - you need to update these fields, delete and use the create (`POST`) endpoint.\nThe - unspecified fields will keep their original values." - operationId: UpdateGCPIntegration - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GCPAccount' - description: Update a Datadog-GCP integration. - required: true + - Usage Metering + /api/v1/notebooks: + get: + description: 'Get all notebooks. This can also be used to search for notebooks + with a particular `query` in the notebook + + `name` or author `handle`.' + operationId: ListNotebooks + parameters: + - description: Return notebooks created by the given `author_handle`. + in: query + name: author_handle + required: false + schema: + example: test@datadoghq.com + type: string + style: form + - description: Return notebooks not created by the given `author_handle`. + in: query + name: exclude_author_handle + required: false + schema: + example: test@datadoghq.com + type: string + style: form + - description: The index of the first notebook you want returned. + in: query + name: start + required: false + schema: + example: 0 + format: int64 + type: integer + style: form + - description: The number of notebooks to be returned. + in: query + name: count + required: false + schema: + default: 100 + example: 5 + format: int64 + type: integer + style: form + - description: Sort by field `modified`, `name`, or `created`. + in: query + name: sort_field + required: false + schema: + default: modified + example: modified + type: string + style: form + - description: Sort by direction `asc` or `desc`. + in: query + name: sort_dir + required: false + schema: + default: desc + example: desc + type: string + style: form + - description: Return only notebooks with `query` string in notebook name or + author handle. + in: query + name: query + required: false + schema: + example: postmortem + type: string + style: form + - description: Value of `false` excludes the `cells` and global `time` for each + notebook. + in: query + name: include_cells + required: false + schema: + default: true + example: false + type: boolean + style: form + - description: True value returns only template notebooks. Default is false + (returns only non-template notebooks). + in: query + name: is_template + required: false + schema: + default: false + example: false + type: boolean + style: form + - description: If type is provided, returns only notebooks with that metadata + type. Default does not have type filtering. + in: query + name: type + required: false + schema: + example: investigation + type: string + style: form responses: '200': content: application/json: schema: - example: {} - type: object + $ref: '#/components/schemas/NotebooksResponse' description: OK '400': content: @@ -12988,30 +27521,69 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a GCP integration + summary: Get all notebooks tags: - - GCP Integration - x-codegen-request-body-name: body - /api/v1/integration/pagerduty/configuration/services: + - Notebooks + x-pagination: + limitParam: count + pageOffsetParam: start + resultsPath: data post: - description: Create a new service object in the PagerDuty integration. - operationId: CreatePagerDutyIntegrationService + description: Create a notebook using the specified options. + operationId: CreateNotebook requestBody: content: application/json: + examples: + json-request-body: + value: + data: + attributes: + cells: + - attributes: + definition: + text: '## Some test markdown + + + With some example content.' + type: markdown + type: notebook_cells + - attributes: + definition: + requests: + - display_type: line + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: dog_classic + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + type: notebook_cells + name: Example Notebook + time: + live_span: 1h + type: notebooks schema: - $ref: '#/components/schemas/PagerDutyService' - description: Create a new service object request body. + $ref: '#/components/schemas/NotebookCreateRequest' + description: The JSON description of the notebook you want to create. required: true responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/PagerDutyServiceName' + $ref: '#/components/schemas/NotebookResponse' description: OK '400': content: @@ -13024,97 +27596,154 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a new service object + summary: Create a notebook tags: - - PagerDuty Integration + - Notebooks x-codegen-request-body-name: body - /api/v1/integration/pagerduty/configuration/services/{service_name}: + /api/v1/notebooks/{notebook_id}: delete: - description: Delete a single service object in the Datadog-PagerDuty integration. - operationId: DeletePagerDutyIntegrationService + description: Delete a notebook using the specified ID. + operationId: DeleteNotebook parameters: - - description: The service name + - description: Unique ID, assigned when you create the notebook. in: path - name: service_name + name: notebook_id required: true schema: - type: string + format: int64 + type: integer responses: '204': - description: No Content + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Authentication Error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a single service object + summary: Delete a notebook tags: - - PagerDuty Integration + - Notebooks get: - description: Get service name in the Datadog-PagerDuty integration. - operationId: GetPagerDutyIntegrationService + description: Get a notebook using the specified notebook ID. + operationId: GetNotebook parameters: - - description: The service name. + - description: Unique ID, assigned when you create the notebook. in: path - name: service_name + name: notebook_id required: true schema: - type: string + format: int64 + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/PagerDutyServiceName' + $ref: '#/components/schemas/NotebookResponse' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Authentication Error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a single service object + summary: Get a notebook tags: - - PagerDuty Integration + - Notebooks put: - description: Update a single service object in the Datadog-PagerDuty integration. - operationId: UpdatePagerDutyIntegrationService + description: Update a notebook using the specified ID. + operationId: UpdateNotebook parameters: - - description: The service name + - description: Unique ID, assigned when you create the notebook. in: path - name: service_name + name: notebook_id required: true schema: - type: string + format: int64 + type: integer requestBody: content: application/json: + examples: + json-request-body: + value: + data: + attributes: + cells: + - attributes: + definition: + text: '## Some updated test markdown + + + With some example content.' + type: markdown + type: notebook_cells + - attributes: + definition: + requests: + - display_type: bars + q: avg:system.load.1{*} + style: + line_type: solid + line_width: normal + palette: warm + show_legend: true + type: timeseries + yaxis: + scale: linear + graph_size: m + split_by: + keys: [] + tags: [] + time: null + id: abcd1234 + type: notebook_cells + name: Example Notebook + time: + live_span: 1h + type: notebooks schema: - $ref: '#/components/schemas/PagerDutyServiceKey' - description: Update an existing service object request body. + $ref: '#/components/schemas/NotebookUpdateRequest' + description: Update notebook request body. required: true responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/NotebookResponse' description: OK '400': content: @@ -13127,73 +27756,79 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Authentication Error '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a single service object + summary: Update a notebook tags: - - PagerDuty Integration + - Notebooks x-codegen-request-body-name: body - /api/v1/integration/slack/configuration/accounts/{account_name}/channels: + /api/v1/org: get: - description: Get a list of all channels configured for your Datadog-Slack integration. - operationId: GetSlackIntegrationChannels - parameters: - - $ref: '#/components/parameters/SlackAccountNamePathParameter' + description: This endpoint returns data on your top-level organization. + operationId: ListOrgs responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SlackIntegrationChannels' + $ref: '#/components/schemas/OrganizationListResponse' description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all channels in a Slack integration + summary: List your managed organizations tags: - - Slack Integration + - Organizations post: - description: Add a channel to your Datadog-Slack integration. - operationId: CreateSlackIntegrationChannel - parameters: - - $ref: '#/components/parameters/SlackAccountNamePathParameter' + description: 'Create a child organization. + + + This endpoint requires the + + [multi-organization account](https://docs.datadoghq.com/account_management/multi_organization/) + + feature and must be enabled by + + [contacting support](https://docs.datadoghq.com/help/). + + + Once a new child organization is created, you can interact with it + + by using the `org.public_id`, `api_key.key`, and + + `application_key.hash` provided in the response.' + operationId: CreateChildOrg requestBody: content: application/json: schema: - $ref: '#/components/schemas/SlackIntegrationChannel' - description: Payload describing Slack channel to be created + $ref: '#/components/schemas/OrganizationCreateBody' + description: Organization object that needs to be created required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SlackIntegrationChannel' + $ref: '#/components/schemas/OrganizationCreateResponse' description: OK '400': content: @@ -13206,64 +27841,72 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a Slack integration channel + summary: Create a child organization tags: - - Slack Integration + - Organizations x-codegen-request-body-name: body - /api/v1/integration/slack/configuration/accounts/{account_name}/channels/{channel_name}: - delete: - description: Remove a channel from your Datadog-Slack integration. - operationId: RemoveSlackIntegrationChannel + /api/v1/org/{public_id}: + get: + description: Get organization information. + operationId: GetOrg parameters: - - $ref: '#/components/parameters/SlackAccountNamePathParameter' - - $ref: '#/components/parameters/SlackChannelNamePathParameter' + - description: The `public_id` of the organization you are operating within. + in: path + name: public_id + required: true + schema: + example: abc123 + type: string responses: - '204': - description: The channel was removed successfully. - '400': + '200': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + $ref: '#/components/schemas/OrganizationResponse' + description: OK + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '404': + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Remove a Slack integration channel + summary: Get organization information tags: - - Slack Integration - get: - description: Get a channel configured for your Datadog-Slack integration. - operationId: GetSlackIntegrationChannel + - Organizations + put: + description: Update your organization. + operationId: UpdateOrg parameters: - - $ref: '#/components/parameters/SlackAccountNamePathParameter' - - $ref: '#/components/parameters/SlackChannelNamePathParameter' + - description: The `public_id` of the organization you are operating within. + in: path + name: public_id + required: true + schema: + example: abc123 + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Organization' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SlackIntegrationChannel' + $ref: '#/components/schemas/OrganizationResponse' description: OK '400': content: @@ -13276,37 +27919,84 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '404': + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update your organization + tags: + - Organizations + x-codegen-request-body-name: body + /api/v1/org/{public_id}/downgrade: + post: + description: Only available for MSP customers. Removes a child organization + from the hierarchy of the master organization and places the child organization + on a 30-day trial. + operationId: DowngradeOrg + parameters: + - description: The `public_id` of the organization you are operating within. + in: path + name: public_id + required: true + schema: + example: abc123 + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OrgDowngradedResponse' + description: OK + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a Slack integration channel + summary: Spin-off Child Organization tags: - - Slack Integration - patch: - description: Update a channel used in your Datadog-Slack integration. - operationId: UpdateSlackIntegrationChannel + - Organizations + /api/v1/org/{public_id}/idp_metadata: + post: + description: 'There are a couple of options for updating the Identity Provider + (IdP) + + metadata from your SAML IdP. + + + * **Multipart Form-Data**: Post the IdP metadata file using a form post. + + + * **XML Body:** Post the IdP metadata file as the body of the request.' + operationId: UploadIdPForOrg parameters: - - $ref: '#/components/parameters/SlackAccountNamePathParameter' - - $ref: '#/components/parameters/SlackChannelNamePathParameter' + - description: The `public_id` of the organization you are operating with + in: path + name: public_id + required: true + schema: + example: abc123 + type: string requestBody: content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/SlackIntegrationChannel' - description: Payload describing fields and values to be updated. + $ref: '#/components/schemas/IdpFormData' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SlackIntegrationChannel' + $ref: '#/components/schemas/IdpResponse' description: OK '400': content: @@ -13319,36 +28009,50 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '404': + description: Forbidden + '415': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Unsupported Media Type '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a Slack integration channel + summary: Upload IdP metadata tags: - - Slack Integration + - Organizations x-codegen-request-body-name: body - /api/v1/integration/webhooks/configuration/custom-variables: - post: - description: Creates an endpoint with the name ``. - operationId: CreateWebhooksIntegrationCustomVariable - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhooksIntegrationCustomVariable' - description: Define a custom variable request body. + /api/v1/query: + get: + description: Query timeseries points. + operationId: QueryMetrics + parameters: + - description: Start of the queried time period, seconds since the Unix epoch. + in: query + name: from + required: true + schema: + format: int64 + type: integer + - description: End of the queried time period, seconds since the Unix epoch. + in: query + name: to + required: true + schema: + format: int64 + type: integer + - description: Query string. + in: query + name: query required: true + schema: + type: string responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegrationCustomVariableResponse' + $ref: '#/components/schemas/MetricsQueryResponse' description: OK '400': content: @@ -13361,65 +28065,78 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a custom variable + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - timeseries_query + summary: Query timeseries points tags: - - Webhooks Integration - x-codegen-request-body-name: body - /api/v1/integration/webhooks/configuration/custom-variables/{custom_variable_name}: - delete: - description: Deletes the endpoint with the name ``. - operationId: DeleteWebhooksIntegrationCustomVariable + - Metrics + /api/v1/search: + get: + description: Search for metrics from the last 24 hours in Datadog. + operationId: ListMetrics parameters: - - description: The name of the custom variable. - in: path - name: custom_variable_name + - description: Query string to search metrics upon. Can optionally be prefixed + with `metrics:`. + in: query + name: q required: true schema: type: string responses: '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricSearchResponse' description: OK - '403': + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '404': + description: Bad Request + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a custom variable + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Search metrics tags: - - Webhooks Integration - get: - description: 'Shows the content of the custom variable with the name ``. - - - If the custom variable is secret, the value does not return in the - - response payload.' - operationId: GetWebhooksIntegrationCustomVariable + - Metrics + /api/v1/security_analytics/signals/{signal_id}/add_to_incident: + patch: + description: Add a security signal to an incident. This makes it possible to + search for signals by incident within the signal explorer and to view the + signals on the incident timeline. + operationId: AddSecurityMonitoringSignalToIncident parameters: - - description: The name of the custom variable. - in: path - name: custom_variable_name + - $ref: '#/components/parameters/SignalID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddSignalToIncidentRequest' + description: Attributes describing the signal update. required: true - schema: - type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegrationCustomVariableResponse' + $ref: '#/components/schemas/SuccessfulSignalUpdateResponse' description: OK '400': content: @@ -13432,41 +28149,38 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a custom variable + summary: Add a security signal to an incident tags: - - Webhooks Integration - put: - description: Updates the endpoint with the name ``. - operationId: UpdateWebhooksIntegrationCustomVariable + - Security Monitoring + x-codegen-request-body-name: body + /api/v1/security_analytics/signals/{signal_id}/assignee: + patch: + description: Modify the triage assignee of a security signal. + operationId: EditSecurityMonitoringSignalAssignee parameters: - - description: The name of the custom variable. - in: path - name: custom_variable_name - required: true - schema: - type: string + - $ref: '#/components/parameters/SignalID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegrationCustomVariableUpdateRequest' - description: Update an existing custom variable request body. + $ref: '#/components/schemas/SignalAssigneeUpdateRequest' + description: Attributes describing the signal update. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegrationCustomVariableResponse' + $ref: '#/components/schemas/SuccessfulSignalUpdateResponse' description: OK '400': content: @@ -13479,36 +28193,38 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a custom variable + summary: Modify the triage assignee of a security signal tags: - - Webhooks Integration + - Security Monitoring x-codegen-request-body-name: body - /api/v1/integration/webhooks/configuration/webhooks: - post: - description: Creates an endpoint with the name ``. - operationId: CreateWebhooksIntegration + /api/v1/security_analytics/signals/{signal_id}/state: + patch: + description: Change the triage state of a security signal. + operationId: EditSecurityMonitoringSignalState + parameters: + - $ref: '#/components/parameters/SignalID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegration' - description: Create a webhooks integration request body. + $ref: '#/components/schemas/SignalStateUpdateRequest' + description: Attributes describing the signal update. required: true responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegration' + $ref: '#/components/schemas/SuccessfulSignalUpdateResponse' description: OK '400': content: @@ -13521,65 +28237,147 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - create_webhooks - summary: Create a webhooks integration + summary: Change the triage state of a security signal tags: - - Webhooks Integration + - Security Monitoring x-codegen-request-body-name: body - /api/v1/integration/webhooks/configuration/webhooks/{webhook_name}: - delete: - description: Deletes the endpoint with the name ``. - operationId: DeleteWebhooksIntegration + /api/v1/series: + post: + description: "The metrics end-point allows you to post time-series data that + can be graphed on Datadog\u2019s dashboards.\nThe maximum payload size is + 3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed + size of less than 62 megabytes (62914560 bytes).\n\nIf you\u2019re submitting + metrics directly to the Datadog API without using DogStatsD, expect:\n\n- + 64 bits for the timestamp\n- 64 bits for the value\n- 40 bytes for the metric + names\n- 50 bytes for the timeseries\n- The full payload is approximately + 100 bytes. However, with the DogStatsD API,\ncompression is applied, which + reduces the payload size." + operationId: SubmitMetrics parameters: - - description: The name of the webhook. - in: path - name: webhook_name - required: true + - description: HTTP header used to compress the media-type. + in: header + name: Content-Encoding + required: false schema: - type: string + $ref: '#/components/schemas/MetricContentEncoding' + requestBody: + content: + text/json: + examples: + dynamic-points: + description: "Post time-series data that can be graphed on Datadog\u2019s + dashboards." + externalValue: examples/metrics/dynamic-points.json.sh + summary: Dynamic Points + x-variables: + NOW: $(date +%s) + schema: + $ref: '#/components/schemas/MetricsPayload' + required: true responses: - '200': - description: OK + '202': + content: + text/json: + schema: + $ref: '#/components/schemas/IntakePayloadAccepted' + description: Payload accepted + '400': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: - application/json: + text/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Authentication error - '404': + '408': content: - application/json: + text/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Request timeout + '413': + content: + text/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Payload too large '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a webhook + security: + - apiKeyAuth: [] + summary: Submit metrics tags: - - Webhooks Integration + - Metrics + x-codegen-request-body-name: body + /api/v1/slo: get: - description: Gets the content of the webhook with the name ``. - operationId: GetWebhooksIntegration + description: Get a list of service level objective objects for your organization. + operationId: ListSLOs parameters: - - description: The name of the webhook. - in: path - name: webhook_name - required: true + - description: A comma separated list of the IDs of the service level objectives + objects. + example: id1, id2, id3 + in: query + name: ids + required: false + schema: + type: string + - description: The query string to filter results based on SLO names. + example: monitor + in: query + name: query + required: false + schema: + type: string + - description: The query string to filter results based on a single SLO tag. + example: env:prod + in: query + name: tags_query + required: false + schema: + type: string + - description: The query string to filter results based on SLO numerator and + denominator. + example: aws.elb.request_count + in: query + name: metrics_query + required: false schema: type: string + - description: The number of SLOs to return in the response. + in: query + name: limit + required: false + schema: + default: 1000 + format: int64 + type: integer + - description: The specific offset to use as the beginning of the returned response. + in: query + name: offset + required: false + schema: + format: int64 + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegration' + $ref: '#/components/schemas/SLOListResponse' description: OK '400': content: @@ -13592,41 +28390,43 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a webhook integration + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_read + summary: Get all SLOs tags: - - Webhooks Integration - put: - description: Updates the endpoint with the name ``. - operationId: UpdateWebhooksIntegration - parameters: - - description: The name of the webhook. - in: path - name: webhook_name - required: true - schema: - type: string + - Service Level Objectives + x-pagination: + limitParam: limit + pageOffsetParam: offset + resultsPath: data + post: + description: Create a service level objective object. + operationId: CreateSLO requestBody: content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegrationUpdateRequest' - description: Update an existing Datadog-Webhooks integration. + $ref: '#/components/schemas/ServiceLevelObjectiveRequest' + description: Service level objective request object. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/WebhooksIntegration' + $ref: '#/components/schemas/SLOListResponse' description: OK '400': content: @@ -13639,81 +28439,51 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Item Not Found + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a webhook + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_write + summary: Create an SLO object tags: - - Webhooks Integration + - Service Level Objectives x-codegen-request-body-name: body - /api/v1/logs-queries/list: + /api/v1/slo/bulk_delete: post: - description: 'List endpoint returns logs that match a log search query. - - [Results are paginated][1]. - - - **If you are considering archiving logs for your organization, - - consider use of the Datadog archive capabilities instead of the log list API. + description: 'Delete (or partially delete) multiple service level objective + objects. - See [Datadog Logs Archive documentation][2].** + This endpoint facilitates deletion of one or more thresholds for one or more - [1]: /logs/guide/collect-multiple-logs-with-pagination + service level objective objects. If all thresholds are deleted, the service + level - [2]: https://docs.datadoghq.com/logs/archives' - operationId: ListLogs + objective object is deleted as well.' + operationId: DeleteSLOTimeframeInBulk requestBody: content: application/json: schema: - $ref: '#/components/schemas/LogsListRequest' - description: Logs filter + $ref: '#/components/schemas/SLOBulkDelete' + description: Delete multiple service level objective objects request body. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsListResponse' + $ref: '#/components/schemas/SLOBulkDeleteResponse' description: OK '400': - content: - application/json: - schema: - $ref: '#/components/schemas/LogsAPIErrorResponse' - description: Bad Request - '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Search logs - tags: - - Logs - x-codegen-request-body-name: body - /api/v1/logs/config/index-order: - get: - description: Get the current order of your log indexes. This endpoint takes - no JSON arguments. - operationId: GetLogsIndexOrder - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LogsIndexesOrder' - description: OK + description: Bad Request '403': content: application/json: @@ -13725,35 +28495,39 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Get indexes order + - AuthZ: + - slos_write + summary: Bulk Delete SLO Timeframes tags: - - Logs Indexes - put: - description: 'This endpoint updates the index order of your organization. + - Service Level Objectives + x-codegen-request-body-name: body + /api/v1/slo/can_delete: + get: + description: 'Check if an SLO can be safely deleted. For example, - It returns the index order object passed in the request body when the request - is successful.' - operationId: UpdateLogsIndexOrder - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LogsIndexesOrder' - description: Object containing the new ordered list of index names + assure an SLO can be deleted without disrupting a dashboard.' + operationId: CheckCanDeleteSLO + parameters: + - description: A comma separated list of the IDs of the service level objectives + objects. + example: id1, id2, id3 + in: query + name: ids required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsIndexesOrder' + $ref: '#/components/schemas/CheckCanDeleteSLOResponse' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/LogsAPIErrorResponse' + $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: @@ -13761,24 +28535,49 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/CheckCanDeleteSLOResponse' + description: Conflict '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update indexes order + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_read + summary: Check if SLOs can be safely deleted tags: - - Logs Indexes - x-codegen-request-body-name: body - /api/v1/logs/config/indexes: + - Service Level Objectives + /api/v1/slo/correction: get: - description: 'The Index object describes the configuration of a log index. - - This endpoint returns an array of the `LogIndex` objects of your organization.' - operationId: ListLogIndexes + description: Get all Service Level Objective corrections. + operationId: ListSLOCorrection + parameters: + - description: The specific offset to use as the beginning of the returned response. + in: query + name: offset + required: false + schema: + format: int64 + type: integer + - description: The number of SLO corrections to return in the response. Default + is 25. + in: query + name: limit + required: false + schema: + default: 25 + format: int64 + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsIndexListResponse' + $ref: '#/components/schemas/SLOCorrectionListResponse' description: OK '403': content: @@ -13791,64 +28590,74 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Get all indexes + - AuthZ: + - slos_read + summary: Get all SLO corrections tags: - - Logs Indexes + - Service Level Objective Corrections + x-pagination: + limitParam: limit + pageOffsetParam: offset + resultsPath: data post: - description: Creates a new index. Returns the Index object passed in the request - body when the request is successful. - operationId: CreateLogsIndex + description: Create an SLO Correction. + operationId: CreateSLOCorrection requestBody: content: application/json: schema: - $ref: '#/components/schemas/LogsIndex' - description: Object containing the new index. + $ref: '#/components/schemas/SLOCorrectionCreateRequest' + description: Create an SLO Correction required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsIndex' + $ref: '#/components/schemas/SLOCorrectionResponse' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/LogsAPIErrorResponse' - description: Invalid Parameter Error + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: SLO Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create an index + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_corrections + summary: Create an SLO correction tags: - - Logs Indexes + - Service Level Objective Corrections x-codegen-request-body-name: body - /api/v1/logs/config/indexes/{name}: - get: - description: Get one log index from your organization. This endpoint takes no - JSON arguments. - operationId: GetLogsIndex + /api/v1/slo/correction/{slo_correction_id}: + delete: + description: Permanently delete the specified SLO correction object. + operationId: DeleteSLOCorrection parameters: - - description: Name of the log index. + - description: The ID of the SLO correction object. in: path - name: name + name: slo_correction_id required: true schema: type: string responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/LogsIndex' + '204': description: OK '403': content: @@ -13860,46 +28669,36 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/LogsAPIErrorResponse' - description: Not Found + $ref: '#/components/schemas/APIErrorResponse' + description: Not found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get an index + summary: Delete an SLO correction tags: - - Logs Indexes - put: - description: "Update an index as identified by its name.\nReturns the Index - object passed in the request body when the request is successful.\n\nUsing - the `PUT` method updates your index\u2019s configuration by **replacing**\nyour - current configuration with the new one sent to your Datadog organization." - operationId: UpdateLogsIndex + - Service Level Objective Corrections + get: + description: Get an SLO correction. + operationId: GetSLOCorrection parameters: - - description: Name of the log index. + - description: The ID of the SLO correction object. in: path - name: name + name: slo_correction_id required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LogsIndexUpdateRequest' - description: Object containing the new `LogsIndexUpdateRequest`. - required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsIndex' + $ref: '#/components/schemas/SLOCorrectionResponse' description: OK '400': content: application/json: schema: - $ref: '#/components/schemas/LogsAPIErrorResponse' - description: Invalid Parameter Error + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: @@ -13907,52 +28706,33 @@ paths: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden '429': - content: - application/json: - schema: - $ref: '#/components/schemas/LogsAPIErrorResponse' - description: Too Many Requests - summary: Update an index + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get an SLO correction for an SLO tags: - - Logs Indexes - x-codegen-request-body-name: body - /api/v1/metrics: - get: - description: Get the list of actively reporting metrics from a given time until - now. - operationId: ListActiveMetrics + - Service Level Objective Corrections + patch: + description: Update the specified SLO correction object. + operationId: UpdateSLOCorrection parameters: - - description: Seconds since the Unix epoch. - in: query - name: from + - description: The ID of the SLO correction object. + in: path + name: slo_correction_id required: true - schema: - format: int64 - type: integer - - description: 'Hostname for filtering the list of metrics returned. - - If set, metrics retrieved are those with the corresponding hostname tag.' - in: query - name: host - required: false - schema: - type: string - - description: 'Filter metrics that have been submitted with the given tags. - Supports boolean and wildcard expressions. - - Cannot be combined with other filters.' - example: env IN (staging,test) AND service:web - in: query - name: tag_filter - required: false schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SLOCorrectionUpdateRequest' + description: The edited SLO correction object. + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MetricsListResponse' + $ref: '#/components/schemas/SLOCorrectionResponse' description: OK '400': content: @@ -13966,40 +28746,6 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - metrics_read - summary: Get active metrics list - tags: - - Metrics - /api/v1/metrics/{metric_name}: - get: - description: Get metadata about a specific metric. - operationId: GetMetricMetadata - parameters: - - description: Name of the metric for which to get metadata. - in: path - name: metric_name - required: true - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/MetricMetadata' - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden '404': content: application/json: @@ -14008,38 +28754,52 @@ paths: description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - metrics_read - summary: Get metric metadata + summary: Update an SLO correction tags: - - Metrics - put: - description: Edit metadata of a specific metric. Find out more about [supported - types](https://docs.datadoghq.com/developers/metrics). - operationId: UpdateMetricMetadata + - Service Level Objective Corrections + x-codegen-request-body-name: body + /api/v1/slo/search: + get: + description: Get a list of service level objective objects for your organization. + operationId: SearchSLO parameters: - - description: Name of the metric for which to edit metadata. - in: path - name: metric_name - required: true + - description: 'The query string to filter results based on SLO names. + + Some examples of queries include `service:` + + and ``.' + in: query + name: query + required: false schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/MetricMetadata' - description: New metadata. - required: true + - description: The number of files to return in the response `[default=10]`. + in: query + name: page[size] + required: false + schema: + format: int64 + type: integer + - description: The identifier of the first page to return. This parameter is + used for the pagination feature `[default=0]`. + in: query + name: page[number] + required: false + schema: + format: int64 + type: integer + - description: Whether or not to return facet information in the response `[default=false]`. + in: query + name: include_facets + required: false + schema: + type: boolean responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MetricMetadata' + $ref: '#/components/schemas/SearchSLOResponse' description: OK '400': content: @@ -14053,237 +28813,276 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Edit metric metadata + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_read + summary: Search for SLOs tags: - - Metrics - x-codegen-request-body-name: body - /api/v1/monitor/{monitor_id}/downtimes: - get: - description: Get all active downtimes for the specified monitor. - operationId: ListMonitorDowntimes + - Service Level Objectives + /api/v1/slo/{slo_id}: + delete: + description: 'Permanently delete the specified service level objective object. + + + If an SLO is used in a dashboard, the `DELETE /v1/slo/` endpoint returns + + a 409 conflict error because the SLO is referenced in a dashboard.' + operationId: DeleteSLO parameters: - - description: The id of the monitor + - description: The ID of the service level objective. in: path - name: monitor_id + name: slo_id required: true schema: - format: int64 - type: integer + type: string + - description: Delete the monitor even if it's referenced by other resources + (for example SLO, composite monitor). + in: query + name: force + required: false + schema: + type: string responses: '200': content: application/json: schema: - items: - $ref: '#/components/schemas/Downtime' - type: array + $ref: '#/components/schemas/SLODeleteResponse' description: OK - '400': + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Monitor Not Found error + description: Not found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/SLODeleteResponse' + description: Conflict '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - monitors_read - summary: Get active downtimes for a monitor + - slos_write + summary: Delete an SLO tags: - - Downtimes - x-codegen-request-body-name: body - /api/v1/monthly_custom_reports: + - Service Level Objectives get: - deprecated: true - description: 'Get monthly custom reports. - - **Note:** This endpoint will be fully deprecated on December 1, 2022. - - Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) - for the associated migration guide.' - operationId: GetMonthlyCustomReports + description: Get a service level objective object. + operationId: GetSLO parameters: - - description: The number of files to return in the response `[default=60].` - in: query - name: page[size] - required: false - schema: - format: int64 - type: integer - - description: The identifier of the first page to return. This parameter is - used for the pagination feature `[default=0]`. - in: query - name: page[number] - required: false - schema: - format: int64 - type: integer - - description: 'The direction to sort by: `[desc, asc]`.' - in: query - name: sort_dir - required: false + - description: The ID of the service level objective object. + in: path + name: slo_id + required: true schema: - $ref: '#/components/schemas/UsageSortDirection' - - description: 'The field to sort by: `[computed_on, size, start_date, end_date]`.' + type: string + - description: Get the IDs of SLO monitors that reference this SLO. + example: true in: query - name: sort + name: with_configured_alert_ids required: false schema: - $ref: '#/components/schemas/UsageSort' + type: boolean responses: '200': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/UsageCustomReportsResponse' + $ref: '#/components/schemas/SLOResponse' description: OK '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized - '429': + description: Forbidden + '404': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - usage_read - summary: Get the list of available monthly custom reports + - slos_read + summary: Get an SLO's details tags: - - Usage Metering - /api/v1/monthly_custom_reports/{report_id}: - get: - deprecated: true - description: 'Get specified monthly custom reports. - - **Note:** This endpoint will be fully deprecated on December 1, 2022. - - Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) - for the associated migration guide.' - operationId: GetSpecifiedMonthlyCustomReports + - Service Level Objectives + put: + description: Update the specified service level objective object. + operationId: UpdateSLO parameters: - - description: Date of the report in the format `YYYY-MM-DD`. + - description: The ID of the service level objective object. in: path - name: report_id + name: slo_id required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceLevelObjective' + description: The edited service level objective request object. + required: true responses: '200': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/UsageSpecifiedCustomReportsResponse' + $ref: '#/components/schemas/SLOListResponse' description: OK '400': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized + description: Forbidden '404': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Not Found '429': - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - usage_read - summary: Get specified monthly custom reports + - slos_write + summary: Update an SLO tags: - - Usage Metering - /api/v1/org: + - Service Level Objectives + x-codegen-request-body-name: body + /api/v1/slo/{slo_id}/corrections: get: - description: This endpoint returns data on your top-level organization. - operationId: ListOrgs + description: Get corrections applied to an SLO + operationId: GetSLOCorrections + parameters: + - description: The ID of the service level objective object. + in: path + name: slo_id + required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/OrganizationListResponse' + $ref: '#/components/schemas/SLOCorrectionListResponse' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List your managed organizations + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_read + summary: Get Corrections For an SLO tags: - - Organizations - post: - description: 'Create a child organization. - - - This endpoint requires the - - [multi-organization account](https://docs.datadoghq.com/account_management/multi_organization/) - - feature and must be enabled by - - [contacting support](https://docs.datadoghq.com/help/). - - - Once a new child organization is created, you can interact with it - - by using the `org.public_id`, `api_key.key`, and - - `application_key.hash` provided in the response.' - operationId: CreateChildOrg - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OrganizationCreateBody' - description: Organization object that needs to be created + - Service Level Objectives + /api/v1/slo/{slo_id}/history: + get: + description: "Get a specific SLO\u2019s history, regardless of its SLO type.\n\nThe + detailed history data is structured according to the source data type.\nFor + example, metric data is included for event SLOs that use\nthe metric source, + and monitor SLO types include the monitor transition history.\n\n**Note:** + There are different response formats for event based and time based SLOs.\nExamples + of both are shown." + operationId: GetSLOHistory + parameters: + - description: The ID of the service level objective object. + in: path + name: slo_id + required: true + schema: + type: string + - description: The `from` timestamp for the query window in epoch seconds. + in: query + name: from_ts + required: true + schema: + format: int64 + type: integer + - description: The `to` timestamp for the query window in epoch seconds. + in: query + name: to_ts required: true + schema: + format: int64 + type: integer + - description: The SLO target. If `target` is passed in, the response will include + the remaining error budget and a timeframe value of `custom`. + in: query + name: target + schema: + exclusiveMaximum: true + exclusiveMinimum: true + format: double + maximum: 100 + minimum: 0 + type: number + - description: 'Defaults to `true`. If any SLO corrections are applied and this + parameter is set to `false`, + + then the corrections will not be applied and the SLI values will not be + affected.' + in: query + name: apply_correction + required: false + schema: + type: boolean responses: '200': content: application/json: schema: - $ref: '#/components/schemas/OrganizationCreateResponse' + $ref: '#/components/schemas/SLOHistoryResponse' description: OK '400': content: @@ -14297,352 +29096,488 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a child organization + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - slos_read + summary: Get an SLO's history tags: - - Organizations - x-codegen-request-body-name: body - /api/v1/org/{public_id}: + - Service Level Objectives + /api/v1/synthetics/ci/batch/{batch_id}: get: - description: Get organization information. - operationId: GetOrg + description: Get a batch's updated details. + operationId: GetSyntheticsCIBatch parameters: - - description: The `public_id` of the organization you are operating within. + - description: The ID of the batch. in: path - name: public_id + name: batch_id required: true schema: - example: abc123 type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/OrganizationResponse' + $ref: '#/components/schemas/SyntheticsBatchDetails' description: OK - '400': + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Batch does not exist. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get details of batch + tags: + - Synthetics + /api/v1/synthetics/locations: + get: + description: 'Get the list of public and private locations available for Synthetic + + tests. No arguments required.' + operationId: ListLocations + responses: + '200': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + $ref: '#/components/schemas/SyntheticsLocations' + description: OK '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get organization information + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_private_location_read + summary: Get all locations (public and private) tags: - - Organizations - put: - description: Update your organization. - operationId: UpdateOrg - parameters: - - description: The `public_id` of the organization you are operating within. - in: path - name: public_id - required: true - schema: - example: abc123 - type: string + - Synthetics + /api/v1/synthetics/private-locations: + post: + description: Create a new Synthetic private location. + operationId: CreatePrivateLocation requestBody: content: application/json: schema: - $ref: '#/components/schemas/Organization' + $ref: '#/components/schemas/SyntheticsPrivateLocation' + description: Details of the private location to create. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/OrganizationResponse' + $ref: '#/components/schemas/SyntheticsPrivateLocationCreationResponse' description: OK - '400': + '402': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Quota reached for private locations + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Private locations are not activated for the user '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update your organization + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_private_location_write + summary: Create a private location tags: - - Organizations + - Synthetics x-codegen-request-body-name: body - /api/v1/org/{public_id}/downgrade: - post: - description: Only available for MSP customers. Removes a child organization - from the hierarchy of the master organization and places the child organization - on a 30-day trial. - operationId: DowngradeOrg + /api/v1/synthetics/private-locations/{location_id}: + delete: + description: Delete a Synthetic private location. + operationId: DeletePrivateLocation parameters: - - description: The `public_id` of the organization you are operating within. + - description: The ID of the private location. in: path - name: public_id + name: location_id required: true schema: - example: abc123 type: string responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/OrgDowngradedResponse' + '204': description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: '- Private locations are not activated for the user + + - Private location does not exist' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Spin-off Child Organization + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_private_location_write + summary: Delete a private location tags: - - Organizations - /api/v1/org/{public_id}/idp_metadata: - post: - description: 'There are a couple of options for updating the Identity Provider - (IdP) - - metadata from your SAML IdP. - - - * **Multipart Form-Data**: Post the IdP metadata file using a form post. - - - * **XML Body:** Post the IdP metadata file as the body of the request.' - operationId: UploadIdPForOrg + - Synthetics + get: + description: Get a Synthetic private location. + operationId: GetPrivateLocation parameters: - - description: The `public_id` of the organization you are operating with + - description: The ID of the private location. in: path - name: public_id + name: location_id required: true schema: - example: abc123 type: string - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/IdpFormData' - required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/IdpResponse' + $ref: '#/components/schemas/SyntheticsPrivateLocation' description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '415': + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Unsupported Media Type + description: '- Synthetic private locations are not activated for the user + + - Private location does not exist' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Upload IdP metadata + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_private_location_read + summary: Get a private location tags: - - Organizations - x-codegen-request-body-name: body - /api/v1/query: - get: - description: Query timeseries points. - operationId: QueryMetrics + - Synthetics + put: + description: Edit a Synthetic private location. + operationId: UpdatePrivateLocation parameters: - - description: Start of the queried time period, seconds since the Unix epoch. - in: query - name: from - required: true - schema: - format: int64 - type: integer - - description: End of the queried time period, seconds since the Unix epoch. - in: query - name: to - required: true - schema: - format: int64 - type: integer - - description: Query string. - in: query - name: query + - description: The ID of the private location. + in: path + name: location_id required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsPrivateLocation' + description: Details of the private location to be updated. + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MetricsQueryResponse' + $ref: '#/components/schemas/SyntheticsPrivateLocation' description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: '- Private locations are not activated for the user + + - Private location does not exist' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - timeseries_query - summary: Query timeseries points + - synthetics_private_location_write + summary: Edit a private location tags: - - Metrics - /api/v1/search: + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/settings/default_locations: get: - description: Search for metrics from the last 24 hours in Datadog. - operationId: ListMetrics + description: Get the default locations settings. + operationId: GetSyntheticsDefaultLocations + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsDefaultLocations' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get the default locations + tags: + - Synthetics + /api/v1/synthetics/tests: + get: + description: Get the list of all Synthetic tests. + operationId: ListTests parameters: - - description: Query string to search metrics upon. Can optionally be prefixed - with `metrics:`. + - description: Used for pagination. The number of tests returned in the page. in: query - name: q - required: true + name: page_size + required: false schema: - type: string + default: 100 + format: int64 + type: integer + - description: Used for pagination. Which page you want to retrieve. Starts + at zero. + in: query + name: page_number + required: false + schema: + format: int64 + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MetricSearchResponse' - description: OK - '400': + $ref: '#/components/schemas/SyntheticsListTestsResponse' + description: OK - Returns the list of all Synthetic tests. + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Forbidden + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: Synthetic Monitoring is not activated for the user. '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Search metrics + - AuthZ: + - synthetics_read + summary: Get the list of all Synthetic tests tags: - - Metrics - /api/v1/security_analytics/signals/{signal_id}/add_to_incident: - patch: - description: Add a security signal to an incident. This makes it possible to - search for signals by incident within the signal explorer and to view the - signals on the incident timeline. - operationId: AddSecurityMonitoringSignalToIncident - parameters: - - $ref: '#/components/parameters/SignalID' + - Synthetics + x-pagination: + limitParam: page_size + pageParam: page_number + resultsPath: tests + /api/v1/synthetics/tests/api: + post: + description: Create a Synthetic API test. + operationId: CreateSyntheticsAPITest requestBody: content: application/json: + examples: + 1-simple-api-test: + description: Example of an API test. + summary: Create an API test. + value: + config: + assertions: + - operator: lessThan + target: 1000 + type: responseTime + - operator: is + target: 200 + type: statusCode + - operator: is + property: content-type + target: text/html; charset=UTF-8 + type: header + request: + method: GET + url: https://example.com + locations: + - azure:eastus + - aws:eu-west-3 + message: MY_NOTIFICATION_MESSAGE + name: MY_TEST_NAME + options: + min_failure_duration: 0 + min_location_failed: 1 + monitor_options: + include_tags: true + locked: false + new_host_delay: 300 + notify_audit: false + notify_no_data: false + renotify_interval: 0 + tick_every: 60 + status: live + subtype: http + tags: + - env:production + type: api + 2-multistep-api-test: + description: 'Example of a multistep API test running on a fake furniture + store. + + It creates a card, select a product and then add the product to + the card.' + summary: Create a Multistep API test + value: + config: + steps: + - assertions: + - operator: lessThan + target: 30000 + type: responseTime + extractedValues: + - field: location + name: CART_ID + parser: + type: regex + value: (?:[^\\/](?!(\\|/)))+$ + type: http_header + name: Get a cart + request: + method: POST + timeout: 30 + url: https://api.shopist.io/carts + subtype: http + - assertions: + - operator: is + target: 200 + type: statusCode + extractedValues: + - name: PRODUCT_ID + parser: + type: json_path + value: $[0].id['$oid'] + type: http_body + name: Get a product + request: + method: GET + timeout: 30 + url: https://api.shopist.io/products.json + subtype: http + - assertions: + - operator: is + target: 201 + type: statusCode + name: Add product to cart + request: + body: "{\n \"cart_item\": {\n \"product_id\": \"{{ PRODUCT_ID + }}\",\n \"amount_paid\": 500,\n \"quantity\": 1\n + \ },\n \"cart_id\": \"{{ CART_ID }}\"\n}" + headers: + content-type: application/json + method: POST + timeout: 30 + url: https://api.shopist.io/add_item.json + subtype: http + locations: + - aws:us-west-2 + message: MY_NOTIFICATION_MESSAGE + name: MY_TEST_NAME + options: + ci: + executionRule: blocking + min_failure_duration: 5400 + min_location_failed: 1 + monitor_options: + renotify_interval: 0 + retry: + count: 3 + interval: 300 + tick_every: 900 + status: live + subtype: multi + tags: + - env:prod + type: api schema: - $ref: '#/components/schemas/AddSignalToIncidentRequest' - description: Attributes describing the signal update. + $ref: '#/components/schemas/SyntheticsAPITest' + description: Details of the test to create. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SuccessfulSignalUpdateResponse' - description: OK + $ref: '#/components/schemas/SyntheticsAPITest' + description: OK - Returns the created test details. '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: '- JSON format is wrong + + - Creation failed' + '402': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': + description: Test quota is reached + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add a security signal to an incident + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Create an API test tags: - - Security Monitoring + - Synthetics x-codegen-request-body-name: body - /api/v1/security_analytics/signals/{signal_id}/assignee: - patch: - description: Modify the triage assignee of a security signal. - operationId: EditSecurityMonitoringSignalAssignee + /api/v1/synthetics/tests/api/{public_id}: + get: + description: 'Get the detailed configuration associated with + + a Synthetic API test.' + operationId: GetAPITest parameters: - - $ref: '#/components/parameters/SignalID' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SignalAssigneeUpdateRequest' - description: Attributes describing the signal update. + - description: The public ID of the test to get details from. + in: path + name: public_id required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SuccessfulSignalUpdateResponse' + $ref: '#/components/schemas/SyntheticsAPITest' description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request '403': content: application/json: @@ -14654,39 +29589,51 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Modify the triage assignee of a security signal + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get an API test tags: - - Security Monitoring - x-codegen-request-body-name: body - /api/v1/security_analytics/signals/{signal_id}/state: - patch: - description: Change the triage state of a security signal. - operationId: EditSecurityMonitoringSignalState + - Synthetics + put: + description: Edit the configuration of a Synthetic API test. + operationId: UpdateAPITest parameters: - - $ref: '#/components/parameters/SignalID' + - description: The public ID of the test to get details from. + in: path + name: public_id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/SignalStateUpdateRequest' - description: Attributes describing the signal update. + $ref: '#/components/schemas/SyntheticsAPITest' + description: New test details to be saved. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SuccessfulSignalUpdateResponse' + $ref: '#/components/schemas/SyntheticsAPITest' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: '- JSON format is wrong + + - Updating sub-type is forbidden' '403': content: application/json: @@ -14698,341 +29645,267 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user + + - Test can''t be found' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Change the triage state of a security signal + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Edit an API test tags: - - Security Monitoring + - Synthetics x-codegen-request-body-name: body - /api/v1/series: + /api/v1/synthetics/tests/browser: post: - description: "The metrics end-point allows you to post time-series data that - can be graphed on Datadog\u2019s dashboards.\nThe maximum payload size is - 3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed - size of less than 62 megabytes (62914560 bytes).\n\nIf you\u2019re submitting - metrics directly to the Datadog API without using DogStatsD, expect:\n\n- - 64 bits for the timestamp\n- 64 bits for the value\n- 40 bytes for the metric - names\n- 50 bytes for the timeseries\n- The full payload is approximately - 100 bytes. However, with the DogStatsD API,\ncompression is applied, which - reduces the payload size." - operationId: SubmitMetrics - parameters: - - description: HTTP header used to compress the media-type. - in: header - name: Content-Encoding - required: false - schema: - $ref: '#/components/schemas/MetricContentEncoding' + description: Create a Synthetic browser test. + operationId: CreateSyntheticsBrowserTest requestBody: content: - text/json: - examples: - dynamic-points: - description: "Post time-series data that can be graphed on Datadog\u2019s - dashboards." - externalValue: examples/metrics/dynamic-points.json.sh - summary: Dynamic Points - x-variables: - NOW: $(date +%s) + application/json: schema: - $ref: '#/components/schemas/MetricsPayload' + $ref: '#/components/schemas/SyntheticsBrowserTest' + description: Details of the test to create. required: true - responses: - '202': - content: - text/json: - schema: - $ref: '#/components/schemas/IntakePayloadAccepted' - description: Payload accepted - '400': - content: - text/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': - content: - text/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '408': - content: - text/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Request timeout - '413': - content: - text/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Payload too large - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - summary: Submit metrics - tags: - - Metrics - x-codegen-request-body-name: body - /api/v1/slo: - get: - description: Get a list of service level objective objects for your organization. - operationId: ListSLOs - parameters: - - description: A comma separated list of the IDs of the service level objectives - objects. - example: id1, id2, id3 - in: query - name: ids - required: false - schema: - type: string - - description: The query string to filter results based on SLO names. - example: monitor - in: query - name: query - required: false - schema: - type: string - - description: The query string to filter results based on a single SLO tag. - example: env:prod - in: query - name: tags_query - required: false - schema: - type: string - - description: The query string to filter results based on SLO numerator and - denominator. - example: aws.elb.request_count - in: query - name: metrics_query - required: false - schema: - type: string - - description: The number of SLOs to return in the response. - in: query - name: limit - required: false - schema: - default: 1000 - format: int64 - type: integer - - description: The specific offset to use as the beginning of the returned response. - in: query - name: offset - required: false - schema: - format: int64 - type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOListResponse' - description: OK + $ref: '#/components/schemas/SyntheticsBrowserTest' + description: OK - Returns the created test details. '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: '- JSON format is wrong + + - Creation failed' + '402': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': + description: Test quota is reached + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_read - summary: Get all SLOs + - synthetics_write + summary: Create a browser test tags: - - Service Level Objectives - x-pagination: - limitParam: limit - pageOffsetParam: offset - resultsPath: data - post: - description: Create a service level objective object. - operationId: CreateSLO - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceLevelObjectiveRequest' - description: Service level objective request object. + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/tests/browser/{public_id}: + get: + description: 'Get the detailed configuration (including steps) associated with + + a Synthetic browser test.' + operationId: GetBrowserTest + parameters: + - description: The public ID of the test to get details from. + in: path + name: public_id required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOListResponse' + $ref: '#/components/schemas/SyntheticsBrowserTest' description: OK - '400': + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Forbidden + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_write - summary: Create an SLO object + - synthetics_read + summary: Get a browser test tags: - - Service Level Objectives - x-codegen-request-body-name: body - /api/v1/slo/bulk_delete: - post: - description: 'Delete (or partially delete) multiple service level objective - objects. - - - This endpoint facilitates deletion of one or more thresholds for one or more - - service level objective objects. If all thresholds are deleted, the service - level - - objective object is deleted as well.' - operationId: DeleteSLOTimeframeInBulk + - Synthetics + put: + description: Edit the configuration of a Synthetic browser test. + operationId: UpdateBrowserTest + parameters: + - description: The public ID of the test to edit. + in: path + name: public_id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/SLOBulkDelete' - description: Delete multiple service level objective objects request body. + $ref: '#/components/schemas/SyntheticsBrowserTest' + description: New test details to be saved. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOBulkDeleteResponse' + $ref: '#/components/schemas/SyntheticsBrowserTest' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: '- JSON format is wrong + + - Updating sub-type is forbidden' '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user + + - Test can''t be found' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_write - summary: Bulk Delete SLO Timeframes + - synthetics_write + summary: Edit a browser test tags: - - Service Level Objectives + - Synthetics x-codegen-request-body-name: body - /api/v1/slo/can_delete: + /api/v1/synthetics/tests/browser/{public_id}/results: get: - description: 'Check if an SLO can be safely deleted. For example, - - assure an SLO can be deleted without disrupting a dashboard.' - operationId: CheckCanDeleteSLO + description: Get the last 150 test results summaries for a given Synthetic browser + test. + operationId: GetBrowserTestLatestResults parameters: - - description: A comma separated list of the IDs of the service level objectives - objects. - example: id1, id2, id3 - in: query - name: ids + - description: 'The public ID of the browser test for which to search results + + for.' + in: path + name: public_id required: true schema: type: string + - description: Timestamp in milliseconds from which to start querying results. + in: query + name: from_ts + required: false + schema: + format: int64 + type: integer + - description: Timestamp in milliseconds up to which to query results. + in: query + name: to_ts + required: false + schema: + format: int64 + type: integer + - description: Locations for which to query results. + in: query + name: probe_dc + required: false + schema: + items: + type: string + type: array responses: '200': content: application/json: schema: - $ref: '#/components/schemas/CheckCanDeleteSLOResponse' + $ref: '#/components/schemas/SyntheticsGetBrowserTestLatestResultsResponse' description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '409': + description: forbidden + '404': content: application/json: schema: - $ref: '#/components/schemas/CheckCanDeleteSLOResponse' - description: Conflict + $ref: '#/components/schemas/APIErrorResponse' + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_read - summary: Check if SLOs can be safely deleted + - synthetics_read + summary: Get a browser test's latest results summaries tags: - - Service Level Objectives - /api/v1/slo/correction: + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/tests/browser/{public_id}/results/{result_id}: get: - description: Get all Service Level Objective corrections. - operationId: ListSLOCorrection + description: Get a specific full result from a given Synthetic browser test. + operationId: GetBrowserTestResult parameters: - - description: The specific offset to use as the beginning of the returned response. - in: query - name: offset - required: false + - description: 'The public ID of the browser test to which the target result + + belongs.' + in: path + name: public_id + required: true schema: - format: int64 - type: integer - - description: The number of SLO corrections to return in the response. Default - is 25. - in: query - name: limit - required: false + type: string + - description: The ID of the result to get. + in: path + name: result_id + required: true schema: - default: 25 - format: int64 - type: integer + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOCorrectionListResponse' + $ref: '#/components/schemas/SyntheticsBrowserTestResultFull' description: OK '403': content: @@ -15040,43 +29913,53 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: '- Synthetic Monitoring is not activated for the user + + - Test or result is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_read - summary: Get all SLO corrections + - synthetics_read + summary: Get a browser test result tags: - - Service Level Objective Corrections - x-pagination: - limitParam: limit - pageOffsetParam: offset - resultsPath: data + - Synthetics + /api/v1/synthetics/tests/delete: post: - description: Create an SLO Correction. - operationId: CreateSLOCorrection + description: Delete multiple Synthetic tests by ID. + operationId: DeleteTests requestBody: content: application/json: schema: - $ref: '#/components/schemas/SLOCorrectionCreateRequest' - description: Create an SLO Correction + $ref: '#/components/schemas/SyntheticsDeleteTestsPayload' + description: Public ID list of the Synthetic tests to be deleted. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOCorrectionResponse' - description: OK + $ref: '#/components/schemas/SyntheticsDeleteTestsResponse' + description: OK. '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: '- JSON format is wrong + + - Test cannot be deleted as it''s used elsewhere (as a sub-test or in + an uptime widget) + + - Some IDs are not owned by the user' '403': content: application/json: @@ -15088,56 +29971,98 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: SLO Not Found + description: '- Tests to be deleted can''t be found + + - Synthetic is not activated for the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_corrections - summary: Create an SLO correction + - synthetics_write + summary: Delete tests tags: - - Service Level Objective Corrections + - Synthetics x-codegen-request-body-name: body - /api/v1/slo/correction/{slo_correction_id}: - delete: - description: Permanently delete the specified SLO correction object. - operationId: DeleteSLOCorrection - parameters: - - description: The ID of the SLO correction object. - in: path - name: slo_correction_id + /api/v1/synthetics/tests/trigger: + post: + description: Trigger a set of Synthetic tests. + operationId: TriggerTests + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsTriggerBody' + description: The identifiers of the tests to trigger. required: true - schema: - type: string responses: - '204': + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsTriggerCITestsResponse' description: OK - '403': + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Trigger Synthetic tests + tags: + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/tests/trigger/ci: + post: + description: Trigger a set of Synthetic tests for continuous integration. + operationId: TriggerCITests + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsCITestBody' + description: Details of the test to trigger. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsTriggerCITestsResponse' + description: OK + '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not found + description: JSON format is wrong '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an SLO correction + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Trigger tests from CI/CD pipelines tags: - - Service Level Objective Corrections + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/tests/{public_id}: get: - description: Get an SLO correction. - operationId: GetSLOCorrection + description: Get the detailed configuration associated with a Synthetic test. + operationId: GetTest parameters: - - description: The ID of the SLO correction object. + - description: The public ID of the test to get details from. in: path - name: slo_correction_id + name: public_id required: true schema: type: string @@ -15146,32 +30071,39 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SLOCorrectionResponse' + $ref: '#/components/schemas/SyntheticsTestDetails' description: OK - '400': + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Forbidden + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: '- Synthetic is not activated for the user + + - Test is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get an SLO correction for an SLO + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Get a test configuration tags: - - Service Level Objective Corrections + - Synthetics patch: - description: Update the specified SLO correction object. - operationId: UpdateSLOCorrection + description: Patch the configuration of a Synthetic test with partial data. + operationId: PatchTest parameters: - - description: The ID of the SLO correction object. + - description: The public ID of the test to patch. in: path - name: slo_correction_id + name: public_id required: true schema: type: string @@ -15179,22 +30111,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SLOCorrectionUpdateRequest' - description: The edited SLO correction object. + $ref: '#/components/schemas/SyntheticsPatchTestBody' + description: '[JSON Patch](https://jsonpatch.com/) compliant list of operations' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOCorrectionResponse' + $ref: '#/components/schemas/SyntheticsTestDetails' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: '- JSON format is wrong + + - Updating sub-type is forbidden' '403': content: application/json: @@ -15206,99 +30140,103 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update an SLO correction - tags: - - Service Level Objective Corrections - x-codegen-request-body-name: body - /api/v1/slo/search: - get: - description: Get a list of service level objective objects for your organization. - operationId: SearchSLO - parameters: - - description: 'The query string to filter results based on SLO names. + description: '- Synthetic Monitoring is not activated for the user - Some examples of queries include `service:` + - Test is not owned by the user - and ``.' - in: query - name: query - required: false + - Test can''t be found' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: Patch a Synthetic test + tags: + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/tests/{public_id}/results: + get: + description: Get the last 150 test results summaries for a given Synthetic API + test. + operationId: GetAPITestLatestResults + parameters: + - description: The public ID of the test for which to search results for. + in: path + name: public_id + required: true schema: type: string - - description: The number of files to return in the response `[default=10]`. + - description: Timestamp in milliseconds from which to start querying results. in: query - name: page[size] + name: from_ts required: false schema: format: int64 type: integer - - description: The identifier of the first page to return. This parameter is - used for the pagination feature `[default=0]`. + - description: Timestamp in milliseconds up to which to query results. in: query - name: page[number] + name: to_ts required: false schema: format: int64 type: integer - - description: Whether or not to return facet information in the response `[default=false]`. + - description: Locations for which to query results. in: query - name: include_facets + name: probe_dc required: false schema: - type: boolean + items: + type: string + type: array responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SearchSLOResponse' + $ref: '#/components/schemas/SyntheticsGetAPITestLatestResultsResponse' description: OK - '400': + '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: Forbidden + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: '- Synthetic is not activated for the user + + - Test is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_read - summary: Search for SLOs + - synthetics_read + summary: Get an API test's latest results summaries tags: - - Service Level Objectives - /api/v1/slo/{slo_id}: - delete: - description: 'Permanently delete the specified service level objective object. - - - If an SLO is used in a dashboard, the `DELETE /v1/slo/` endpoint returns - - a 409 conflict error because the SLO is referenced in a dashboard.' - operationId: DeleteSLO + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/tests/{public_id}/results/{result_id}: + get: + description: Get a specific full result from a given Synthetic API test. + operationId: GetAPITestResult parameters: - - description: The ID of the service level objective. + - description: The public ID of the API test to which the target result belongs. in: path - name: slo_id + name: public_id required: true schema: type: string - - description: Delete the monitor even if it's referenced by other resources - (for example SLO, composite monitor). - in: query - name: force - required: false + - description: The ID of the result to get. + in: path + name: result_id + required: true schema: type: string responses: @@ -15306,7 +30244,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SLODeleteResponse' + $ref: '#/components/schemas/SyntheticsAPITestResultFull' description: OK '403': content: @@ -15319,47 +30257,50 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not found - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/SLODeleteResponse' - description: Conflict + description: '- Synthetic Monitoring is not activated for the user + + - Test or result is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_write - summary: Delete an SLO + - synthetics_read + summary: Get an API test result tags: - - Service Level Objectives - get: - description: Get a service level objective object. - operationId: GetSLO + - Synthetics + /api/v1/synthetics/tests/{public_id}/status: + put: + description: Pause or start a Synthetic test by changing the status. + operationId: UpdateTestPauseStatus parameters: - - description: The ID of the service level objective object. + - description: The public ID of the Synthetic test to update. in: path - name: slo_id + name: public_id required: true schema: type: string - - description: Get the IDs of SLO monitors that reference this SLO. - example: true - in: query - name: with_configured_alert_ids - required: false - schema: - type: boolean + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsUpdateTestPauseStatusPayload' + description: Status to set the given Synthetic test to. + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOResponse' - description: OK + type: boolean + description: OK - Returns a boolean indicating if the update was successful. + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: JSON format is wrong. '403': content: application/json: @@ -15371,94 +30312,107 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not found + description: '- Synthetic Monitoring is not activated for the user + + - Test is not owned by the user' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_read - summary: Get an SLO's details + - synthetics_write + summary: Pause or start a test tags: - - Service Level Objectives - put: - description: Update the specified service level objective object. - operationId: UpdateSLO - parameters: - - description: The ID of the service level objective object. - in: path - name: slo_id - required: true - schema: - type: string + - Synthetics + x-codegen-request-body-name: body + /api/v1/synthetics/variables: + get: + description: Get the list of all Synthetic global variables. + operationId: ListGlobalVariables + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsListGlobalVariablesResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_global_variable_read + summary: Get all global variables + tags: + - Synthetics + post: + description: Create a Synthetic global variable. + operationId: CreateGlobalVariable requestBody: content: application/json: schema: - $ref: '#/components/schemas/ServiceLevelObjective' - description: The edited service level objective request object. + $ref: '#/components/schemas/SyntheticsGlobalVariable' + description: Details of the global variable to create. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOListResponse' + $ref: '#/components/schemas/SyntheticsGlobalVariable' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: Invalid request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_write - summary: Update an SLO + - synthetics_global_variable_write + summary: Create a global variable tags: - - Service Level Objectives + - Synthetics x-codegen-request-body-name: body - /api/v1/slo/{slo_id}/corrections: - get: - description: Get corrections applied to an SLO - operationId: GetSLOCorrections + /api/v1/synthetics/variables/{variable_id}: + delete: + description: Delete a Synthetic global variable. + operationId: DeleteGlobalVariable parameters: - - description: The ID of the service level objective object. + - description: The ID of the global variable. in: path - name: slo_id + name: variable_id required: true schema: type: string responses: '200': - content: - application/json: - schema: - $ref: '#/components/schemas/SLOCorrectionListResponse' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: JSON format is wrong '403': content: application/json: @@ -15470,103 +30424,103 @@ paths: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + description: Not found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_read - summary: Get Corrections For an SLO + - synthetics_global_variable_write + summary: Delete a global variable tags: - - Service Level Objectives - /api/v1/slo/{slo_id}/history: + - Synthetics get: - description: "Get a specific SLO\u2019s history, regardless of its SLO type.\n\nThe - detailed history data is structured according to the source data type.\nFor - example, metric data is included for event SLOs that use\nthe metric source, - and monitor SLO types include the monitor transition history.\n\n**Note:** - There are different response formats for event based and time based SLOs.\nExamples - of both are shown." - operationId: GetSLOHistory + description: Get the detailed configuration of a global variable. + operationId: GetGlobalVariable parameters: - - description: The ID of the service level objective object. + - description: The ID of the global variable. in: path - name: slo_id + name: variable_id required: true schema: type: string - - description: The `from` timestamp for the query window in epoch seconds. - in: query - name: from_ts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsGlobalVariable' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_global_variable_read + summary: Get a global variable + tags: + - Synthetics + put: + description: Edit a Synthetic global variable. + operationId: EditGlobalVariable + parameters: + - description: The ID of the global variable. + in: path + name: variable_id required: true schema: - format: int64 - type: integer - - description: The `to` timestamp for the query window in epoch seconds. - in: query - name: to_ts + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsGlobalVariable' + description: Details of the global variable to update. required: true - schema: - format: int64 - type: integer - - description: The SLO target. If `target` is passed in, the response will include - the remaining error budget and a timeframe value of `custom`. - in: query - name: target - schema: - exclusiveMaximum: true - exclusiveMinimum: true - format: double - maximum: 100 - minimum: 0 - type: number - - description: 'Defaults to `true`. If any SLO corrections are applied and this - parameter is set to `false`, - - then the corrections will not be applied and the SLI values will not be - affected.' - in: query - name: apply_correction - required: false - schema: - type: boolean responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SLOHistoryResponse' + $ref: '#/components/schemas/SyntheticsGlobalVariable' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: Invalid request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - slos_read - summary: Get an SLO's history + - synthetics_global_variable_write + summary: Edit a global variable tags: - - Service Level Objectives + - Synthetics + x-codegen-request-body-name: body /api/v1/tags/hosts: get: description: Return a mapping of tags to hosts for your whole infrastructure. @@ -18442,6 +33396,11 @@ tags: organization.' name: Dashboard Lists x-deprecated: true +- description: 'Interact with your dashboard lists through the API to make it easier + to organize, + + find, and share all of your dashboards with your team and organization.' + name: Dashboards - description: '[Downtiming](https://docs.datadoghq.com/monitors/notify/downtimes) gives @@ -18492,6 +33451,22 @@ tags: description: Find out more at url: https://docs.datadoghq.com/logs/indexes/ name: Logs Indexes +- description: "Pipelines and processors operate on incoming logs, parsing\nand transforming + them into structured attributes for easier querying.\n\n- See the [pipelines configuration + page](https://app.datadoghq.com/logs/pipelines)\n for a list of the pipelines + and processors currently configured in web UI.\n\n- Additional API-related information + about processors can be found in the\n [processors documentation](https://docs.datadoghq.com/logs/log_configuration/processors/?tab=api#lookup-processor).\n\n- + For more information about Pipelines, see the\n [pipeline documentation](https://docs.datadoghq.com/logs/log_configuration/pipelines).\n\n**Notes:**\n\nThese + endpoints are only available for admin users.\nMake sure to use an application + key created by an admin.\n\n**Grok parsing rules may effect JSON output and require\nreturned + data to be configured before using in a request.**\nFor example, if you are using + the data returned from a\nrequest for another request body, and have a parsing + rule\nthat uses a regex pattern like `\\s` for spaces, you will\nneed to configure + all escaped spaces as `%{space}` to use\nin the body data." + externalDocs: + description: Find out more at + url: https://docs.datadoghq.com/logs/log_configuration + name: Logs Pipelines - description: "The metrics endpoint allows you to:\n\n- Post metrics data so it can be graphed on Datadog\u2019s dashboards\n- Query metrics from any time period\n- Modify tag configurations for metrics\n- View tags and volumes for metrics\n\n**Note**: @@ -18500,6 +33475,28 @@ tags: that set number.\n\nThe Post, Patch, and Delete `manage_tags` API methods can only be performed by\na user who has the `Manage Tags for Metrics` permission." name: Metrics +- description: '[Monitors](https://docs.datadoghq.com/monitors) allow you to watch + a metric or check that you care about and + + notifies your team when a defined threshold has exceeded. + + + For more information, see [Creating Monitors](https://docs.datadoghq.com/monitors/create/types/).' + externalDocs: + description: Find out more at + url: https://docs.datadoghq.com/monitors/create/types/ + name: Monitors +- description: 'Interact with your notebooks through the API to make it easier to + organize, find, and + + share all of your notebooks with your team and organization. For more information, + see the + + [Notebooks documentation](https://docs.datadoghq.com/notebooks/).' + externalDocs: + description: For more information, see the Notebooks documentation. + url: https://docs.datadoghq.com/notebooks/ + name: Notebooks - description: Create, edit, and manage your organizations. Read more about [multi-org accounts](https://docs.datadoghq.com/account_management/multi_organization). externalDocs: @@ -18580,6 +33577,14 @@ tags: name: Slack Integration - description: Take graph snapshots using the API. name: Snapshots +- description: "Datadog Synthetic Monitoring uses simulated user requests and browser + rendering to help you ensure uptime,\nidentify regional issues, and track your + application performance. Synthetic tests come in\ntwo different flavors, [API + tests](https://docs.datadoghq.com/synthetics/api_tests/?tab=httptest)\nand [browser + tests](https://docs.datadoghq.com/synthetics/browser_tests). You can use Datadog\u2019s + API to\nmanage both test types programmatically.\n\nFor more information, see + the [Synthetic Monitoring documentation](https://docs.datadoghq.com/synthetics/)." + name: Synthetics - description: 'The tag endpoint allows you to assign tags to hosts, for example: `role:database`. Those tags are applied to @@ -18636,4 +33641,4 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/webhooks name: Webhooks Integration -x-group-parameters: true +x-group-parameters: true \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 73c51a16e..edf7336b3 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4,6 +4,160 @@ components: headers: {} links: {} parameters: + APIKeyCategoryParameter: + description: Filter API keys by category. + in: query + name: filter[category] + required: false + schema: + type: string + APIKeyFilterCreatedAtEndParameter: + description: Only include API keys created on or before the specified date. + in: query + name: filter[created_at][end] + required: false + schema: + example: '2020-11-24T18:46:21+00:00' + type: string + APIKeyFilterCreatedAtStartParameter: + description: Only include API keys created on or after the specified date. + in: query + name: filter[created_at][start] + required: false + schema: + example: '2020-11-24T18:46:21+00:00' + type: string + APIKeyFilterModifiedAtEndParameter: + description: Only include API keys modified on or before the specified date. + in: query + name: filter[modified_at][end] + required: false + schema: + example: '2020-11-24T18:46:21+00:00' + type: string + APIKeyFilterModifiedAtStartParameter: + description: Only include API keys modified on or after the specified date. + in: query + name: filter[modified_at][start] + required: false + schema: + example: '2020-11-24T18:46:21+00:00' + type: string + APIKeyFilterParameter: + description: Filter API keys by the specified string. + in: query + name: filter + required: false + schema: + type: string + APIKeyId: + description: The ID of the API key. + in: path + name: api_key_id + required: true + schema: + type: string + APIKeyIncludeParameter: + description: Comma separated list of resource paths for related resources to + include in the response. Supported resource paths are `created_by` and `modified_by`. + in: query + name: include + required: false + schema: + example: created_by,modified_by + type: string + APIKeyReadConfigReadEnabledParameter: + description: Filter API keys by remote config read enabled status. + in: query + name: filter[remote_config_read_enabled] + required: false + schema: + type: boolean + APIKeysSortParameter: + description: 'API key attribute used to sort results. Sort order is ascending + + by default. In order to specify a descending sort, prefix the + + attribute with a minus sign.' + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/APIKeysSort' + ApplicationKeyFilterCreatedAtEndParameter: + description: Only include application keys created on or before the specified + date. + in: query + name: filter[created_at][end] + required: false + schema: + example: '2020-11-24T18:46:21+00:00' + type: string + ApplicationKeyFilterCreatedAtStartParameter: + description: Only include application keys created on or after the specified + date. + in: query + name: filter[created_at][start] + required: false + schema: + example: '2020-11-24T18:46:21+00:00' + type: string + ApplicationKeyFilterParameter: + description: Filter application keys by the specified string. + in: query + name: filter + required: false + schema: + type: string + ApplicationKeyID: + description: The ID of the application key. + in: path + name: app_key_id + required: true + schema: + type: string + ApplicationKeyIncludeParameter: + description: Resource path for related resources to include in the response. + Only `owned_by` is supported. + in: query + name: include + required: false + schema: + example: owned_by + type: string + ApplicationKeysSortParameter: + description: 'Application key attribute used to sort results. Sort order is + ascending + + by default. In order to specify a descending sort, prefix the + + attribute with a minus sign.' + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/ApplicationKeysSort' + ArchiveID: + description: The ID of the archive. + in: path + name: archive_id + required: true + schema: + type: string + AuthNMappingID: + description: The UUID of the AuthN Mapping. + in: path + name: authn_mapping_id + required: true + schema: + type: string + CloudAccountID: + description: Cloud Account id. + in: path + name: cloud_account_id + required: true + schema: + type: string CloudWorkloadSecurityAgentRuleID: description: The ID of the Agent rule. example: 3b5-v82-ns6 @@ -47,6 +201,134 @@ components: required: true schema: type: string + IncidentAttachmentFilterQueryParameter: + description: Specifies which types of attachments are included in the response. + explode: false + in: query + name: filter[attachment_type] + required: false + schema: + items: + $ref: '#/components/schemas/IncidentAttachmentAttachmentType' + type: array + IncidentAttachmentIncludeQueryParameter: + description: Specifies which types of related objects are included in the response. + explode: false + in: query + name: include + required: false + schema: + items: + $ref: '#/components/schemas/IncidentAttachmentRelatedObject' + type: array + IncidentIDPathParameter: + description: The UUID of the incident. + in: path + name: incident_id + required: true + schema: + type: string + IncidentIncludeQueryParameter: + description: Specifies which types of related objects should be included in + the response. + explode: false + in: query + name: include + required: false + schema: + items: + $ref: '#/components/schemas/IncidentRelatedObject' + type: array + IncidentIntegrationMetadataIDPathParameter: + description: The UUID of the incident integration metadata. + in: path + name: integration_metadata_id + required: true + schema: + type: string + IncidentSearchIncludeQueryParameter: + description: Specifies which types of related objects should be included in + the response. + in: query + name: include + required: false + schema: + $ref: '#/components/schemas/IncidentRelatedObject' + IncidentSearchQueryQueryParameter: + description: 'Specifies which incidents should be returned. The query can contain + any number of incident facets + + joined by `ANDs`, along with multiple values for each of those facets joined + by `OR`s. For + + example: `state:active AND severity:(SEV-2 OR SEV-1)`.' + explode: false + in: query + name: query + required: true + schema: + type: string + IncidentSearchSortQueryParameter: + description: Specifies the order of returned incidents. + explode: false + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/IncidentSearchSortOrder' + IncidentServiceIDPathParameter: + description: The ID of the incident service. + in: path + name: service_id + required: true + schema: + type: string + IncidentServiceIncludeQueryParameter: + description: Specifies which types of related objects should be included in + the response. + in: query + name: include + required: false + schema: + $ref: '#/components/schemas/IncidentRelatedObject' + IncidentServiceSearchQueryParameter: + description: A search query that filters services by name. + in: query + name: filter + required: false + schema: + example: ExampleServiceName + type: string + IncidentTeamIDPathParameter: + description: The ID of the incident team. + in: path + name: team_id + required: true + schema: + type: string + IncidentTeamIncludeQueryParameter: + description: Specifies which types of related objects should be included in + the response. + in: query + name: include + required: false + schema: + $ref: '#/components/schemas/IncidentRelatedObject' + IncidentTeamSearchQueryParameter: + description: A search query that filters teams by name. + in: query + name: filter + required: false + schema: + example: ExampleTeamName + type: string + IncidentTodoIDPathParameter: + description: The UUID of the incident todo. + in: path + name: todo_id + required: true + schema: + type: string MetricID: description: The name of the log-based metric. in: path @@ -54,6 +336,14 @@ components: required: true schema: type: string + MetricName: + description: The name of the metric. + example: dist.http.endpoint.request + in: path + name: metric_name + required: true + schema: + type: string OpsgenieServiceIDPathParameter: description: The UUID of the service. in: path @@ -107,6 +397,78 @@ components: required: true schema: type: string + RoleID: + description: The unique identifier of the role. + in: path + name: role_id + required: true + schema: + type: string + RuleId: + description: The ID of the rule/scorecard. + in: path + name: rule_id + required: true + schema: + type: string + SchemaVersion: + description: The schema version desired in the response. + in: query + name: schema_version + required: false + schema: + $ref: '#/components/schemas/ServiceDefinitionSchemaVersions' + SecurityFilterID: + description: The ID of the security filter. + in: path + name: security_filter_id + required: true + schema: + type: string + SecurityMonitoringRuleID: + description: The ID of the rule. + in: path + name: rule_id + required: true + schema: + type: string + SensitiveDataScannerGroupID: + description: The ID of a group of rules. + in: path + name: group_id + required: true + schema: + type: string + SensitiveDataScannerRuleID: + description: The ID of the rule. + in: path + name: rule_id + required: true + schema: + type: string + ServiceAccountID: + description: The ID of the service account. + in: path + name: service_account_id + required: true + schema: + example: 00000000-0000-1234-0000-000000000000 + type: string + ServiceName: + description: The name of the service. + in: path + name: service_name + required: true + schema: + example: my-service + type: string + SignalID: + description: The ID of the signal. + in: path + name: signal_id + required: true + schema: + type: string SpansMetricIDParameter: description: The name of the span-based metric. in: path @@ -114,6 +476,14 @@ components: required: true schema: type: string + UserID: + description: The ID of the user. + in: path + name: user_id + required: true + schema: + example: 00000000-0000-9999-0000-000000000000 + type: string requestBodies: {} responses: BadRequestResponse: @@ -177,6 +547,30 @@ components: schema: $ref: '#/components/schemas/APIErrorResponse' description: Not Found + SpansBadRequestResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request. + SpansForbiddenResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: 'Forbidden: Access denied.' + SpansTooManyRequestsResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: 'Too many requests: The rate limit set by the API has been exceeded.' + SpansUnprocessableEntityResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Unprocessable Entity. TooManyRequestsResponse: content: application/json: @@ -203,41 +597,426 @@ components: required: - errors type: object - ApmRetentionFilterType: - default: apm_retention_filter - description: The type of the resource. - enum: - - apm_retention_filter - example: apm_retention_filter - type: string - x-enum-varnames: - - apm_retention_filter - AuditLogsEvent: - description: Object description of an Audit Logs event after it is processed - and stored by Datadog. + APIKeyCreateAttributes: + description: Attributes used to create an API Key. properties: - attributes: - $ref: '#/components/schemas/AuditLogsEventAttributes' - id: - description: Unique ID of the event. - example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + name: + description: Name of the API key. + example: API Key for submitting metrics type: string + required: + - name + type: object + APIKeyCreateData: + description: Object used to create an API key. + properties: + attributes: + $ref: '#/components/schemas/APIKeyCreateAttributes' type: - $ref: '#/components/schemas/AuditLogsEventType' + $ref: '#/components/schemas/APIKeysType' + required: + - attributes + - type type: object - AuditLogsEventAttributes: - description: JSON object containing all event attributes and their associated - values. + APIKeyCreateRequest: + description: Request used to create an API key. + properties: + data: + $ref: '#/components/schemas/APIKeyCreateData' + required: + - data + type: object + APIKeyRelationships: + description: Resources related to the API key. + properties: + created_by: + $ref: '#/components/schemas/RelationshipToUser' + modified_by: + $ref: '#/components/schemas/RelationshipToUser' + type: object + APIKeyResponse: + description: Response for retrieving an API key. + properties: + data: + $ref: '#/components/schemas/FullAPIKey' + included: + description: Array of objects related to the API key. + items: + $ref: '#/components/schemas/APIKeyResponseIncludedItem' + type: array + type: object + APIKeyResponseIncludedItem: + description: An object related to an API key. + oneOf: + - $ref: '#/components/schemas/User' + APIKeyUpdateAttributes: + description: Attributes used to update an API Key. + properties: + name: + description: Name of the API key. + example: API Key for submitting metrics + type: string + required: + - name + type: object + APIKeyUpdateData: + description: Object used to update an API key. properties: attributes: - additionalProperties: {} - description: JSON object of attributes from Audit Logs events. - example: - customAttribute: 123 - duration: 2345 - type: object - message: - description: Message of the event. + $ref: '#/components/schemas/APIKeyUpdateAttributes' + id: + description: ID of the API key. + example: 00112233-4455-6677-8899-aabbccddeeff + type: string + type: + $ref: '#/components/schemas/APIKeysType' + required: + - attributes + - id + - type + type: object + APIKeyUpdateRequest: + description: Request used to update an API key. + properties: + data: + $ref: '#/components/schemas/APIKeyUpdateData' + required: + - data + type: object + APIKeysResponse: + description: Response for a list of API keys. + properties: + data: + description: Array of API keys. + items: + $ref: '#/components/schemas/PartialAPIKey' + type: array + included: + description: Array of objects related to the API key. + items: + $ref: '#/components/schemas/APIKeyResponseIncludedItem' + type: array + meta: + $ref: '#/components/schemas/APIKeysResponseMeta' + type: object + APIKeysResponseMeta: + description: Additional information related to api keys response. + properties: + max_allowed: + description: Max allowed number of API keys. + format: int64 + type: integer + page: + $ref: '#/components/schemas/APIKeysResponseMetaPage' + type: object + APIKeysResponseMetaPage: + description: Additional information related to the API keys response. + properties: + total_filtered_count: + description: Total filtered application key count. + format: int64 + type: integer + type: object + APIKeysSort: + default: name + description: Sorting options + enum: + - created_at + - -created_at + - last4 + - -last4 + - modified_at + - -modified_at + - name + - -name + type: string + x-enum-varnames: + - CREATED_AT_ASCENDING + - CREATED_AT_DESCENDING + - LAST4_ASCENDING + - LAST4_DESCENDING + - MODIFIED_AT_ASCENDING + - MODIFIED_AT_DESCENDING + - NAME_ASCENDING + - NAME_DESCENDING + APIKeysType: + default: api_keys + description: API Keys resource type. + enum: + - api_keys + example: api_keys + type: string + x-enum-varnames: + - API_KEYS + AWSRelatedAccount: + description: AWS related account. + properties: + attributes: + $ref: '#/components/schemas/AWSRelatedAccountAttributes' + id: + description: The AWS account ID. + example: '123456789123' + type: string + type: + $ref: '#/components/schemas/AWSRelatedAccountType' + required: + - id + - type + type: object + AWSRelatedAccountAttributes: + description: Attributes for an AWS related account. + properties: + has_datadog_integration: + description: Whether or not the AWS account has a Datadog integration. + type: boolean + name: + description: The name of the AWS account. + type: string + type: object + AWSRelatedAccountType: + default: aws_account + description: Type of AWS related account. + enum: + - aws_account + example: aws_account + type: string + x-enum-varnames: + - AWS_ACCOUNT + AWSRelatedAccountsResponse: + description: List of AWS related accounts. + properties: + data: + description: An AWS related account. + items: + $ref: '#/components/schemas/AWSRelatedAccount' + type: array + type: object + ActiveBillingDimensionsAttributes: + description: List of active billing dimensions. + properties: + month: + description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`.' + format: date-time + type: string + values: + description: 'List of active billing dimensions. Example: `[infra_host, + apm_host, serverless_infra]`.' + items: + description: A given billing dimension in a list. + example: infra_host + type: string + type: array + type: object + ActiveBillingDimensionsBody: + description: Active billing dimensions data. + properties: + attributes: + $ref: '#/components/schemas/ActiveBillingDimensionsAttributes' + id: + description: Unique ID of the response. + type: string + type: + $ref: '#/components/schemas/ActiveBillingDimensionsType' + type: object + ActiveBillingDimensionsResponse: + description: Active billing dimensions response. + properties: + data: + $ref: '#/components/schemas/ActiveBillingDimensionsBody' + type: object + ActiveBillingDimensionsType: + default: billing_dimensions + description: Type of active billing dimensions data. + enum: + - billing_dimensions + type: string + x-enum-varnames: + - BILLING_DIMENSIONS + ApmRetentionFilterType: + default: apm_retention_filter + description: The type of the resource. + enum: + - apm_retention_filter + example: apm_retention_filter + type: string + x-enum-varnames: + - apm_retention_filter + ApplicationKeyCreateAttributes: + description: Attributes used to create an application Key. + properties: + name: + description: Name of the application key. + example: Application Key for managing dashboards + type: string + scopes: + description: Array of scopes to grant the application key. + example: + - dashboards_read + - dashboards_write + - dashboards_public_share + items: + description: Name of scope. + type: string + nullable: true + type: array + required: + - name + type: object + ApplicationKeyCreateData: + description: Object used to create an application key. + properties: + attributes: + $ref: '#/components/schemas/ApplicationKeyCreateAttributes' + type: + $ref: '#/components/schemas/ApplicationKeysType' + required: + - attributes + - type + type: object + ApplicationKeyCreateRequest: + description: Request used to create an application key. + properties: + data: + $ref: '#/components/schemas/ApplicationKeyCreateData' + required: + - data + type: object + ApplicationKeyRelationships: + description: Resources related to the application key. + properties: + owned_by: + $ref: '#/components/schemas/RelationshipToUser' + type: object + ApplicationKeyResponse: + description: Response for retrieving an application key. + properties: + data: + $ref: '#/components/schemas/FullApplicationKey' + included: + description: Array of objects related to the application key. + items: + $ref: '#/components/schemas/ApplicationKeyResponseIncludedItem' + type: array + type: object + ApplicationKeyResponseIncludedItem: + description: An object related to an application key. + oneOf: + - $ref: '#/components/schemas/User' + - $ref: '#/components/schemas/Role' + ApplicationKeyResponseMeta: + description: Additional information related to the application key response. + properties: + max_allowed_per_user: + description: Max allowed number of application keys per user. + format: int64 + type: integer + page: + $ref: '#/components/schemas/ApplicationKeyResponseMetaPage' + type: object + ApplicationKeyResponseMetaPage: + description: Additional information related to the application key response. + properties: + total_filtered_count: + description: Total filtered application key count. + format: int64 + type: integer + type: object + ApplicationKeyUpdateAttributes: + description: Attributes used to update an application Key. + properties: + name: + description: Name of the application key. + example: Application Key for managing dashboards + type: string + scopes: + description: Array of scopes to grant the application key. + example: + - dashboards_read + - dashboards_write + - dashboards_public_share + items: + description: Name of scope. + type: string + nullable: true + type: array + type: object + ApplicationKeyUpdateData: + description: Object used to update an application key. + properties: + attributes: + $ref: '#/components/schemas/ApplicationKeyUpdateAttributes' + id: + description: ID of the application key. + example: 00112233-4455-6677-8899-aabbccddeeff + type: string + type: + $ref: '#/components/schemas/ApplicationKeysType' + required: + - attributes + - id + - type + type: object + ApplicationKeyUpdateRequest: + description: Request used to update an application key. + properties: + data: + $ref: '#/components/schemas/ApplicationKeyUpdateData' + required: + - data + type: object + ApplicationKeysSort: + default: name + description: Sorting options + enum: + - created_at + - -created_at + - last4 + - -last4 + - name + - -name + type: string + x-enum-varnames: + - CREATED_AT_ASCENDING + - CREATED_AT_DESCENDING + - LAST4_ASCENDING + - LAST4_DESCENDING + - NAME_ASCENDING + - NAME_DESCENDING + ApplicationKeysType: + default: application_keys + description: Application Keys resource type. + enum: + - application_keys + example: application_keys + type: string + x-enum-varnames: + - APPLICATION_KEYS + AuditLogsEvent: + description: Object description of an Audit Logs event after it is processed + and stored by Datadog. + properties: + attributes: + $ref: '#/components/schemas/AuditLogsEventAttributes' + id: + description: Unique ID of the event. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: '#/components/schemas/AuditLogsEventType' + type: object + AuditLogsEventAttributes: + description: JSON object containing all event attributes and their associated + values. + properties: + attributes: + additionalProperties: {} + description: JSON object of attributes from Audit Logs events. + example: + customAttribute: 123 + duration: 2345 + type: object + message: + description: Message of the event. type: string service: description: 'Name of the application or service generating Audit Logs events. @@ -432,1239 +1211,1816 @@ components: from the other indexes type: string type: object - ChargebackBreakdown: - description: Charges breakdown. + AuthNMapping: + description: The AuthN Mapping object returned by API. properties: - charge_type: - description: The type of charge for a particular product. - example: on_demand - type: string - cost: - description: The cost for a particular product and charge type during a - given month. - format: double - type: number - product_name: - description: The product for which cost is being reported. - example: infra_host + attributes: + $ref: '#/components/schemas/AuthNMappingAttributes' + id: + description: ID of the AuthN Mapping. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d type: string + relationships: + $ref: '#/components/schemas/AuthNMappingRelationships' + type: + $ref: '#/components/schemas/AuthNMappingsType' + required: + - id + - type type: object - CloudWorkloadSecurityAgentRuleAttributes: - description: A Cloud Workload Security Agent rule returned by the API. + AuthNMappingAttributes: + description: Attributes of AuthN Mapping. properties: - agentConstraint: - description: The version of the agent. + attribute_key: + description: Key portion of a key/value pair of the attribute sent from + the Identity Provider. + example: member-of type: string - category: - description: The category of the Agent rule. - example: Process Activity + attribute_value: + description: Value portion of a key/value pair of the attribute sent from + the Identity Provider. + example: Development type: string - creationAuthorUuId: - description: The ID of the user who created the rule. - example: e51c9744-d158-11ec-ad23-da7ad0900002 + created_at: + description: Creation time of the AuthN Mapping. + format: date-time + readOnly: true type: string - creationDate: - description: When the Agent rule was created, timestamp in milliseconds. - example: 1624366480320 - format: int64 - type: integer - creator: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreatorAttributes' - defaultRule: - description: Whether the rule is included by default. - example: false - type: boolean - description: - description: The description of the Agent rule. - example: My Agent rule + modified_at: + description: Time of last AuthN Mapping modification. + format: date-time + readOnly: true type: string - enabled: - description: Whether the Agent rule is enabled. - example: true - type: boolean - expression: - description: The SECL expression of the Agent rule. - example: exec.file.name == \"sh\" + saml_assertion_attribute_id: + description: The ID of the SAML assertion attribute. + example: '0' type: string - name: - description: The name of the Agent rule. - example: my_agent_rule + type: object + AuthNMappingCreateAttributes: + description: Key/Value pair of attributes used for create request. + properties: + attribute_key: + description: Key portion of a key/value pair of the attribute sent from + the Identity Provider. + example: member-of type: string - updateAuthorUuId: - description: The ID of the user who updated the rule. - example: e51c9744-d158-11ec-ad23-da7ad0900002 + attribute_value: + description: Value portion of a key/value pair of the attribute sent from + the Identity Provider. + example: Development type: string - updateDate: - description: Timestamp in milliseconds when the Agent rule was last updated. - example: 1624366480320 - format: int64 - type: integer - updatedAt: - description: When the Agent rule was last updated, timestamp in milliseconds. - example: 1624366480320 - format: int64 - type: integer - updater: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdaterAttributes' - version: - description: The version of the Agent rule. - example: 23 - format: int64 - type: integer - type: object - CloudWorkloadSecurityAgentRuleCreateAttributes: - description: Create a new Cloud Workload Security Agent rule. - properties: - description: - description: The description of the Agent rule. - example: My Agent rule - type: string - enabled: - description: Whether the Agent rule is enabled. - example: true - type: boolean - expression: - description: The SECL expression of the Agent rule. - example: exec.file.name == \"sh\" - type: string - name: - description: The name of the Agent rule. - example: my_agent_rule - type: string - required: - - name - - expression type: object - CloudWorkloadSecurityAgentRuleCreateData: - description: Object for a single Agent rule. + AuthNMappingCreateData: + description: Data for creating an AuthN Mapping. properties: attributes: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateAttributes' + $ref: '#/components/schemas/AuthNMappingCreateAttributes' + relationships: + $ref: '#/components/schemas/AuthNMappingCreateRelationships' type: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleType' + $ref: '#/components/schemas/AuthNMappingsType' required: - - attributes - type type: object - CloudWorkloadSecurityAgentRuleCreateRequest: - description: Request object that includes the Agent rule to create. + AuthNMappingCreateRelationships: + description: Relationship of AuthN Mapping create object to Role. + properties: + role: + $ref: '#/components/schemas/RelationshipToRole' + type: object + AuthNMappingCreateRequest: + description: Request for creating an AuthN Mapping. properties: data: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateData' + $ref: '#/components/schemas/AuthNMappingCreateData' required: - data type: object - CloudWorkloadSecurityAgentRuleCreatorAttributes: - description: The attributes of the user who created the Agent rule. - properties: - handle: - description: The handle of the user. - example: datadog.user@example.com - type: string - name: - description: The name of the user. - example: Datadog User - nullable: true - type: string - type: object - CloudWorkloadSecurityAgentRuleData: - description: Object for a single Agent rule. + AuthNMappingIncluded: + description: Included data in the AuthN Mapping response. + oneOf: + - $ref: '#/components/schemas/SAMLAssertionAttribute' + - $ref: '#/components/schemas/Role' + AuthNMappingRelationships: + description: All relationships associated with AuthN Mapping. properties: - attributes: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleAttributes' - id: - description: The ID of the Agent rule. - example: 3dd-0uc-h1s - type: string - type: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleType' + role: + $ref: '#/components/schemas/RelationshipToRole' + saml_assertion_attribute: + $ref: '#/components/schemas/RelationshipToSAMLAssertionAttribute' type: object - CloudWorkloadSecurityAgentRuleResponse: - description: Response object that includes an Agent rule. + AuthNMappingResponse: + description: AuthN Mapping response from the API. properties: data: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData' + $ref: '#/components/schemas/AuthNMapping' + included: + description: Included data in the AuthN Mapping response. + items: + $ref: '#/components/schemas/AuthNMappingIncluded' + type: array type: object - CloudWorkloadSecurityAgentRuleType: - default: agent_rule - description: The type of the resource. The value should always be `agent_rule`. - enum: - - agent_rule - example: agent_rule - type: string - x-enum-varnames: - - AGENT_RULE - CloudWorkloadSecurityAgentRuleUpdateAttributes: - description: Update an existing Cloud Workload Security Agent rule. + AuthNMappingUpdateAttributes: + description: Key/Value pair of attributes used for update request. properties: - description: - description: The description of the Agent rule. - example: My Agent rule + attribute_key: + description: Key portion of a key/value pair of the attribute sent from + the Identity Provider. + example: member-of type: string - enabled: - description: Whether the Agent rule is enabled. - example: true - type: boolean - expression: - description: The SECL expression of the Agent rule. - example: exec.file.name == \"sh\" + attribute_value: + description: Value portion of a key/value pair of the attribute sent from + the Identity Provider. + example: Development type: string type: object - CloudWorkloadSecurityAgentRuleUpdateData: - description: Object for a single Agent rule. + AuthNMappingUpdateData: + description: Data for updating an AuthN Mapping. properties: attributes: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateAttributes' + $ref: '#/components/schemas/AuthNMappingUpdateAttributes' + id: + description: ID of the AuthN Mapping. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + relationships: + $ref: '#/components/schemas/AuthNMappingUpdateRelationships' type: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleType' + $ref: '#/components/schemas/AuthNMappingsType' required: - - attributes + - id - type type: object - CloudWorkloadSecurityAgentRuleUpdateRequest: - description: Request object that includes the Agent rule with the attributes - to update. + AuthNMappingUpdateRelationships: + description: Relationship of AuthN Mapping update object to Role. + properties: + role: + $ref: '#/components/schemas/RelationshipToRole' + type: object + AuthNMappingUpdateRequest: + description: Request to update an AuthN Mapping. properties: data: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateData' + $ref: '#/components/schemas/AuthNMappingUpdateData' required: - data type: object - CloudWorkloadSecurityAgentRuleUpdaterAttributes: - description: The attributes of the user who last updated the Agent rule. - properties: - handle: - description: The handle of the user. - example: datadog.user@example.com - type: string - name: - description: The name of the user. - example: Datadog User - nullable: true - type: string - type: object - CloudWorkloadSecurityAgentRulesListResponse: - description: Response object that includes a list of Agent rule. + AuthNMappingsResponse: + description: Array of AuthN Mappings response. properties: data: - description: A list of Agent rules objects. + description: Array of returned AuthN Mappings. items: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData' + $ref: '#/components/schemas/AuthNMapping' type: array + included: + description: Included data in the AuthN Mapping response. + items: + $ref: '#/components/schemas/AuthNMappingIncluded' + type: array + meta: + $ref: '#/components/schemas/ResponseMetaAttributes' type: object - CloudflareAccountCreateRequest: - description: Payload schema when adding a Cloudflare account. + AuthNMappingsSort: + description: Sorting options for AuthN Mappings. + enum: + - created_at + - -created_at + - role_id + - -role_id + - saml_assertion_attribute_id + - -saml_assertion_attribute_id + - role.name + - -role.name + - saml_assertion_attribute.attribute_key + - -saml_assertion_attribute.attribute_key + - saml_assertion_attribute.attribute_value + - -saml_assertion_attribute.attribute_value + type: string + x-enum-varnames: + - CREATED_AT_ASCENDING + - CREATED_AT_DESCENDING + - ROLE_ID_ASCENDING + - ROLE_ID_DESCENDING + - SAML_ASSERTION_ATTRIBUTE_ID_ASCENDING + - SAML_ASSERTION_ATTRIBUTE_ID_DESCENDING + - ROLE_NAME_ASCENDING + - ROLE_NAME_DESCENDING + - SAML_ASSERTION_ATTRIBUTE_KEY_ASCENDING + - SAML_ASSERTION_ATTRIBUTE_KEY_DESCENDING + - SAML_ASSERTION_ATTRIBUTE_VALUE_ASCENDING + - SAML_ASSERTION_ATTRIBUTE_VALUE_DESCENDING + AuthNMappingsType: + default: authn_mappings + description: AuthN Mappings resource type. + enum: + - authn_mappings + example: authn_mappings + type: string + x-enum-varnames: + - AUTHN_MAPPINGS + AwsCURConfig: + description: AWS CUR config. properties: - data: - $ref: '#/components/schemas/CloudflareAccountCreateRequestData' + attributes: + $ref: '#/components/schemas/AwsCURConfigAttributes' + id: + description: The ID of the AWS CUR config. + format: int64 + type: integer + type: + $ref: '#/components/schemas/AwsCURConfigType' required: - - data + - attributes + - type type: object - CloudflareAccountCreateRequestAttributes: - description: Attributes object for creating a Cloudflare account. + AwsCURConfigAttributes: + description: Attributes for An AWS CUR config. properties: - api_key: - description: The API key (or token) for the Cloudflare account. - example: a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 + account_id: + description: The AWS account ID. + example: '123456789123' type: string - email: - description: The email associated with the Cloudflare account. If an API - key is provided (and not a token), this field is also required. - example: test-email@example.com + bucket_name: + description: The AWS bucket name used to store the Cost and Usage Report. + example: dd-cost-bucket type: string - name: - description: The name of the Cloudflare account. - example: test-name + bucket_region: + description: The region the bucket is located in. + example: us-east-1 + type: string + created_at: + description: The timestamp when the AWS CUR config was created. + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ + type: string + error_messages: + description: The error messages for the AWS CUR config. + items: + type: string + type: array + months: + deprecated: true + description: The number of months the report has been backfilled. + format: int32 + maximum: 36 + type: integer + report_name: + description: The name of the Cost and Usage Report. + example: dd-report-name + type: string + report_prefix: + description: The report prefix used for the Cost and Usage Report. + example: dd-report-prefix + type: string + status: + description: The status of the AWS CUR. + example: active + type: string + status_updated_at: + description: The timestamp when the AWS CUR config status was updated. + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ + type: string + updated_at: + description: The timestamp when the AWS CUR config status was updated. + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string required: - - api_key - - name + - account_id + - bucket_name + - bucket_region + - report_name + - report_prefix + - status type: object - CloudflareAccountCreateRequestData: - description: Data object for creating a Cloudflare account. + AwsCURConfigPatchData: + description: AWS CUR config Patch data. properties: attributes: - $ref: '#/components/schemas/CloudflareAccountCreateRequestAttributes' + $ref: '#/components/schemas/AwsCURConfigPatchRequestAttributes' type: - $ref: '#/components/schemas/CloudflareAccountType' + $ref: '#/components/schemas/AwsCURConfigPatchRequestType' required: - attributes - type type: object - CloudflareAccountResponse: - description: The expected response schema when getting a Cloudflare account. + AwsCURConfigPatchRequest: + description: AWS CUR config Patch Request. properties: data: - $ref: '#/components/schemas/CloudflareAccountResponseData' + $ref: '#/components/schemas/AwsCURConfigPatchData' + required: + - data type: object - CloudflareAccountResponseAttributes: - description: Attributes object of a Cloudflare account. + AwsCURConfigPatchRequestAttributes: + description: Attributes for AWS CUR config Patch Request. properties: - email: - description: The email associated with the Cloudflare account. - example: test-email@example.com - type: string - name: - description: The name of the Cloudflare account. - example: test-name - type: string + is_enabled: + description: Whether or not the Cloud Cost Management account is enabled. + example: true + type: boolean required: - - name + - is_enabled type: object - CloudflareAccountResponseData: - description: Data object of a Cloudflare account. + AwsCURConfigPatchRequestType: + default: aws_cur_config_patch_request + description: Type of AWS CUR config Patch Request. + enum: + - aws_cur_config_patch_request + example: aws_cur_config_patch_request + type: string + x-enum-varnames: + - AWS_CUR_CONFIG_PATCH_REQUEST + AwsCURConfigPostData: + description: AWS CUR config Post data. properties: attributes: - $ref: '#/components/schemas/CloudflareAccountResponseAttributes' - id: - description: The ID of the Cloudflare account, a hash of the account name. - example: c1a8e059bfd1e911cf10b626340c9a54 - type: string + $ref: '#/components/schemas/AwsCURConfigPostRequestAttributes' type: - $ref: '#/components/schemas/CloudflareAccountType' + $ref: '#/components/schemas/AwsCURConfigPostRequestType' required: - attributes - - id - type type: object - CloudflareAccountType: - default: cloudflare-accounts - description: The JSON:API type for this API. Should always be `cloudflare-accounts`. - enum: - - cloudflare-accounts - example: cloudflare-accounts - type: string - x-enum-varnames: - - CLOUDFLARE_ACCOUNTS - CloudflareAccountUpdateRequest: - description: Payload schema when updating a Cloudflare account. + AwsCURConfigPostRequest: + description: AWS CUR config Post Request. properties: data: - $ref: '#/components/schemas/CloudflareAccountUpdateRequestData' + $ref: '#/components/schemas/AwsCURConfigPostData' required: - data type: object - CloudflareAccountUpdateRequestAttributes: - description: Attributes object for updating a Cloudflare account. + AwsCURConfigPostRequestAttributes: + description: Attributes for AWS CUR config Post Request. properties: - api_key: - description: The API key of the Cloudflare account. - example: a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 + account_id: + description: The AWS account ID. + example: '123456789123' type: string - email: - description: The email associated with the Cloudflare account. If an API - key is provided (and not a token), this field is also required. - example: test-email@example.com + bucket_name: + description: The AWS bucket name used to store the Cost and Usage Report. + example: dd-cost-bucket + type: string + bucket_region: + description: The region the bucket is located in. + example: us-east-1 + type: string + is_enabled: + description: Whether or not the Cloud Cost Management account is enabled. + type: boolean + months: + description: The month of the report. + format: int32 + maximum: 36 + type: integer + report_name: + description: The name of the Cost and Usage Report. + example: dd-report-name + type: string + report_prefix: + description: The report prefix used for the Cost and Usage Report. + example: dd-report-prefix type: string required: - - api_key + - account_id + - bucket_name + - report_name + - report_prefix type: object - CloudflareAccountUpdateRequestData: - description: Data object for updating a Cloudflare account. + AwsCURConfigPostRequestType: + default: aws_cur_config_post_request + description: Type of AWS CUR config Post Request. + enum: + - aws_cur_config_post_request + example: aws_cur_config_post_request + type: string + x-enum-varnames: + - AWS_CUR_CONFIG_POST_REQUEST + AwsCURConfigResponse: + description: Response of AWS CUR config. properties: - attributes: - $ref: '#/components/schemas/CloudflareAccountUpdateRequestAttributes' - type: - $ref: '#/components/schemas/CloudflareAccountType' + data: + $ref: '#/components/schemas/AwsCURConfig' type: object - CloudflareAccountsResponse: - description: The expected response schema when getting Cloudflare accounts. + AwsCURConfigType: + default: aws_cur_config + description: Type of AWS CUR config. + enum: + - aws_cur_config + example: aws_cur_config + type: string + x-enum-varnames: + - AWS_CUR_CONFIG + AwsCURConfigsResponse: + description: List of AWS CUR configs. properties: data: - description: The JSON:API data schema. + description: An AWS CUR config. items: - $ref: '#/components/schemas/CloudflareAccountResponseData' + $ref: '#/components/schemas/AwsCURConfig' type: array type: object - ConfluentAccountCreateRequest: - description: Payload schema when adding a Confluent account. + AzureUCConfig: + description: Azure config. properties: - data: - $ref: '#/components/schemas/ConfluentAccountCreateRequestData' - required: - - data - type: object - ConfluentAccountCreateRequestAttributes: - description: Attributes associated with the account creation request. - properties: - api_key: - description: The API key associated with your Confluent account. - example: TESTAPIKEY123 + account_id: + description: The tenant ID of the azure account. + example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string - api_secret: - description: The API secret associated with your Confluent account. - example: test-api-secret-123 + client_id: + description: The client ID of the Azure account. + example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string - resources: - description: A list of Confluent resources associated with the Confluent - account. - items: - $ref: '#/components/schemas/ConfluentAccountResourceAttributes' - type: array - tags: - description: A list of strings representing tags. Can be a single key, or - key-value pairs separated by a colon. - example: - - myTag - - myTag2:myValue + created_at: + description: The timestamp when the Azure config was created. + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ + type: string + dataset_type: + description: The dataset type of the Azure config. + example: actual + type: string + error_messages: + description: The error messages for the Azure config. items: type: string type: array + export_name: + description: The name of the configured Azure Export. + example: dd-actual-export + type: string + export_path: + description: The path where the Azure Export is saved. + example: dd-export-path + type: string + id: + description: The ID of the Azure config. + format: int64 + type: integer + months: + deprecated: true + description: The number of months the report has been backfilled. + format: int32 + maximum: 36 + type: integer + scope: + description: The scope of your observed subscription. + example: subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 + type: string + status: + description: The status of the Azure config. + example: active + type: string + status_updated_at: + description: The timestamp when the Azure config status was last updated. + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ + type: string + storage_account: + description: The name of the storage account where the Azure Export is saved. + example: dd-storage-account + type: string + storage_container: + description: The name of the storage container where the Azure Export is + saved. + example: dd-storage-container + type: string + updated_at: + description: The timestamp when the Azure config was last updated. + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ + type: string required: - - api_key - - api_secret + - account_id + - client_id + - dataset_type + - export_name + - export_path + - scope + - status + - storage_account + - storage_container type: object - ConfluentAccountCreateRequestData: - description: The data body for adding a Confluent account. + AzureUCConfigPair: + description: Azure config pair. properties: attributes: - $ref: '#/components/schemas/ConfluentAccountCreateRequestAttributes' + $ref: '#/components/schemas/AzureUCConfigPairAttributes' + id: + description: The ID of Cloud Cost Management account. + format: int64 + type: integer type: - $ref: '#/components/schemas/ConfluentAccountType' + $ref: '#/components/schemas/AzureUCConfigPairType' required: - attributes - type type: object - ConfluentAccountResourceAttributes: - description: Attributes object for updating a Confluent resource. + AzureUCConfigPairAttributes: + description: Attributes for Azure config pair. properties: - enable_custom_metrics: - default: false - description: Enable the `custom.consumer_lag_offset` metric, which contains - extra metric tags. - example: false - type: boolean - id: - description: The ID associated with a Confluent resource. - example: resource-id-123 - type: string - resource_type: - description: The resource type of the Resource. Can be `kafka`, `connector`, - `ksql`, or `schema_registry`. - example: kafka - type: string - tags: - description: A list of strings representing tags. Can be a single key, or - key-value pairs separated by a colon. - example: - - myTag - - myTag2:myValue + configs: + description: An Azure config. items: - type: string + $ref: '#/components/schemas/AzureUCConfig' type: array + id: + description: The ID of the Azure config pair. + format: int64 + type: integer required: - - resource_type + - configs type: object - ConfluentAccountResponse: - description: The expected response schema when getting a Confluent account. + AzureUCConfigPairType: + default: azure_uc_configs + description: Type of Azure config pair. + enum: + - azure_uc_configs + example: azure_uc_configs + type: string + x-enum-varnames: + - AZURE_UC_CONFIGS + AzureUCConfigPairsResponse: + description: Response of Azure config pair. properties: data: - $ref: '#/components/schemas/ConfluentAccountResponseData' - type: object - ConfluentAccountResponseAttributes: - description: The attributes of a Confluent account. - properties: - api_key: - description: The API key associated with your Confluent account. - example: TESTAPIKEY123 - type: string - resources: - description: A list of Confluent resources associated with the Confluent - account. - items: - $ref: '#/components/schemas/ConfluentResourceResponseAttributes' - type: array - tags: - description: A list of strings representing tags. Can be a single key, or - key-value pairs separated by a colon. - example: - - myTag - - myTag2:myValue - items: - type: string - type: array - required: - - api_key + $ref: '#/components/schemas/AzureUCConfigPair' type: object - ConfluentAccountResponseData: - description: An API key and API secret pair that represents a Confluent account. + AzureUCConfigPatchData: + description: Azure config Patch data. properties: attributes: - $ref: '#/components/schemas/ConfluentAccountResponseAttributes' - id: - description: A randomly generated ID associated with a Confluent account. - example: account_id_abc123 - type: string + $ref: '#/components/schemas/AzureUCConfigPatchRequestAttributes' type: - $ref: '#/components/schemas/ConfluentAccountType' + $ref: '#/components/schemas/AzureUCConfigPatchRequestType' required: - attributes - - id - type type: object - ConfluentAccountType: - default: confluent-cloud-accounts - description: The JSON:API type for this API. Should always be `confluent-cloud-accounts`. - enum: - - confluent-cloud-accounts - example: confluent-cloud-accounts - type: string - x-enum-varnames: - - CONFLUENT_CLOUD_ACCOUNTS - ConfluentAccountUpdateRequest: - description: The JSON:API request for updating a Confluent account. + AzureUCConfigPatchRequest: + description: Azure config Patch Request. properties: data: - $ref: '#/components/schemas/ConfluentAccountUpdateRequestData' + $ref: '#/components/schemas/AzureUCConfigPatchData' required: - data type: object - ConfluentAccountUpdateRequestAttributes: - description: Attributes object for updating a Confluent account. + AzureUCConfigPatchRequestAttributes: + description: Attributes for Azure config Patch Request. properties: - api_key: - description: The API key associated with your Confluent account. - example: TESTAPIKEY123 - type: string - api_secret: - description: The API secret associated with your Confluent account. - example: test-api-secret-123 - type: string - tags: - description: A list of strings representing tags. Can be a single key, or - key-value pairs separated by a colon. - example: - - myTag - - myTag2:myValue - items: - type: string - type: array + is_enabled: + description: Whether or not the Cloud Cost Management account is enabled. + example: true + type: boolean required: - - api_key - - api_secret + - is_enabled type: object - ConfluentAccountUpdateRequestData: - description: Data object for updating a Confluent account. + AzureUCConfigPatchRequestType: + default: azure_uc_config_patch_request + description: Type of Azure config Patch Request. + enum: + - azure_uc_config_patch_request + example: azure_uc_config_patch_request + type: string + x-enum-varnames: + - AZURE_UC_CONFIG_PATCH_REQUEST + AzureUCConfigPostData: + description: Azure config Post data. properties: attributes: - $ref: '#/components/schemas/ConfluentAccountUpdateRequestAttributes' + $ref: '#/components/schemas/AzureUCConfigPostRequestAttributes' type: - $ref: '#/components/schemas/ConfluentAccountType' + $ref: '#/components/schemas/AzureUCConfigPostRequestType' required: - attributes - type type: object - ConfluentAccountsResponse: - description: Confluent account returned by the API. - properties: - data: - description: The Confluent account. - items: - $ref: '#/components/schemas/ConfluentAccountResponseData' - type: array - type: object - ConfluentResourceRequest: - description: The JSON:API request for updating a Confluent resource. + AzureUCConfigPostRequest: + description: Azure config Post Request. properties: data: - $ref: '#/components/schemas/ConfluentResourceRequestData' + $ref: '#/components/schemas/AzureUCConfigPostData' required: - data type: object - ConfluentResourceRequestAttributes: - description: Attributes object for updating a Confluent resource. + AzureUCConfigPostRequestAttributes: + description: Attributes for Azure config Post Request. properties: - enable_custom_metrics: - default: false - description: Enable the `custom.consumer_lag_offset` metric, which contains - extra metric tags. - example: false + account_id: + description: The tenant ID of the azure account. + example: 1234abcd-1234-abcd-1234-1234abcd1234 + type: string + actual_bill_config: + $ref: '#/components/schemas/BillConfig' + amortized_bill_config: + $ref: '#/components/schemas/BillConfig' + client_id: + description: The client ID of the azure account. + example: 1234abcd-1234-abcd-1234-1234abcd1234 + type: string + is_enabled: + description: Whether or not the Cloud Cost Management account is enabled. type: boolean - resource_type: - description: The resource type of the Resource. Can be `kafka`, `connector`, - `ksql`, or `schema_registry`. - example: kafka + scope: + description: The scope of your observed subscription. + example: subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 type: string - tags: - description: A list of strings representing tags. Can be a single key, or - key-value pairs separated by a colon. - example: - - myTag - - myTag2:myValue + required: + - account_id + - actual_bill_config + - amortized_bill_config + - client_id + - scope + type: object + AzureUCConfigPostRequestType: + default: azure_uc_config_post_request + description: Type of Azure config Post Request. + enum: + - azure_uc_config_post_request + example: azure_uc_config_post_request + type: string + x-enum-varnames: + - AZURE_UC_CONFIG_POST_REQUEST + AzureUCConfigsResponse: + description: List of Azure accounts with configs. + properties: + data: + description: An Azure config pair. items: - type: string + $ref: '#/components/schemas/AzureUCConfigPair' type: array - required: - - resource_type type: object - ConfluentResourceRequestData: - description: JSON:API request for updating a Confluent resource. + BillConfig: + description: Bill config. properties: - attributes: - $ref: '#/components/schemas/ConfluentResourceRequestAttributes' - id: - description: The ID associated with a Confluent resource. - example: resource-id-123 + export_name: + description: The name of the configured Azure Export. + example: dd-actual-export + type: string + export_path: + description: The path where the Azure Export is saved. + example: dd-export-path + type: string + storage_account: + description: The name of the storage account where the Azure Export is saved. + example: dd-storage-account + type: string + storage_container: + description: The name of the storage container where the Azure Export is + saved. + example: dd-storage-container type: string - type: - $ref: '#/components/schemas/ConfluentResourceType' required: - - attributes - - type - - id + - export_name + - export_path + - storage_account + - storage_container type: object - ConfluentResourceResponse: - description: Response schema when interacting with a Confluent resource. + BulkMuteFindingsRequest: + description: The new bulk mute finding request. properties: data: - $ref: '#/components/schemas/ConfluentResourceResponseData' + $ref: '#/components/schemas/BulkMuteFindingsRequestData' + required: + - data type: object - ConfluentResourceResponseAttributes: - description: Model representation of a Confluent Cloud resource. + BulkMuteFindingsRequestAttributes: + additionalProperties: false + description: The mute properties to be updated. properties: - enable_custom_metrics: - default: false - description: Enable the `custom.consumer_lag_offset` metric, which contains - extra metric tags. - example: false - type: boolean - id: - description: The ID associated with the Confluent resource. - example: resource_id_abc123 - type: string - resource_type: - description: The resource type of the Resource. Can be `kafka`, `connector`, - `ksql`, or `schema_registry`. - example: kafka - type: string - tags: - description: A list of strings representing tags. Can be a single key, or - key-value pairs separated by a colon. - example: - - myTag - - myTag2:myValue - items: - type: string - type: array + mute: + $ref: '#/components/schemas/BulkMuteFindingsRequestProperties' required: - - resource_type + - mute type: object - ConfluentResourceResponseData: - description: Confluent Cloud resource data. + BulkMuteFindingsRequestData: + description: Data object containing the new bulk mute properties of the finding. properties: attributes: - $ref: '#/components/schemas/ConfluentResourceResponseAttributes' + $ref: '#/components/schemas/BulkMuteFindingsRequestAttributes' id: - description: The ID associated with the Confluent resource. - example: resource_id_abc123 + description: UUID to identify the request + example: dbe5f567-192b-4404-b908-29b70e1c9f76 type: string + meta: + $ref: '#/components/schemas/BulkMuteFindingsRequestMeta' type: - $ref: '#/components/schemas/ConfluentResourceType' + $ref: '#/components/schemas/FindingType' required: - - attributes - - type - id + - type + - attributes + - meta type: object - ConfluentResourceType: - default: confluent-cloud-resources - description: The JSON:API type for this request. - enum: - - confluent-cloud-resources - example: confluent-cloud-resources - type: string - x-enum-varnames: - - CONFLUENT_CLOUD_RESOURCES - ConfluentResourcesResponse: - description: Response schema when interacting with a list of Confluent resources. + BulkMuteFindingsRequestMeta: + description: Meta object containing the findings to be updated. properties: - data: - description: The JSON:API data attribute. + findings: + description: Array of findings. items: - $ref: '#/components/schemas/ConfluentResourceResponseData' + $ref: '#/components/schemas/BulkMuteFindingsRequestMetaFindings' type: array type: object - ContentEncoding: - description: HTTP header used to compress the media-type. - enum: - - identity - - gzip - - deflate - type: string - x-enum-varnames: - - IDENTITY - - GZIP - - DEFLATE - CostByOrg: - description: Cost data. + BulkMuteFindingsRequestMetaFindings: + description: Finding object containing the finding information. + properties: + finding_id: + $ref: '#/components/schemas/FindingID' + type: object + BulkMuteFindingsRequestProperties: + additionalProperties: false + description: Object containing the new mute properties of the findings. + properties: + description: + description: Additional information about the reason why those findings + are muted or unmuted. This field has a maximum limit of 280 characters. + type: string + expiration_date: + description: 'The expiration date of the mute or unmute action (Unix ms). + It must be set to a value greater than the current timestamp. + + If this field is not provided, the finding will be muted or unmuted indefinitely, + which is equivalent to setting the expiration date to 9999999999999. + + ' + example: 1778721573794 + format: int64 + type: integer + muted: + description: Whether those findings should be muted or unmuted. + example: true + type: boolean + reason: + $ref: '#/components/schemas/FindingMuteReason' + required: + - muted + - reason + type: object + BulkMuteFindingsResponse: + description: The expected response schema. + properties: + data: + $ref: '#/components/schemas/BulkMuteFindingsResponseData' + required: + - data + type: object + BulkMuteFindingsResponseData: + description: Data object containing the ID of the request that was updated. properties: - attributes: - $ref: '#/components/schemas/CostByOrgAttributes' id: - description: Unique ID of the response. + description: UUID used to identify the request + example: 93bfeb70-af47-424d-908a-948d3f08e37f type: string type: - $ref: '#/components/schemas/CostByOrgType' + $ref: '#/components/schemas/FindingType' type: object - CostByOrgAttributes: - description: Cost attributes data. + CIAppAggregateBucketValue: + description: A bucket value, can either be a timeseries or a single value. + oneOf: + - $ref: '#/components/schemas/CIAppAggregateBucketValueSingleString' + - $ref: '#/components/schemas/CIAppAggregateBucketValueSingleNumber' + - $ref: '#/components/schemas/CIAppAggregateBucketValueTimeseries' + CIAppAggregateBucketValueSingleNumber: + description: A single number value. + format: double + type: number + CIAppAggregateBucketValueSingleString: + description: A single string value. + type: string + CIAppAggregateBucketValueTimeseries: + description: A timeseries array. + items: + $ref: '#/components/schemas/CIAppAggregateBucketValueTimeseriesPoint' + type: array + x-generate-alias-as-model: true + CIAppAggregateBucketValueTimeseriesPoint: + description: A timeseries point. properties: - charges: - description: List of charges data reported for the requested month. - items: - $ref: '#/components/schemas/ChargebackBreakdown' - type: array - date: - description: The month requested. + time: + description: The time value for this point. + example: '2020-06-08T11:55:00.123Z' format: date-time type: string - org_name: - description: The organization name. - type: string - public_id: - description: The organization public ID. - type: string - region: - description: The region of the Datadog instance that the organization belongs - to. - type: string - total_cost: - description: The total cost of products for the month. + value: + description: The value for this point. + example: 19 format: double type: number type: object - CostByOrgResponse: - description: Chargeback Summary response. + CIAppAggregateSort: + description: A sort rule. + example: + aggregation: count + order: asc properties: - data: - description: Response containing Chargeback Summary. - items: - $ref: '#/components/schemas/CostByOrg' - type: array + aggregation: + $ref: '#/components/schemas/CIAppAggregationFunction' + metric: + description: The metric to sort by (only used for `type=measure`). + example: '@duration' + type: string + order: + $ref: '#/components/schemas/CIAppSortOrder' + type: + $ref: '#/components/schemas/CIAppAggregateSortType' type: object - CostByOrgType: - default: cost_by_org - description: Type of cost data. + CIAppAggregateSortType: + default: alphabetical + description: The type of sorting algorithm. enum: - - cost_by_org - example: cost_by_org + - alphabetical + - measure type: string x-enum-varnames: - - COST_BY_ORG - Creator: - description: Creator of the object. + - ALPHABETICAL + - MEASURE + CIAppAggregationFunction: + description: An aggregation function. + enum: + - count + - cardinality + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + - median + - latest + - earliest + - most_frequent + - delta + example: pc90 + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - PERCENTILE_75 + - PERCENTILE_90 + - PERCENTILE_95 + - PERCENTILE_98 + - PERCENTILE_99 + - SUM + - MIN + - MAX + - AVG + - MEDIAN + - LATEST + - EARLIEST + - MOST_FREQUENT + - DELTA + CIAppCIError: + description: Contains information of the CI error. + nullable: true properties: - email: - description: Email of the creator. + domain: + $ref: '#/components/schemas/CIAppCIErrorDomain' + message: + description: Error message. + maxLength: 5000 + nullable: true type: string - handle: - description: Handle of the creator. + stack: + description: The stack trace of the reported errors. + nullable: true type: string - name: - description: Name of the creator. + type: + description: Short description of the error type. + maxLength: 100 nullable: true type: string type: object - DashboardListAddItemsRequest: - description: Request containing a list of dashboards to add. + CIAppCIErrorDomain: + description: Error category used to differentiate between issues related to + the developer or provider environments. + enum: + - provider + - user + - unknown + type: string + x-enum-varnames: + - PROVIDER + - USER + - UNKNOWN + CIAppCompute: + description: A compute rule to compute metrics or timeseries. properties: - dashboards: - description: List of dashboards to add the dashboard list. - items: - $ref: '#/components/schemas/DashboardListItemRequest' - type: array + aggregation: + $ref: '#/components/schemas/CIAppAggregationFunction' + interval: + description: 'The time buckets'' size (only used for type=timeseries) + + Defaults to a resolution of 150 points.' + example: 5m + type: string + metric: + description: The metric to use. + example: '@duration' + type: string + type: + $ref: '#/components/schemas/CIAppComputeType' + required: + - aggregation type: object - DashboardListAddItemsResponse: - description: Response containing a list of added dashboards. + CIAppComputeType: + default: total + description: The type of compute. + enum: + - timeseries + - total + type: string + x-enum-varnames: + - TIMESERIES + - TOTAL + CIAppComputes: + additionalProperties: + $ref: '#/components/schemas/CIAppAggregateBucketValue' + description: A map of the metric name to value for regular compute, or a list + of values for a timeseries. + type: object + CIAppCreatePipelineEventRequest: + description: Request object. properties: - added_dashboards_to_list: - description: List of dashboards added to the dashboard list. - items: - $ref: '#/components/schemas/DashboardListItemResponse' - type: array + data: + $ref: '#/components/schemas/CIAppCreatePipelineEventRequestData' type: object - DashboardListDeleteItemsRequest: - description: Request containing a list of dashboards to delete. + CIAppCreatePipelineEventRequestAttributes: + description: Attributes of the pipeline event to create. properties: - dashboards: - description: List of dashboards to delete from the dashboard list. - items: - $ref: '#/components/schemas/DashboardListItemRequest' - type: array + env: + description: The Datadog environment. + type: string + resource: + $ref: '#/components/schemas/CIAppCreatePipelineEventRequestAttributesResource' + service: + description: If the CI provider is SaaS, use this to differentiate between + instances. + type: string + required: + - resource type: object - DashboardListDeleteItemsResponse: - description: Response containing a list of deleted dashboards. + CIAppCreatePipelineEventRequestAttributesResource: + description: Details of the CI pipeline event. + example: Details TBD + oneOf: + - $ref: '#/components/schemas/CIAppPipelineEventPipeline' + - $ref: '#/components/schemas/CIAppPipelineEventStage' + - $ref: '#/components/schemas/CIAppPipelineEventJob' + - $ref: '#/components/schemas/CIAppPipelineEventStep' + CIAppCreatePipelineEventRequestData: + description: Data of the pipeline event to create. properties: - deleted_dashboards_from_list: - description: List of dashboards deleted from the dashboard list. - items: - $ref: '#/components/schemas/DashboardListItemResponse' - type: array + attributes: + $ref: '#/components/schemas/CIAppCreatePipelineEventRequestAttributes' + type: + $ref: '#/components/schemas/CIAppCreatePipelineEventRequestDataType' type: object - DashboardListItem: - description: A dashboard within a list. + CIAppCreatePipelineEventRequestDataType: + default: cipipeline_resource_request + description: Type of the event. + enum: + - cipipeline_resource_request + example: cipipeline_resource_request + type: string + x-enum-varnames: + - CIPIPELINE_RESOURCE_REQUEST + CIAppEventAttributes: + description: JSON object containing all event attributes and their associated + values. properties: - author: - $ref: '#/components/schemas/Creator' - created: - description: Date of creation of the dashboard. - format: date-time - readOnly: true + attributes: + additionalProperties: {} + description: JSON object of attributes from CI Visibility test events. + example: + customAttribute: 123 + duration: 2345 + type: object + tags: + $ref: '#/components/schemas/TagsEventAttribute' + test_level: + $ref: '#/components/schemas/CIAppTestLevel' + type: object + CIAppGitInfo: + description: 'If pipelines are triggered due to actions to a Git repository, + then all payloads must contain this. + + Note that either `tag` or `branch` has to be provided, but not both.' + nullable: true + properties: + author_email: + description: The commit author email. + example: author@example.com + format: email + type: string + author_name: + description: The commit author name. + example: John Doe + nullable: true type: string - icon: - description: URL to the icon of the dashboard. + author_time: + description: The commit author timestamp in RFC3339 format. + example: '2023-05-31T15:30:00Z' nullable: true - readOnly: true type: string - id: - description: ID of the dashboard. - example: q5j-nti-fv6 + branch: + description: The branch name (if a tag use the tag parameter). + example: feature-1 + nullable: true type: string - integration_id: - description: The short name of the integration. + commit_time: + description: The commit timestamp in RFC3339 format. + example: '2023-05-31T15:30:00Z' nullable: true - readOnly: true type: string - is_favorite: - description: Whether or not the dashboard is in the favorites. - readOnly: true - type: boolean - is_read_only: - description: Whether or not the dashboard is read only. - readOnly: true - type: boolean - is_shared: - description: Whether the dashboard is publicly shared or not. - readOnly: true - type: boolean - modified: - description: Date of last edition of the dashboard. - format: date-time - readOnly: true + committer_email: + description: The committer email. + example: committer@example.com + format: email + nullable: true type: string - popularity: - description: Popularity of the dashboard. - format: int32 - maximum: 5 - readOnly: true - type: integer - tags: - description: List of team names representing ownership of a dashboard. - items: - description: The name of a Datadog team, formatted as `team:` - type: string - maxItems: 5 + committer_name: + description: The committer name. nullable: true - readOnly: true - type: array - title: - description: Title of the dashboard. - readOnly: true type: string - type: - $ref: '#/components/schemas/DashboardType' - url: - description: URL path to the dashboard. - readOnly: true + default_branch: + description: The Git repository's default branch. + example: main + nullable: true + type: string + message: + description: The commit message. + example: Instrumenting tests with CI Visibility. + nullable: true + type: string + repository_url: + description: The URL of the repository. + example: https://github.com/username/repository + type: string + sha: + description: The git commit SHA. + example: da39a3ee5e6b4b0d3255bfef95601890afd80709 + pattern: ^[a-fA-F0-9]{40}$ + type: string + tag: + description: The tag name (if a branch use the branch parameter). + example: v1.0.0 + nullable: true type: string required: - - type - - id + - repository_url + - sha + - author_email type: object - DashboardListItemRequest: - description: A dashboard within a list. + CIAppGroupByHistogram: + description: 'Used to perform a histogram computation (only for measure facets). + + At most, 100 buckets are allowed, the number of buckets is `(max - min)/interval`.' properties: - id: - description: ID of the dashboard. - example: q5j-nti-fv6 - type: string - type: - $ref: '#/components/schemas/DashboardType' + interval: + description: The bin size of the histogram buckets. + example: 10 + format: double + type: number + max: + description: 'The maximum value for the measure used in the histogram + + (values greater than this one are filtered out).' + example: 100 + format: double + type: number + min: + description: 'The minimum value for the measure used in the histogram + + (values smaller than this one are filtered out).' + example: 50 + format: double + type: number required: - - type - - id + - interval + - min + - max type: object - DashboardListItemResponse: - description: A dashboard within a list. + CIAppGroupByMissing: + description: The value to use for logs that don't have the facet used to group-by. + oneOf: + - $ref: '#/components/schemas/CIAppGroupByMissingString' + - $ref: '#/components/schemas/CIAppGroupByMissingNumber' + CIAppGroupByMissingNumber: + description: The missing value to use if there is a number valued facet. + format: double + type: number + CIAppGroupByMissingString: + description: The missing value to use if there is a string valued facet. + type: string + CIAppGroupByTotal: + default: false + description: A resulting object to put the given computes in over all the matching + records. + oneOf: + - $ref: '#/components/schemas/CIAppGroupByTotalBoolean' + - $ref: '#/components/schemas/CIAppGroupByTotalString' + - $ref: '#/components/schemas/CIAppGroupByTotalNumber' + CIAppGroupByTotalBoolean: + description: If set to true, creates an additional bucket labeled "$facet_total". + type: boolean + CIAppGroupByTotalNumber: + description: A number to use as the key value for the total bucket. + format: double + type: number + CIAppGroupByTotalString: + description: A string to use as the key value for the total bucket. + type: string + CIAppHostInfo: + description: Contains information of the host running the pipeline, stage, job, + or step. + nullable: true + properties: + hostname: + description: FQDN of the host. + example: www.example.com + type: string + labels: + description: A list of labels used to select or identify the node. + example: + - ubuntu-18.04 + - n2.large + items: + type: string + type: array + name: + description: Name for the host. + type: string + workspace: + description: The path where the code is checked out. + example: /home/workspace/code/my-repo + type: string + type: object + CIAppPipelineEvent: + description: Object description of a pipeline event after being processed and + stored by Datadog. properties: + attributes: + $ref: '#/components/schemas/CIAppPipelineEventAttributes' id: - description: ID of the dashboard. - example: q5j-nti-fv6 - readOnly: true + description: Unique ID of the event. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA type: string type: - $ref: '#/components/schemas/DashboardType' - required: - - type - - id + $ref: '#/components/schemas/CIAppPipelineEventTypeName' type: object - DashboardListItems: - description: Dashboards within a list. + CIAppPipelineEventAttributes: + description: JSON object containing all event attributes and their associated + values. properties: - dashboards: - description: List of dashboards in the dashboard list. - example: [] + attributes: + additionalProperties: {} + description: JSON object of attributes from CI Visibility pipeline events. + example: + customAttribute: 123 + duration: 2345 + type: object + ci_level: + $ref: '#/components/schemas/CIAppPipelineLevel' + tags: + $ref: '#/components/schemas/TagsEventAttribute' + type: object + CIAppPipelineEventJob: + description: Details of a CI job. + properties: + dependencies: + description: A list of job IDs that this job depends on. + example: + - f7e6a006-a029-46c3-b0cc-742c9d7d363b + - c8a69849-3c3b-4721-8b33-3e8ec2df1ebe items: - $ref: '#/components/schemas/DashboardListItem' + description: A list of job IDs. + type: string + nullable: true type: array - total: - description: Number of dashboards in the dashboard list. + end: + description: Time when the job run finished. The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' + format: date-time + type: string + error: + $ref: '#/components/schemas/CIAppCIError' + git: + $ref: '#/components/schemas/CIAppGitInfo' + id: + description: The UUID for the job. It has to be unique within each pipeline + execution. + example: c865bad4-de82-44b8-ade7-2c987528eb54 + type: string + level: + $ref: '#/components/schemas/CIAppPipelineEventJobLevel' + metrics: + $ref: '#/components/schemas/CIAppPipelineEventMetrics' + name: + description: The name for the job. + example: test + type: string + node: + $ref: '#/components/schemas/CIAppHostInfo' + parameters: + $ref: '#/components/schemas/CIAppPipelineEventParameters' + pipeline_name: + description: The parent pipeline name. + example: Build + type: string + pipeline_unique_id: + description: The parent pipeline UUID. + example: 76b572af-a078-42b2-a08a-cc28f98b944f + type: string + queue_time: + description: The queue time in milliseconds, if applicable. + example: 1004 format: int64 - readOnly: true + minimum: 0 + nullable: true type: integer + stage_id: + description: The parent stage UUID (if applicable). + nullable: true + type: string + stage_name: + description: The parent stage name (if applicable). + nullable: true + type: string + start: + description: Time when the job run instance started (it should not include + any queue time). The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' + format: date-time + type: string + status: + $ref: '#/components/schemas/CIAppPipelineEventJobStatus' + tags: + $ref: '#/components/schemas/CIAppPipelineEventTags' + url: + description: The URL to look at the job in the CI provider UI. + example: https://ci-platform.com/job/your-job-name/build/123 + type: string required: - - dashboards - type: object - DashboardListUpdateItemsRequest: - description: Request containing the list of dashboards to update to. - properties: - dashboards: - description: List of dashboards to update the dashboard list to. - items: - $ref: '#/components/schemas/DashboardListItemRequest' - type: array - type: object - DashboardListUpdateItemsResponse: - description: Response containing a list of updated dashboards. - properties: - dashboards: - description: List of dashboards in the dashboard list. - items: - $ref: '#/components/schemas/DashboardListItemResponse' - type: array + - level + - id + - name + - pipeline_unique_id + - pipeline_name + - start + - end + - status + - url type: object - DashboardType: - description: The type of the dashboard. + CIAppPipelineEventJobLevel: + default: job + description: Used to distinguish between pipelines, stages, jobs, and steps. enum: - - custom_timeboard - - custom_screenboard - - integration_screenboard - - integration_timeboard - - host_timeboard - example: host_timeboard + - job + example: job type: string x-enum-varnames: - - CUSTOM_TIMEBOARD - - CUSTOM_SCREENBOARD - - INTEGRATION_SCREENBOARD - - INTEGRATION_TIMEBOARD - - HOST_TIMEBOARD - DetailedFinding: - description: A single finding with with message and resource configuration. + - JOB + CIAppPipelineEventJobStatus: + description: The final status of the job. + enum: + - success + - error + - canceled + - skipped + example: success + type: string + x-enum-varnames: + - SUCCESS + - ERROR + - CANCELED + - SKIPPED + CIAppPipelineEventMetrics: + description: A list of user-defined metrics. The metrics must follow the `key:value` + pattern and the value must be numeric. + example: + - bundle_size:370 + - build_time:50021 + items: + description: Metrics in the form of `key:value`. The value needs to be numeric. + type: string + nullable: true + type: array + CIAppPipelineEventParameters: + additionalProperties: + type: string + description: A map of key-value parameters or environment variables that were + defined for the pipeline. + example: + LOG_LEVEL: debug + nullable: true + type: object + CIAppPipelineEventParentPipeline: + description: If the pipeline is triggered as child of another pipeline, this + should contain the details of the parent pipeline. + nullable: true properties: - attributes: - $ref: '#/components/schemas/DetailedFindingAttributes' id: - $ref: '#/components/schemas/FindingID' - type: - $ref: '#/components/schemas/DetailedFindingType' + description: UUID of a pipeline. + example: 93bfeb70-af47-424d-908a-948d3f08e37f + type: string + url: + description: The URL to look at the pipeline in the CI provider UI. + example: https://ci-platform.com/pipelines/123456789 + type: string + required: + - id type: object - DetailedFindingAttributes: - description: The JSON:API attributes of the detailed finding. + CIAppPipelineEventPipeline: + description: Details of the top level pipeline, build, or workflow of your CI. properties: - evaluation: - $ref: '#/components/schemas/FindingEvaluation' - evaluation_changed_at: - $ref: '#/components/schemas/FindingEvaluationChangedAt' - message: - description: The remediation message for this finding. - example: '## Remediation - - - ### From the console - - - 1. Go to Storage Account + end: + description: Time when the pipeline run finished. It cannot be older than + 18 hours in the past from the current time. The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' + format: date-time + type: string + error: + $ref: '#/components/schemas/CIAppCIError' + git: + $ref: '#/components/schemas/CIAppGitInfo' + is_manual: + description: Whether or not the pipeline was triggered manually by the user. + example: false + nullable: true + type: boolean + is_resumed: + description: Whether or not the pipeline was resumed after being blocked. + example: false + nullable: true + type: boolean + level: + $ref: '#/components/schemas/CIAppPipelineEventPipelineLevel' + metrics: + $ref: '#/components/schemas/CIAppPipelineEventMetrics' + name: + description: Name of the pipeline. All pipeline runs for the builds should + have the same name. + example: Deploy to AWS + type: string + node: + $ref: '#/components/schemas/CIAppHostInfo' + parameters: + $ref: '#/components/schemas/CIAppPipelineEventParameters' + parent_pipeline: + $ref: '#/components/schemas/CIAppPipelineEventParentPipeline' + partial_retry: + description: 'Whether or not the pipeline was a partial retry of a previous + attempt. A partial retry is one - 2. For each Storage Account, navigate to Data Protection + which only runs a subset of the original jobs.' + example: false + type: boolean + pipeline_id: + description: 'Any ID used in the provider to identify the pipeline run even + if it is not unique across retries. - 3. Select Set soft delete enabled and enter the number of days to retain - soft deleted data.' + If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id` + can be set to the same value.' + example: '#023' + type: string + previous_attempt: + $ref: '#/components/schemas/CIAppPipelineEventPreviousPipeline' + queue_time: + description: The queue time in milliseconds, if applicable. + example: 1004 + format: int64 + minimum: 0 + nullable: true + type: integer + start: + description: Time when the pipeline run started (it should not include any + queue time). The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' + format: date-time type: string - mute: - $ref: '#/components/schemas/FindingMute' - resource: - $ref: '#/components/schemas/FindingResource' - resource_configuration: - description: The resource configuration for this finding. - type: object - resource_discovery_date: - $ref: '#/components/schemas/FindingResourceDiscoveryDate' - resource_type: - $ref: '#/components/schemas/FindingResourceType' - rule: - $ref: '#/components/schemas/FindingRule' status: - $ref: '#/components/schemas/FindingStatus' + $ref: '#/components/schemas/CIAppPipelineEventPipelineStatus' tags: - $ref: '#/components/schemas/FindingTags' + $ref: '#/components/schemas/CIAppPipelineEventTags' + unique_id: + description: 'UUID of the pipeline run. The ID has to be unique across retries + and pipelines, + + including partial retries.' + example: 3eacb6f3-ff04-4e10-8a9c-46e6d054024a + type: string + url: + description: The URL to look at the pipeline in the CI provider UI. + example: https://my-ci-provider.example/pipelines/my-pipeline/run/1 + type: string + required: + - level + - unique_id + - name + - url + - start + - end + - status + - partial_retry type: object - DetailedFindingType: - default: detailed_finding - description: The JSON:API type for findings that have the message and resource - configuration. + CIAppPipelineEventPipelineLevel: + default: pipeline + description: Used to distinguish between pipelines, stages, jobs, and steps. enum: - - detailed_finding - example: detailed_finding + - pipeline + example: pipeline type: string x-enum-varnames: - - DETAILED_FINDING - Event: - description: The metadata associated with a request. + - PIPELINE + CIAppPipelineEventPipelineStatus: + description: The final status of the pipeline. + enum: + - success + - error + - canceled + - skipped + - blocked + example: success + type: string + x-enum-varnames: + - SUCCESS + - ERROR + - CANCELED + - SKIPPED + - BLOCKED + CIAppPipelineEventPreviousPipeline: + description: If the pipeline is a retry, this should contain the details of + the previous attempt. + nullable: true properties: id: - description: Event ID. - example: '6509751066204996294' + description: UUID of a pipeline. + example: 93bfeb70-af47-424d-908a-948d3f08e37f type: string - name: - description: The event name. - type: string - source_id: - description: Event source ID. - example: 36 - format: int64 - type: integer - type: - description: Event type. - example: error_tracking_alert + url: + description: The URL to look at the pipeline in the CI provider UI. + example: https://ci-platform.com/pipelines/123456789 type: string + required: + - id type: object - EventAttributes: - description: Object description of attributes from your event. + CIAppPipelineEventStage: + description: Details of a CI stage. properties: - aggregation_key: - description: Aggregation key of the event. - type: string - date_happened: - description: 'POSIX timestamp of the event. Must be sent as an integer (no - quotation marks). - - Limited to events no older than 18 hours.' - format: int64 - type: integer - device_name: - description: A device name. - type: string - duration: - description: The duration between the triggering of the event and its recovery - in nanoseconds. - format: int64 - type: integer - event_object: - description: The event title. - example: Did you hear the news today? - type: string - evt: - $ref: '#/components/schemas/Event' - hostname: - description: 'Host name to associate with the event. - - Any tags associated with the host are also applied to this event.' - type: string - monitor: - $ref: '#/components/schemas/MonitorType' - monitor_groups: - description: List of groups referred to in the event. + dependencies: + description: A list of stage IDs that this stage depends on. + example: + - f7e6a006-a029-46c3-b0cc-742c9d7d363b + - c8a69849-3c3b-4721-8b33-3e8ec2df1ebe items: - description: Group referred to in the event. + description: A list of stage IDs. type: string nullable: true type: array - monitor_id: - description: ID of the monitor that triggered the event. When an event isn't - related to a monitor, this field is empty. + end: + description: Time when the stage run finished. The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' + format: date-time + type: string + error: + $ref: '#/components/schemas/CIAppCIError' + git: + $ref: '#/components/schemas/CIAppGitInfo' + id: + description: UUID for the stage. It has to be unique at least in the pipeline + scope. + example: 562bdbbb-7cab-48c8-851c-b24ca14628bf + type: string + level: + $ref: '#/components/schemas/CIAppPipelineEventStageLevel' + metrics: + $ref: '#/components/schemas/CIAppPipelineEventMetrics' + name: + description: The name for the stage. + example: build + type: string + node: + $ref: '#/components/schemas/CIAppHostInfo' + parameters: + $ref: '#/components/schemas/CIAppPipelineEventParameters' + pipeline_name: + description: The parent pipeline name. + example: Build + type: string + pipeline_unique_id: + description: The parent pipeline UUID. + example: 76b572af-a078-42b2-a08a-cc28f98b944f + type: string + queue_time: + description: The queue time in milliseconds, if applicable. + example: 1004 format: int64 + minimum: 0 nullable: true type: integer - priority: - $ref: '#/components/schemas/EventPriority' - related_event_id: - description: Related event ID. - format: int64 - type: integer - service: - description: Service that triggered the event. - example: datadog-api - type: string - source_type_name: - description: 'The type of event being posted. - - For example, `nagios`, `hudson`, `jenkins`, `my_apps`, `chef`, `puppet`, - `git` or `bitbucket`. - - The list of standard source attribute values is [available here](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).' - type: string - sourcecategory: - description: Identifier for the source of the event, such as a monitor alert, - an externally-submitted event, or an integration. + start: + description: Time when the stage run started (it should not include any + queue time). The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' + format: date-time type: string status: - $ref: '#/components/schemas/EventStatusType' + $ref: '#/components/schemas/CIAppPipelineEventStageStatus' tags: - description: A list of tags to apply to the event. - example: - - environment:test - items: - description: A tag. - type: string - type: array - timestamp: - description: POSIX timestamp of your event in milliseconds. - example: 1652274265000 - format: int64 - type: integer - title: - description: The event title. - example: Oh boy! - type: string + $ref: '#/components/schemas/CIAppPipelineEventTags' + required: + - level + - id + - name + - pipeline_unique_id + - pipeline_name + - start + - end + - status type: object - EventPriority: - description: The priority of the event's monitor. For example, `normal` or `low`. + CIAppPipelineEventStageLevel: + default: stage + description: Used to distinguish between pipelines, stages, jobs and steps. enum: - - normal - - low - example: normal - nullable: true + - stage + example: stage type: string x-enum-varnames: - - NORMAL - - LOW - EventResponse: - description: The object description of an event after being processed and stored - by Datadog. + - STAGE + CIAppPipelineEventStageStatus: + description: The final status of the stage. + enum: + - success + - error + - canceled + - skipped + example: success + type: string + x-enum-varnames: + - SUCCESS + - ERROR + - CANCELED + - SKIPPED + CIAppPipelineEventStep: + description: Details of a CI step. properties: - attributes: - $ref: '#/components/schemas/EventResponseAttributes' + end: + description: Time when the step run finished. The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' + format: date-time + type: string + error: + $ref: '#/components/schemas/CIAppCIError' + git: + $ref: '#/components/schemas/CIAppGitInfo' id: - description: the unique ID of the event. - example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + description: UUID for the step. It has to be unique within each pipeline + execution. + example: c2d517a8-4f3a-4b41-b4ae-69df0c864c79 type: string - type: - $ref: '#/components/schemas/EventType' - type: object - EventResponseAttributes: - description: The object description of an event response attribute. - properties: - attributes: - $ref: '#/components/schemas/EventAttributes' - message: - description: The message of the event. + job_id: + description: The parent job UUID (if applicable). + nullable: true type: string - tags: - description: An array of tags associated with the event. - example: - - team:A - items: - description: The tag associated with the event. - type: string - type: array - timestamp: - description: The timestamp of the event. - example: '2019-01-02T09:42:36.320Z' + job_name: + description: The parent job name (if applicable). + nullable: true + type: string + level: + $ref: '#/components/schemas/CIAppPipelineEventStepLevel' + metrics: + $ref: '#/components/schemas/CIAppPipelineEventMetrics' + name: + description: The name for the step. + example: test-server + type: string + node: + $ref: '#/components/schemas/CIAppHostInfo' + parameters: + $ref: '#/components/schemas/CIAppPipelineEventParameters' + pipeline_name: + description: The parent pipeline name. + example: Build + type: string + pipeline_unique_id: + description: The parent pipeline UUID. + example: 76b572af-a078-42b2-a08a-cc28f98b944f + type: string + stage_id: + description: The parent stage UUID (if applicable). + nullable: true + type: string + stage_name: + description: The parent stage name (if applicable). + nullable: true + type: string + start: + description: Time when the step run started. The time format must be RFC3339. + example: '2023-05-31T15:30:00Z' format: date-time type: string + status: + $ref: '#/components/schemas/CIAppPipelineEventStepStatus' + tags: + $ref: '#/components/schemas/CIAppPipelineEventTags' + url: + description: The URL to look at the step in the CI provider UI. + nullable: true + type: string + required: + - level + - id + - name + - pipeline_unique_id + - pipeline_name + - start + - end + - status type: object - EventStatusType: - description: 'If an alert event is enabled, its status is one of the following: - - `failure`, `error`, `warning`, `info`, `success`, `user_update`, - - `recommendation`, or `snapshot`.' + CIAppPipelineEventStepLevel: + default: step + description: Used to distinguish between pipelines, stages, jobs and steps. + enum: + - step + example: step + type: string + x-enum-varnames: + - STEP + CIAppPipelineEventStepStatus: + description: The final status of the step. enum: - - failure - - error - - warning - - info - success - - user_update - - recommendation - - snapshot - example: info + - error + example: success type: string x-enum-varnames: - - FAILURE - - ERROR - - WARNING - - INFO - SUCCESS - - USER_UPDATE - - RECOMMENDATION - - SNAPSHOT - EventType: - default: event + - ERROR + CIAppPipelineEventTags: + description: A list of user-defined tags. The tags must follow the `key:value` + pattern. + example: + - team:backend + - type:deployment + items: + description: Tags in the form of `key:value`. + type: string + nullable: true + type: array + CIAppPipelineEventTypeName: description: Type of the event. enum: - - event - example: event + - cipipeline + example: cipipeline type: string x-enum-varnames: - - EVENT - EventsListRequest: - description: The object sent with the request to retrieve a list of events from - your organization. + - CIPIPELINE + CIAppPipelineEventsRequest: + description: The request for a pipelines search. properties: filter: - $ref: '#/components/schemas/EventsQueryFilter' + $ref: '#/components/schemas/CIAppPipelinesQueryFilter' options: - $ref: '#/components/schemas/EventsQueryOptions' + $ref: '#/components/schemas/CIAppQueryOptions' page: - $ref: '#/components/schemas/EventsRequestPage' + $ref: '#/components/schemas/CIAppQueryPageOptions' sort: - $ref: '#/components/schemas/EventsSort' + $ref: '#/components/schemas/CIAppSort' type: object - EventsListResponse: - description: The response object with all events matching the request and pagination - information. + CIAppPipelineEventsResponse: + description: Response object with all pipeline events matching the request and + pagination information. properties: data: - description: An array of events matching the request. + description: Array of events matching the request. items: - $ref: '#/components/schemas/EventResponse' + $ref: '#/components/schemas/CIAppPipelineEvent' type: array links: - $ref: '#/components/schemas/EventsListResponseLinks' + $ref: '#/components/schemas/CIAppResponseLinks' meta: - $ref: '#/components/schemas/EventsResponseMetadata' + $ref: '#/components/schemas/CIAppResponseMetadataWithPagination' type: object - EventsListResponseLinks: - description: Links attributes. + CIAppPipelineLevel: + description: Pipeline execution level. + enum: + - pipeline + - stage + - job + - step + - custom + example: pipeline + type: string + x-enum-varnames: + - PIPELINE + - STAGE + - JOB + - STEP + - CUSTOM + CIAppPipelinesAggregateRequest: + description: The object sent with the request to retrieve aggregation buckets + of pipeline events from your organization. properties: - next: - description: 'Link for the next set of results. Note that the request can - also be made using the - - POST endpoint.' - example: https://app.datadoghq.com/api/v2/events?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + compute: + description: The list of metrics or timeseries to compute for the retrieved + buckets. + items: + $ref: '#/components/schemas/CIAppCompute' + type: array + filter: + $ref: '#/components/schemas/CIAppPipelinesQueryFilter' + group_by: + description: The rules for the group-by. + items: + $ref: '#/components/schemas/CIAppPipelinesGroupBy' + type: array + options: + $ref: '#/components/schemas/CIAppQueryOptions' + type: object + CIAppPipelinesAggregationBucketsResponse: + description: The query results. + properties: + buckets: + description: The list of matching buckets, one item per bucket. + items: + $ref: '#/components/schemas/CIAppPipelinesBucketResponse' + type: array + type: object + CIAppPipelinesAnalyticsAggregateResponse: + description: The response object for the pipeline events aggregate API endpoint. + properties: + data: + $ref: '#/components/schemas/CIAppPipelinesAggregationBucketsResponse' + links: + $ref: '#/components/schemas/CIAppResponseLinks' + meta: + $ref: '#/components/schemas/CIAppResponseMetadata' + type: object + CIAppPipelinesBucketResponse: + description: Bucket values. + properties: + by: + additionalProperties: + description: The values for each group-by. + description: The key-value pairs for each group-by. + example: + '@ci.provider.name': gitlab + '@ci.status': success + type: object + computes: + $ref: '#/components/schemas/CIAppComputes' + type: object + CIAppPipelinesGroupBy: + description: A group-by rule. + properties: + facet: + description: The name of the facet to use (required). + example: '@ci.status' type: string + histogram: + $ref: '#/components/schemas/CIAppGroupByHistogram' + limit: + default: 10 + description: The maximum buckets to return for this group-by. + format: int64 + type: integer + missing: + $ref: '#/components/schemas/CIAppGroupByMissing' + sort: + $ref: '#/components/schemas/CIAppAggregateSort' + total: + $ref: '#/components/schemas/CIAppGroupByTotal' + required: + - facet type: object - EventsQueryFilter: + CIAppPipelinesQueryFilter: description: The search and filter query settings. properties: from: default: now-15m - description: The minimum time for the requested events. Supports date math - and regular timestamps in milliseconds. + description: The minimum time for the requested events; supports date, math, + and regular timestamps (in milliseconds). example: now-15m type: string query: default: '*' - description: The search query following the event search syntax. - example: service:web* AND @http.status_code:[200 TO 299] + description: The search query following the CI Visibility Explorer search + syntax. + example: '@ci.provider.name:github AND @ci.status:error' type: string to: default: now - description: The maximum time for the requested events. Supports date math - and regular timestamps in milliseconds. + description: The maximum time for the requested events, supports date, math, + and regular timestamps (in milliseconds). example: now type: string type: object - EventsQueryOptions: - description: 'The global query options that are used. Either provide a timezone - or a time offset but not both, + CIAppQueryOptions: + description: 'Global query options that are used during the query. - otherwise the query fails.' + Only supply timezone or time offset, not both. Otherwise, the query fails.' properties: - timeOffset: - description: The time offset to apply to the query in seconds. + time_offset: + description: The time offset (in seconds) to apply to the query. format: int64 type: integer timezone: @@ -1674,22 +3030,34 @@ components: example: GMT type: string type: object - EventsRequestPage: - description: Pagination settings. + CIAppQueryPageOptions: + description: Paging attributes for listing events. properties: cursor: - description: The returned paging point to use to get the next results. + description: List following results with a cursor provided in the previous + query. example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== type: string limit: default: 10 - description: The maximum number of logs in the response. + description: Maximum number of events in the response. example: 25 format: int32 maximum: 1000 type: integer type: object - EventsResponseMetadata: + CIAppResponseLinks: + description: Links attributes. + properties: + next: + description: 'Link for the next set of results. The request can also be + made using the + + POST endpoint.' + example: https://app.datadoghq.com/api/v2/ci/tests/events?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + CIAppResponseMetadata: description: The metadata associated with a request. properties: elapsed: @@ -1697,38 +3065,67 @@ components: example: 132 format: int64 type: integer - page: - $ref: '#/components/schemas/EventsResponseMetadataPage' request_id: description: The identifier of the request. example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR type: string status: - description: The request status. - example: done + $ref: '#/components/schemas/CIAppResponseStatus' + warnings: + description: 'A list of warnings (non-fatal errors) encountered. Partial + results may return if + + warnings are present in the response.' + items: + $ref: '#/components/schemas/CIAppWarning' + type: array + type: object + CIAppResponseMetadataWithPagination: + description: The metadata associated with a request. + properties: + elapsed: + description: The time elapsed in milliseconds. + example: 132 + format: int64 + type: integer + page: + $ref: '#/components/schemas/CIAppResponsePage' + request_id: + description: The identifier of the request. + example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR type: string + status: + $ref: '#/components/schemas/CIAppResponseStatus' warnings: description: 'A list of warnings (non-fatal errors) encountered. Partial - results might be returned if + results may return if warnings are present in the response.' items: - $ref: '#/components/schemas/EventsWarning' + $ref: '#/components/schemas/CIAppWarning' type: array type: object - EventsResponseMetadataPage: - description: Pagination attributes. + CIAppResponsePage: + description: Paging attributes. properties: after: - description: 'The cursor to use to get the next results, if any. To make - the next request, use the same - - parameters with the addition of the `page[cursor]`.' + description: The cursor to use to get the next results, if any. To make + the next request, use the same parameters with the addition of `page[cursor]`. example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== type: string type: object - EventsSort: - description: The sort parameters when querying events. + CIAppResponseStatus: + description: The status of the response. + enum: + - done + - timeout + example: done + type: string + x-enum-varnames: + - DONE + - TIMEOUT + CIAppSort: + description: Sort parameters when querying events. enum: - timestamp - -timestamp @@ -1736,8 +3133,178 @@ components: x-enum-varnames: - TIMESTAMP_ASCENDING - TIMESTAMP_DESCENDING - EventsWarning: - description: A warning message indicating something is wrong with the query. + CIAppSortOrder: + description: The order to use, ascending or descending. + enum: + - asc + - desc + example: asc + type: string + x-enum-varnames: + - ASCENDING + - DESCENDING + CIAppTestEvent: + description: Object description of test event after being processed and stored + by Datadog. + properties: + attributes: + $ref: '#/components/schemas/CIAppEventAttributes' + id: + description: Unique ID of the event. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: '#/components/schemas/CIAppTestEventTypeName' + type: object + CIAppTestEventTypeName: + description: Type of the event. + enum: + - citest + example: citest + type: string + x-enum-varnames: + - CITEST + CIAppTestEventsRequest: + description: The request for a tests search. + properties: + filter: + $ref: '#/components/schemas/CIAppTestsQueryFilter' + options: + $ref: '#/components/schemas/CIAppQueryOptions' + page: + $ref: '#/components/schemas/CIAppQueryPageOptions' + sort: + $ref: '#/components/schemas/CIAppSort' + type: object + CIAppTestEventsResponse: + description: Response object with all test events matching the request and pagination + information. + properties: + data: + description: Array of events matching the request. + items: + $ref: '#/components/schemas/CIAppTestEvent' + type: array + links: + $ref: '#/components/schemas/CIAppResponseLinks' + meta: + $ref: '#/components/schemas/CIAppResponseMetadataWithPagination' + type: object + CIAppTestLevel: + description: Test run level. + enum: + - session + - module + - suite + - test + example: test + type: string + x-enum-varnames: + - SESSION + - MODULE + - SUITE + - TEST + CIAppTestsAggregateRequest: + description: The object sent with the request to retrieve aggregation buckets + of test events from your organization. + properties: + compute: + description: The list of metrics or timeseries to compute for the retrieved + buckets. + items: + $ref: '#/components/schemas/CIAppCompute' + type: array + filter: + $ref: '#/components/schemas/CIAppTestsQueryFilter' + group_by: + description: The rules for the group-by. + items: + $ref: '#/components/schemas/CIAppTestsGroupBy' + type: array + options: + $ref: '#/components/schemas/CIAppQueryOptions' + type: object + CIAppTestsAggregationBucketsResponse: + description: The query results. + properties: + buckets: + description: The list of matching buckets, one item per bucket. + items: + $ref: '#/components/schemas/CIAppTestsBucketResponse' + type: array + type: object + CIAppTestsAnalyticsAggregateResponse: + description: The response object for the test events aggregate API endpoint. + properties: + data: + $ref: '#/components/schemas/CIAppTestsAggregationBucketsResponse' + links: + $ref: '#/components/schemas/CIAppResponseLinks' + meta: + $ref: '#/components/schemas/CIAppResponseMetadataWithPagination' + type: object + CIAppTestsBucketResponse: + description: Bucket values. + properties: + by: + additionalProperties: + description: The values for each group-by. + description: The key-value pairs for each group-by. + example: + '@test.service': web-ui-tests + '@test.status': skip + type: object + computes: + $ref: '#/components/schemas/CIAppComputes' + type: object + CIAppTestsGroupBy: + description: A group-by rule. + properties: + facet: + description: The name of the facet to use (required). + example: '@test.service' + type: string + histogram: + $ref: '#/components/schemas/CIAppGroupByHistogram' + limit: + default: 10 + description: The maximum buckets to return for this group-by. + format: int64 + type: integer + missing: + $ref: '#/components/schemas/CIAppGroupByMissing' + sort: + $ref: '#/components/schemas/CIAppAggregateSort' + total: + $ref: '#/components/schemas/CIAppGroupByTotal' + required: + - facet + type: object + CIAppTestsQueryFilter: + description: The search and filter query settings. + properties: + from: + default: now-15m + description: The minimum time for the requested events; supports date, math, + and regular timestamps (in milliseconds). + example: now-15m + type: string + query: + default: '*' + description: The search query following the CI Visibility Explorer search + syntax. + example: '@test.service:web-ui-tests AND @test.status:fail' + type: string + to: + default: now + description: The maximum time for the requested events, supports date, math, + and regular timestamps (in milliseconds). + example: now + type: string + type: object + CIAppWarning: + description: A warning message indicating something that went wrong with the + query. properties: code: description: A unique code for this type of warning. @@ -1749,2601 +3316,17211 @@ components: type: string title: description: A short human-readable summary of the warning. - example: One or several indexes are missing or invalid. Results hold data - from the other indexes. + example: One or several indexes are missing or invalid, results hold data + from the other indexes type: string type: object - FastlyAccounResponseAttributes: - description: Attributes object of a Fastly account. + ChargebackBreakdown: + description: Charges breakdown. properties: - name: - description: The name of the Fastly account. - example: test-name + charge_type: + description: The type of charge for a particular product. + example: on_demand type: string - services: - description: A list of services belonging to the parent account. + cost: + description: The cost for a particular product and charge type during a + given month. + format: double + type: number + product_name: + description: The product for which cost is being reported. + example: infra_host + type: string + type: object + CloudConfigurationComplianceRuleOptions: + additionalProperties: {} + description: 'Options for cloud_configuration rules. + + Fields `resourceType` and `regoRule` are mandatory when managing custom `cloud_configuration` + rules. + + ' + properties: + complexRule: + description: 'Whether the rule is a complex one. + + Must be set to true if `regoRule.resourceTypes` contains more than one + item. Defaults to false. + + ' + type: boolean + regoRule: + $ref: '#/components/schemas/CloudConfigurationRegoRule' + resourceType: + description: 'Main resource type to be checked by the rule. It should be + specified again in `regoRule.resourceTypes`. + + ' + example: aws_acm + type: string + type: object + CloudConfigurationRegoRule: + description: Rule details. + properties: + policy: + description: 'The policy written in `rego`, see: https://www.openpolicyagent.org/docs/latest/policy-language/' + example: "package datadog\n\nimport data.datadog.output as dd_output\nimport + future.keywords.contains\nimport future.keywords.if\nimport future.keywords.in\n\neval(resource) + = \"skip\" if {\n # Logic that evaluates to true if the resource should + be skipped\n true\n} else = \"pass\" {\n # Logic that evaluates to true + if the resource is compliant\n true\n} else = \"fail\" {\n # Logic that + evaluates to true if the resource is not compliant\n true\n}\n\n# This + part remains unchanged for all rules\nresults contains result if {\n some + resource in input.resources[input.main_resource_type]\n result := dd_output.format(resource, + eval(resource))\n}\n" + type: string + resourceTypes: + description: List of resource types that will be evaluated upon. Must have + at least one element. + example: + - gcp_iam_service_account + - gcp_iam_policy items: - $ref: '#/components/schemas/FastlyService' + type: string type: array required: - - name + - policy + - resourceTypes type: object - FastlyAccountCreateRequest: - description: Payload schema when adding a Fastly account. + CloudConfigurationRuleCaseCreate: + description: Description of signals. properties: - data: - $ref: '#/components/schemas/FastlyAccountCreateRequestData' + notifications: + description: Notification targets for each rule case. + items: + description: Notification. + type: string + type: array + status: + $ref: '#/components/schemas/SecurityMonitoringRuleSeverity' required: - - data + - status type: object - FastlyAccountCreateRequestAttributes: - description: Attributes object for creating a Fastly account. + CloudConfigurationRuleComplianceSignalOptions: + description: How to generate compliance signals. Useful for cloud_configuration + rules only. properties: - api_key: - description: The API key for the Fastly account. - example: ABCDEFG123 + defaultActivationStatus: + description: The default activation status. + nullable: true + type: boolean + defaultGroupByFields: + description: The default group by fields. + items: + type: string + nullable: true + type: array + userActivationStatus: + description: Whether signals will be sent. + nullable: true + type: boolean + userGroupByFields: + description: Fields to use to group findings by when sending signals. + items: + type: string + nullable: true + type: array + type: object + CloudConfigurationRuleCreatePayload: + description: Create a new cloud configuration rule. + properties: + cases: + description: 'Description of generated findings and signals (severity and + channels to be notified in case of a signal). Must contain exactly one + item. + + ' + items: + $ref: '#/components/schemas/CloudConfigurationRuleCaseCreate' + type: array + complianceSignalOptions: + $ref: '#/components/schemas/CloudConfigurationRuleComplianceSignalOptions' + filters: + description: Additional queries to filter matched events before they are + processed. + items: + $ref: '#/components/schemas/SecurityMonitoringFilter' + type: array + isEnabled: + description: Whether the rule is enabled. + example: true + type: boolean + message: + description: Message in markdown format for generated findings and signals. + example: '#Description + + Explanation of the rule. + + + #Remediation + + How to fix the security issue. + + ' type: string name: - description: The name of the Fastly account. - example: test-name + description: The name of the rule. + example: My security monitoring rule. type: string - services: - description: A list of services belonging to the parent account. + options: + $ref: '#/components/schemas/CloudConfigurationRuleOptions' + tags: + description: Tags for generated findings and signals. + example: + - env:prod + - team:security items: - $ref: '#/components/schemas/FastlyService' + description: Tag. + type: string type: array + type: + $ref: '#/components/schemas/CloudConfigurationRuleType' required: - - api_key - name + - isEnabled + - options + - complianceSignalOptions + - cases + - message type: object - FastlyAccountCreateRequestData: - description: Data object for creating a Fastly account. + CloudConfigurationRuleOptions: + description: Options on cloud configuration rules. properties: - attributes: - $ref: '#/components/schemas/FastlyAccountCreateRequestAttributes' + complianceRuleOptions: + $ref: '#/components/schemas/CloudConfigurationComplianceRuleOptions' + required: + - complianceRuleOptions + type: object + CloudConfigurationRuleType: + description: The rule type. + enum: + - cloud_configuration + type: string + x-enum-varnames: + - CLOUD_CONFIGURATION + CloudCostActivity: + description: Cloud Cost Activity. + properties: + attributes: + $ref: '#/components/schemas/CloudCostActivityAttributes' type: - $ref: '#/components/schemas/FastlyAccountType' + $ref: '#/components/schemas/CloudCostActivityType' required: - attributes - type type: object - FastlyAccountResponse: - description: The expected response schema when getting a Fastly account. + CloudCostActivityAttributes: + description: Attributes for Cloud Cost activity. + properties: + is_enabled: + description: Whether or not the cloud account is enabled. + example: true + type: boolean + required: + - is_enabled + type: object + CloudCostActivityResponse: + description: Response for Cloud Cost activity. properties: data: - $ref: '#/components/schemas/FastlyAccountResponseData' + $ref: '#/components/schemas/CloudCostActivity' type: object - FastlyAccountResponseData: - description: Data object of a Fastly account. + CloudCostActivityType: + default: cloud_cost_activity + description: Type of Cloud Cost Activity. + enum: + - cloud_cost_activity + example: cloud_cost_activity + type: string + x-enum-varnames: + - CLOUD_COST_ACTIVITY + CloudWorkloadSecurityAgentRuleAttributes: + description: A Cloud Workload Security Agent rule returned by the API. properties: - attributes: - $ref: '#/components/schemas/FastlyAccounResponseAttributes' - id: - description: The ID of the Fastly account, a hash of the account name. - example: abc123 + agentConstraint: + description: The version of the agent. + type: string + category: + description: The category of the Agent rule. + example: Process Activity + type: string + creationAuthorUuId: + description: The ID of the user who created the rule. + example: e51c9744-d158-11ec-ad23-da7ad0900002 + type: string + creationDate: + description: When the Agent rule was created, timestamp in milliseconds. + example: 1624366480320 + format: int64 + type: integer + creator: + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreatorAttributes' + defaultRule: + description: Whether the rule is included by default. + example: false + type: boolean + description: + description: The description of the Agent rule. + example: My Agent rule + type: string + enabled: + description: Whether the Agent rule is enabled. + example: true + type: boolean + expression: + description: The SECL expression of the Agent rule. + example: exec.file.name == \"sh\" + type: string + filters: + description: The platforms the Agent rule is supported on. + items: + type: string + type: array + name: + description: The name of the Agent rule. + example: my_agent_rule + type: string + updateAuthorUuId: + description: The ID of the user who updated the rule. + example: e51c9744-d158-11ec-ad23-da7ad0900002 + type: string + updateDate: + description: Timestamp in milliseconds when the Agent rule was last updated. + example: 1624366480320 + format: int64 + type: integer + updatedAt: + description: When the Agent rule was last updated, timestamp in milliseconds. + example: 1624366480320 + format: int64 + type: integer + updater: + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdaterAttributes' + version: + description: The version of the Agent rule. + example: 23 + format: int64 + type: integer + type: object + CloudWorkloadSecurityAgentRuleCreateAttributes: + description: Create a new Cloud Workload Security Agent rule. + properties: + description: + description: The description of the Agent rule. + example: My Agent rule + type: string + enabled: + description: Whether the Agent rule is enabled. + example: true + type: boolean + expression: + description: The SECL expression of the Agent rule. + example: exec.file.name == \"sh\" + type: string + name: + description: The name of the Agent rule. + example: my_agent_rule type: string + required: + - name + - expression + type: object + CloudWorkloadSecurityAgentRuleCreateData: + description: Object for a single Agent rule. + properties: + attributes: + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateAttributes' type: - $ref: '#/components/schemas/FastlyAccountType' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleType' required: - attributes - - id - type type: object - FastlyAccountType: - default: fastly-accounts - description: The JSON:API type for this API. Should always be `fastly-accounts`. - enum: - - fastly-accounts - example: fastly-accounts - type: string - x-enum-varnames: - - FASTLY_ACCOUNTS - FastlyAccountUpdateRequest: - description: Payload schema when updating a Fastly account. + CloudWorkloadSecurityAgentRuleCreateRequest: + description: Request object that includes the Agent rule to create. properties: data: - $ref: '#/components/schemas/FastlyAccountUpdateRequestData' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateData' required: - data type: object - FastlyAccountUpdateRequestAttributes: - description: Attributes object for updating a Fastly account. + CloudWorkloadSecurityAgentRuleCreatorAttributes: + description: The attributes of the user who created the Agent rule. properties: - api_key: - description: The API key of the Fastly account. - example: ABCDEFG123 + handle: + description: The handle of the user. + example: datadog.user@example.com + type: string + name: + description: The name of the user. + example: Datadog User + nullable: true type: string type: object - FastlyAccountUpdateRequestData: - description: Data object for updating a Fastly account. + CloudWorkloadSecurityAgentRuleData: + description: Object for a single Agent rule. properties: attributes: - $ref: '#/components/schemas/FastlyAccountUpdateRequestAttributes' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleAttributes' + id: + description: The ID of the Agent rule. + example: 3dd-0uc-h1s + type: string type: - $ref: '#/components/schemas/FastlyAccountType' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleType' type: object - FastlyAccountsResponse: - description: The expected response schema when getting Fastly accounts. + CloudWorkloadSecurityAgentRuleResponse: + description: Response object that includes an Agent rule. properties: data: - description: The JSON:API data schema. - items: - $ref: '#/components/schemas/FastlyAccountResponseData' - type: array + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData' type: object - FastlyService: - description: The schema representation of a Fastly service. + CloudWorkloadSecurityAgentRuleType: + default: agent_rule + description: The type of the resource. The value should always be `agent_rule`. + enum: + - agent_rule + example: agent_rule + type: string + x-enum-varnames: + - AGENT_RULE + CloudWorkloadSecurityAgentRuleUpdateAttributes: + description: Update an existing Cloud Workload Security Agent rule. properties: - id: - description: The id of the Fastly service - example: 6abc7de6893AbcDe9fghIj + description: + description: The description of the Agent rule. + example: My Agent rule + type: string + enabled: + description: Whether the Agent rule is enabled. + example: true + type: boolean + expression: + description: The SECL expression of the Agent rule. + example: exec.file.name == \"sh\" type: string - tags: - description: A list of tags for the Fastly service. - example: - - myTag - - myTag2:myValue - items: - type: string - type: array - required: - - id - type: object - FastlyServiceAttributes: - description: Attributes object for Fastly service requests. - properties: - tags: - description: A list of tags for the Fastly service. - example: - - myTag - - myTag2:myValue - items: - type: string - type: array type: object - FastlyServiceData: - description: Data object for Fastly service requests. + CloudWorkloadSecurityAgentRuleUpdateData: + description: Object for a single Agent rule. properties: attributes: - $ref: '#/components/schemas/FastlyServiceAttributes' - id: - description: The ID of the Fastly service. - example: abc123 - type: string + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateAttributes' type: - $ref: '#/components/schemas/FastlyServiceType' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleType' required: - - id + - attributes - type type: object - FastlyServiceRequest: - description: Payload schema for Fastly service requests. + CloudWorkloadSecurityAgentRuleUpdateRequest: + description: Request object that includes the Agent rule with the attributes + to update. properties: data: - $ref: '#/components/schemas/FastlyServiceData' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateData' required: - data type: object - FastlyServiceResponse: - description: The expected response schema when getting a Fastly service. + CloudWorkloadSecurityAgentRuleUpdaterAttributes: + description: The attributes of the user who last updated the Agent rule. properties: - data: - $ref: '#/components/schemas/FastlyServiceData' - type: object - FastlyServiceType: - default: fastly-services - description: The JSON:API type for this API. Should always be `fastly-services`. - enum: - - fastly-services - example: fastly-services - type: string - x-enum-varnames: - - FASTLY_SERVICES - FastlyServicesResponse: - description: The expected response schema when getting Fastly services. + handle: + description: The handle of the user. + example: datadog.user@example.com + type: string + name: + description: The name of the user. + example: Datadog User + nullable: true + type: string + type: object + CloudWorkloadSecurityAgentRulesListResponse: + description: Response object that includes a list of Agent rule. properties: data: - description: The JSON:API data schema. + description: A list of Agent rules objects. items: - $ref: '#/components/schemas/FastlyServiceResponse' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData' type: array type: object - Finding: - description: A single finding without the message and resource configuration. - properties: - attributes: - $ref: '#/components/schemas/FindingAttributes' - id: - $ref: '#/components/schemas/FindingID' - type: - $ref: '#/components/schemas/FindingType' - type: object - FindingAttributes: - description: The JSON:API attributes of the finding. + CloudflareAccountCreateRequest: + description: Payload schema when adding a Cloudflare account. properties: - evaluation: - $ref: '#/components/schemas/FindingEvaluation' - evaluation_changed_at: - $ref: '#/components/schemas/FindingEvaluationChangedAt' - mute: - $ref: '#/components/schemas/FindingMute' - resource: - $ref: '#/components/schemas/FindingResource' - resource_discovery_date: - $ref: '#/components/schemas/FindingResourceDiscoveryDate' - resource_type: - $ref: '#/components/schemas/FindingResourceType' - rule: - $ref: '#/components/schemas/FindingRule' - status: - $ref: '#/components/schemas/FindingStatus' - tags: - $ref: '#/components/schemas/FindingTags' + data: + $ref: '#/components/schemas/CloudflareAccountCreateRequestData' + required: + - data type: object - FindingEvaluation: - description: The evaluation of the finding. - enum: - - pass - - fail - example: pass - type: string - x-enum-varnames: - - PASS - - FAIL - FindingEvaluationChangedAt: - description: The date on which the evaluation for this finding changed (Unix - ms). - example: 1678721573794 - format: int64 - minimum: 1 - type: integer - FindingID: - description: The unique ID for this finding. - example: AQAAAYbb1i0gijTHEQAAAABBWWJiMWkwZ0FBQ2FuNzBJVGZXZ3B3QUE - type: string - FindingMute: - additionalProperties: false - description: Information about the mute status of this finding. + CloudflareAccountCreateRequestAttributes: + description: Attributes object for creating a Cloudflare account. properties: - description: - description: Additional information about the reason why this finding is - muted or unmuted. - example: To be resolved later - type: string - expiration_date: - description: The expiration date of the mute or unmute action (Unix ms). - example: 1778721573794 - format: int64 - type: integer - muted: - description: Whether this finding is muted or unmuted. - example: true - type: boolean - reason: - $ref: '#/components/schemas/FindingMuteReason' - start_date: - description: The start of the mute period. - example: 1678721573794 - format: int64 - type: integer - uuid: - description: The ID of the user who muted or unmuted this finding. - example: e51c9744-d158-11ec-ad23-da7ad0900002 + api_key: + description: The API key (or token) for the Cloudflare account. + example: a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 type: string - type: object - FindingMuteReason: - description: The reason why this finding is muted or unmuted. - enum: - - PENDING_FIX - - FALSE_POSITIVE - - ACCEPTED_RISK - - NO_PENDING_FIX - - HUMAN_ERROR - - NO_LONGER_ACCEPTED_RISK - - OTHER - example: ACCEPTED_RISK - type: string - x-enum-varnames: - - PENDING_FIX - - FALSE_POSITIVE - - ACCEPTED_RISK - - NO_PENDING_FIX - - HUMAN_ERROR - - NO_LONGER_ACCEPTED_RISK - - OTHER - FindingResource: - description: The resource name of this finding. - example: my_resource_name - type: string - FindingResourceDiscoveryDate: - description: The date on which the resource was discovered (Unix ms). - example: 1678721573794 - format: int64 - minimum: 1 - type: integer - FindingResourceType: - description: The resource type of this finding. - example: azure_storage_account - type: string - FindingRule: - additionalProperties: false - description: The rule that triggered this finding. - properties: - id: - description: The ID of the rule that triggered this finding. - example: dv2-jzf-41i + email: + description: The email associated with the Cloudflare account. If an API + key is provided (and not a token), this field is also required. + example: test-email@example.com type: string name: - description: The name of the rule that triggered this finding. - example: Soft delete is enabled for Azure Storage + description: The name of the Cloudflare account. + example: test-name type: string + required: + - api_key + - name type: object - FindingStatus: - description: The status of the finding. - enum: - - critical - - high - - medium - - low - - info - example: critical - type: string - x-enum-varnames: - - CRITICAL - - HIGH - - MEDIUM - - LOW - - INFO - FindingTags: - description: The tags associated with this finding. - example: - - cloud_provider:aws - - myTag:myValue - items: - description: The list of tags. - type: string - type: array - FindingType: - default: finding - description: The JSON:API type for findings. - enum: - - finding - example: finding - type: string - x-enum-varnames: - - FINDING - GCPSTSDelegateAccount: - description: Datadog principal service account info. + CloudflareAccountCreateRequestData: + description: Data object for creating a Cloudflare account. properties: attributes: - $ref: '#/components/schemas/GCPSTSDelegateAccountAttributes' - id: - description: The ID of the delegate service account. - example: ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com - type: string + $ref: '#/components/schemas/CloudflareAccountCreateRequestAttributes' type: - $ref: '#/components/schemas/GCPSTSDelegateAccountType' + $ref: '#/components/schemas/CloudflareAccountType' + required: + - attributes + - type type: object - GCPSTSDelegateAccountAttributes: - description: Your delegate account attributes. + CloudflareAccountResponse: + description: The expected response schema when getting a Cloudflare account. properties: - delegate_account_email: - description: Your organization's Datadog principal email address. - example: ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com - type: string + data: + $ref: '#/components/schemas/CloudflareAccountResponseData' type: object - GCPSTSDelegateAccountResponse: - description: Your delegate service account response data. + CloudflareAccountResponseAttributes: + description: Attributes object of a Cloudflare account. properties: - data: - $ref: '#/components/schemas/GCPSTSDelegateAccount' + email: + description: The email associated with the Cloudflare account. + example: test-email@example.com + type: string + name: + description: The name of the Cloudflare account. + example: test-name + type: string + required: + - name type: object - GCPSTSDelegateAccountType: - default: gcp_sts_delegate - description: The type of account. - enum: - - gcp_sts_delegate - example: gcp_sts_delegate - type: string - x-enum-varnames: - - GCP_STS_DELEGATE - GCPSTSServiceAccount: - description: Info on your service account. + CloudflareAccountResponseData: + description: Data object of a Cloudflare account. properties: attributes: - $ref: '#/components/schemas/GCPSTSServiceAccountAttributes' + $ref: '#/components/schemas/CloudflareAccountResponseAttributes' id: - description: Your service account's unique ID. - example: d291291f-12c2-22g4-j290-123456678897 + description: The ID of the Cloudflare account, a hash of the account name. + example: c1a8e059bfd1e911cf10b626340c9a54 type: string - meta: - $ref: '#/components/schemas/GCPServiceAccountMeta' type: - $ref: '#/components/schemas/GCPServiceAccountType' + $ref: '#/components/schemas/CloudflareAccountType' + required: + - attributes + - id + - type type: object - GCPSTSServiceAccountAttributes: - description: Attributes associated with your service account. + CloudflareAccountType: + default: cloudflare-accounts + description: The JSON:API type for this API. Should always be `cloudflare-accounts`. + enum: + - cloudflare-accounts + example: cloudflare-accounts + type: string + x-enum-varnames: + - CLOUDFLARE_ACCOUNTS + CloudflareAccountUpdateRequest: + description: Payload schema when updating a Cloudflare account. properties: - account_tags: - description: Tags to be associated with GCP metrics and service checks from - your account. - items: - description: Account Level Tag - type: string - type: array - automute: - description: Silence monitors for expected GCE instance shutdowns. - type: boolean - client_email: - description: Your service account email address. - example: datadog-service-account@test-project.iam.gserviceaccount.com - type: string - host_filters: - description: Your Host Filters. - items: - description: Host Filters - type: string - type: array - is_cspm_enabled: - description: When enabled, Datadog performs configuration checks across - your Google Cloud environment by continuously scanning every resource. - type: boolean + data: + $ref: '#/components/schemas/CloudflareAccountUpdateRequestData' + required: + - data type: object - GCPSTSServiceAccountCreateRequest: - description: Data on your newly generated service account. + CloudflareAccountUpdateRequestAttributes: + description: Attributes object for updating a Cloudflare account. properties: - data: - $ref: '#/components/schemas/GCPSTSServiceAccountData' + api_key: + description: The API key of the Cloudflare account. + example: a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 + type: string + email: + description: The email associated with the Cloudflare account. If an API + key is provided (and not a token), this field is also required. + example: test-email@example.com + type: string + required: + - api_key type: object - GCPSTSServiceAccountData: - description: Additional metadata on your generated service account. + CloudflareAccountUpdateRequestData: + description: Data object for updating a Cloudflare account. properties: attributes: - $ref: '#/components/schemas/GCPSTSServiceAccountAttributes' + $ref: '#/components/schemas/CloudflareAccountUpdateRequestAttributes' type: - $ref: '#/components/schemas/GCPServiceAccountType' + $ref: '#/components/schemas/CloudflareAccountType' type: object - GCPSTSServiceAccountResponse: - description: The account creation response. + CloudflareAccountsResponse: + description: The expected response schema when getting Cloudflare accounts. properties: data: - $ref: '#/components/schemas/GCPSTSServiceAccount' + description: The JSON:API data schema. + items: + $ref: '#/components/schemas/CloudflareAccountResponseData' + type: array type: object - GCPSTSServiceAccountUpdateRequest: - description: Service account info. + ConfluentAccountCreateRequest: + description: Payload schema when adding a Confluent account. properties: data: - $ref: '#/components/schemas/GCPSTSServiceAccountUpdateRequestData' + $ref: '#/components/schemas/ConfluentAccountCreateRequestData' + required: + - data type: object - GCPSTSServiceAccountUpdateRequestData: - description: Data on your service account. + ConfluentAccountCreateRequestAttributes: + description: Attributes associated with the account creation request. properties: - attributes: - $ref: '#/components/schemas/GCPSTSServiceAccountAttributes' - id: - description: Your service account's unique ID. - example: d291291f-12c2-22g4-j290-123456678897 + api_key: + description: The API key associated with your Confluent account. + example: TESTAPIKEY123 + type: string + api_secret: + description: The API secret associated with your Confluent account. + example: test-api-secret-123 type: string + resources: + description: A list of Confluent resources associated with the Confluent + account. + items: + $ref: '#/components/schemas/ConfluentAccountResourceAttributes' + type: array + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + required: + - api_key + - api_secret + type: object + ConfluentAccountCreateRequestData: + description: The data body for adding a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/ConfluentAccountCreateRequestAttributes' type: - $ref: '#/components/schemas/GCPServiceAccountType' + $ref: '#/components/schemas/ConfluentAccountType' + required: + - attributes + - type type: object - GCPSTSServiceAccountsResponse: - description: Object containing all your STS enabled accounts. + ConfluentAccountResourceAttributes: + description: Attributes object for updating a Confluent resource. properties: - data: - description: Array of GCP STS enabled service accounts. + enable_custom_metrics: + default: false + description: Enable the `custom.consumer_lag_offset` metric, which contains + extra metric tags. + example: false + type: boolean + id: + description: The ID associated with a Confluent resource. + example: resource-id-123 + type: string + resource_type: + description: The resource type of the Resource. Can be `kafka`, `connector`, + `ksql`, or `schema_registry`. + example: kafka + type: string + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue items: - $ref: '#/components/schemas/GCPSTSServiceAccount' + type: string type: array + required: + - resource_type type: object - GCPServiceAccountMeta: - description: Additional information related to your service account. + ConfluentAccountResponse: + description: The expected response schema when getting a Confluent account. properties: - accessible_projects: - description: The current list of projects accessible from your service account. + data: + $ref: '#/components/schemas/ConfluentAccountResponseData' + type: object + ConfluentAccountResponseAttributes: + description: The attributes of a Confluent account. + properties: + api_key: + description: The API key associated with your Confluent account. + example: TESTAPIKEY123 + type: string + resources: + description: A list of Confluent resources associated with the Confluent + account. + items: + $ref: '#/components/schemas/ConfluentResourceResponseAttributes' + type: array + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue items: - description: List of GCP projects. type: string type: array + required: + - api_key type: object - GCPServiceAccountType: - default: gcp_service_account - description: The type of account. + ConfluentAccountResponseData: + description: An API key and API secret pair that represents a Confluent account. + properties: + attributes: + $ref: '#/components/schemas/ConfluentAccountResponseAttributes' + id: + description: A randomly generated ID associated with a Confluent account. + example: account_id_abc123 + type: string + type: + $ref: '#/components/schemas/ConfluentAccountType' + required: + - attributes + - id + - type + type: object + ConfluentAccountType: + default: confluent-cloud-accounts + description: The JSON:API type for this API. Should always be `confluent-cloud-accounts`. enum: - - gcp_service_account - example: gcp_service_account + - confluent-cloud-accounts + example: confluent-cloud-accounts type: string x-enum-varnames: - - GCP_SERVICE_ACCOUNT - GetFindingResponse: - description: The expected response schema when getting a finding. + - CONFLUENT_CLOUD_ACCOUNTS + ConfluentAccountUpdateRequest: + description: The JSON:API request for updating a Confluent account. properties: data: - $ref: '#/components/schemas/DetailedFinding' + $ref: '#/components/schemas/ConfluentAccountUpdateRequestData' required: - data type: object - HTTPLog: - description: Structured log message. - items: - $ref: '#/components/schemas/HTTPLogItem' - type: array - HTTPLogError: - description: List of errors. + ConfluentAccountUpdateRequestAttributes: + description: Attributes object for updating a Confluent account. properties: - detail: - description: Error message. - example: Malformed payload - type: string - status: - description: Error code. - example: '400' + api_key: + description: The API key associated with your Confluent account. + example: TESTAPIKEY123 type: string - title: - description: Error title. - example: Bad Request + api_secret: + description: The API secret associated with your Confluent account. + example: test-api-secret-123 type: string - type: object - HTTPLogErrors: - description: Invalid query performed. - properties: - errors: - description: Structured errors. + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue items: - $ref: '#/components/schemas/HTTPLogError' + type: string type: array - type: object - HTTPLogItem: - additionalProperties: - description: Additional log attributes. - type: string - description: Logs that are sent over HTTP. - properties: - ddsource: - description: 'The integration name associated with your log: the technology - from which the log originated. - - When it matches an integration name, Datadog automatically installs the - corresponding parsers and facets. - - See [reserved attributes](https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#reserved-attributes).' - example: nginx - type: string - ddtags: - description: Tags associated with your logs. - example: env:staging,version:5.1 - type: string - hostname: - description: The name of the originating host of the log. - example: i-012345678 - type: string - message: - description: 'The message [reserved attribute](https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#reserved-attributes) - - of your log. By default, Datadog ingests the value of the message attribute - as the body of the log entry. - - That value is then highlighted and displayed in the Logstream, where it - is indexed for full text search.' - example: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World - type: string - service: - description: 'The name of the application or service generating the log - events. - - It is used to switch from Logs to APM, so make sure you define the same - value when you use both products. - - See [reserved attributes](https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#reserved-attributes).' - example: payment - type: string required: - - message + - api_key + - api_secret type: object - HourlyUsage: - description: Hourly usage for a product family for an org. + ConfluentAccountUpdateRequestData: + description: Data object for updating a Confluent account. properties: attributes: - $ref: '#/components/schemas/HourlyUsageAttributes' - id: - description: Unique ID of the response. - type: string + $ref: '#/components/schemas/ConfluentAccountUpdateRequestAttributes' type: - $ref: '#/components/schemas/UsageTimeSeriesType' + $ref: '#/components/schemas/ConfluentAccountType' + required: + - attributes + - type type: object - HourlyUsageAttributes: - description: Attributes of hourly usage for a product family for an org for - a time period. + ConfluentAccountsResponse: + description: Confluent account returned by the API. properties: - measurements: - description: List of the measured usage values for the product family for - the org for the time period. + data: + description: The Confluent account. items: - $ref: '#/components/schemas/HourlyUsageMeasurement' + $ref: '#/components/schemas/ConfluentAccountResponseData' type: array - org_name: - description: The organization name. - type: string - product_family: - description: The product for which usage is being reported. - type: string - public_id: - description: The organization public ID. - type: string - region: - description: The region of the Datadog instance that the organization belongs - to. - type: string - timestamp: - description: Datetime in ISO-8601 format, UTC. The hour for the usage. - format: date-time - type: string - type: object - HourlyUsageMeasurement: - description: Usage amount for a given usage type. - properties: - usage_type: - description: Type of usage. - type: string - value: - description: Contains the number measured for the given usage_type during - the hour. - format: int64 - nullable: true - type: integer - type: object - HourlyUsageMetadata: - description: The object containing document metadata. - properties: - pagination: - $ref: '#/components/schemas/HourlyUsagePagination' - type: object - HourlyUsagePagination: - description: The metadata for the current pagination. - properties: - next_record_id: - description: The cursor to get the next results (if any). To make the next - request, use the same parameters and add `next_record_id`. - nullable: true - type: string type: object - HourlyUsageResponse: - description: Hourly usage response. + ConfluentResourceRequest: + description: The JSON:API request for updating a Confluent resource. properties: data: - description: Response containing hourly usage. - items: - $ref: '#/components/schemas/HourlyUsage' - type: array - meta: - $ref: '#/components/schemas/HourlyUsageMetadata' + $ref: '#/components/schemas/ConfluentResourceRequestData' + required: + - data type: object - HourlyUsageType: - description: Usage type that is being measured. - enum: - - app_sec_host_count - - observability_pipelines_bytes_processed - - lambda_traced_invocations_count - example: observability_pipelines_bytes_processed - type: string - x-enum-varnames: - - APP_SEC_HOST_COUNT - - OBSERVABILITY_PIPELINES_BYTES_PROCESSSED - - LAMBDA_TRACED_INVOCATIONS_COUNT - IPAllowlistAttributes: - description: Attributes of the IP allowlist. + ConfluentResourceRequestAttributes: + description: Attributes object for updating a Confluent resource. properties: - enabled: - description: Whether the IP allowlist logic is enabled or not. + enable_custom_metrics: + default: false + description: Enable the `custom.consumer_lag_offset` metric, which contains + extra metric tags. + example: false type: boolean - entries: - description: Array of entries in the IP allowlist. + resource_type: + description: The resource type of the Resource. Can be `kafka`, `connector`, + `ksql`, or `schema_registry`. + example: kafka + type: string + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue items: - $ref: '#/components/schemas/IPAllowlistEntry' + type: string type: array + required: + - resource_type type: object - IPAllowlistData: - description: IP allowlist data. + ConfluentResourceRequestData: + description: JSON:API request for updating a Confluent resource. properties: attributes: - $ref: '#/components/schemas/IPAllowlistAttributes' + $ref: '#/components/schemas/ConfluentResourceRequestAttributes' id: - description: The unique identifier of the org. + description: The ID associated with a Confluent resource. + example: resource-id-123 type: string type: - $ref: '#/components/schemas/IPAllowlistType' + $ref: '#/components/schemas/ConfluentResourceType' required: + - attributes - type + - id type: object - IPAllowlistEntry: - description: IP allowlist entry object. + ConfluentResourceResponse: + description: Response schema when interacting with a Confluent resource. properties: data: - $ref: '#/components/schemas/IPAllowlistEntryData' - required: - - data + $ref: '#/components/schemas/ConfluentResourceResponseData' type: object - IPAllowlistEntryAttributes: - description: Attributes of the IP allowlist entry. + ConfluentResourceResponseAttributes: + description: Model representation of a Confluent Cloud resource. properties: - cidr_block: - description: The CIDR block describing the IP range of the entry. - type: string - created_at: - description: Creation time of the entry. - format: date-time - readOnly: true - type: string - modified_at: - description: Time of last entry modification. - format: date-time - readOnly: true + enable_custom_metrics: + default: false + description: Enable the `custom.consumer_lag_offset` metric, which contains + extra metric tags. + example: false + type: boolean + id: + description: The ID associated with the Confluent resource. + example: resource_id_abc123 type: string - note: - description: A note describing the IP allowlist entry. + resource_type: + description: The resource type of the Resource. Can be `kafka`, `connector`, + `ksql`, or `schema_registry`. + example: kafka type: string + tags: + description: A list of strings representing tags. Can be a single key, or + key-value pairs separated by a colon. + example: + - myTag + - myTag2:myValue + items: + type: string + type: array + required: + - resource_type type: object - IPAllowlistEntryData: - description: Data of the IP allowlist entry object. + ConfluentResourceResponseData: + description: Confluent Cloud resource data. properties: attributes: - $ref: '#/components/schemas/IPAllowlistEntryAttributes' + $ref: '#/components/schemas/ConfluentResourceResponseAttributes' id: - description: The unique identifier of the IP allowlist entry. + description: The ID associated with the Confluent resource. + example: resource_id_abc123 type: string type: - $ref: '#/components/schemas/IPAllowlistEntryType' + $ref: '#/components/schemas/ConfluentResourceType' required: + - attributes - type + - id type: object - IPAllowlistEntryType: - default: ip_allowlist_entry - description: IP allowlist Entry type. - enum: - - ip_allowlist_entry - example: ip_allowlist_entry - type: string - x-enum-varnames: - - IP_ALLOWLIST_ENTRY - IPAllowlistResponse: - description: Response containing information about the IP allowlist. - properties: - data: - $ref: '#/components/schemas/IPAllowlistData' - type: object - IPAllowlistType: - default: ip_allowlist - description: IP allowlist type. + ConfluentResourceType: + default: confluent-cloud-resources + description: The JSON:API type for this request. enum: - - ip_allowlist - example: ip_allowlist + - confluent-cloud-resources + example: confluent-cloud-resources type: string x-enum-varnames: - - IP_ALLOWLIST - IPAllowlistUpdateRequest: - description: Update the IP allowlist. + - CONFLUENT_CLOUD_RESOURCES + ConfluentResourcesResponse: + description: Response schema when interacting with a list of Confluent resources. properties: data: - $ref: '#/components/schemas/IPAllowlistData' - required: - - data + description: The JSON:API data attribute. + items: + $ref: '#/components/schemas/ConfluentResourceResponseData' + type: array type: object - IdPMetadataFormData: - description: The form data submitted to upload IdP metadata + Container: + description: Container object. properties: - idp_file: - description: The IdP metadata XML file - format: binary + attributes: + $ref: '#/components/schemas/ContainerAttributes' + id: + description: Container ID. type: string - x-mimetype: application/xml + type: + $ref: '#/components/schemas/ContainerType' type: object - IntakePayloadAccepted: - description: The payload accepted for intake. + ContainerAttributes: + description: Attributes for a container. properties: - errors: - description: A list of errors. + container_id: + description: The ID of the container. + type: string + created_at: + description: Time the container was created. + type: string + host: + description: Hostname of the host running the container. + type: string + image_digest: + description: Digest of the compressed image manifest. + nullable: true + type: string + image_name: + description: Name of the associated container image. + type: string + image_tags: + description: List of image tags associated with the container image. items: - description: An empty error list. type: string + nullable: true type: array - type: object - JSONAPIErrorItem: - description: API error response body - properties: - detail: - description: A human-readable explanation specific to this occurrence of - the error. - example: Missing required attribute in body + name: + description: Name of the container. type: string - status: - description: Status code of the response. - example: '400' + started_at: + description: Time the container was started. type: string - title: - description: Short human-readable summary of the error. - example: Bad Request + state: + description: State of the container. This depends on the container runtime. type: string - type: object - JSONAPIErrorResponse: - description: API error response. - properties: - errors: - description: A list of errors. + tags: + description: List of tags associated with the container. items: - $ref: '#/components/schemas/JSONAPIErrorItem' + type: string type: array - required: - - errors type: object - ListFindingsData: - description: Array of findings. - items: - $ref: '#/components/schemas/Finding' - type: array - ListFindingsMeta: - additionalProperties: false - description: Metadata for pagination. + ContainerGroup: + description: Container group object. properties: - page: - $ref: '#/components/schemas/ListFindingsPage' - snapshot_timestamp: - description: The point in time corresponding to the listed findings. - example: 1678721573794 - format: int64 - minimum: 1 - type: integer + attributes: + $ref: '#/components/schemas/ContainerGroupAttributes' + id: + description: Container Group ID. + type: string + relationships: + $ref: '#/components/schemas/ContainerGroupRelationships' + type: + $ref: '#/components/schemas/ContainerGroupType' type: object - ListFindingsPage: - additionalProperties: false - description: Pagination and findings count information. + ContainerGroupAttributes: + description: Attributes for a container group. properties: - cursor: - description: The cursor used to paginate requests. - example: eyJhZnRlciI6IkFRQUFBWWJiaEJXQS1OY1dqUUFBQUFCQldXSmlhRUpYUVVGQlJFSktkbTlDTUdaWFRVbDNRVUUiLCJ2YWx1ZXMiOlsiY3JpdGljYWwiXX0= - type: string - total_filtered_count: - description: The total count of findings after the filter has been applied. - example: 213 + count: + description: Number of containers in the group. format: int64 type: integer + tags: + description: Tags from the group name parsed in key/value format. + type: object type: object - ListFindingsResponse: - description: The expected response schema when listing findings. + ContainerGroupRelationships: + description: Relationships to containers inside a container group. + properties: + containers: + $ref: '#/components/schemas/ContainerGroupRelationshipsLink' + type: object + ContainerGroupRelationshipsData: + description: Links data. + items: + description: A link data. + type: string + type: array + ContainerGroupRelationshipsLink: + description: Relationships to Containers inside a Container Group. properties: data: - $ref: '#/components/schemas/ListFindingsData' - meta: - $ref: '#/components/schemas/ListFindingsMeta' - required: - - data - - meta + $ref: '#/components/schemas/ContainerGroupRelationshipsData' + links: + $ref: '#/components/schemas/ContainerGroupRelationshipsLinks' type: object - LogsMetricCompute: - description: The compute rule to compute the log-based metric. + ContainerGroupRelationshipsLinks: + description: Links attributes. properties: - aggregation_type: - $ref: '#/components/schemas/LogsMetricComputeAggregationType' - include_percentiles: - $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles' - path: - description: The path to the value the log-based metric will aggregate on - (only used if the aggregation type is a "distribution"). - example: '@duration' + related: + description: Link to related containers. type: string - required: - - aggregation_type type: object - LogsMetricComputeAggregationType: - description: The type of aggregation to use. + ContainerGroupType: + default: container_group + description: Type of container group. enum: - - count - - distribution - example: distribution + - container_group + example: container_group type: string x-enum-varnames: - - COUNT - - DISTRIBUTION - LogsMetricComputeIncludePercentiles: - description: 'Toggle to include or exclude percentile aggregations for distribution - metrics. - - Only present when the `aggregation_type` is `distribution`.' - example: true - type: boolean - LogsMetricCreateAttributes: - description: The object describing the Datadog log-based metric to create. + - CONTAINER_GROUP + ContainerImage: + description: Container Image object. properties: - compute: - $ref: '#/components/schemas/LogsMetricCompute' - filter: - $ref: '#/components/schemas/LogsMetricFilter' - group_by: - description: The rules for the group by. + attributes: + $ref: '#/components/schemas/ContainerImageAttributes' + id: + description: Container Image ID. + type: string + type: + $ref: '#/components/schemas/ContainerImageType' + type: object + ContainerImageAttributes: + description: Attributes for a Container Image. + properties: + container_count: + description: Number of containers running the image. + format: int64 + type: integer + image_flavors: + description: 'List of platform-specific images associated with the image + record. + + The list contains more than 1 entry for multi-architecture images.' items: - $ref: '#/components/schemas/LogsMetricGroupBy' + $ref: '#/components/schemas/ContainerImageFlavor' type: array - required: - - compute + image_tags: + description: List of image tags associated with the Container Image. + items: + description: An image tag associated with the Container Image. + type: string + type: array + images_built_at: + description: 'List of build times associated with the Container Image. + + The list contains more than 1 entry for multi-architecture images.' + items: + description: Time the platform-specific Container Image was built. + type: string + type: array + name: + description: Name of the Container Image. + type: string + os_architectures: + description: List of Operating System architectures supported by the Container + Image. + items: + description: Operating System architecture supported by the Container + Image. + example: amd64 + type: string + type: array + os_names: + description: List of Operating System names supported by the Container Image. + items: + description: Operating System supported by the Container Image. + example: linux + type: string + type: array + os_versions: + description: List of Operating System versions supported by the Container + Image. + items: + description: Operating System version supported by the Container Image. + type: string + type: array + published_at: + description: Time the image was pushed to the container registry. + type: string + registry: + description: Registry the Container Image was pushed to. + type: string + repo_digest: + description: Digest of the compressed image manifest. + type: string + repository: + description: Repository where the Container Image is stored in. + type: string + short_image: + description: Short version of the Container Image name. + type: string + sizes: + description: 'List of size for each platform-specific image associated with + the image record. + + The list contains more than 1 entry for multi-architecture images.' + items: + description: Size of the platform-specific Container Image. + format: int64 + type: integer + type: array + sources: + description: List of sources where the Container Image was collected from. + items: + description: Source where the Container Image was collected from. + type: string + type: array + tags: + description: List of tags associated with the Container Image. + items: + description: A tag associated with the Container Image. + type: string + type: array + vulnerability_count: + $ref: '#/components/schemas/ContainerImageVulnerabilities' type: object - LogsMetricCreateData: - description: The new log-based metric properties. + ContainerImageFlavor: + description: Container Image breakdown by supported platform. + properties: + built_at: + description: Time the platform-specific Container Image was built. + type: string + os_architecture: + description: Operating System architecture supported by the Container Image. + type: string + os_name: + description: Operating System name supported by the Container Image. + type: string + os_version: + description: Operating System version supported by the Container Image. + type: string + size: + description: Size of the platform-specific Container Image. + format: int64 + type: integer + type: object + ContainerImageGroup: + description: Container Image Group object. properties: attributes: - $ref: '#/components/schemas/LogsMetricCreateAttributes' + $ref: '#/components/schemas/ContainerImageGroupAttributes' id: - $ref: '#/components/schemas/LogsMetricID' + description: Container Image Group ID. + type: string + relationships: + $ref: '#/components/schemas/ContainerImageGroupRelationships' type: - $ref: '#/components/schemas/LogsMetricType' - required: - - id - - type - - attributes + $ref: '#/components/schemas/ContainerImageGroupType' type: object - LogsMetricCreateRequest: - description: The new log-based metric body. + ContainerImageGroupAttributes: + description: Attributes for a Container Image Group. + properties: + count: + description: Number of Container Images in the group. + format: int64 + type: integer + name: + description: Name of the Container Image group. + type: string + tags: + description: Tags from the group name parsed in key/value format. + type: object + type: object + ContainerImageGroupImagesRelationshipsLink: + description: Relationships to Container Images inside a Container Image Group. properties: data: - $ref: '#/components/schemas/LogsMetricCreateData' - required: - - data + $ref: '#/components/schemas/ContainerImageGroupRelationshipsData' + links: + $ref: '#/components/schemas/ContainerImageGroupRelationshipsLinks' type: object - LogsMetricFilter: - description: The log-based metric filter. Logs matching this filter will be - aggregated in this metric. + ContainerImageGroupRelationships: + description: Relationships inside a Container Image Group. properties: - query: - default: '*' - description: The search query - following the log search syntax. - example: service:web* AND @http.status_code:[200 TO 299] - type: string - type: object - LogsMetricGroupBy: - description: A group by rule. - properties: - path: - description: The path to the value the log-based metric will be aggregated - over. - example: '@http.status_code' - type: string - tag_name: - description: Eventual name of the tag that gets created. By default, the - path attribute is used as the tag name. - example: status_code - type: string - required: - - path - type: object - LogsMetricID: - description: The name of the log-based metric. - example: logs.page.load.count - type: string - LogsMetricResponse: - description: The log-based metric object. - properties: - data: - $ref: '#/components/schemas/LogsMetricResponseData' - type: object - LogsMetricResponseAttributes: - description: The object describing a Datadog log-based metric. - properties: - compute: - $ref: '#/components/schemas/LogsMetricResponseCompute' - filter: - $ref: '#/components/schemas/LogsMetricResponseFilter' - group_by: - description: The rules for the group by. - items: - $ref: '#/components/schemas/LogsMetricResponseGroupBy' - type: array + container_images: + $ref: '#/components/schemas/ContainerImageGroupImagesRelationshipsLink' type: object - LogsMetricResponseCompute: - description: The compute rule to compute the log-based metric. + ContainerImageGroupRelationshipsData: + description: Links data. + items: + description: A link data. + type: string + type: array + ContainerImageGroupRelationshipsLinks: + description: Links attributes. properties: - aggregation_type: - $ref: '#/components/schemas/LogsMetricResponseComputeAggregationType' - include_percentiles: - $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles' - path: - description: The path to the value the log-based metric will aggregate on - (only used if the aggregation type is a "distribution"). - example: '@duration' + related: + description: Link to related Container Images. type: string type: object - LogsMetricResponseComputeAggregationType: - description: The type of aggregation to use. + ContainerImageGroupType: + default: container_image_group + description: Type of Container Image Group. enum: - - count - - distribution - example: distribution + - container_image_group + example: container_image_group type: string x-enum-varnames: - - COUNT - - DISTRIBUTION - LogsMetricResponseData: - description: The log-based metric properties. + - CONTAINER_IMAGE_GROUP + ContainerImageItem: + description: Possible Container Image models. + oneOf: + - $ref: '#/components/schemas/ContainerImage' + - $ref: '#/components/schemas/ContainerImageGroup' + ContainerImageMeta: + description: Response metadata object. properties: - attributes: - $ref: '#/components/schemas/LogsMetricResponseAttributes' - id: - $ref: '#/components/schemas/LogsMetricID' - type: - $ref: '#/components/schemas/LogsMetricType' + pagination: + $ref: '#/components/schemas/ContainerImageMetaPage' type: object - LogsMetricResponseFilter: - description: The log-based metric filter. Logs matching this filter will be - aggregated in this metric. + ContainerImageMetaPage: + description: Paging attributes. properties: - query: - description: The search query - following the log search syntax. - example: service:web* AND @http.status_code:[200 TO 299] + cursor: + description: The cursor used to get the current results, if any. type: string - type: object - LogsMetricResponseGroupBy: - description: A group by rule. - properties: - path: - description: The path to the value the log-based metric will be aggregated - over. - example: '@http.status_code' + limit: + description: Number of results returned + format: int32 + maximum: 10000 + minimum: 0 + type: integer + next_cursor: + description: The cursor used to get the next results, if any. type: string - tag_name: - description: Eventual name of the tag that gets created. By default, the - path attribute is used as the tag name. - example: status_code + prev_cursor: + description: The cursor used to get the previous results, if any. + nullable: true type: string + total: + description: Total number of records that match the query. + format: int64 + type: integer + type: + $ref: '#/components/schemas/ContainerImageMetaPageType' type: object - LogsMetricType: - default: logs_metrics - description: The type of the resource. The value should always be logs_metrics. + ContainerImageMetaPageType: + default: cursor_limit + description: Type of Container Image pagination. enum: - - logs_metrics - example: logs_metrics + - cursor_limit + example: cursor_limit type: string x-enum-varnames: - - LOGS_METRICS - LogsMetricUpdateAttributes: - description: The log-based metric properties that will be updated. + - CURSOR_LIMIT + ContainerImageType: + default: container_image + description: Type of Container Image. + enum: + - container_image + example: container_image + type: string + x-enum-varnames: + - CONTAINER_IMAGE + ContainerImageVulnerabilities: + description: Vulnerability counts associated with the Container Image. properties: - compute: - $ref: '#/components/schemas/LogsMetricUpdateCompute' - filter: - $ref: '#/components/schemas/LogsMetricFilter' - group_by: - description: The rules for the group by. + asset_id: + description: ID of the Container Image. + type: string + critical: + description: Number of vulnerabilities with CVSS Critical severity. + format: int64 + type: integer + high: + description: Number of vulnerabilities with CVSS High severity. + format: int64 + type: integer + low: + description: Number of vulnerabilities with CVSS Low severity. + format: int64 + type: integer + medium: + description: Number of vulnerabilities with CVSS Medium severity. + format: int64 + type: integer + none: + description: Number of vulnerabilities with CVSS None severity. + format: int64 + type: integer + unknown: + description: Number of vulnerabilities with an unknown CVSS severity. + format: int64 + type: integer + type: object + ContainerImagesResponse: + description: List of Container Images. + properties: + data: + description: Array of Container Image objects. items: - $ref: '#/components/schemas/LogsMetricGroupBy' + $ref: '#/components/schemas/ContainerImageItem' type: array + links: + $ref: '#/components/schemas/ContainerImagesResponseLinks' + meta: + $ref: '#/components/schemas/ContainerImageMeta' type: object - LogsMetricUpdateCompute: - description: The compute rule to compute the log-based metric. + ContainerImagesResponseLinks: + description: Pagination links. properties: - include_percentiles: - $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles' + first: + description: Link to the first page. + type: string + last: + description: Link to the last page. + nullable: true + type: string + next: + description: Link to the next page. + nullable: true + type: string + prev: + description: Link to previous page. + nullable: true + type: string + self: + description: Link to current page. + type: string type: object - LogsMetricUpdateData: - description: The new log-based metric properties. + ContainerItem: + description: Possible Container models. + oneOf: + - $ref: '#/components/schemas/Container' + - $ref: '#/components/schemas/ContainerGroup' + ContainerMeta: + description: Response metadata object. properties: - attributes: - $ref: '#/components/schemas/LogsMetricUpdateAttributes' - type: - $ref: '#/components/schemas/LogsMetricType' - required: - - type - - attributes + pagination: + $ref: '#/components/schemas/ContainerMetaPage' type: object - LogsMetricUpdateRequest: - description: The new log-based metric body. + ContainerMetaPage: + description: Paging attributes. properties: - data: - $ref: '#/components/schemas/LogsMetricUpdateData' - required: - - data + cursor: + description: The cursor used to get the current results, if any. + type: string + limit: + description: Number of results returned + format: int32 + maximum: 10000 + minimum: 0 + type: integer + next_cursor: + description: The cursor used to get the next results, if any. + type: string + prev_cursor: + description: The cursor used to get the previous results, if any. + nullable: true + type: string + total: + description: Total number of records that match the query. + format: int64 + type: integer + type: + $ref: '#/components/schemas/ContainerMetaPageType' type: object - LogsMetricsResponse: - description: All the available log-based metric objects. + ContainerMetaPageType: + default: cursor_limit + description: Type of Container pagination. + enum: + - cursor_limit + example: cursor_limit + type: string + x-enum-varnames: + - CURSOR_LIMIT + ContainerType: + default: container + description: Type of container. + enum: + - container + example: container + type: string + x-enum-varnames: + - CONTAINER + ContainersResponse: + description: List of containers. properties: data: - description: A list of log-based metric objects. + description: Array of Container objects. items: - $ref: '#/components/schemas/LogsMetricResponseData' + $ref: '#/components/schemas/ContainerItem' type: array + links: + $ref: '#/components/schemas/ContainersResponseLinks' + meta: + $ref: '#/components/schemas/ContainerMeta' type: object - MetricContentEncoding: - default: deflate + ContainersResponseLinks: + description: Pagination links. + properties: + first: + description: Link to the first page. + type: string + last: + description: Link to the last page. + nullable: true + type: string + next: + description: Link to the next page. + nullable: true + type: string + prev: + description: Link to previous page. + nullable: true + type: string + self: + description: Link to current page. + type: string + type: object + ContentEncoding: description: HTTP header used to compress the media-type. enum: - - deflate - - zstd1 + - identity - gzip - example: deflate + - deflate type: string x-enum-varnames: - - DEFLATE - - ZSTD1 + - IDENTITY - GZIP - MetricIntakeType: - description: The type of metric. The available types are `0` (unspecified), - `1` (count), `2` (rate), and `3` (gauge). + - DEFLATE + CostAttributionAggregates: + description: An array of available aggregates. + items: + $ref: '#/components/schemas/CostAttributionAggregatesBody' + type: array + CostAttributionAggregatesBody: + description: The object containing the aggregates. + properties: + agg_type: + description: The aggregate type. + example: sum + type: string + field: + description: The field. + example: infra_host_committed_cost + type: string + value: + description: The value for a given field. + format: double + type: number + type: object + CostAttributionTagNames: + additionalProperties: + description: 'A list of values that are associated with each tag key. + + - An empty list means the resource use wasn''t tagged with the respective + tag. + + - Multiple values means the respective tag was applied multiple times on + the resource. + + - An `` value means the resource was tagged with the respective tag + but did not have a value.' + items: + description: A given tag in a list. + example: datadog-integrations-lab + type: string + type: array + description: 'Tag keys and values. + + A `null` value here means that the requested tag breakdown cannot be applied + because it does not match the [tags + + configured for usage attribution](https://docs.datadoghq.com/account_management/billing/usage_attribution/#getting-started). + + In this scenario the API returns the total cost, not broken down by tags.' + nullable: true + type: object + CostAttributionType: + default: cost_by_tag + description: Type of cost attribution data. enum: - - 0 - - 1 - - 2 - - 3 - format: int32 - type: integer + - cost_by_tag + example: cost_by_tag + type: string x-enum-varnames: - - UNSPECIFIED - - COUNT - - RATE - - GAUGE - MetricMetadata: - description: Metadata for the metric. + - COST_BY_TAG + CostByOrg: + description: Cost data. properties: - origin: - $ref: '#/components/schemas/MetricOrigin' + attributes: + $ref: '#/components/schemas/CostByOrgAttributes' + id: + description: Unique ID of the response. + type: string + type: + $ref: '#/components/schemas/CostByOrgType' type: object - MetricOrigin: - description: Metric origin information. + CostByOrgAttributes: + description: Cost attributes data. properties: - metric_type: - default: 0 - description: The origin metric type code - format: int32 - maximum: 1000 - type: integer - product: - default: 0 - description: The origin product code - format: int32 - maximum: 1000 - type: integer - service: - default: 0 - description: The origin service code - format: int32 - maximum: 1000 - type: integer + charges: + description: List of charges data reported for the requested month. + items: + $ref: '#/components/schemas/ChargebackBreakdown' + type: array + date: + description: The month requested. + format: date-time + type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string + region: + description: The region of the Datadog instance that the organization belongs + to. + type: string + total_cost: + description: The total cost of products for the month. + format: double + type: number type: object - MetricPayload: - description: The metrics' payload. + CostByOrgResponse: + description: Chargeback Summary response. properties: - series: - description: A list of time series to submit to Datadog. - example: - - metric: system.load.1 - points: - - timestamp: 1475317847 - value: 0.7 - resources: - - name: dummyhost - type: host + data: + description: Response containing Chargeback Summary. items: - $ref: '#/components/schemas/MetricSeries' + $ref: '#/components/schemas/CostByOrg' type: array - required: - - series type: object - MetricPoint: - description: A point object is of the form `{POSIX_timestamp, numeric_value}`. - example: - timestamp: 1575317847 - value: 0.5 + CostByOrgType: + default: cost_by_org + description: Type of cost data. + enum: + - cost_by_org + example: cost_by_org + type: string + x-enum-varnames: + - COST_BY_ORG + CreateRuleRequest: + description: Scorecard create rule request. properties: - timestamp: - description: 'The timestamp should be in seconds and current. - - Current is defined as not more than 10 minutes in the future or more than - 1 hour in the past.' - format: int64 - type: integer - value: - description: The numeric value format should be a 64bit float gauge-type - value. - format: double - type: number + data: + $ref: '#/components/schemas/CreateRuleRequestData' type: object - MetricResource: - description: Metric resource. - example: - name: dummyhost - type: host + CreateRuleRequestData: + description: Scorecard create rule request data. properties: - name: - description: The name of the resource. - type: string + attributes: + $ref: '#/components/schemas/RuleAttributes' type: - description: The type of the resource. - type: string + $ref: '#/components/schemas/RuleType' type: object - MetricSeries: - description: 'A metric to submit to Datadog. - - See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties).' + CreateRuleResponse: + description: Created rule in response. properties: - interval: - description: If the type of the metric is rate or count, define the corresponding - interval. - example: 20 - format: int64 - type: integer - metadata: - $ref: '#/components/schemas/MetricMetadata' - metric: - description: The name of the timeseries. - example: system.load.1 + data: + $ref: '#/components/schemas/CreateRuleResponseData' + type: object + CreateRuleResponseData: + description: Create rule response data. + properties: + attributes: + $ref: '#/components/schemas/RuleAttributes' + id: + $ref: '#/components/schemas/RuleId' + relationships: + $ref: '#/components/schemas/RelationshipToRule' + type: + $ref: '#/components/schemas/RuleType' + type: object + Creator: + description: Creator of the object. + properties: + email: + description: Email of the creator. type: string - points: - description: Points relating to a metric. All points must be objects with - timestamp and a scalar value (cannot be a string). Timestamps should be - in POSIX time in seconds, and cannot be more than ten minutes in the future - or more than one hour in the past. - items: - $ref: '#/components/schemas/MetricPoint' - type: array - resources: - description: A list of resources to associate with this metric. - items: - $ref: '#/components/schemas/MetricResource' - type: array - source_type_name: - description: The source type name. - example: datadog + handle: + description: Handle of the creator. type: string - tags: - description: A list of tags associated with the metric. - example: - - environment:test - items: - description: Individual tags. - type: string - type: array - type: - $ref: '#/components/schemas/MetricIntakeType' - unit: - description: The unit of point value. - example: second + name: + description: Name of the creator. + nullable: true type: string + type: object + DORADeploymentRequest: + description: Request to create a DORA deployment event. + properties: + data: + $ref: '#/components/schemas/DORADeploymentRequestData' required: - - metric - - points + - data type: object - MonitorType: - description: Attributes from the monitor that triggered the event. - nullable: true + DORADeploymentRequestAttributes: + description: Attributes to create a DORA deployment event. properties: - created_at: - description: The POSIX timestamp of the monitor's creation in nanoseconds. - example: 1646318692000 + finished_at: + description: Unix timestamp in nanoseconds when the deployment finished. + It should not be older than 3 hours. + example: 1693491984000000000 format: int64 type: integer - group_status: - description: Monitor group status used when there is no `result_groups`. - format: int32 - maximum: 2147483647 - type: integer - groups: - description: Groups to which the monitor belongs. - items: - description: A group. - type: string - type: array + git: + $ref: '#/components/schemas/DORAGitInfo' id: - description: The monitor ID. - format: int64 - type: integer - message: - description: The monitor message. + description: Deployment ID. type: string - modified: - description: The monitor's last-modified timestamp. + service: + description: Service name from a service available in the Service Catalog. + example: shopist + type: string + started_at: + description: Unix timestamp in nanoseconds when the deployment started. + example: 1693491974000000000 format: int64 type: integer - name: - description: The monitor name. - type: string - query: - description: The query that triggers the alert. - type: string - tags: - description: A list of tags attached to the monitor. - example: - - environment:test - items: - description: A tag. - type: string - type: array - templated_name: - description: The templated name of the monitor before resolving any template - variables. - type: string - type: - description: The monitor type. + version: + description: Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/). + example: v1.12.07 type: string + required: + - service + - started_at + - finished_at type: object - MuteFindingRequest: - description: The new mute finding request. + DORADeploymentRequestData: + description: The JSON:API data. properties: - data: - $ref: '#/components/schemas/MuteFindingRequestData' + attributes: + $ref: '#/components/schemas/DORADeploymentRequestAttributes' required: - - data + - attributes type: object - MuteFindingRequestAttributes: - additionalProperties: false - description: The mute properties to be updated. + DORADeploymentResponse: + description: Response after receiving a DORA deployment event. properties: - mute: - $ref: '#/components/schemas/MuteFindingRequestProperties' + data: + $ref: '#/components/schemas/DORADeploymentResponseData' required: - - mute + - data type: object - MuteFindingRequestData: - description: Data object containing the new mute properties of the finding. + DORADeploymentResponseData: + description: The JSON:API data. properties: - attributes: - $ref: '#/components/schemas/MuteFindingRequestAttributes' id: - $ref: '#/components/schemas/FindingID' + description: The ID of the received DORA deployment event. + example: 4242fcdd31586083 + type: string type: - $ref: '#/components/schemas/FindingType' + $ref: '#/components/schemas/DORADeploymentType' required: - id - - type - - attributes type: object - MuteFindingRequestProperties: - additionalProperties: false - description: Object containing the new mute properties of the finding. + DORADeploymentType: + default: dora_deployment + description: JSON:API type for DORA deployment events. + enum: + - dora_deployment + example: dora_deployment + type: string + x-enum-varnames: + - DORA_DEPLOYMENT + DORAGitInfo: + description: Git info for DORA Metrics events. properties: - description: - description: Additional information about the reason why this finding is - muted or unmuted. This field has a maximum limit of 280 characters. - example: To be resolved later - type: string - expiration_date: - description: 'The expiration date of the mute or unmute action (Unix ms). - It must be set to a value greater than the current timestamp. - - If this field is not provided, the finding will be muted or unmuted indefinitely, - which is equivalent to setting the expiration date to 9999999999999. - - ' - example: 1778721573794 - format: int64 - type: integer - muted: - description: Whether this finding is muted or unmuted. - example: true - type: boolean - reason: - $ref: '#/components/schemas/FindingMuteReason' + commit_sha: + $ref: '#/components/schemas/GitCommitSHA' + repository_url: + $ref: '#/components/schemas/GitRepositoryURL' required: - - muted - - reason + - repository_url + - commit_sha type: object - MuteFindingResponse: - description: The expected response schema. + DORAIncidentRequest: + description: Request to create a DORA incident event. properties: data: - $ref: '#/components/schemas/MuteFindingResponseData' + $ref: '#/components/schemas/DORAIncidentRequestData' required: - data type: object - MuteFindingResponseAttributes: - description: The JSON:API attributes of the finding. - properties: - evaluation: - $ref: '#/components/schemas/FindingEvaluation' - evaluation_changed_at: - $ref: '#/components/schemas/FindingEvaluationChangedAt' - mute: - $ref: '#/components/schemas/MuteFindingResponseProperties' - resource: - $ref: '#/components/schemas/FindingResource' - resource_discovery_date: - $ref: '#/components/schemas/FindingResourceDiscoveryDate' - resource_type: - $ref: '#/components/schemas/FindingResourceType' - rule: - $ref: '#/components/schemas/FindingRule' - status: - $ref: '#/components/schemas/FindingStatus' - tags: - $ref: '#/components/schemas/FindingTags' - type: object - MuteFindingResponseData: - description: Data object containing the updated finding. - properties: - attributes: - $ref: '#/components/schemas/MuteFindingResponseAttributes' - id: - $ref: '#/components/schemas/FindingID' - type: - $ref: '#/components/schemas/FindingType' - type: object - MuteFindingResponseProperties: - additionalProperties: false - description: Information about the mute status of this finding. + DORAIncidentRequestAttributes: + description: Attributes to create a DORA incident event. properties: - description: - description: 'Additional information about the reason why this finding is - muted or unmuted. - - This attribute will not be included in the response if the description - is not provided in the request body. - - ' - example: To be resolved later - type: string - expiration_date: - description: 'The expiration date of the mute or unmute action. - - If the expiration date is not provided in the request body, this attribute - will not be included in the response and the finding will be muted or - unmuted indefinitely. - - ' - example: 1778721573794 + finished_at: + description: Unix timestamp in nanoseconds when the incident finished. It + should not be older than 3 hours. + example: 1693491984000000000 format: int64 type: integer - muted: - description: Whether this finding is muted or unmuted. - example: true - type: boolean - reason: - $ref: '#/components/schemas/FindingMuteReason' - type: object - OnDemandConcurrencyCap: - description: On-demand concurrency cap. - properties: - attributes: - $ref: '#/components/schemas/OnDemandConcurrencyCapAttributes' - type: - $ref: '#/components/schemas/OnDemandConcurrencyCapType' - type: object - OnDemandConcurrencyCapAttributes: - description: On-demand concurrency cap attributes. - properties: - on_demand_concurrency_cap: - description: Value of the on-demand concurrency cap. - format: double - type: number - type: object - OnDemandConcurrencyCapResponse: - description: On-demand concurrency cap response. - properties: - data: - $ref: '#/components/schemas/OnDemandConcurrencyCap' - type: object - OnDemandConcurrencyCapType: - description: On-demand concurrency cap type. - enum: - - on_demand_concurrency_cap - type: string - x-enum-varnames: - - ON_DEMAND_CONCURRENCY_CAP - OpsgenieServiceCreateAttributes: - description: The Opsgenie service attributes for a create request. - properties: - custom_url: - description: The custom URL for a custom region. - example: https://example.com + git: + $ref: '#/components/schemas/DORAGitInfo' + id: + description: Incident ID type: string name: - description: The name for the Opsgenie service. - example: fake-opsgenie-service-name + description: Incident name. + example: Webserver is down failing all requests type: string - opsgenie_api_key: - description: The Opsgenie API key for your Opsgenie service. - example: 00000000-0000-0000-0000-000000000000 + service: + description: Service name from a service available in the Service Catalog. + example: shopist + type: string + severity: + description: Incident severity. + example: High + type: string + started_at: + description: Unix timestamp in nanoseconds when the incident started. + example: 1693491974000000000 + format: int64 + type: integer + version: + description: Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/). + example: v1.12.07 type: string - region: - $ref: '#/components/schemas/OpsgenieServiceRegionType' required: - - name - - opsgenie_api_key - - region + - service + - started_at type: object - OpsgenieServiceCreateData: - description: Opsgenie service data for a create request. + DORAIncidentRequestData: + description: The JSON:API data. properties: attributes: - $ref: '#/components/schemas/OpsgenieServiceCreateAttributes' - type: - $ref: '#/components/schemas/OpsgenieServiceType' + $ref: '#/components/schemas/DORAIncidentRequestAttributes' required: - - type - attributes type: object - OpsgenieServiceCreateRequest: - description: Create request for an Opsgenie service. - properties: - data: - $ref: '#/components/schemas/OpsgenieServiceCreateData' - required: - - data - type: object - OpsgenieServiceRegionType: - description: The region for the Opsgenie service. - enum: - - us - - eu - - custom - example: us - type: string - x-enum-varnames: - - US - - EU - - CUSTOM - OpsgenieServiceResponse: - description: Response of an Opsgenie service. + DORAIncidentResponse: + description: Response after receiving a DORA incident event. properties: data: - $ref: '#/components/schemas/OpsgenieServiceResponseData' + $ref: '#/components/schemas/DORAIncidentResponseData' required: - data type: object - OpsgenieServiceResponseAttributes: - description: The attributes from an Opsgenie service response. - properties: - custom_url: - description: The custom URL for a custom region. - example: null - nullable: true - type: string - name: - description: The name for the Opsgenie service. - example: fake-opsgenie-service-name - type: string - region: - $ref: '#/components/schemas/OpsgenieServiceRegionType' - type: object - OpsgenieServiceResponseData: - description: Opsgenie service data from a response. + DORAIncidentResponseData: + description: Response after receiving a DORA incident event. properties: - attributes: - $ref: '#/components/schemas/OpsgenieServiceResponseAttributes' id: - description: The ID of the Opsgenie service. - example: 596da4af-0563-4097-90ff-07230c3f9db3 + description: The ID of the received DORA incident event. + example: 4242fcdd31586083 type: string type: - $ref: '#/components/schemas/OpsgenieServiceType' + $ref: '#/components/schemas/DORAIncidentType' required: - id - - type - - attributes type: object - OpsgenieServiceType: - default: opsgenie-service - description: Opsgenie service resource type. + DORAIncidentType: + default: dora_incident + description: JSON:API type for DORA incident events. enum: - - opsgenie-service - example: opsgenie-service + - dora_incident + example: dora_incident type: string x-enum-varnames: - - OPSGENIE_SERVICE - OpsgenieServiceUpdateAttributes: - description: The Opsgenie service attributes for an update request. + - DORA_INCIDENT + DashboardListAddItemsRequest: + description: Request containing a list of dashboards to add. properties: - custom_url: - description: The custom URL for a custom region. - example: https://example.com - nullable: true - type: string - name: - description: The name for the Opsgenie service. - example: fake-opsgenie-service-name - type: string - opsgenie_api_key: - description: The Opsgenie API key for your Opsgenie service. - example: 00000000-0000-0000-0000-000000000000 - type: string - region: - $ref: '#/components/schemas/OpsgenieServiceRegionType' + dashboards: + description: List of dashboards to add the dashboard list. + items: + $ref: '#/components/schemas/DashboardListItemRequest' + type: array type: object - OpsgenieServiceUpdateData: - description: Opsgenie service for an update request. + DashboardListAddItemsResponse: + description: Response containing a list of added dashboards. properties: - attributes: - $ref: '#/components/schemas/OpsgenieServiceUpdateAttributes' - id: - description: The ID of the Opsgenie service. - example: 596da4af-0563-4097-90ff-07230c3f9db3 - type: string - type: - $ref: '#/components/schemas/OpsgenieServiceType' - required: - - id - - type - - attributes + added_dashboards_to_list: + description: List of dashboards added to the dashboard list. + items: + $ref: '#/components/schemas/DashboardListItemResponse' + type: array type: object - OpsgenieServiceUpdateRequest: - description: Update request for an Opsgenie service. + DashboardListDeleteItemsRequest: + description: Request containing a list of dashboards to delete. properties: - data: - $ref: '#/components/schemas/OpsgenieServiceUpdateData' - required: - - data + dashboards: + description: List of dashboards to delete from the dashboard list. + items: + $ref: '#/components/schemas/DashboardListItemRequest' + type: array type: object - OpsgenieServicesResponse: - description: Response with a list of Opsgenie services. + DashboardListDeleteItemsResponse: + description: Response containing a list of deleted dashboards. properties: - data: - description: An array of Opsgenie services. - example: - - attributes: - custom_url: null - name: fake-opsgenie-service-name - region: us - id: 596da4af-0563-4097-90ff-07230c3f9db3 - type: opsgenie-service - - attributes: - custom_url: null - name: fake-opsgenie-service-name-2 - region: eu - id: 0d2937f1-b561-44fa-914a-99910f848014 - type: opsgenie-service + deleted_dashboards_from_list: + description: List of dashboards deleted from the dashboard list. items: - $ref: '#/components/schemas/OpsgenieServiceResponseData' + $ref: '#/components/schemas/DashboardListItemResponse' type: array - required: - - data type: object - Organization: - description: Organization object. - properties: - attributes: - $ref: '#/components/schemas/OrganizationAttributes' - id: - description: ID of the organization. - type: string - type: - $ref: '#/components/schemas/OrganizationsType' - required: - - type - type: object - OrganizationAttributes: - description: Attributes of the organization. + DashboardListItem: + description: A dashboard within a list. properties: - created_at: - description: Creation time of the organization. + author: + $ref: '#/components/schemas/Creator' + created: + description: Date of creation of the dashboard. format: date-time + readOnly: true type: string - description: - description: Description of the organization. + icon: + description: URL to the icon of the dashboard. + nullable: true + readOnly: true type: string - disabled: - description: Whether or not the organization is disabled. - type: boolean - modified_at: - description: Time of last organization modification. - format: date-time + id: + description: ID of the dashboard. + example: q5j-nti-fv6 type: string - name: - description: Name of the organization. + integration_id: + description: The short name of the integration. + nullable: true + readOnly: true type: string - public_id: - description: Public ID of the organization. + is_favorite: + description: Whether or not the dashboard is in the favorites. + readOnly: true + type: boolean + is_read_only: + description: Whether or not the dashboard is read only. + readOnly: true + type: boolean + is_shared: + description: Whether the dashboard is publicly shared or not. + readOnly: true + type: boolean + modified: + description: Date of last edition of the dashboard. + format: date-time + readOnly: true type: string - sharing: - description: Sharing type of the organization. + popularity: + description: Popularity of the dashboard. + format: int32 + maximum: 5 + readOnly: true + type: integer + tags: + description: List of team names representing ownership of a dashboard. + items: + description: The name of a Datadog team, formatted as `team:` + type: string + maxItems: 5 + nullable: true + readOnly: true + type: array + title: + description: Title of the dashboard. + readOnly: true type: string + type: + $ref: '#/components/schemas/DashboardType' url: - description: URL of the site that this organization exists at. + description: URL path to the dashboard. + readOnly: true type: string + required: + - type + - id type: object - OrganizationsType: - default: orgs - description: Organizations resource type. - enum: - - orgs - example: orgs - type: string - x-enum-varnames: - - ORGS - Pagination: - description: Pagination object. + DashboardListItemRequest: + description: A dashboard within a list. properties: - total_count: - description: Total count. - format: int64 - type: integer - total_filtered_count: - description: Total count of elements matched by the filter. - format: int64 - type: integer + id: + description: ID of the dashboard. + example: q5j-nti-fv6 + type: string + type: + $ref: '#/components/schemas/DashboardType' + required: + - type + - id type: object - Permission: - description: Permission object. + DashboardListItemResponse: + description: A dashboard within a list. properties: - attributes: - $ref: '#/components/schemas/PermissionAttributes' id: - description: ID of the permission. + description: ID of the dashboard. + example: q5j-nti-fv6 + readOnly: true type: string type: - $ref: '#/components/schemas/PermissionsType' + $ref: '#/components/schemas/DashboardType' required: - type + - id type: object - PermissionAttributes: - description: Attributes of a permission. + DashboardListItems: + description: Dashboards within a list. properties: - created: - description: Creation time of the permission. - format: date-time - type: string - description: - description: Description of the permission. - type: string - display_name: - description: Displayed name for the permission. - type: string - display_type: - description: Display type. - type: string - group_name: - description: Name of the permission group. - type: string - name: - description: Name of the permission. - type: string - restricted: - description: Whether or not the permission is restricted. - type: boolean + dashboards: + description: List of dashboards in the dashboard list. + example: [] + items: + $ref: '#/components/schemas/DashboardListItem' + type: array + total: + description: Number of dashboards in the dashboard list. + format: int64 + readOnly: true + type: integer + required: + - dashboards type: object - PermissionsResponse: - description: Payload with API-returned permissions. + DashboardListUpdateItemsRequest: + description: Request containing the list of dashboards to update to. properties: - data: - description: Array of permissions. + dashboards: + description: List of dashboards to update the dashboard list to. items: - $ref: '#/components/schemas/Permission' + $ref: '#/components/schemas/DashboardListItemRequest' type: array type: object - PermissionsType: - default: permissions - description: Permissions resource type. + DashboardListUpdateItemsResponse: + description: Response containing a list of updated dashboards. + properties: + dashboards: + description: List of dashboards in the dashboard list. + items: + $ref: '#/components/schemas/DashboardListItemResponse' + type: array + type: object + DashboardType: + description: The type of the dashboard. enum: - - permissions - example: permissions + - custom_timeboard + - custom_screenboard + - integration_screenboard + - integration_timeboard + - host_timeboard + example: host_timeboard type: string x-enum-varnames: - - PERMISSIONS - ProcessSummariesMeta: - description: Response metadata object. - properties: - page: - $ref: '#/components/schemas/ProcessSummariesMetaPage' - type: object - ProcessSummariesMetaPage: - description: Paging attributes. + - CUSTOM_TIMEBOARD + - CUSTOM_SCREENBOARD + - INTEGRATION_SCREENBOARD + - INTEGRATION_TIMEBOARD + - HOST_TIMEBOARD + DataScalarColumn: + description: A column containing the numerical results for a formula or query. properties: - after: - description: 'The cursor used to get the next results, if any. To make the - next request, use the same - - parameters with the addition of the `page[cursor]`.' - example: 911abf1204838d9cdfcb9a96d0b6a1bd03e1b514074f1ce1737c4cbd + meta: + $ref: '#/components/schemas/ScalarMeta' + name: + description: The name referencing the formula or query for this column. + example: a type: string - size: - description: Number of results returned. - format: int32 - maximum: 10000 - minimum: 0 - type: integer - type: object - ProcessSummariesResponse: - description: List of process summaries. - properties: - data: - description: Array of process summary objects. + type: + $ref: '#/components/schemas/ScalarColumnTypeNumber' + values: + description: The array of numerical values for one formula or query. + example: + - 0.5 items: - $ref: '#/components/schemas/ProcessSummary' + description: An individual value for a given column and group-by. + example: 0.5 + format: double + nullable: true + type: number type: array - meta: - $ref: '#/components/schemas/ProcessSummariesMeta' type: object - ProcessSummary: - description: Process summary object. + DetailedFinding: + description: A single finding with with message and resource configuration. properties: attributes: - $ref: '#/components/schemas/ProcessSummaryAttributes' + $ref: '#/components/schemas/DetailedFindingAttributes' id: - description: Process ID. - type: string + $ref: '#/components/schemas/FindingID' type: - $ref: '#/components/schemas/ProcessSummaryType' + $ref: '#/components/schemas/DetailedFindingType' type: object - ProcessSummaryAttributes: - description: Attributes for a process summary. + DetailedFindingAttributes: + description: The JSON:API attributes of the detailed finding. properties: - cmdline: - description: Process command line. - type: string - host: - description: Host running the process. - type: string - pid: - description: Process ID. - format: int64 - type: integer - ppid: - description: Parent process ID. - format: int64 - type: integer - start: - description: Time the process was started. + evaluation: + $ref: '#/components/schemas/FindingEvaluation' + evaluation_changed_at: + $ref: '#/components/schemas/FindingEvaluationChangedAt' + message: + description: The remediation message for this finding. + example: '## Remediation + + + ### From the console + + + 1. Go to Storage Account + + 2. For each Storage Account, navigate to Data Protection + + 3. Select Set soft delete enabled and enter the number of days to retain + soft deleted data.' type: string + mute: + $ref: '#/components/schemas/FindingMute' + resource: + $ref: '#/components/schemas/FindingResource' + resource_configuration: + description: The resource configuration for this finding. + type: object + resource_discovery_date: + $ref: '#/components/schemas/FindingResourceDiscoveryDate' + resource_type: + $ref: '#/components/schemas/FindingResourceType' + rule: + $ref: '#/components/schemas/FindingRule' + status: + $ref: '#/components/schemas/FindingStatus' tags: - description: List of tags associated with the process. - items: - description: A tag associated with the process. - type: string - type: array - timestamp: - description: Time the process was seen. - type: string - user: - description: Process owner. - type: string + $ref: '#/components/schemas/FindingTags' type: object - ProcessSummaryType: - default: process - description: Type of process summary. - enum: - - process - example: process - type: string - x-enum-varnames: - - PROCESS - QuerySortOrder: - default: desc - description: Direction of sort. + DetailedFindingType: + default: detailed_finding + description: The JSON:API type for findings that have the message and resource + configuration. enum: - - asc - - desc + - detailed_finding + example: detailed_finding type: string x-enum-varnames: - - ASC - - DESC - RelationshipToOrganization: - description: Relationship to an organization. + - DETAILED_FINDING + DowntimeCreateRequest: + description: Request for creating a downtime. properties: data: - $ref: '#/components/schemas/RelationshipToOrganizationData' + $ref: '#/components/schemas/DowntimeCreateRequestData' required: - data type: object - RelationshipToOrganizationData: - description: Relationship to organization object. + DowntimeCreateRequestAttributes: + description: Downtime details. properties: - id: - description: ID of the organization. - example: 00000000-0000-beef-0000-000000000000 - type: string + display_timezone: + $ref: '#/components/schemas/DowntimeDisplayTimezone' + message: + $ref: '#/components/schemas/DowntimeMessage' + monitor_identifier: + $ref: '#/components/schemas/DowntimeMonitorIdentifier' + mute_first_recovery_notification: + $ref: '#/components/schemas/DowntimeMuteFirstRecoveryNotification' + notify_end_states: + $ref: '#/components/schemas/DowntimeNotifyEndStates' + notify_end_types: + $ref: '#/components/schemas/DowntimeNotifyEndTypes' + schedule: + $ref: '#/components/schemas/DowntimeScheduleCreateRequest' + scope: + $ref: '#/components/schemas/DowntimeScope' + required: + - scope + - monitor_identifier + type: object + DowntimeCreateRequestData: + description: Object to create a downtime. + properties: + attributes: + $ref: '#/components/schemas/DowntimeCreateRequestAttributes' type: - $ref: '#/components/schemas/OrganizationsType' + $ref: '#/components/schemas/DowntimeResourceType' required: - - id - type + - attributes type: object - RelationshipToOrganizations: - description: Relationship to organizations. + DowntimeDisplayTimezone: + default: UTC + description: 'The timezone in which to display the downtime''s start and end + times in Datadog applications. This is not used + + as an offset for scheduling.' + example: America/New_York + nullable: true + type: string + DowntimeIncludedMonitorType: + default: monitors + description: Monitor resource type. + enum: + - monitors + example: monitors + type: string + x-enum-varnames: + - MONITORS + DowntimeMessage: + description: 'A message to include with notifications for this downtime. Email + notifications can be sent to specific users + + by using the same `@username` notation as events.' + example: Message about the downtime + nullable: true + type: string + DowntimeMeta: + description: Pagination metadata returned by the API. properties: - data: - description: Relationships to organization objects. - example: [] + page: + $ref: '#/components/schemas/DowntimeMetaPage' + type: object + DowntimeMetaPage: + description: Object containing the total filtered count. + properties: + total_filtered_count: + description: Total count of elements matched by the filter. + format: int64 + type: integer + type: object + DowntimeMonitorIdentifier: + description: Monitor identifier for the downtime. + oneOf: + - $ref: '#/components/schemas/DowntimeMonitorIdentifierId' + - $ref: '#/components/schemas/DowntimeMonitorIdentifierTags' + DowntimeMonitorIdentifierId: + additionalProperties: {} + description: Object of the monitor identifier. + properties: + monitor_id: + description: ID of the monitor to prevent notifications. + example: 123 + format: int64 + type: integer + required: + - monitor_id + type: object + DowntimeMonitorIdentifierTags: + additionalProperties: {} + description: Object of the monitor tags. + properties: + monitor_tags: + description: 'A list of monitor tags. For example, tags that are applied + directly to monitors, + + not tags that are used in monitor queries (which are filtered by the scope + parameter), to which the downtime applies. + + The resulting downtime applies to monitors that match **all** provided + monitor tags. Setting `monitor_tags` + + to `[*]` configures the downtime to mute all monitors for the given scope.' + example: + - service:postgres + - team:frontend items: - $ref: '#/components/schemas/RelationshipToOrganizationData' + description: A list of monitor tags. + example: service:postgres + type: string + minItems: 1 type: array required: - - data + - monitor_tags type: object - RelationshipToPermission: - description: Relationship to a permissions object. + DowntimeMonitorIncludedAttributes: + description: Attributes of the monitor identified by the downtime. + properties: + name: + description: The name of the monitor identified by the downtime. + example: A monitor name + type: string + type: object + DowntimeMonitorIncludedItem: + description: Information about the monitor identified by the downtime. + properties: + attributes: + $ref: '#/components/schemas/DowntimeMonitorIncludedAttributes' + id: + description: ID of the monitor identified by the downtime. + example: 12345 + format: int64 + type: integer + type: + $ref: '#/components/schemas/DowntimeIncludedMonitorType' + type: object + DowntimeMuteFirstRecoveryNotification: + description: If the first recovery notification during a downtime should be + muted. + example: false + type: boolean + DowntimeNotifyEndStateActions: + description: Action that will trigger a monitor notification if the downtime + is in the `notify_end_types` state. + enum: + - canceled + - expired + example: canceled + type: string + x-enum-varnames: + - CANCELED + - EXPIRED + DowntimeNotifyEndStateTypes: + description: State that will trigger a monitor notification when the `notify_end_types` + action occurs. + enum: + - alert + - no data + - warn + example: alert + type: string + x-enum-varnames: + - ALERT + - NO_DATA + - WARN + DowntimeNotifyEndStates: + description: States that will trigger a monitor notification when the `notify_end_types` + action occurs. + example: + - alert + - warn + items: + $ref: '#/components/schemas/DowntimeNotifyEndStateTypes' + type: array + DowntimeNotifyEndTypes: + description: Actions that will trigger a monitor notification if the downtime + is in the `notify_end_types` state. + example: + - canceled + - expired + items: + $ref: '#/components/schemas/DowntimeNotifyEndStateActions' + type: array + DowntimeRelationships: + description: All relationships associated with downtime. + properties: + created_by: + $ref: '#/components/schemas/DowntimeRelationshipsCreatedBy' + monitor: + $ref: '#/components/schemas/DowntimeRelationshipsMonitor' + type: object + DowntimeRelationshipsCreatedBy: + description: The user who created the downtime. properties: data: - $ref: '#/components/schemas/RelationshipToPermissionData' + $ref: '#/components/schemas/DowntimeRelationshipsCreatedByData' type: object - RelationshipToPermissionData: - description: Relationship to permission object. + DowntimeRelationshipsCreatedByData: + description: Data for the user who created the downtime. + nullable: true properties: id: - description: ID of the permission. + description: User ID of the downtime creator. + example: 00000000-0000-1234-0000-000000000000 type: string type: - $ref: '#/components/schemas/PermissionsType' + $ref: '#/components/schemas/UsersType' type: object - RelationshipToPermissions: - description: Relationship to multiple permissions objects. + DowntimeRelationshipsMonitor: + description: The monitor identified by the downtime. properties: data: - description: Relationships to permission objects. - items: - $ref: '#/components/schemas/RelationshipToPermissionData' - type: array + $ref: '#/components/schemas/DowntimeRelationshipsMonitorData' type: object - ReorderRetentionFiltersRequest: - description: A list of retention filters to reorder. + DowntimeRelationshipsMonitorData: + description: Data for the monitor. + nullable: true + properties: + id: + description: Monitor ID of the downtime. + example: '12345' + type: string + type: + $ref: '#/components/schemas/DowntimeIncludedMonitorType' + type: object + DowntimeResourceType: + default: downtime + description: Downtime resource type. + enum: + - downtime + example: downtime + type: string + x-enum-varnames: + - DOWNTIME + DowntimeResponse: + description: 'Downtiming gives you greater control over monitor notifications + by + + allowing you to globally exclude scopes from alerting. + + Downtime settings, which can be scheduled with start and end times, + + prevent all alerting related to specified Datadog tags.' properties: data: - description: A list of retention filters objects. + $ref: '#/components/schemas/DowntimeResponseData' + included: + description: Array of objects related to the downtime that the user requested. items: - $ref: '#/components/schemas/RetentionFilterWithoutAttributes' + $ref: '#/components/schemas/DowntimeResponseIncludedItem' type: array - required: - - data type: object - ResponseMetaAttributes: - description: Object describing meta attributes of response. + DowntimeResponseAttributes: + description: Downtime details. properties: - page: - $ref: '#/components/schemas/Pagination' + canceled: + description: Time that the downtime was canceled. + example: 2020-01-02T03:04:05.282979+0000 + format: date-time + nullable: true + type: string + created: + description: Creation time of the downtime. + example: 2020-01-02T03:04:05.282979+0000 + format: date-time + type: string + display_timezone: + $ref: '#/components/schemas/DowntimeDisplayTimezone' + message: + $ref: '#/components/schemas/DowntimeMessage' + modified: + description: Time that the downtime was last modified. + example: 2020-01-02T03:04:05.282979+0000 + format: date-time + type: string + monitor_identifier: + $ref: '#/components/schemas/DowntimeMonitorIdentifier' + mute_first_recovery_notification: + $ref: '#/components/schemas/DowntimeMuteFirstRecoveryNotification' + notify_end_states: + $ref: '#/components/schemas/DowntimeNotifyEndStates' + notify_end_types: + $ref: '#/components/schemas/DowntimeNotifyEndTypes' + schedule: + $ref: '#/components/schemas/DowntimeScheduleResponse' + scope: + $ref: '#/components/schemas/DowntimeScope' + status: + $ref: '#/components/schemas/DowntimeStatus' type: object - RestrictionPolicy: - description: Restriction policy object. + DowntimeResponseData: + description: Downtime data. properties: attributes: - $ref: '#/components/schemas/RestrictionPolicyAttributes' + $ref: '#/components/schemas/DowntimeResponseAttributes' id: - description: The identifier, always equivalent to the value specified in - the `resource_id` path parameter. - example: dashboard:abc-def-ghi + description: The downtime ID. + example: 00000000-0000-1234-0000-000000000000 type: string + relationships: + $ref: '#/components/schemas/DowntimeRelationships' type: - $ref: '#/components/schemas/RestrictionPolicyType' - required: - - type - - id - - attributes + $ref: '#/components/schemas/DowntimeResourceType' type: object - RestrictionPolicyAttributes: - description: Restriction policy attributes. - example: - bindings: [] + DowntimeResponseIncludedItem: + description: An object related to a downtime. + oneOf: + - $ref: '#/components/schemas/User' + - $ref: '#/components/schemas/DowntimeMonitorIncludedItem' + DowntimeScheduleCreateRequest: + description: Schedule for the downtime. + oneOf: + - $ref: '#/components/schemas/DowntimeScheduleRecurrencesCreateRequest' + - $ref: '#/components/schemas/DowntimeScheduleOneTimeCreateUpdateRequest' + DowntimeScheduleCurrentDowntimeResponse: + description: 'The most recent actual start and end dates for a recurring downtime. + For a canceled downtime, + + this is the previously occurring downtime. For active downtimes, this is the + ongoing downtime, and for scheduled + + downtimes it is the upcoming downtime.' properties: - bindings: - description: An array of bindings. - items: - $ref: '#/components/schemas/RestrictionPolicyBinding' - type: array - required: - - bindings + end: + description: The end of the current downtime. + example: 2020-01-02 03:04:00+00:00 + format: date-time + nullable: true + type: string + start: + description: The start of the current downtime. + example: 2020-01-02 03:04:00+00:00 + format: date-time + type: string type: object - RestrictionPolicyBinding: - description: Specifies which principals are associated with a relation. + DowntimeScheduleOneTimeCreateUpdateRequest: + additionalProperties: {} + description: A one-time downtime definition. properties: - principals: - description: 'An array of principals. A principal is a subject or group - of subjects. + end: + description: 'ISO-8601 Datetime to end the downtime. Must include a UTC + offset of zero. If not provided, the - Each principal is formatted as `type:id`. Supported types: `role`, `team`, - `user`, and `org`. + downtime continues forever.' + example: 2020-01-02 03:04:00+00:00 + format: date-time + nullable: true + type: string + start: + description: 'ISO-8601 Datetime to start the downtime. Must include a UTC + offset of zero. If not provided, the - The org ID can be obtained through the api/v2/current_user API. + downtime starts the moment it is created.' + example: 2020-01-02 03:04:00+00:00 + format: date-time + nullable: true + type: string + type: object + DowntimeScheduleOneTimeResponse: + description: A one-time downtime definition. + properties: + end: + description: ISO-8601 Datetime to end the downtime. + example: 2020-01-02 03:04:00+00:00 + format: date-time + nullable: true + type: string + start: + description: ISO-8601 Datetime to start the downtime. + example: 2020-01-02 03:04:00+00:00 + format: date-time + type: string + required: + - start + type: object + DowntimeScheduleRecurrenceCreateUpdateRequest: + additionalProperties: {} + description: An object defining the recurrence of the downtime. + properties: + duration: + $ref: '#/components/schemas/DowntimeScheduleRecurrenceDuration' + rrule: + $ref: '#/components/schemas/DowntimeScheduleRecurrenceRrule' + start: + description: 'ISO-8601 Datetime to start the downtime. Must not include + a UTC offset. If not provided, the - The user principal type accepts service account IDs.' - example: - - role:00000000-0000-1111-0000-000000000000 - items: - description: 'Subject or group of subjects. Each principal is formatted - as `type:id`. + downtime starts the moment it is created.' + example: 2020-01-02T03:04 + nullable: true + type: string + required: + - duration + - rrule + type: object + DowntimeScheduleRecurrenceDuration: + description: The length of the downtime. Must begin with an integer and end + with one of 'm', 'h', d', or 'w'. + example: 123d + type: string + DowntimeScheduleRecurrenceResponse: + description: An RRULE-based recurring downtime. + properties: + duration: + $ref: '#/components/schemas/DowntimeScheduleRecurrenceDuration' + rrule: + $ref: '#/components/schemas/DowntimeScheduleRecurrenceRrule' + start: + description: 'ISO-8601 Datetime to start the downtime. Must not include + a UTC offset. If not provided, the - Supported types: `role`, `team`, `user`, and `org`. + downtime starts the moment it is created.' + example: 2020-01-02T03:04 + type: string + type: object + DowntimeScheduleRecurrenceRrule: + description: 'The `RRULE` standard for defining recurring events. - The org ID can be obtained through the api/v2/current_user API. + For example, to have a recurring event on the first day of each month, set + the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`. - The user principal type accepts service account IDs.' - type: string + Most common `rrule` options from the [iCalendar Spec](https://tools.ietf.org/html/rfc5545) + are supported. + + + **Note**: Attributes specifying the duration in `RRULE` are not supported + (for example, `DTSTART`, `DTEND`, `DURATION`). + + More examples available in this [downtime guide](https://docs.datadoghq.com/monitors/guide/suppress-alert-with-downtimes/?tab=api).' + example: FREQ=MONTHLY;BYSETPOS=3;BYDAY=WE;INTERVAL=1 + type: string + DowntimeScheduleRecurrencesCreateRequest: + description: A recurring downtime schedule definition. + properties: + recurrences: + description: A list of downtime recurrences. + items: + $ref: '#/components/schemas/DowntimeScheduleRecurrenceCreateUpdateRequest' type: array - relation: - description: The role/level of access. - example: editor + timezone: + default: UTC + description: The timezone in which to schedule the downtime. + example: America/New_York type: string required: - - relation - - principals + - recurrences type: object - RestrictionPolicyResponse: - description: Response containing information about a single restriction policy. + DowntimeScheduleRecurrencesResponse: + description: A recurring downtime schedule definition. properties: - data: - $ref: '#/components/schemas/RestrictionPolicy' + current_downtime: + $ref: '#/components/schemas/DowntimeScheduleCurrentDowntimeResponse' + recurrences: + description: A list of downtime recurrences. + items: + $ref: '#/components/schemas/DowntimeScheduleRecurrenceResponse' + maxItems: 5 + minItems: 1 + type: array + timezone: + default: UTC + description: 'The timezone in which to schedule the downtime. This affects + recurring start and end dates. + + Must match `display_timezone`.' + example: America/New_York + type: string required: - - data + - recurrences type: object - RestrictionPolicyType: - default: restriction_policy - description: Restriction policy type. + DowntimeScheduleRecurrencesUpdateRequest: + description: A recurring downtime schedule definition. + properties: + recurrences: + description: A list of downtime recurrences. + items: + $ref: '#/components/schemas/DowntimeScheduleRecurrenceCreateUpdateRequest' + type: array + timezone: + default: UTC + description: The timezone in which to schedule the downtime. + example: America/New_York + type: string + type: object + DowntimeScheduleResponse: + description: 'The schedule that defines when the monitor starts, stops, and + recurs. There are two types of schedules: + + one-time and recurring. Recurring schedules may have up to five RRULE-based + recurrences. If no schedules are + + provided, the downtime will begin immediately and never end.' + oneOf: + - $ref: '#/components/schemas/DowntimeScheduleRecurrencesResponse' + - $ref: '#/components/schemas/DowntimeScheduleOneTimeResponse' + DowntimeScheduleUpdateRequest: + description: Schedule for the downtime. + oneOf: + - $ref: '#/components/schemas/DowntimeScheduleRecurrencesUpdateRequest' + - $ref: '#/components/schemas/DowntimeScheduleOneTimeCreateUpdateRequest' + DowntimeScope: + description: The scope to which the downtime applies. Must follow the [common + search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). + example: env:(staging OR prod) AND datacenter:us-east-1 + type: string + DowntimeStatus: + description: The current status of the downtime. enum: - - restriction_policy - example: restriction_policy + - active + - canceled + - ended + - scheduled + example: active type: string x-enum-varnames: - - RESTRICTION_POLICY - RestrictionPolicyUpdateRequest: - description: Update request for a restriction policy. + - ACTIVE + - CANCELED + - ENDED + - SCHEDULED + DowntimeUpdateRequest: + description: Request for editing a downtime. properties: data: - $ref: '#/components/schemas/RestrictionPolicy' + $ref: '#/components/schemas/DowntimeUpdateRequestData' required: - data type: object - RetentionFilter: - description: The definition of the retention filter. + DowntimeUpdateRequestAttributes: + description: Attributes of the downtime to update. + properties: + display_timezone: + $ref: '#/components/schemas/DowntimeDisplayTimezone' + message: + $ref: '#/components/schemas/DowntimeMessage' + monitor_identifier: + $ref: '#/components/schemas/DowntimeMonitorIdentifier' + mute_first_recovery_notification: + $ref: '#/components/schemas/DowntimeMuteFirstRecoveryNotification' + notify_end_states: + $ref: '#/components/schemas/DowntimeNotifyEndStates' + notify_end_types: + $ref: '#/components/schemas/DowntimeNotifyEndTypes' + schedule: + $ref: '#/components/schemas/DowntimeScheduleUpdateRequest' + scope: + $ref: '#/components/schemas/DowntimeScope' + type: object + DowntimeUpdateRequestData: + description: Object to update a downtime. properties: attributes: - $ref: '#/components/schemas/RetentionFilterAttributes' + $ref: '#/components/schemas/DowntimeUpdateRequestAttributes' id: - description: The ID of the retention filter. - example: 7RBOb7dLSYWI01yc3pIH8w + description: ID of this downtime. + example: 00000000-0000-1234-0000-000000000000 type: string type: - $ref: '#/components/schemas/ApmRetentionFilterType' + $ref: '#/components/schemas/DowntimeResourceType' required: - id - type - attributes type: object - RetentionFilterAll: - description: The definition of the retention filter. + Event: + description: The metadata associated with a request. properties: - attributes: - $ref: '#/components/schemas/RetentionFilterAllAttributes' id: - description: The ID of the retention filter. - example: 7RBOb7dLSYWI01yc3pIH8w + description: Event ID. + example: '6509751066204996294' type: string + name: + description: The event name. + type: string + source_id: + description: Event source ID. + example: 36 + format: int64 + type: integer type: - $ref: '#/components/schemas/ApmRetentionFilterType' - required: - - id - - type - - attributes + description: Event type. + example: error_tracking_alert + type: string type: object - RetentionFilterAllAttributes: - description: The attributes of the retention filter. + EventAttributes: + description: Object description of attributes from your event. properties: - created_at: - description: The creation timestamp of the retention filter. - format: int64 - type: integer - created_by: - description: The creator of the retention filter. + aggregation_key: + description: Aggregation key of the event. type: string - editable: - description: Shows whether the filter can be edited. - example: true - type: boolean - enabled: - description: The status of the retention filter (Enabled/Disabled). - example: true - type: boolean - execution_order: - description: The execution order of the retention filter. + date_happened: + description: 'POSIX timestamp of the event. Must be sent as an integer (no + quotation marks). + + Limited to events no older than 18 hours.' format: int64 type: integer - filter: - $ref: '#/components/schemas/SpansFilter' - filter_type: - $ref: '#/components/schemas/RetentionFilterAllType' - modified_at: - description: The modification timestamp of the retention filter. + device_name: + description: A device name. + type: string + duration: + description: The duration between the triggering of the event and its recovery + in nanoseconds. format: int64 type: integer - modified_by: - description: The modifier of the retention filter. - type: string - name: - description: The name of the retention filter. - example: my retention filter + event_object: + description: The event title. + example: Did you hear the news today? type: string - rate: - description: 'Sample rate to apply to spans going through this retention - filter, + evt: + $ref: '#/components/schemas/Event' + hostname: + description: 'Host name to associate with the event. - a value of 1.0 keeps all spans matching the query.' - example: 1.0 - format: double - type: number - type: object - RetentionFilterAllType: - default: spans-sampling-processor - description: The type of retention filter. - enum: - - spans-sampling-processor - - spans-errors-sampling-processor - - spans-appsec-sampling-processor - type: string - x-enum-varnames: - - SPANS_SAMPLING_PROCESSOR - - SPANS_ERRORS_SAMPLING_PROCESSOR - - SPANS_APPSEC_SAMPLING_PROCESSOR - RetentionFilterAttributes: - description: The attributes of the retention filter. - properties: - created_at: - description: The creation timestamp of the retention filter. - format: int64 - type: integer - created_by: - description: The creator of the retention filter. + Any tags associated with the host are also applied to this event.' type: string - editable: - description: Shows whether the filter can be edited. - example: true - type: boolean - enabled: - description: The status of the retention filter (Enabled/Disabled). - example: true - type: boolean - execution_order: - description: The execution order of the retention filter. + monitor: + $ref: '#/components/schemas/MonitorType' + monitor_groups: + description: List of groups referred to in the event. + items: + description: Group referred to in the event. + type: string + nullable: true + type: array + monitor_id: + description: ID of the monitor that triggered the event. When an event isn't + related to a monitor, this field is empty. format: int64 + nullable: true type: integer - filter: - $ref: '#/components/schemas/SpansFilter' - filter_type: - $ref: '#/components/schemas/RetentionFilterType' - modified_at: - description: The modification timestamp of the retention filter. + priority: + $ref: '#/components/schemas/EventPriority' + related_event_id: + description: Related event ID. format: int64 type: integer - modified_by: - description: The modifier of the retention filter. - type: string - name: - description: The name of the retention filter. - example: my retention filter + service: + description: Service that triggered the event. + example: datadog-api type: string - rate: - description: 'Sample rate to apply to spans going through this retention - filter, + source_type_name: + description: 'The type of event being posted. - a value of 1.0 keeps all spans matching the query.' - example: 1.0 - format: double - type: number - type: object - RetentionFilterCreateAttributes: - description: The object describing the configuration of the retention filter - to create/update. - properties: - enabled: - description: Enable/Disable the retention filter. - example: true - type: boolean - filter: - $ref: '#/components/schemas/SpansFilterCreate' - filter_type: - $ref: '#/components/schemas/RetentionFilterType' - name: - description: The name of the retention filter. - example: my retention filter - type: string - rate: - description: 'Sample rate to apply to spans going through this retention - filter, + For example, `nagios`, `hudson`, `jenkins`, `my_apps`, `chef`, `puppet`, + `git` or `bitbucket`. - a value of 1.0 keeps all spans matching the query.' - example: 1.0 - format: double - type: number - required: - - name - - filter - - enabled - - filter_type - - rate + The list of standard source attribute values is [available here](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).' + type: string + sourcecategory: + description: Identifier for the source of the event, such as a monitor alert, + an externally-submitted event, or an integration. + type: string + status: + $ref: '#/components/schemas/EventStatusType' + tags: + description: A list of tags to apply to the event. + example: + - environment:test + items: + description: A tag. + type: string + type: array + timestamp: + description: POSIX timestamp of your event in milliseconds. + example: 1652274265000 + format: int64 + type: integer + title: + description: The event title. + example: Oh boy! + type: string type: object - RetentionFilterCreateData: - description: The body of the retention filter to be created. + EventPriority: + description: The priority of the event's monitor. For example, `normal` or `low`. + enum: + - normal + - low + example: normal + nullable: true + type: string + x-enum-varnames: + - NORMAL + - LOW + EventResponse: + description: The object description of an event after being processed and stored + by Datadog. properties: attributes: - $ref: '#/components/schemas/RetentionFilterCreateAttributes' + $ref: '#/components/schemas/EventResponseAttributes' + id: + description: the unique ID of the event. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string type: - $ref: '#/components/schemas/ApmRetentionFilterType' - required: - - attributes - - type - type: object - RetentionFilterCreateRequest: - description: The body of the retention filter to be created. - properties: - data: - $ref: '#/components/schemas/RetentionFilterCreateData' - required: - - data + $ref: '#/components/schemas/EventType' type: object - RetentionFilterResponse: - description: The retention filters definition. + EventResponseAttributes: + description: The object description of an event response attribute. properties: - data: - $ref: '#/components/schemas/RetentionFilter' + attributes: + $ref: '#/components/schemas/EventAttributes' + message: + description: The message of the event. + type: string + tags: + description: An array of tags associated with the event. + example: + - team:A + items: + description: The tag associated with the event. + type: string + type: array + timestamp: + description: The timestamp of the event. + example: '2019-01-02T09:42:36.320Z' + format: date-time + type: string type: object - RetentionFilterType: - default: spans-sampling-processor - description: The type of retention filter. The value should always be spans-sampling-processor. + EventStatusType: + description: 'If an alert event is enabled, its status is one of the following: + + `failure`, `error`, `warning`, `info`, `success`, `user_update`, + + `recommendation`, or `snapshot`.' enum: - - spans-sampling-processor - example: spans-sampling-processor + - failure + - error + - warning + - info + - success + - user_update + - recommendation + - snapshot + example: info type: string x-enum-varnames: - - SPANS_SAMPLING_PROCESSOR - RetentionFilterUpdateData: - description: The body of the retention filter to be updated. + - FAILURE + - ERROR + - WARNING + - INFO + - SUCCESS + - USER_UPDATE + - RECOMMENDATION + - SNAPSHOT + EventType: + default: event + description: Type of the event. + enum: + - event + example: event + type: string + x-enum-varnames: + - EVENT + EventsAggregation: + default: count + description: The type of aggregation that can be performed on events-based queries. + enum: + - count + - cardinality + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + example: count + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - PC75 + - PC90 + - PC95 + - PC98 + - PC99 + - SUM + - MIN + - MAX + - AVG + EventsCompute: + description: The instructions for what to compute for this query. properties: - attributes: - $ref: '#/components/schemas/RetentionFilterCreateAttributes' - id: - description: The ID of the retention filter. - example: retention-filter-id + aggregation: + $ref: '#/components/schemas/EventsAggregation' + interval: + description: Interval for compute in milliseconds. + example: 60000 + format: int64 + type: integer + metric: + description: The "measure" attribute on which to perform the computation. type: string - type: - $ref: '#/components/schemas/ApmRetentionFilterType' required: - - id - - attributes - - type + - aggregation type: object - RetentionFilterUpdateRequest: - description: The body of the retention filter to be updated. + EventsDataSource: + default: logs + description: A data source that is powered by the Events Platform. + enum: + - logs + - rum + example: logs + type: string + x-enum-varnames: + - LOGS + - RUM + EventsGroupBy: + description: A dimension on which to split a query's results. properties: - data: - $ref: '#/components/schemas/RetentionFilterUpdateData' + facet: + description: The facet by which to split groups. + example: '@error.type' + type: string + limit: + description: The maximum number of groups to return. + example: 10 + format: int32 + maximum: 2147483647 + type: integer + sort: + $ref: '#/components/schemas/EventsGroupBySort' required: - - data + - facet type: object - RetentionFilterWithoutAttributes: - description: The retention filter object . + EventsGroupBySort: + description: The dimension by which to sort a query's results. properties: - id: - description: The ID of the retention filter. - example: 7RBOb7dLSYWI01yc3pIH8w + aggregation: + $ref: '#/components/schemas/EventsAggregation' + metric: + description: The metric's calculated value which should be used to define + the sort order of a query's results. + example: '@duration' type: string + order: + $ref: '#/components/schemas/QuerySortOrder' type: - $ref: '#/components/schemas/ApmRetentionFilterType' + $ref: '#/components/schemas/EventsSortType' required: - - id - - type + - aggregation type: object - RetentionFiltersResponse: - description: An ordered list of retention filters. + EventsListRequest: + description: The object sent with the request to retrieve a list of events from + your organization. + properties: + filter: + $ref: '#/components/schemas/EventsQueryFilter' + options: + $ref: '#/components/schemas/EventsQueryOptions' + page: + $ref: '#/components/schemas/EventsRequestPage' + sort: + $ref: '#/components/schemas/EventsSort' + type: object + EventsListResponse: + description: The response object with all events matching the request and pagination + information. properties: data: - description: A list of retention filters objects. + description: An array of events matching the request. items: - $ref: '#/components/schemas/RetentionFilterAll' + $ref: '#/components/schemas/EventResponse' type: array - required: - - data + links: + $ref: '#/components/schemas/EventsListResponseLinks' + meta: + $ref: '#/components/schemas/EventsResponseMetadata' type: object - SpansFilter: - description: The spans filter used to index spans. + EventsListResponseLinks: + description: Links attributes. properties: - query: - description: The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). - example: '@http.status_code:200 service:my-service' + next: + description: 'Link for the next set of results. Note that the request can + also be made using the + + POST endpoint.' + example: https://app.datadoghq.com/api/v2/events?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== type: string type: object - SpansFilterCreate: - description: The spans filter. Spans matching this filter will be indexed and - stored. + EventsQueryFilter: + description: The search and filter query settings. properties: + from: + default: now-15m + description: The minimum time for the requested events. Supports date math + and regular timestamps in milliseconds. + example: now-15m + type: string query: - description: The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). - example: '@http.status_code:200 service:my-service' + default: '*' + description: The search query following the event search syntax. + example: service:web* AND @http.status_code:[200 TO 299] type: string - required: - - query - type: object - SpansMetricCompute: - description: The compute rule to compute the span-based metric. - properties: - aggregation_type: - $ref: '#/components/schemas/SpansMetricComputeAggregationType' - include_percentiles: - $ref: '#/components/schemas/SpansMetricComputeIncludePercentiles' - path: - description: The path to the value the span-based metric will aggregate - on (only used if the aggregation type is a "distribution"). - example: '@duration' + to: + default: now + description: The maximum time for the requested events. Supports date math + and regular timestamps in milliseconds. + example: now type: string - required: - - aggregation_type type: object - SpansMetricComputeAggregationType: - description: The type of aggregation to use. - enum: - - count - - distribution - example: distribution - type: string - x-enum-varnames: - - COUNT - - DISTRIBUTION - SpansMetricComputeIncludePercentiles: - description: 'Toggle to include or exclude percentile aggregations for distribution - metrics. + EventsQueryGroupBys: + description: The list of facets on which to split results. + items: + $ref: '#/components/schemas/EventsGroupBy' + type: array + EventsQueryOptions: + description: 'The global query options that are used. Either provide a timezone + or a time offset but not both, - Only present when the `aggregation_type` is `distribution`.' - example: false - type: boolean - SpansMetricCreateAttributes: - description: The object describing the Datadog span-based metric to create. - properties: - compute: - $ref: '#/components/schemas/SpansMetricCompute' - filter: - $ref: '#/components/schemas/SpansMetricFilter' - group_by: - description: The rules for the group by. - items: - $ref: '#/components/schemas/SpansMetricGroupBy' - type: array - required: - - compute - type: object - SpansMetricCreateData: - description: The new span-based metric properties. - properties: - attributes: - $ref: '#/components/schemas/SpansMetricCreateAttributes' - id: - $ref: '#/components/schemas/SpansMetricID' - type: - $ref: '#/components/schemas/SpansMetricType' - required: - - id - - type - - attributes - type: object - SpansMetricCreateRequest: - description: The new span-based metric body. + otherwise the query fails.' properties: - data: - $ref: '#/components/schemas/SpansMetricCreateData' - required: - - data + timeOffset: + description: The time offset to apply to the query in seconds. + format: int64 + type: integer + timezone: + default: UTC + description: The timezone can be specified as GMT, UTC, an offset from UTC + (like UTC+1), or as a Timezone Database identifier (like America/New_York). + example: GMT + type: string type: object - SpansMetricFilter: - description: The span-based metric filter. Spans matching this filter will be - aggregated in this metric. + EventsRequestPage: + description: Pagination settings. properties: - query: - default: '*' - description: The search query - following the span search syntax. - example: '@http.status_code:200 service:my-service' + cursor: + description: The returned paging point to use to get the next results. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== type: string + limit: + default: 10 + description: The maximum number of logs in the response. + example: 25 + format: int32 + maximum: 1000 + type: integer type: object - SpansMetricGroupBy: - description: A group by rule. + EventsResponseMetadata: + description: The metadata associated with a request. properties: - path: - description: The path to the value the span-based metric will be aggregated - over. - example: resource_name + elapsed: + description: The time elapsed in milliseconds. + example: 132 + format: int64 + type: integer + page: + $ref: '#/components/schemas/EventsResponseMetadataPage' + request_id: + description: The identifier of the request. + example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR type: string - tag_name: - description: Eventual name of the tag that gets created. By default, the - path attribute is used as the tag name. - example: resource_name + status: + description: The request status. + example: done type: string - required: - - path + warnings: + description: 'A list of warnings (non-fatal errors) encountered. Partial + results might be returned if + + warnings are present in the response.' + items: + $ref: '#/components/schemas/EventsWarning' + type: array type: object - SpansMetricID: - description: The name of the span-based metric. - example: my.metric - type: string - SpansMetricResponse: - description: The span-based metric object. + EventsResponseMetadataPage: + description: Pagination attributes. properties: - data: - $ref: '#/components/schemas/SpansMetricResponseData' + after: + description: 'The cursor to use to get the next results, if any. To make + the next request, use the same + + parameters with the addition of the `page[cursor]`.' + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string type: object - SpansMetricResponseAttributes: - description: The object describing a Datadog span-based metric. + EventsScalarQuery: + description: An individual scalar events query. properties: compute: - $ref: '#/components/schemas/SpansMetricResponseCompute' - filter: - $ref: '#/components/schemas/SpansMetricResponseFilter' + $ref: '#/components/schemas/EventsCompute' + data_source: + $ref: '#/components/schemas/EventsDataSource' group_by: - description: The rules for the group by. + $ref: '#/components/schemas/EventsQueryGroupBys' + indexes: + description: The indexes in which to search. + example: + - main items: - $ref: '#/components/schemas/SpansMetricResponseGroupBy' + description: The unique index name. + example: main + type: string type: array - type: object - SpansMetricResponseCompute: - description: The compute rule to compute the span-based metric. - properties: - aggregation_type: - $ref: '#/components/schemas/SpansMetricComputeAggregationType' - include_percentiles: - $ref: '#/components/schemas/SpansMetricComputeIncludePercentiles' - path: - description: The path to the value the span-based metric will aggregate - on (only used if the aggregation type is a "distribution"). - example: '@duration' + name: + description: The variable name for use in formulas. type: string + search: + $ref: '#/components/schemas/EventsSearch' + required: + - data_source + - compute type: object - SpansMetricResponseData: - description: The span-based metric properties. - properties: - attributes: - $ref: '#/components/schemas/SpansMetricResponseAttributes' - id: - $ref: '#/components/schemas/SpansMetricID' - type: - $ref: '#/components/schemas/SpansMetricType' - type: object - SpansMetricResponseFilter: - description: The span-based metric filter. Spans matching this filter will be - aggregated in this metric. + EventsSearch: + description: Configuration of the search/filter for an events query. properties: query: - description: The search query - following the span search syntax. - example: '@http.status_code:200 service:my-service' - type: string - type: object - SpansMetricResponseGroupBy: - description: A group by rule. - properties: - path: - description: The path to the value the span-based metric will be aggregated - over. - example: resource_name - type: string - tag_name: - description: Eventual name of the tag that gets created. By default, the - path attribute is used as the tag name. - example: resource_name + description: The search/filter string for an events query. + example: status:warn service:foo type: string type: object - SpansMetricType: - default: spans_metrics - description: The type of resource. The value should always be spans_metrics. + EventsSort: + description: The sort parameters when querying events. enum: - - spans_metrics - example: spans_metrics + - timestamp + - -timestamp type: string x-enum-varnames: - - SPANS_METRICS - SpansMetricUpdateAttributes: - description: The span-based metric properties that will be updated. + - TIMESTAMP_ASCENDING + - TIMESTAMP_DESCENDING + EventsSortType: + description: The type of sort to use on the calculated value. + enum: + - alphabetical + - measure + type: string + x-enum-varnames: + - ALPHABETICAL + - MEASURE + EventsTimeseriesQuery: + description: An individual timeseries events query. properties: compute: - $ref: '#/components/schemas/SpansMetricUpdateCompute' - filter: - $ref: '#/components/schemas/SpansMetricFilter' + $ref: '#/components/schemas/EventsCompute' + data_source: + $ref: '#/components/schemas/EventsDataSource' group_by: - description: The rules for the group by. + $ref: '#/components/schemas/EventsQueryGroupBys' + indexes: + description: The indexes in which to search. + example: + - main items: - $ref: '#/components/schemas/SpansMetricGroupBy' + description: The unique index name. + example: main + type: string type: array + name: + description: The variable name for use in formulas. + type: string + search: + $ref: '#/components/schemas/EventsSearch' + required: + - data_source + - compute type: object - SpansMetricUpdateCompute: - description: The compute rule to compute the span-based metric. + EventsWarning: + description: A warning message indicating something is wrong with the query. properties: - include_percentiles: - $ref: '#/components/schemas/SpansMetricComputeIncludePercentiles' + code: + description: A unique code for this type of warning. + example: unknown_index + type: string + detail: + description: A detailed explanation of this specific warning. + example: 'indexes: foo, bar' + type: string + title: + description: A short human-readable summary of the warning. + example: One or several indexes are missing or invalid. Results hold data + from the other indexes. + type: string type: object - SpansMetricUpdateData: - description: The new span-based metric properties. + FastlyAccounResponseAttributes: + description: Attributes object of a Fastly account. + properties: + name: + description: The name of the Fastly account. + example: test-name + type: string + services: + description: A list of services belonging to the parent account. + items: + $ref: '#/components/schemas/FastlyService' + type: array + required: + - name + type: object + FastlyAccountCreateRequest: + description: Payload schema when adding a Fastly account. + properties: + data: + $ref: '#/components/schemas/FastlyAccountCreateRequestData' + required: + - data + type: object + FastlyAccountCreateRequestAttributes: + description: Attributes object for creating a Fastly account. + properties: + api_key: + description: The API key for the Fastly account. + example: ABCDEFG123 + type: string + name: + description: The name of the Fastly account. + example: test-name + type: string + services: + description: A list of services belonging to the parent account. + items: + $ref: '#/components/schemas/FastlyService' + type: array + required: + - api_key + - name + type: object + FastlyAccountCreateRequestData: + description: Data object for creating a Fastly account. properties: attributes: - $ref: '#/components/schemas/SpansMetricUpdateAttributes' + $ref: '#/components/schemas/FastlyAccountCreateRequestAttributes' type: - $ref: '#/components/schemas/SpansMetricType' + $ref: '#/components/schemas/FastlyAccountType' required: + - attributes - type + type: object + FastlyAccountResponse: + description: The expected response schema when getting a Fastly account. + properties: + data: + $ref: '#/components/schemas/FastlyAccountResponseData' + type: object + FastlyAccountResponseData: + description: Data object of a Fastly account. + properties: + attributes: + $ref: '#/components/schemas/FastlyAccounResponseAttributes' + id: + description: The ID of the Fastly account, a hash of the account name. + example: abc123 + type: string + type: + $ref: '#/components/schemas/FastlyAccountType' + required: - attributes + - id + - type type: object - SpansMetricUpdateRequest: - description: The new span-based metric body. + FastlyAccountType: + default: fastly-accounts + description: The JSON:API type for this API. Should always be `fastly-accounts`. + enum: + - fastly-accounts + example: fastly-accounts + type: string + x-enum-varnames: + - FASTLY_ACCOUNTS + FastlyAccountUpdateRequest: + description: Payload schema when updating a Fastly account. properties: data: - $ref: '#/components/schemas/SpansMetricUpdateData' + $ref: '#/components/schemas/FastlyAccountUpdateRequestData' required: - data type: object - SpansMetricsResponse: - description: All the available span-based metric objects. + FastlyAccountUpdateRequestAttributes: + description: Attributes object for updating a Fastly account. + properties: + api_key: + description: The API key of the Fastly account. + example: ABCDEFG123 + type: string + type: object + FastlyAccountUpdateRequestData: + description: Data object for updating a Fastly account. + properties: + attributes: + $ref: '#/components/schemas/FastlyAccountUpdateRequestAttributes' + type: + $ref: '#/components/schemas/FastlyAccountType' + type: object + FastlyAccountsResponse: + description: The expected response schema when getting Fastly accounts. properties: data: - description: A list of span-based metric objects. + description: The JSON:API data schema. items: - $ref: '#/components/schemas/SpansMetricResponseData' + $ref: '#/components/schemas/FastlyAccountResponseData' type: array type: object - UsageApplicationSecurityMonitoringResponse: - description: Application Security Monitoring usage response. + FastlyService: + description: The schema representation of a Fastly service. properties: - data: - description: Response containing Application Security Monitoring usage. + id: + description: The id of the Fastly service + example: 6abc7de6893AbcDe9fghIj + type: string + tags: + description: A list of tags for the Fastly service. + example: + - myTag + - myTag2:myValue items: - $ref: '#/components/schemas/UsageDataObject' + type: string type: array + required: + - id type: object - UsageAttributesObject: - description: Usage attributes data. + FastlyServiceAttributes: + description: Attributes object for Fastly service requests. properties: - org_name: - description: The organization name. - type: string - product_family: - description: The product for which usage is being reported. - type: string - public_id: - description: The organization public ID. - type: string - region: - description: The region of the Datadog instance that the organization belongs - to. - type: string - timeseries: - description: List of usage data reported for each requested hour. + tags: + description: A list of tags for the Fastly service. + example: + - myTag + - myTag2:myValue items: - $ref: '#/components/schemas/UsageTimeSeriesObject' + type: string type: array - usage_type: - $ref: '#/components/schemas/HourlyUsageType' type: object - UsageDataObject: - description: Usage data. + FastlyServiceData: + description: Data object for Fastly service requests. properties: attributes: - $ref: '#/components/schemas/UsageAttributesObject' + $ref: '#/components/schemas/FastlyServiceAttributes' id: - description: Unique ID of the response. + description: The ID of the Fastly service. + example: abc123 type: string type: - $ref: '#/components/schemas/UsageTimeSeriesType' + $ref: '#/components/schemas/FastlyServiceType' + required: + - id + - type type: object - UsageLambdaTracedInvocationsResponse: - description: Lambda Traced Invocations usage response. + FastlyServiceRequest: + description: Payload schema for Fastly service requests. properties: data: - description: Response containing Lambda Traced Invocations usage. - items: - $ref: '#/components/schemas/UsageDataObject' - type: array + $ref: '#/components/schemas/FastlyServiceData' + required: + - data type: object - UsageObservabilityPipelinesResponse: - description: Observability Pipelines usage response. + FastlyServiceResponse: + description: The expected response schema when getting a Fastly service. properties: data: - description: Response containing Observability Pipelines usage. + $ref: '#/components/schemas/FastlyServiceData' + type: object + FastlyServiceType: + default: fastly-services + description: The JSON:API type for this API. Should always be `fastly-services`. + enum: + - fastly-services + example: fastly-services + type: string + x-enum-varnames: + - FASTLY_SERVICES + FastlyServicesResponse: + description: The expected response schema when getting Fastly services. + properties: + data: + description: The JSON:API data schema. items: - $ref: '#/components/schemas/UsageDataObject' + $ref: '#/components/schemas/FastlyServiceResponse' type: array type: object - UsageTimeSeriesObject: - description: Usage timeseries data. + Finding: + description: A single finding without the message and resource configuration. properties: - timestamp: - description: Datetime in ISO-8601 format, UTC. The hour for the usage. - format: date-time - type: string - value: - description: Contains the number measured for the given usage_type during - the hour. - format: int64 - nullable: true - type: integer + attributes: + $ref: '#/components/schemas/FindingAttributes' + id: + $ref: '#/components/schemas/FindingID' + type: + $ref: '#/components/schemas/FindingType' type: object - UsageTimeSeriesType: - default: usage_timeseries - description: Type of usage data. + FindingAttributes: + description: The JSON:API attributes of the finding. + properties: + evaluation: + $ref: '#/components/schemas/FindingEvaluation' + evaluation_changed_at: + $ref: '#/components/schemas/FindingEvaluationChangedAt' + mute: + $ref: '#/components/schemas/FindingMute' + resource: + $ref: '#/components/schemas/FindingResource' + resource_discovery_date: + $ref: '#/components/schemas/FindingResourceDiscoveryDate' + resource_type: + $ref: '#/components/schemas/FindingResourceType' + rule: + $ref: '#/components/schemas/FindingRule' + status: + $ref: '#/components/schemas/FindingStatus' + tags: + $ref: '#/components/schemas/FindingTags' + type: object + FindingEvaluation: + description: The evaluation of the finding. enum: - - usage_timeseries - example: usage_timeseries + - pass + - fail + example: pass type: string x-enum-varnames: - - USAGE_TIMESERIES + - PASS + - FAIL + FindingEvaluationChangedAt: + description: The date on which the evaluation for this finding changed (Unix + ms). + example: 1678721573794 + format: int64 + minimum: 1 + type: integer + FindingID: + description: The unique ID for this finding. + example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== + type: string + FindingMute: + additionalProperties: false + description: Information about the mute status of this finding. + properties: + description: + description: Additional information about the reason why this finding is + muted or unmuted. + example: To be resolved later + type: string + expiration_date: + description: The expiration date of the mute or unmute action (Unix ms). + example: 1778721573794 + format: int64 + type: integer + muted: + description: Whether this finding is muted or unmuted. + example: true + type: boolean + reason: + $ref: '#/components/schemas/FindingMuteReason' + start_date: + description: The start of the mute period. + example: 1678721573794 + format: int64 + type: integer + uuid: + description: The ID of the user who muted or unmuted this finding. + example: e51c9744-d158-11ec-ad23-da7ad0900002 + type: string + type: object + FindingMuteReason: + description: The reason why this finding is muted or unmuted. + enum: + - PENDING_FIX + - FALSE_POSITIVE + - ACCEPTED_RISK + - NO_PENDING_FIX + - HUMAN_ERROR + - NO_LONGER_ACCEPTED_RISK + - OTHER + example: ACCEPTED_RISK + type: string + x-enum-varnames: + - PENDING_FIX + - FALSE_POSITIVE + - ACCEPTED_RISK + - NO_PENDING_FIX + - HUMAN_ERROR + - NO_LONGER_ACCEPTED_RISK + - OTHER + FindingResource: + description: The resource name of this finding. + example: my_resource_name + type: string + FindingResourceDiscoveryDate: + description: The date on which the resource was discovered (Unix ms). + example: 1678721573794 + format: int64 + minimum: 1 + type: integer + FindingResourceType: + description: The resource type of this finding. + example: azure_storage_account + type: string + FindingRule: + additionalProperties: false + description: The rule that triggered this finding. + properties: + id: + description: The ID of the rule that triggered this finding. + example: dv2-jzf-41i + type: string + name: + description: The name of the rule that triggered this finding. + example: Soft delete is enabled for Azure Storage + type: string + type: object + FindingStatus: + description: The status of the finding. + enum: + - critical + - high + - medium + - low + - info + example: critical + type: string + x-enum-varnames: + - CRITICAL + - HIGH + - MEDIUM + - LOW + - INFO + FindingTags: + description: The tags associated with this finding. + example: + - cloud_provider:aws + - myTag:myValue + items: + description: The list of tags. + type: string + type: array + FindingType: + default: finding + description: The JSON:API type for findings. + enum: + - finding + example: finding + type: string + x-enum-varnames: + - FINDING + FormulaLimit: + description: 'Message for specifying limits to the number of values returned + by a query. + + This limit is only for scalar queries and has no effect on timeseries queries.' + properties: + count: + description: The number of results to which to limit. + example: 10 + format: int32 + maximum: 2147483647 + type: integer + order: + $ref: '#/components/schemas/QuerySortOrder' + type: object + FullAPIKey: + description: Datadog API key. + properties: + attributes: + $ref: '#/components/schemas/FullAPIKeyAttributes' + id: + description: ID of the API key. + type: string + relationships: + $ref: '#/components/schemas/APIKeyRelationships' + type: + $ref: '#/components/schemas/APIKeysType' + type: object + FullAPIKeyAttributes: + description: Attributes of a full API key. + properties: + category: + description: The category of the API key. + type: string + created_at: + description: Creation date of the API key. + example: '2020-11-23T10:00:00.000Z' + readOnly: true + type: string + key: + description: The API key. + readOnly: true + type: string + last4: + description: The last four characters of the API key. + example: abcd + maxLength: 4 + minLength: 4 + readOnly: true + type: string + modified_at: + description: Date the API key was last modified. + example: '2020-11-23T10:00:00.000Z' + readOnly: true + type: string + name: + description: Name of the API key. + example: API Key for submitting metrics + type: string + remote_config_read_enabled: + description: The remote config read enabled status. + type: boolean + type: object + FullApplicationKey: + description: Datadog application key. + properties: + attributes: + $ref: '#/components/schemas/FullApplicationKeyAttributes' + id: + description: ID of the application key. + type: string + relationships: + $ref: '#/components/schemas/ApplicationKeyRelationships' + type: + $ref: '#/components/schemas/ApplicationKeysType' + type: object + FullApplicationKeyAttributes: + description: Attributes of a full application key. + properties: + created_at: + description: Creation date of the application key. + example: '2020-11-23T10:00:00.000Z' + readOnly: true + type: string + key: + description: The application key. + readOnly: true + type: string + last4: + description: The last four characters of the application key. + example: abcd + maxLength: 4 + minLength: 4 + readOnly: true + type: string + name: + description: Name of the application key. + example: Application Key for managing dashboards + type: string + scopes: + description: Array of scopes to grant the application key. + example: + - dashboards_read + - dashboards_write + - dashboards_public_share + items: + description: Name of scope. + type: string + nullable: true + type: array + type: object + GCPSTSDelegateAccount: + description: Datadog principal service account info. + properties: + attributes: + $ref: '#/components/schemas/GCPSTSDelegateAccountAttributes' + id: + description: The ID of the delegate service account. + example: ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com + type: string + type: + $ref: '#/components/schemas/GCPSTSDelegateAccountType' + type: object + GCPSTSDelegateAccountAttributes: + description: Your delegate account attributes. + properties: + delegate_account_email: + description: Your organization's Datadog principal email address. + example: ddgci-1a19n28hb1a812221893@datadog-gci-sts-us5-prod.iam.gserviceaccount.com + type: string + type: object + GCPSTSDelegateAccountResponse: + description: Your delegate service account response data. + properties: + data: + $ref: '#/components/schemas/GCPSTSDelegateAccount' + type: object + GCPSTSDelegateAccountType: + default: gcp_sts_delegate + description: The type of account. + enum: + - gcp_sts_delegate + example: gcp_sts_delegate + type: string + x-enum-varnames: + - GCP_STS_DELEGATE + GCPSTSServiceAccount: + description: Info on your service account. + properties: + attributes: + $ref: '#/components/schemas/GCPSTSServiceAccountAttributes' + id: + description: Your service account's unique ID. + example: d291291f-12c2-22g4-j290-123456678897 + type: string + meta: + $ref: '#/components/schemas/GCPServiceAccountMeta' + type: + $ref: '#/components/schemas/GCPServiceAccountType' + type: object + GCPSTSServiceAccountAttributes: + description: Attributes associated with your service account. + properties: + account_tags: + description: Tags to be associated with GCP metrics and service checks from + your account. + items: + description: Account Level Tag + type: string + type: array + automute: + description: Silence monitors for expected GCE instance shutdowns. + type: boolean + client_email: + description: Your service account email address. + example: datadog-service-account@test-project.iam.gserviceaccount.com + type: string + host_filters: + description: Your Host Filters. + items: + description: Host Filters + type: string + type: array + is_cspm_enabled: + description: 'When enabled, Datadog will activate the Cloud Security Monitoring + product for this service account. Note: This requires resource_collection_enabled + to be set to true.' + type: boolean + is_security_command_center_enabled: + default: false + description: 'When enabled, Datadog will attempt to collect Security Command + Center Findings. Note: This requires additional permissions on the service + account.' + example: true + type: boolean + resource_collection_enabled: + description: When enabled, Datadog scans for all resources in your GCP environment. + type: boolean + type: object + GCPSTSServiceAccountCreateRequest: + description: Data on your newly generated service account. + properties: + data: + $ref: '#/components/schemas/GCPSTSServiceAccountData' + type: object + GCPSTSServiceAccountData: + description: Additional metadata on your generated service account. + properties: + attributes: + $ref: '#/components/schemas/GCPSTSServiceAccountAttributes' + type: + $ref: '#/components/schemas/GCPServiceAccountType' + type: object + GCPSTSServiceAccountResponse: + description: The account creation response. + properties: + data: + $ref: '#/components/schemas/GCPSTSServiceAccount' + type: object + GCPSTSServiceAccountUpdateRequest: + description: Service account info. + properties: + data: + $ref: '#/components/schemas/GCPSTSServiceAccountUpdateRequestData' + type: object + GCPSTSServiceAccountUpdateRequestData: + description: Data on your service account. + properties: + attributes: + $ref: '#/components/schemas/GCPSTSServiceAccountAttributes' + id: + description: Your service account's unique ID. + example: d291291f-12c2-22g4-j290-123456678897 + type: string + type: + $ref: '#/components/schemas/GCPServiceAccountType' + type: object + GCPSTSServiceAccountsResponse: + description: Object containing all your STS enabled accounts. + properties: + data: + description: Array of GCP STS enabled service accounts. + items: + $ref: '#/components/schemas/GCPSTSServiceAccount' + type: array + type: object + GCPServiceAccountMeta: + description: Additional information related to your service account. + properties: + accessible_projects: + description: The current list of projects accessible from your service account. + items: + description: List of GCP projects. + type: string + type: array + type: object + GCPServiceAccountType: + default: gcp_service_account + description: The type of account. + enum: + - gcp_service_account + example: gcp_service_account + type: string + x-enum-varnames: + - GCP_SERVICE_ACCOUNT + GetFindingResponse: + description: The expected response schema when getting a finding. + properties: + data: + $ref: '#/components/schemas/DetailedFinding' + required: + - data + type: object + GetTeamMembershipsSort: + description: Specifies the order of returned team memberships + enum: + - manager_name + - -manager_name + - name + - -name + - handle + - -handle + - email + - -email + type: string + x-enum-varnames: + - MANAGER_NAME + - _MANAGER_NAME + - NAME + - _NAME + - HANDLE + - _HANDLE + - EMAIL + - _EMAIL + GitCommitSHA: + description: Git Commit SHA. + example: 66adc9350f2cc9b250b69abddab733dd55e1a588 + pattern: ^[a-fA-F0-9]{40,}$ + type: string + GitRepositoryURL: + description: Git Repository URL + example: https://github.com/organization/example-repository + type: string + GroupScalarColumn: + description: A column containing the tag keys and values in a group. + properties: + name: + description: The name of the tag key or group. + example: env + type: string + type: + $ref: '#/components/schemas/ScalarColumnTypeGroup' + values: + description: The array of tag values for each group found for the results + of the formulas or queries. + example: + - - production + - - staging + items: + description: An individual tag value for a given group column. + items: + description: One tag value within a values array. + example: production + type: string + type: array + type: array + type: object + GroupTags: + description: List of tags that apply to a single response value. + items: + description: A single tag that applies to a single response value. + example: env:production + type: string + type: array + HTTPCIAppError: + description: List of errors. + properties: + detail: + description: Error message. + example: Malformed payload + type: string + status: + description: Error code. + example: '400' + type: string + title: + description: Error title. + example: Bad Request + type: string + type: object + HTTPCIAppErrors: + description: Errors occurred. + properties: + errors: + description: Structured errors. + items: + $ref: '#/components/schemas/HTTPCIAppError' + type: array + type: object + HTTPLog: + description: Structured log message. + items: + $ref: '#/components/schemas/HTTPLogItem' + type: array + HTTPLogError: + description: List of errors. + properties: + detail: + description: Error message. + example: Malformed payload + type: string + status: + description: Error code. + example: '400' + type: string + title: + description: Error title. + example: Bad Request + type: string + type: object + HTTPLogErrors: + description: Invalid query performed. + properties: + errors: + description: Structured errors. + items: + $ref: '#/components/schemas/HTTPLogError' + type: array + type: object + HTTPLogItem: + additionalProperties: + description: Additional log attributes. + type: string + description: Logs that are sent over HTTP. + properties: + ddsource: + description: 'The integration name associated with your log: the technology + from which the log originated. + + When it matches an integration name, Datadog automatically installs the + corresponding parsers and facets. + + See [reserved attributes](https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#reserved-attributes).' + example: nginx + type: string + ddtags: + description: Tags associated with your logs. + example: env:staging,version:5.1 + type: string + hostname: + description: The name of the originating host of the log. + example: i-012345678 + type: string + message: + description: 'The message [reserved attribute](https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#reserved-attributes) + + of your log. By default, Datadog ingests the value of the message attribute + as the body of the log entry. + + That value is then highlighted and displayed in the Logstream, where it + is indexed for full text search.' + example: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World + type: string + service: + description: 'The name of the application or service generating the log + events. + + It is used to switch from Logs to APM, so make sure you define the same + value when you use both products. + + See [reserved attributes](https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#reserved-attributes).' + example: payment + type: string + required: + - message + type: object + HourlyUsage: + description: Hourly usage for a product family for an org. + properties: + attributes: + $ref: '#/components/schemas/HourlyUsageAttributes' + id: + description: Unique ID of the response. + type: string + type: + $ref: '#/components/schemas/UsageTimeSeriesType' + type: object + HourlyUsageAttributes: + description: Attributes of hourly usage for a product family for an org for + a time period. + properties: + measurements: + description: List of the measured usage values for the product family for + the org for the time period. + items: + $ref: '#/components/schemas/HourlyUsageMeasurement' + type: array + org_name: + description: The organization name. + type: string + product_family: + description: The product for which usage is being reported. + type: string + public_id: + description: The organization public ID. + type: string + region: + description: The region of the Datadog instance that the organization belongs + to. + type: string + timestamp: + description: Datetime in ISO-8601 format, UTC. The hour for the usage. + format: date-time + type: string + type: object + HourlyUsageMeasurement: + description: Usage amount for a given usage type. + properties: + usage_type: + description: Type of usage. + type: string + value: + description: Contains the number measured for the given usage_type during + the hour. + format: int64 + nullable: true + type: integer + type: object + HourlyUsageMetadata: + description: The object containing document metadata. + properties: + pagination: + $ref: '#/components/schemas/HourlyUsagePagination' + type: object + HourlyUsagePagination: + description: The metadata for the current pagination. + properties: + next_record_id: + description: The cursor to get the next results (if any). To make the next + request, use the same parameters and add `next_record_id`. + nullable: true + type: string + type: object + HourlyUsageResponse: + description: Hourly usage response. + properties: + data: + description: Response containing hourly usage. + items: + $ref: '#/components/schemas/HourlyUsage' + type: array + meta: + $ref: '#/components/schemas/HourlyUsageMetadata' + type: object + HourlyUsageType: + description: Usage type that is being measured. + enum: + - app_sec_host_count + - observability_pipelines_bytes_processed + - lambda_traced_invocations_count + example: observability_pipelines_bytes_processed + type: string + x-enum-varnames: + - APP_SEC_HOST_COUNT + - OBSERVABILITY_PIPELINES_BYTES_PROCESSSED + - LAMBDA_TRACED_INVOCATIONS_COUNT + IPAllowlistAttributes: + description: Attributes of the IP allowlist. + properties: + enabled: + description: Whether the IP allowlist logic is enabled or not. + type: boolean + entries: + description: Array of entries in the IP allowlist. + items: + $ref: '#/components/schemas/IPAllowlistEntry' + type: array + type: object + IPAllowlistData: + description: IP allowlist data. + properties: + attributes: + $ref: '#/components/schemas/IPAllowlistAttributes' + id: + description: The unique identifier of the org. + type: string + type: + $ref: '#/components/schemas/IPAllowlistType' + required: + - type + type: object + IPAllowlistEntry: + description: IP allowlist entry object. + properties: + data: + $ref: '#/components/schemas/IPAllowlistEntryData' + required: + - data + type: object + IPAllowlistEntryAttributes: + description: Attributes of the IP allowlist entry. + properties: + cidr_block: + description: The CIDR block describing the IP range of the entry. + type: string + created_at: + description: Creation time of the entry. + format: date-time + readOnly: true + type: string + modified_at: + description: Time of last entry modification. + format: date-time + readOnly: true + type: string + note: + description: A note describing the IP allowlist entry. + type: string + type: object + IPAllowlistEntryData: + description: Data of the IP allowlist entry object. + properties: + attributes: + $ref: '#/components/schemas/IPAllowlistEntryAttributes' + id: + description: The unique identifier of the IP allowlist entry. + type: string + type: + $ref: '#/components/schemas/IPAllowlistEntryType' + required: + - type + type: object + IPAllowlistEntryType: + default: ip_allowlist_entry + description: IP allowlist Entry type. + enum: + - ip_allowlist_entry + example: ip_allowlist_entry + type: string + x-enum-varnames: + - IP_ALLOWLIST_ENTRY + IPAllowlistResponse: + description: Response containing information about the IP allowlist. + properties: + data: + $ref: '#/components/schemas/IPAllowlistData' + type: object + IPAllowlistType: + default: ip_allowlist + description: IP allowlist type. + enum: + - ip_allowlist + example: ip_allowlist + type: string + x-enum-varnames: + - IP_ALLOWLIST + IPAllowlistUpdateRequest: + description: Update the IP allowlist. + properties: + data: + $ref: '#/components/schemas/IPAllowlistData' + required: + - data + type: object + IdPMetadataFormData: + description: The form data submitted to upload IdP metadata + properties: + idp_file: + description: The IdP metadata XML file + format: binary + type: string + x-mimetype: application/xml + type: object + IncidentAttachmentAttachmentType: + description: The type of the incident attachment attributes. + enum: + - link + - postmortem + example: link + type: string + x-enum-varnames: + - LINK + - POSTMORTEM + IncidentAttachmentAttributes: + description: The attributes object for an attachment. + oneOf: + - $ref: '#/components/schemas/IncidentAttachmentPostmortemAttributes' + - $ref: '#/components/schemas/IncidentAttachmentLinkAttributes' + IncidentAttachmentData: + description: A single incident attachment. + example: + attributes: + attachment: + documentUrl: '' + title: Postmortem IR-123 + attachment_type: postmortem + id: 00000000-abcd-0002-0000-000000000000 + relationships: + last_modified_by_user: + data: + id: 00000000-0000-0000-cccc-000000000000 + type: users + type: incident_attachments + properties: + attributes: + $ref: '#/components/schemas/IncidentAttachmentAttributes' + id: + description: A unique identifier that represents the incident attachment. + example: 00000000-abcd-0001-0000-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentAttachmentRelationships' + type: + $ref: '#/components/schemas/IncidentAttachmentType' + required: + - type + - attributes + - id + - relationships + type: object + IncidentAttachmentLinkAttachmentType: + default: link + description: The type of link attachment attributes. + enum: + - link + example: link + type: string + x-enum-varnames: + - LINK + IncidentAttachmentLinkAttributes: + description: The attributes object for a link attachment. + properties: + attachment: + $ref: '#/components/schemas/IncidentAttachmentLinkAttributesAttachmentObject' + attachment_type: + $ref: '#/components/schemas/IncidentAttachmentLinkAttachmentType' + modified: + description: Timestamp when the incident attachment link was last modified. + format: date-time + readOnly: true + type: string + required: + - attachment_type + - attachment + type: object + IncidentAttachmentLinkAttributesAttachmentObject: + description: The link attachment. + properties: + documentUrl: + description: The URL of this link attachment. + example: https://www.example.com/webstore-failure-runbook + type: string + title: + description: The title of this link attachment. + example: Runbook for webstore service failures + type: string + required: + - documentUrl + - title + type: object + IncidentAttachmentPostmortemAttachmentType: + default: postmortem + description: The type of postmortem attachment attributes. + enum: + - postmortem + example: postmortem + type: string + x-enum-varnames: + - POSTMORTEM + IncidentAttachmentPostmortemAttributes: + description: The attributes object for a postmortem attachment. + properties: + attachment: + $ref: '#/components/schemas/IncidentAttachmentsPostmortemAttributesAttachmentObject' + attachment_type: + $ref: '#/components/schemas/IncidentAttachmentPostmortemAttachmentType' + required: + - attachment_type + - attachment + type: object + IncidentAttachmentRelatedObject: + description: The object related to an incident attachment. + enum: + - users + type: string + x-enum-varnames: + - USERS + IncidentAttachmentRelationships: + description: The incident attachment's relationships. + properties: + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + type: object + IncidentAttachmentType: + default: incident_attachments + description: The incident attachment resource type. + enum: + - incident_attachments + example: incident_attachments + type: string + x-enum-varnames: + - INCIDENT_ATTACHMENTS + IncidentAttachmentUpdateAttributes: + description: Incident attachment attributes. + oneOf: + - $ref: '#/components/schemas/IncidentAttachmentPostmortemAttributes' + - $ref: '#/components/schemas/IncidentAttachmentLinkAttributes' + IncidentAttachmentUpdateData: + description: A single incident attachment. + properties: + attributes: + $ref: '#/components/schemas/IncidentAttachmentUpdateAttributes' + id: + description: A unique identifier that represents the incident attachment. + example: 00000000-abcd-0001-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentAttachmentType' + required: + - type + type: object + IncidentAttachmentUpdateRequest: + description: The update request for an incident's attachments. + properties: + data: + description: 'An array of incident attachments. An attachment object without + an "id" key indicates that you want to + + create that attachment. An attachment object without an "attributes" key + indicates that you want to + + delete that attachment. An attachment object with both the "id" key and + a populated "attributes" object + + indicates that you want to update that attachment.' + example: + - attributes: + attachment: + documentUrl: https://app.datadoghq.com/notebook/123 + title: Postmortem IR-123 + attachment_type: postmortem + id: 00000000-abcd-0002-0000-000000000000 + type: incident_attachments + - attributes: + attachment: + documentUrl: https://www.example.com/webstore-failure-runbook + title: Runbook for webstore service failures + attachment_type: link + type: incident_attachments + - id: 00000000-abcd-0003-0000-000000000000 + type: incident_attachments + items: + $ref: '#/components/schemas/IncidentAttachmentUpdateData' + type: array + required: + - data + type: object + IncidentAttachmentUpdateResponse: + description: The response object containing the created or updated incident + attachments. + properties: + data: + description: 'An array of incident attachments. Only the attachments that + were created or updated by the request are + + returned.' + items: + $ref: '#/components/schemas/IncidentAttachmentData' + type: array + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentAttachmentsResponseIncludedItem' + type: array + required: + - data + type: object + IncidentAttachmentsPostmortemAttributesAttachmentObject: + description: The postmortem attachment. + properties: + documentUrl: + description: The URL of this notebook attachment. + example: https://app.datadoghq.com/notebook/123 + type: string + title: + description: The title of this postmortem attachment. + example: Postmortem IR-123 + type: string + required: + - documentUrl + - title + type: object + IncidentAttachmentsResponse: + description: The response object containing an incident's attachments. + properties: + data: + description: An array of incident attachments. + items: + $ref: '#/components/schemas/IncidentAttachmentData' + type: array + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentAttachmentsResponseIncludedItem' + type: array + required: + - data + type: object + IncidentAttachmentsResponseIncludedItem: + description: An object related to an attachment that is included in the response. + oneOf: + - $ref: '#/components/schemas/User' + IncidentCreateAttributes: + description: The incident's attributes for a create request. + properties: + customer_impact_scope: + description: Required if `customer_impacted:"true"`. A summary of the impact + customers experienced during the incident. + example: Example customer impact scope + type: string + customer_impacted: + description: A flag indicating whether the incident caused customer impact. + example: false + type: boolean + fields: + additionalProperties: + $ref: '#/components/schemas/IncidentFieldAttributes' + description: A condensed view of the user-defined fields for which to create + initial selections. + example: + severity: + type: dropdown + value: SEV-5 + type: object + initial_cells: + description: An array of initial timeline cells to be placed at the beginning + of the incident timeline. + items: + $ref: '#/components/schemas/IncidentTimelineCellCreateAttributes' + type: array + notification_handles: + description: Notification handles that will be notified of the incident + at creation. + items: + $ref: '#/components/schemas/IncidentNotificationHandle' + type: array + title: + description: The title of the incident, which summarizes what happened. + example: A test incident title + type: string + required: + - title + - customer_impacted + type: object + IncidentCreateData: + description: Incident data for a create request. + properties: + attributes: + $ref: '#/components/schemas/IncidentCreateAttributes' + relationships: + $ref: '#/components/schemas/IncidentCreateRelationships' + type: + $ref: '#/components/schemas/IncidentType' + required: + - type + - attributes + type: object + IncidentCreateRelationships: + description: The relationships the incident will have with other resources once + created. + properties: + commander_user: + $ref: '#/components/schemas/NullableRelationshipToUser' + required: + - commander_user + type: object + IncidentCreateRequest: + description: Create request for an incident. + properties: + data: + $ref: '#/components/schemas/IncidentCreateData' + required: + - data + type: object + IncidentFieldAttributes: + description: Dynamic fields for which selections can be made, with field names + as keys. + oneOf: + - $ref: '#/components/schemas/IncidentFieldAttributesSingleValue' + - $ref: '#/components/schemas/IncidentFieldAttributesMultipleValue' + required: + - type + IncidentFieldAttributesMultipleValue: + description: A field with potentially multiple values selected. + properties: + type: + $ref: '#/components/schemas/IncidentFieldAttributesValueType' + value: + description: The multiple values selected for this field. + example: + - '1.0' + - '1.1' + items: + description: A value which has been selected for the parent field. + example: '1.1' + type: string + nullable: true + type: array + type: object + IncidentFieldAttributesSingleValue: + description: A field with a single value selected. + properties: + type: + $ref: '#/components/schemas/IncidentFieldAttributesSingleValueType' + value: + description: The single value selected for this field. + example: SEV-1 + nullable: true + type: string + type: object + IncidentFieldAttributesSingleValueType: + default: dropdown + description: Type of the single value field definitions. + enum: + - dropdown + - textbox + example: dropdown + type: string + x-enum-varnames: + - DROPDOWN + - TEXTBOX + IncidentFieldAttributesValueType: + default: multiselect + description: Type of the multiple value field definitions. + enum: + - multiselect + - textarray + - metrictag + - autocomplete + example: multiselect + type: string + x-enum-varnames: + - MULTISELECT + - TEXTARRAY + - METRICTAG + - AUTOCOMPLETE + IncidentImpactsType: + description: The incident impacts type. + enum: + - incident_impacts + example: incident_impacts + type: string + x-enum-varnames: + - INCIDENT_IMPACTS + IncidentIntegrationMetadataAttributes: + description: Incident integration metadata's attributes for a create request. + properties: + created: + description: Timestamp when the incident todo was created. + format: date-time + readOnly: true + type: string + incident_id: + description: UUID of the incident this integration metadata is connected + to. + example: 00000000-aaaa-0000-0000-000000000000 + type: string + integration_type: + description: 'A number indicating the type of integration this metadata + is for. 1 indicates Slack; + + 8 indicates Jira.' + example: 1 + format: int32 + maximum: 9 + type: integer + metadata: + $ref: '#/components/schemas/IncidentIntegrationMetadataMetadata' + modified: + description: Timestamp when the incident todo was last modified. + format: date-time + readOnly: true + type: string + status: + description: 'A number indicating the status of this integration metadata. + 0 indicates unknown; + + 1 indicates pending; 2 indicates complete; 3 indicates manually created; + + 4 indicates manually updated; 5 indicates failed.' + format: int32 + maximum: 5 + type: integer + required: + - integration_type + - metadata + type: object + IncidentIntegrationMetadataCreateData: + description: Incident integration metadata data for a create request. + properties: + attributes: + $ref: '#/components/schemas/IncidentIntegrationMetadataAttributes' + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - type + - attributes + type: object + IncidentIntegrationMetadataCreateRequest: + description: Create request for an incident integration metadata. + properties: + data: + $ref: '#/components/schemas/IncidentIntegrationMetadataCreateData' + required: + - data + type: object + IncidentIntegrationMetadataListResponse: + description: Response with a list of incident integration metadata. + properties: + data: + description: An array of incident integration metadata. + items: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseData' + type: array + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseIncludedItem' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentResponseMeta' + required: + - data + type: object + IncidentIntegrationMetadataMetadata: + description: Incident integration metadata's metadata attribute. + oneOf: + - $ref: '#/components/schemas/SlackIntegrationMetadata' + - $ref: '#/components/schemas/JiraIntegrationMetadata' + IncidentIntegrationMetadataPatchData: + description: Incident integration metadata data for a patch request. + properties: + attributes: + $ref: '#/components/schemas/IncidentIntegrationMetadataAttributes' + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - type + - attributes + type: object + IncidentIntegrationMetadataPatchRequest: + description: Patch request for an incident integration metadata. + properties: + data: + $ref: '#/components/schemas/IncidentIntegrationMetadataPatchData' + required: + - data + type: object + IncidentIntegrationMetadataResponse: + description: Response with an incident integration metadata. + properties: + data: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseData' + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponseIncludedItem' + readOnly: true + type: array + required: + - data + type: object + IncidentIntegrationMetadataResponseData: + description: Incident integration metadata from a response. + properties: + attributes: + $ref: '#/components/schemas/IncidentIntegrationMetadataAttributes' + id: + description: The incident integration metadata's ID. + example: 00000000-0000-0000-1234-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentIntegrationRelationships' + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - id + - type + type: object + IncidentIntegrationMetadataResponseIncludedItem: + description: An object related to an incident integration metadata that is included + in the response. + oneOf: + - $ref: '#/components/schemas/User' + IncidentIntegrationMetadataType: + default: incident_integrations + description: Integration metadata resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentIntegrationRelationships: + description: The incident's integration relationships from a response. + properties: + created_by_user: + $ref: '#/components/schemas/RelationshipToUser' + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + type: object + IncidentNonDatadogCreator: + description: Incident's non Datadog creator. + nullable: true + properties: + image_48_px: + description: Non Datadog creator `48px` image. + type: string + name: + description: Non Datadog creator name. + type: string + type: object + IncidentNotificationHandle: + description: A notification handle that will be notified at incident creation. + properties: + display_name: + description: The name of the notified handle. + example: Jane Doe + type: string + handle: + description: The email address used for the notification. + example: '@test.user@test.com' + type: string + type: object + IncidentPostmortemType: + default: incident_postmortems + description: Incident postmortem resource type. + enum: + - incident_postmortems + example: incident_postmortems + type: string + x-enum-varnames: + - INCIDENT_POSTMORTEMS + IncidentRelatedObject: + description: Object related to an incident. + enum: + - users + - attachments + type: string + x-enum-varnames: + - USERS + - ATTACHMENTS + IncidentRespondersType: + description: The incident responders type. + enum: + - incident_responders + example: incident_responders + type: string + x-enum-varnames: + - INCIDENT_RESPONDERS + IncidentResponse: + description: Response with an incident. + properties: + data: + $ref: '#/components/schemas/IncidentResponseData' + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentResponseIncludedItem' + readOnly: true + type: array + required: + - data + type: object + IncidentResponseAttributes: + description: The incident's attributes from a response. + properties: + archived: + description: Timestamp of when the incident was archived. + format: date-time + nullable: true + readOnly: true + type: string + case_id: + description: The incident case id. + format: int64 + nullable: true + type: integer + created: + description: Timestamp when the incident was created. + format: date-time + readOnly: true + type: string + customer_impact_duration: + description: 'Length of the incident''s customer impact in seconds. + + Equals the difference between `customer_impact_start` and `customer_impact_end`.' + format: int64 + readOnly: true + type: integer + customer_impact_end: + description: Timestamp when customers were no longer impacted by the incident. + format: date-time + nullable: true + type: string + customer_impact_scope: + description: A summary of the impact customers experienced during the incident. + example: An example customer impact scope + nullable: true + type: string + customer_impact_start: + description: Timestamp when customers began being impacted by the incident. + format: date-time + nullable: true + type: string + customer_impacted: + description: A flag indicating whether the incident caused customer impact. + example: false + type: boolean + detected: + description: Timestamp when the incident was detected. + format: date-time + nullable: true + type: string + fields: + additionalProperties: + $ref: '#/components/schemas/IncidentFieldAttributes' + description: A condensed view of the user-defined fields attached to incidents. + example: + severity: + type: dropdown + value: SEV-5 + type: object + modified: + description: Timestamp when the incident was last modified. + format: date-time + readOnly: true + type: string + non_datadog_creator: + $ref: '#/components/schemas/IncidentNonDatadogCreator' + notification_handles: + description: Notification handles that will be notified of the incident + during update. + items: + $ref: '#/components/schemas/IncidentNotificationHandle' + nullable: true + type: array + public_id: + description: The monotonically increasing integer ID for the incident. + example: 1 + format: int64 + type: integer + resolved: + description: Timestamp when the incident's state was last changed from active + or stable to resolved or completed. + format: date-time + nullable: true + type: string + severity: + $ref: '#/components/schemas/IncidentSeverity' + state: + description: The state incident. + nullable: true + type: string + time_to_detect: + description: 'The amount of time in seconds to detect the incident. + + Equals the difference between `customer_impact_start` and `detected`.' + format: int64 + readOnly: true + type: integer + time_to_internal_response: + description: The amount of time in seconds to call incident after detection. + Equals the difference of `detected` and `created`. + format: int64 + readOnly: true + type: integer + time_to_repair: + description: The amount of time in seconds to resolve customer impact after + detecting the issue. Equals the difference between `customer_impact_end` + and `detected`. + format: int64 + readOnly: true + type: integer + time_to_resolve: + description: The amount of time in seconds to resolve the incident after + it was created. Equals the difference between `created` and `resolved`. + format: int64 + readOnly: true + type: integer + title: + description: The title of the incident, which summarizes what happened. + example: A test incident title + type: string + visibility: + description: The incident visibility status. + nullable: true + type: string + required: + - title + type: object + IncidentResponseData: + description: Incident data from a response. + properties: + attributes: + $ref: '#/components/schemas/IncidentResponseAttributes' + id: + description: The incident's ID. + example: 00000000-0000-0000-1234-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentResponseRelationships' + type: + $ref: '#/components/schemas/IncidentType' + required: + - id + - type + type: object + IncidentResponseIncludedItem: + description: An object related to an incident that is included in the response. + oneOf: + - $ref: '#/components/schemas/User' + - $ref: '#/components/schemas/IncidentAttachmentData' + IncidentResponseMeta: + description: The metadata object containing pagination metadata. + properties: + pagination: + $ref: '#/components/schemas/IncidentResponseMetaPagination' + readOnly: true + type: object + IncidentResponseMetaPagination: + description: Pagination properties. + properties: + next_offset: + description: The index of the first element in the next page of results. + Equal to page size added to the current offset. + example: 1000 + format: int64 + type: integer + offset: + description: The index of the first element in the results. + example: 10 + format: int64 + type: integer + size: + description: Maximum size of pages to return. + example: 1000 + format: int64 + type: integer + type: object + IncidentResponseRelationships: + description: The incident's relationships from a response. + properties: + attachments: + $ref: '#/components/schemas/RelationshipToIncidentAttachment' + commander_user: + $ref: '#/components/schemas/NullableRelationshipToUser' + created_by_user: + $ref: '#/components/schemas/RelationshipToUser' + impacts: + $ref: '#/components/schemas/RelationshipToIncidentImpacts' + integrations: + $ref: '#/components/schemas/RelationshipToIncidentIntegrationMetadatas' + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + responders: + $ref: '#/components/schemas/RelationshipToIncidentResponders' + user_defined_fields: + $ref: '#/components/schemas/RelationshipToIncidentUserDefinedFields' + type: object + IncidentSearchResponse: + description: Response with incidents and facets. + properties: + data: + $ref: '#/components/schemas/IncidentSearchResponseData' + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentResponseIncludedItem' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentSearchResponseMeta' + required: + - data + type: object + IncidentSearchResponseAttributes: + description: Attributes returned by an incident search. + properties: + facets: + $ref: '#/components/schemas/IncidentSearchResponseFacetsData' + incidents: + description: Incidents returned by the search. + items: + $ref: '#/components/schemas/IncidentSearchResponseIncidentsData' + type: array + total: + description: Number of incidents returned by the search. + example: 10 + format: int32 + maximum: 2147483647 + type: integer + required: + - facets + - incidents + - total + type: object + IncidentSearchResponseData: + description: Data returned by an incident search. + properties: + attributes: + $ref: '#/components/schemas/IncidentSearchResponseAttributes' + type: + $ref: '#/components/schemas/IncidentSearchResultsType' + type: object + IncidentSearchResponseFacetCount: + description: Count of the facet value appearing in search results. + example: 5 + format: int32 + maximum: 2147483647 + type: integer + IncidentSearchResponseFacetsData: + description: Facet data for incidents returned by a search query. + properties: + commander: + description: Facet data for incident commander users. + items: + $ref: '#/components/schemas/IncidentSearchResponseUserFacetData' + type: array + created_by: + description: Facet data for incident creator users. + items: + $ref: '#/components/schemas/IncidentSearchResponseUserFacetData' + type: array + fields: + description: Facet data for incident property fields. + items: + $ref: '#/components/schemas/IncidentSearchResponsePropertyFieldFacetData' + type: array + impact: + description: Facet data for incident impact attributes. + items: + $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData' + type: array + last_modified_by: + description: Facet data for incident last modified by users. + items: + $ref: '#/components/schemas/IncidentSearchResponseUserFacetData' + type: array + postmortem: + description: Facet data for incident postmortem existence. + items: + $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData' + type: array + responder: + description: Facet data for incident responder users. + items: + $ref: '#/components/schemas/IncidentSearchResponseUserFacetData' + type: array + severity: + description: Facet data for incident severity attributes. + items: + $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData' + type: array + state: + description: Facet data for incident state attributes. + items: + $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData' + type: array + time_to_repair: + description: Facet data for incident time to repair metrics. + items: + $ref: '#/components/schemas/IncidentSearchResponseNumericFacetData' + type: array + time_to_resolve: + description: Facet data for incident time to resolve metrics. + items: + $ref: '#/components/schemas/IncidentSearchResponseNumericFacetData' + type: array + type: object + IncidentSearchResponseFieldFacetData: + description: Facet value and number of occurrences for a property field of an + incident. + properties: + count: + $ref: '#/components/schemas/IncidentSearchResponseFacetCount' + name: + description: The facet value appearing in search results. + example: SEV-2 + type: string + type: object + IncidentSearchResponseIncidentsData: + description: Incident returned by the search. + properties: + data: + $ref: '#/components/schemas/IncidentResponseData' + required: + - data + type: object + IncidentSearchResponseMeta: + description: The metadata object containing pagination metadata. + properties: + pagination: + $ref: '#/components/schemas/IncidentResponseMetaPagination' + readOnly: true + type: object + IncidentSearchResponseNumericFacetData: + description: Facet data numeric attributes of an incident. + properties: + aggregates: + $ref: '#/components/schemas/IncidentSearchResponseNumericFacetDataAggregates' + name: + description: Name of the incident property field. + example: time_to_repair + type: string + required: + - name + - aggregates + type: object + IncidentSearchResponseNumericFacetDataAggregates: + description: Aggregate information for numeric incident data. + properties: + max: + description: Maximum value of the numeric aggregates. + example: 1234.0 + format: double + nullable: true + type: number + min: + description: Minimum value of the numeric aggregates. + example: 20.0 + format: double + nullable: true + type: number + type: object + IncidentSearchResponsePropertyFieldFacetData: + description: Facet data for the incident property fields. + properties: + aggregates: + $ref: '#/components/schemas/IncidentSearchResponseNumericFacetDataAggregates' + facets: + description: Facet data for the property field of an incident. + items: + $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData' + type: array + name: + description: Name of the incident property field. + example: Severity + type: string + required: + - facets + - name + type: object + IncidentSearchResponseUserFacetData: + description: Facet data for user attributes of an incident. + properties: + count: + $ref: '#/components/schemas/IncidentSearchResponseFacetCount' + email: + description: Email of the user. + example: datadog.user@example.com + type: string + handle: + description: Handle of the user. + example: '@datadog.user@example.com' + type: string + name: + description: Name of the user. + example: Datadog User + type: string + uuid: + description: ID of the user. + example: 773b045d-ccf8-4808-bd3b-955ef6a8c940 + type: string + type: object + IncidentSearchResultsType: + default: incidents_search_results + description: Incident search result type. + enum: + - incidents_search_results + example: incidents_search_results + type: string + x-enum-varnames: + - INCIDENTS_SEARCH_RESULTS + IncidentSearchSortOrder: + description: The ways searched incidents can be sorted. + enum: + - created + - -created + type: string + x-enum-varnames: + - CREATED_ASCENDING + - CREATED_DESCENDING + IncidentServiceCreateAttributes: + description: The incident service's attributes for a create request. + properties: + name: + description: Name of the incident service. + example: an example service name + type: string + required: + - name + type: object + IncidentServiceCreateData: + description: Incident Service payload for create requests. + properties: + attributes: + $ref: '#/components/schemas/IncidentServiceCreateAttributes' + relationships: + $ref: '#/components/schemas/IncidentServiceRelationships' + type: + $ref: '#/components/schemas/IncidentServiceType' + required: + - type + type: object + IncidentServiceCreateRequest: + description: Create request with an incident service payload. + properties: + data: + $ref: '#/components/schemas/IncidentServiceCreateData' + required: + - data + type: object + IncidentServiceIncludedItems: + description: An object related to an incident service which is present in the + included payload. + oneOf: + - $ref: '#/components/schemas/User' + IncidentServiceRelationships: + description: The incident service's relationships. + properties: + created_by: + $ref: '#/components/schemas/RelationshipToUser' + last_modified_by: + $ref: '#/components/schemas/RelationshipToUser' + readOnly: true + type: object + IncidentServiceResponse: + description: Response with an incident service payload. + properties: + data: + $ref: '#/components/schemas/IncidentServiceResponseData' + included: + description: Included objects from relationships. + items: + $ref: '#/components/schemas/IncidentServiceIncludedItems' + readOnly: true + type: array + required: + - data + type: object + IncidentServiceResponseAttributes: + description: The incident service's attributes from a response. + properties: + created: + description: Timestamp of when the incident service was created. + format: date-time + readOnly: true + type: string + modified: + description: Timestamp of when the incident service was modified. + format: date-time + readOnly: true + type: string + name: + description: Name of the incident service. + example: service name + type: string + type: object + IncidentServiceResponseData: + description: Incident Service data from responses. + properties: + attributes: + $ref: '#/components/schemas/IncidentServiceResponseAttributes' + id: + description: The incident service's ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentServiceRelationships' + type: + $ref: '#/components/schemas/IncidentServiceType' + required: + - id + - type + type: object + IncidentServiceType: + default: services + description: Incident service resource type. + enum: + - services + example: services + type: string + x-enum-varnames: + - SERVICES + IncidentServiceUpdateAttributes: + description: The incident service's attributes for an update request. + properties: + name: + description: Name of the incident service. + example: an example service name + type: string + required: + - name + type: object + IncidentServiceUpdateData: + description: Incident Service payload for update requests. + properties: + attributes: + $ref: '#/components/schemas/IncidentServiceUpdateAttributes' + id: + description: The incident service's ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentServiceRelationships' + type: + $ref: '#/components/schemas/IncidentServiceType' + required: + - type + type: object + IncidentServiceUpdateRequest: + description: Update request with an incident service payload. + properties: + data: + $ref: '#/components/schemas/IncidentServiceUpdateData' + required: + - data + type: object + IncidentServicesResponse: + description: Response with a list of incident service payloads. + properties: + data: + description: An array of incident services. + example: + - id: 00000000-0000-0000-0000-000000000000 + type: services + items: + $ref: '#/components/schemas/IncidentServiceResponseData' + type: array + included: + description: Included related resources which the user requested. + items: + $ref: '#/components/schemas/IncidentServiceIncludedItems' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentResponseMeta' + required: + - data + type: object + IncidentSeverity: + description: The incident severity. + enum: + - UNKNOWN + - SEV-1 + - SEV-2 + - SEV-3 + - SEV-4 + - SEV-5 + example: UNKNOWN + type: string + x-enum-varnames: + - UNKNOWN + - SEV_1 + - SEV_2 + - SEV_3 + - SEV_4 + - SEV_5 + IncidentTeamCreateAttributes: + description: The incident team's attributes for a create request. + properties: + name: + description: Name of the incident team. + example: team name + type: string + required: + - name + type: object + IncidentTeamCreateData: + description: Incident Team data for a create request. + properties: + attributes: + $ref: '#/components/schemas/IncidentTeamCreateAttributes' + relationships: + $ref: '#/components/schemas/IncidentTeamRelationships' + type: + $ref: '#/components/schemas/IncidentTeamType' + required: + - type + type: object + IncidentTeamCreateRequest: + description: Create request with an incident team payload. + properties: + data: + $ref: '#/components/schemas/IncidentTeamCreateData' + required: + - data + type: object + IncidentTeamIncludedItems: + description: An object related to an incident team which is present in the included + payload. + oneOf: + - $ref: '#/components/schemas/User' + IncidentTeamRelationships: + description: The incident team's relationships. + properties: + created_by: + $ref: '#/components/schemas/RelationshipToUser' + last_modified_by: + $ref: '#/components/schemas/RelationshipToUser' + readOnly: true + type: object + IncidentTeamResponse: + description: Response with an incident team payload. + properties: + data: + $ref: '#/components/schemas/IncidentTeamResponseData' + included: + description: Included objects from relationships. + items: + $ref: '#/components/schemas/IncidentTeamIncludedItems' + readOnly: true + type: array + required: + - data + type: object + IncidentTeamResponseAttributes: + description: The incident team's attributes from a response. + properties: + created: + description: Timestamp of when the incident team was created. + format: date-time + readOnly: true + type: string + modified: + description: Timestamp of when the incident team was modified. + format: date-time + readOnly: true + type: string + name: + description: Name of the incident team. + example: team name + type: string + type: object + IncidentTeamResponseData: + description: Incident Team data from a response. + properties: + attributes: + $ref: '#/components/schemas/IncidentTeamResponseAttributes' + id: + description: The incident team's ID. + example: 00000000-7ea3-0000-000a-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentTeamRelationships' + type: + $ref: '#/components/schemas/IncidentTeamType' + type: object + IncidentTeamType: + default: teams + description: Incident Team resource type. + enum: + - teams + example: teams + type: string + x-enum-varnames: + - TEAMS + IncidentTeamUpdateAttributes: + description: The incident team's attributes for an update request. + properties: + name: + description: Name of the incident team. + example: team name + type: string + required: + - name + type: object + IncidentTeamUpdateData: + description: Incident Team data for an update request. + properties: + attributes: + $ref: '#/components/schemas/IncidentTeamUpdateAttributes' + id: + description: The incident team's ID. + example: 00000000-7ea3-0000-0001-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentTeamRelationships' + type: + $ref: '#/components/schemas/IncidentTeamType' + required: + - type + type: object + IncidentTeamUpdateRequest: + description: Update request with an incident team payload. + properties: + data: + $ref: '#/components/schemas/IncidentTeamUpdateData' + required: + - data + type: object + IncidentTeamsResponse: + description: Response with a list of incident team payloads. + properties: + data: + description: An array of incident teams. + example: + - attributes: + name: team name + id: 00000000-7ea3-0000-0000-000000000000 + type: teams + items: + $ref: '#/components/schemas/IncidentTeamResponseData' + type: array + included: + description: Included related resources which the user requested. + items: + $ref: '#/components/schemas/IncidentTeamIncludedItems' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentResponseMeta' + required: + - data + type: object + IncidentTimelineCellCreateAttributes: + description: The timeline cell's attributes for a create request. + oneOf: + - $ref: '#/components/schemas/IncidentTimelineCellMarkdownCreateAttributes' + IncidentTimelineCellMarkdownContentType: + default: markdown + description: Type of the Markdown timeline cell. + enum: + - markdown + example: markdown + type: string + x-enum-varnames: + - MARKDOWN + IncidentTimelineCellMarkdownCreateAttributes: + description: Timeline cell data for Markdown timeline cells for a create request. + properties: + cell_type: + $ref: '#/components/schemas/IncidentTimelineCellMarkdownContentType' + content: + $ref: '#/components/schemas/IncidentTimelineCellMarkdownCreateAttributesContent' + important: + default: false + description: A flag indicating whether the timeline cell is important and + should be highlighted. + example: false + type: boolean + required: + - content + - cell_type + type: object + IncidentTimelineCellMarkdownCreateAttributesContent: + description: The Markdown timeline cell contents. + properties: + content: + description: The Markdown content of the cell. + example: An example timeline cell message. + nullable: false + type: string + type: object + IncidentTodoAnonymousAssignee: + description: Anonymous assignee entity. + properties: + icon: + description: URL for assignee's icon. + example: https://a.slack-edge.com/80588/img/slackbot_48.png + type: string + id: + description: Anonymous assignee's ID. + example: USLACKBOT + type: string + name: + description: Assignee's name. + example: Slackbot + type: string + source: + $ref: '#/components/schemas/IncidentTodoAnonymousAssigneeSource' + required: + - id + - icon + - name + - source + type: object + IncidentTodoAnonymousAssigneeSource: + default: slack + description: The source of the anonymous assignee. + enum: + - slack + - microsoft_teams + example: slack + type: string + x-enum-varnames: + - SLACK + - MICROSOFT_TEAMS + IncidentTodoAssignee: + description: A todo assignee. + example: '@test.user@test.com' + oneOf: + - $ref: '#/components/schemas/IncidentTodoAssigneeHandle' + - $ref: '#/components/schemas/IncidentTodoAnonymousAssignee' + IncidentTodoAssigneeArray: + description: Array of todo assignees. + items: + $ref: '#/components/schemas/IncidentTodoAssignee' + type: array + IncidentTodoAssigneeHandle: + description: Assignee's @-handle. + example: '@test.user@test.com' + type: string + IncidentTodoAttributes: + description: Incident todo's attributes. + properties: + assignees: + $ref: '#/components/schemas/IncidentTodoAssigneeArray' + completed: + description: Timestamp when the todo was completed. + example: '2023-03-06T22:00:00.000000+00:00' + nullable: true + type: string + content: + description: The follow-up task's content. + example: Restore lost data. + type: string + created: + description: Timestamp when the incident todo was created. + format: date-time + readOnly: true + type: string + due_date: + description: Timestamp when the todo should be completed by. + example: '2023-07-10T05:00:00.000000+00:00' + nullable: true + type: string + incident_id: + description: UUID of the incident this todo is connected to. + example: 00000000-aaaa-0000-0000-000000000000 + type: string + modified: + description: Timestamp when the incident todo was last modified. + format: date-time + readOnly: true + type: string + required: + - content + - assignees + type: object + IncidentTodoCreateData: + description: Incident todo data for a create request. + properties: + attributes: + $ref: '#/components/schemas/IncidentTodoAttributes' + type: + $ref: '#/components/schemas/IncidentTodoType' + required: + - type + - attributes + type: object + IncidentTodoCreateRequest: + description: Create request for an incident todo. + properties: + data: + $ref: '#/components/schemas/IncidentTodoCreateData' + required: + - data + type: object + IncidentTodoListResponse: + description: Response with a list of incident todos. + properties: + data: + description: An array of incident todos. + items: + $ref: '#/components/schemas/IncidentTodoResponseData' + type: array + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentTodoResponseIncludedItem' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentResponseMeta' + required: + - data + type: object + IncidentTodoPatchData: + description: Incident todo data for a patch request. + properties: + attributes: + $ref: '#/components/schemas/IncidentTodoAttributes' + type: + $ref: '#/components/schemas/IncidentTodoType' + required: + - type + - attributes + type: object + IncidentTodoPatchRequest: + description: Patch request for an incident todo. + properties: + data: + $ref: '#/components/schemas/IncidentTodoPatchData' + required: + - data + type: object + IncidentTodoRelationships: + description: The incident's relationships from a response. + properties: + created_by_user: + $ref: '#/components/schemas/RelationshipToUser' + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + type: object + IncidentTodoResponse: + description: Response with an incident todo. + properties: + data: + $ref: '#/components/schemas/IncidentTodoResponseData' + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentTodoResponseIncludedItem' + readOnly: true + type: array + required: + - data + type: object + IncidentTodoResponseData: + description: Incident todo response data. + properties: + attributes: + $ref: '#/components/schemas/IncidentTodoAttributes' + id: + description: The incident todo's ID. + example: 00000000-0000-0000-1234-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentTodoRelationships' + type: + $ref: '#/components/schemas/IncidentTodoType' + required: + - id + - type + type: object + IncidentTodoResponseIncludedItem: + description: An object related to an incident todo that is included in the response. + oneOf: + - $ref: '#/components/schemas/User' + IncidentTodoType: + default: incident_todos + description: Todo resource type. + enum: + - incident_todos + example: incident_todos + type: string + x-enum-varnames: + - INCIDENT_TODOS + IncidentType: + default: incidents + description: Incident resource type. + enum: + - incidents + example: incidents + type: string + x-enum-varnames: + - INCIDENTS + IncidentUpdateAttributes: + description: The incident's attributes for an update request. + properties: + customer_impact_end: + description: Timestamp when customers were no longer impacted by the incident. + format: date-time + nullable: true + type: string + customer_impact_scope: + description: A summary of the impact customers experienced during the incident. + example: Example customer impact scope + type: string + customer_impact_start: + description: Timestamp when customers began being impacted by the incident. + format: date-time + nullable: true + type: string + customer_impacted: + description: A flag indicating whether the incident caused customer impact. + example: false + type: boolean + detected: + description: Timestamp when the incident was detected. + format: date-time + nullable: true + type: string + fields: + additionalProperties: + $ref: '#/components/schemas/IncidentFieldAttributes' + description: A condensed view of the user-defined fields for which to update + selections. + example: + severity: + type: dropdown + value: SEV-5 + type: object + notification_handles: + description: Notification handles that will be notified of the incident + during update. + items: + $ref: '#/components/schemas/IncidentNotificationHandle' + type: array + title: + description: The title of the incident, which summarizes what happened. + example: A test incident title + type: string + type: object + IncidentUpdateData: + description: Incident data for an update request. + properties: + attributes: + $ref: '#/components/schemas/IncidentUpdateAttributes' + id: + description: The incident's ID. + example: 00000000-0000-0000-4567-000000000000 + type: string + relationships: + $ref: '#/components/schemas/IncidentUpdateRelationships' + type: + $ref: '#/components/schemas/IncidentType' + required: + - id + - type + type: object + IncidentUpdateRelationships: + description: The incident's relationships for an update request. + properties: + commander_user: + $ref: '#/components/schemas/NullableRelationshipToUser' + integrations: + $ref: '#/components/schemas/RelationshipToIncidentIntegrationMetadatas' + postmortem: + $ref: '#/components/schemas/RelationshipToIncidentPostmortem' + type: object + IncidentUpdateRequest: + description: Update request for an incident. + properties: + data: + $ref: '#/components/schemas/IncidentUpdateData' + required: + - data + type: object + IncidentUserDefinedFieldType: + description: The incident user defined fields type. + enum: + - user_defined_field + example: user_defined_field + type: string + x-enum-varnames: + - USER_DEFINED_FIELD + IncidentsResponse: + description: Response with a list of incidents. + properties: + data: + description: An array of incidents. + example: + - attributes: + created: '2020-04-21T15:34:08.627205+00:00' + creation_idempotency_key: null + customer_impact_duration: 0 + customer_impact_end: null + customer_impact_scope: null + customer_impact_start: null + customer_impacted: false + detected: '2020-04-14T00:00:00+00:00' + modified: '2020-09-17T14:16:58.696424+00:00' + public_id: 1 + resolved: null + severity: SEV-1 + time_to_detect: 0 + time_to_internal_response: 0 + time_to_repair: 0 + time_to_resolve: 0 + title: Example Incident + id: 00000000-aaaa-0000-0000-000000000000 + relationships: + attachments: + data: + - id: 00000000-9999-0000-0000-000000000000 + type: incident_attachments + - id: 00000000-1234-0000-0000-000000000000 + type: incident_attachments + commander_user: + data: + id: 00000000-0000-0000-cccc-000000000000 + type: users + created_by_user: + data: + id: 00000000-0000-0000-cccc-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-4444-000000000000 + type: incident_integrations + - id: 00000000-0000-0000-5555-000000000000 + type: incident_integrations + last_modified_by_user: + data: + id: 00000000-0000-0000-cccc-000000000000 + type: users + type: incidents + - attributes: + created: '2020-04-21T15:34:08.627205+00:00' + creation_idempotency_key: null + customer_impact_duration: 0 + customer_impact_end: null + customer_impact_scope: null + customer_impact_start: null + customer_impacted: false + detected: '2020-04-14T00:00:00+00:00' + modified: '2020-09-17T14:16:58.696424+00:00' + public_id: 2 + resolved: null + severity: SEV-5 + time_to_detect: 0 + time_to_internal_response: 0 + time_to_repair: 0 + time_to_resolve: 0 + title: Example Incident 2 + id: 00000000-1111-0000-0000-000000000000 + relationships: + attachments: + data: + - id: 00000000-9999-0000-0000-000000000000 + type: incident_attachments + commander_user: + data: + id: 00000000-aaaa-0000-0000-000000000000 + type: users + created_by_user: + data: + id: 00000000-aaaa-0000-0000-000000000000 + type: users + integrations: + data: + - id: 00000000-0000-0000-0001-000000000000 + type: incident_integrations + - id: 00000000-0000-0000-0002-000000000000 + type: incident_integrations + last_modified_by_user: + data: + id: 00000000-aaaa-0000-0000-000000000000 + type: users + type: incidents + items: + $ref: '#/components/schemas/IncidentResponseData' + type: array + included: + description: Included related resources that the user requested. + items: + $ref: '#/components/schemas/IncidentResponseIncludedItem' + readOnly: true + type: array + meta: + $ref: '#/components/schemas/IncidentResponseMeta' + required: + - data + type: object + IntakePayloadAccepted: + description: The payload accepted for intake. + properties: + errors: + description: A list of errors. + items: + description: An empty error list. + type: string + type: array + type: object + JSONAPIErrorItem: + description: API error response body + properties: + detail: + description: A human-readable explanation specific to this occurrence of + the error. + example: Missing required attribute in body + type: string + status: + description: Status code of the response. + example: '400' + type: string + title: + description: Short human-readable summary of the error. + example: Bad Request + type: string + type: object + JSONAPIErrorResponse: + description: API error response. + properties: + errors: + description: A list of errors. + items: + $ref: '#/components/schemas/JSONAPIErrorItem' + type: array + required: + - errors + type: object + JiraIntegrationMetadata: + description: Incident integration metadata for the Jira integration. + properties: + issues: + description: Array of Jira issues in this integration metadata. + example: [] + items: + $ref: '#/components/schemas/JiraIntegrationMetadataIssuesItem' + type: array + required: + - issues + type: object + JiraIntegrationMetadataIssuesItem: + description: Item in the Jira integration metadata issue array. + properties: + account: + description: URL of issue's Jira account. + example: https://example.atlassian.net + type: string + issue_key: + description: Jira issue's issue key. + example: PROJ-123 + type: string + issuetype_id: + description: Jira issue's issue type. + example: '1000' + type: string + project_key: + description: Jira issue's project keys. + example: PROJ + type: string + redirect_url: + description: URL redirecting to the Jira issue. + example: https://example.atlassian.net/browse/PROJ-123 + type: string + required: + - project_key + - account + type: object + ListApplicationKeysResponse: + description: Response for a list of application keys. + properties: + data: + description: Array of application keys. + items: + $ref: '#/components/schemas/PartialApplicationKey' + type: array + included: + description: Array of objects related to the application key. + items: + $ref: '#/components/schemas/ApplicationKeyResponseIncludedItem' + type: array + meta: + $ref: '#/components/schemas/ApplicationKeyResponseMeta' + type: object + ListDowntimesResponse: + description: Response for retrieving all downtimes. + properties: + data: + description: An array of downtimes. + items: + $ref: '#/components/schemas/DowntimeResponseData' + type: array + included: + description: Array of objects related to the downtimes. + items: + $ref: '#/components/schemas/DowntimeResponseIncludedItem' + type: array + meta: + $ref: '#/components/schemas/DowntimeMeta' + type: object + ListFindingsData: + description: Array of findings. + items: + $ref: '#/components/schemas/Finding' + type: array + ListFindingsMeta: + additionalProperties: false + description: Metadata for pagination. + properties: + page: + $ref: '#/components/schemas/ListFindingsPage' + snapshot_timestamp: + description: The point in time corresponding to the listed findings. + example: 1678721573794 + format: int64 + minimum: 1 + type: integer + type: object + ListFindingsPage: + additionalProperties: false + description: Pagination and findings count information. + properties: + cursor: + description: The cursor used to paginate requests. + example: eyJhZnRlciI6IkFRQUFBWWJiaEJXQS1OY1dqUUFBQUFCQldXSmlhRUpYUVVGQlJFSktkbTlDTUdaWFRVbDNRVUUiLCJ2YWx1ZXMiOlsiY3JpdGljYWwiXX0= + type: string + total_filtered_count: + description: The total count of findings after the filter has been applied. + example: 213 + format: int64 + type: integer + type: object + ListFindingsResponse: + description: The expected response schema when listing findings. + properties: + data: + $ref: '#/components/schemas/ListFindingsData' + meta: + $ref: '#/components/schemas/ListFindingsMeta' + required: + - data + - meta + type: object + ListPowerpacksResponse: + description: Response object which includes all powerpack configurations. + properties: + data: + description: List of powerpack definitions. + items: + $ref: '#/components/schemas/PowerpackData' + type: array + included: + description: Array of objects related to the users. + items: + $ref: '#/components/schemas/User' + type: array + links: + $ref: '#/components/schemas/PowerpackResponseLinks' + meta: + $ref: '#/components/schemas/PowerpacksResponseMeta' + type: object + ListRulesResponse: + description: Scorecard rules response. + properties: + data: + $ref: '#/components/schemas/ListRulesResponseData' + links: + $ref: '#/components/schemas/ListRulesResponseLinks' + type: object + ListRulesResponseData: + description: Array of rule details. + items: + $ref: '#/components/schemas/ListRulesResponseDataItem' + type: array + ListRulesResponseDataItem: + description: Rule details. + properties: + attributes: + $ref: '#/components/schemas/RuleAttributes' + id: + $ref: '#/components/schemas/RuleId' + relationships: + $ref: '#/components/schemas/RelationshipToRule' + type: + $ref: '#/components/schemas/RuleType' + type: object + ListRulesResponseLinks: + description: Links attributes. + properties: + next: + description: Link for the next set of rules. + example: /api/v2/scorecard/rules?page%5Blimit%5D=2&page%5Boffset%5D=2&page%5Bsize%5D=2 + type: string + type: object + ListTeamsInclude: + description: Included related resources optionally requested. + enum: + - team_links + - user_team_permissions + type: string + x-enum-varnames: + - TEAM_LINKS + - USER_TEAM_PERMISSIONS + ListTeamsSort: + description: Specifies the order of the returned teams + enum: + - name + - -name + - user_count + - -user_count + type: string + x-enum-varnames: + - NAME + - _NAME + - USER_COUNT + - _USER_COUNT + Log: + description: Object description of a log after being processed and stored by + Datadog. + properties: + attributes: + $ref: '#/components/schemas/LogAttributes' + id: + description: Unique ID of the Log. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: '#/components/schemas/LogType' + type: object + LogAttributes: + description: JSON object containing all log attributes and their associated + values. + properties: + attributes: + additionalProperties: {} + description: JSON object of attributes from your log. + example: + customAttribute: 123 + duration: 2345 + type: object + host: + description: Name of the machine from where the logs are being sent. + example: i-0123 + type: string + message: + description: 'The message [reserved attribute](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes) + + of your log. By default, Datadog ingests the value of the message attribute + as the body of the log entry. + + That value is then highlighted and displayed in the Logstream, where it + is indexed for full text search.' + example: Host connected to remote + type: string + service: + description: 'The name of the application or service generating the log + events. + + It is used to switch from Logs to APM, so make sure you define the same + + value when you use both products.' + example: agent + type: string + status: + description: Status of the message associated with your log. + example: INFO + type: string + tags: + description: Array of tags associated with your log. + example: + - team:A + items: + description: Tag associated with your log. + type: string + type: array + timestamp: + description: Timestamp of your log. + example: '2019-01-02T09:42:36.320Z' + format: date-time + type: string + type: object + LogType: + default: log + description: Type of the event. + enum: + - log + example: log + type: string + x-enum-varnames: + - LOG + LogsAggregateBucket: + description: A bucket values + properties: + by: + additionalProperties: + description: The values for each group by + description: The key, value pairs for each group by + example: + '@state': success + '@version': abc + type: object + computes: + additionalProperties: + $ref: '#/components/schemas/LogsAggregateBucketValue' + description: A map of the metric name -> value for regular compute or list + of values for a timeseries + type: object + type: object + LogsAggregateBucketValue: + description: A bucket value, can be either a timeseries or a single value + oneOf: + - $ref: '#/components/schemas/LogsAggregateBucketValueSingleString' + - $ref: '#/components/schemas/LogsAggregateBucketValueSingleNumber' + - $ref: '#/components/schemas/LogsAggregateBucketValueTimeseries' + LogsAggregateBucketValueSingleNumber: + description: A single number value + format: double + type: number + LogsAggregateBucketValueSingleString: + description: A single string value + type: string + LogsAggregateBucketValueTimeseries: + description: A timeseries array + items: + $ref: '#/components/schemas/LogsAggregateBucketValueTimeseriesPoint' + type: array + x-generate-alias-as-model: true + LogsAggregateBucketValueTimeseriesPoint: + description: A timeseries point + properties: + time: + description: The time value for this point + example: '2020-06-08T11:55:00Z' + type: string + value: + description: The value for this point + example: 19 + format: double + type: number + type: object + LogsAggregateRequest: + description: The object sent with the request to retrieve a list of logs from + your organization. + properties: + compute: + description: The list of metrics or timeseries to compute for the retrieved + buckets. + items: + $ref: '#/components/schemas/LogsCompute' + type: array + filter: + $ref: '#/components/schemas/LogsQueryFilter' + group_by: + description: The rules for the group by + items: + $ref: '#/components/schemas/LogsGroupBy' + type: array + options: + $ref: '#/components/schemas/LogsQueryOptions' + page: + $ref: '#/components/schemas/LogsAggregateRequestPage' + type: object + LogsAggregateRequestPage: + description: Paging settings + properties: + cursor: + description: 'The returned paging point to use to get the next results. + Note: at most 1000 results can be paged.' + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + LogsAggregateResponse: + description: The response object for the logs aggregate API endpoint + properties: + data: + $ref: '#/components/schemas/LogsAggregateResponseData' + meta: + $ref: '#/components/schemas/LogsResponseMetadata' + type: object + LogsAggregateResponseData: + description: The query results + properties: + buckets: + description: The list of matching buckets, one item per bucket + items: + $ref: '#/components/schemas/LogsAggregateBucket' + type: array + type: object + LogsAggregateResponseStatus: + description: The status of the response + enum: + - done + - timeout + example: done + type: string + x-enum-varnames: + - DONE + - TIMEOUT + LogsAggregateSort: + description: A sort rule + example: + aggregation: count + order: asc + properties: + aggregation: + $ref: '#/components/schemas/LogsAggregationFunction' + metric: + description: The metric to sort by (only used for `type=measure`) + example: '@duration' + type: string + order: + $ref: '#/components/schemas/LogsSortOrder' + type: + $ref: '#/components/schemas/LogsAggregateSortType' + type: object + LogsAggregateSortType: + default: alphabetical + description: The type of sorting algorithm + enum: + - alphabetical + - measure + type: string + x-enum-varnames: + - ALPHABETICAL + - MEASURE + LogsAggregationFunction: + description: An aggregation function + enum: + - count + - cardinality + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + - median + example: pc90 + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - PERCENTILE_75 + - PERCENTILE_90 + - PERCENTILE_95 + - PERCENTILE_98 + - PERCENTILE_99 + - SUM + - MIN + - MAX + - AVG + - MEDIAN + LogsArchive: + description: The logs archive. + properties: + data: + $ref: '#/components/schemas/LogsArchiveDefinition' + type: object + LogsArchiveAttributes: + description: The attributes associated with the archive. + properties: + destination: + $ref: '#/components/schemas/LogsArchiveDestination' + include_tags: + default: false + description: 'To store the tags in the archive, set the value "true". + + If it is set to "false", the tags will be deleted when the logs are sent + to the archive.' + example: false + type: boolean + name: + description: The archive name. + example: Nginx Archive + type: string + query: + description: The archive query/filter. Logs matching this query are included + in the archive. + example: source:nginx + type: string + rehydration_max_scan_size_in_gb: + description: Maximum scan size for rehydration from this archive. + example: 100 + format: int64 + nullable: true + type: integer + rehydration_tags: + description: An array of tags to add to rehydrated logs from an archive. + example: + - team:intake + - team:app + items: + description: A given tag in the `:` format. + type: string + type: array + state: + $ref: '#/components/schemas/LogsArchiveState' + required: + - name + - query + - destination + type: object + LogsArchiveCreateRequest: + description: The logs archive. + properties: + data: + $ref: '#/components/schemas/LogsArchiveCreateRequestDefinition' + type: object + LogsArchiveCreateRequestAttributes: + description: The attributes associated with the archive. + properties: + destination: + $ref: '#/components/schemas/LogsArchiveCreateRequestDestination' + include_tags: + default: false + description: 'To store the tags in the archive, set the value "true". + + If it is set to "false", the tags will be deleted when the logs are sent + to the archive.' + example: false + type: boolean + name: + description: The archive name. + example: Nginx Archive + type: string + query: + description: The archive query/filter. Logs matching this query are included + in the archive. + example: source:nginx + type: string + rehydration_max_scan_size_in_gb: + description: Maximum scan size for rehydration from this archive. + example: 100 + format: int64 + nullable: true + type: integer + rehydration_tags: + description: An array of tags to add to rehydrated logs from an archive. + example: + - team:intake + - team:app + items: + description: A given tag in the `:` format. + type: string + type: array + required: + - name + - query + - destination + type: object + LogsArchiveCreateRequestDefinition: + description: The definition of an archive. + properties: + attributes: + $ref: '#/components/schemas/LogsArchiveCreateRequestAttributes' + type: + default: archives + description: The type of the resource. The value should always be archives. + example: archives + type: string + required: + - type + type: object + LogsArchiveCreateRequestDestination: + description: An archive's destination. + oneOf: + - $ref: '#/components/schemas/LogsArchiveDestinationAzure' + - $ref: '#/components/schemas/LogsArchiveDestinationGCS' + - $ref: '#/components/schemas/LogsArchiveDestinationS3' + required: + - type + - integration + LogsArchiveDefinition: + description: The definition of an archive. + properties: + attributes: + $ref: '#/components/schemas/LogsArchiveAttributes' + id: + description: The archive ID. + example: a2zcMylnM4OCHpYusxIi3g + readOnly: true + type: string + type: + default: archives + description: The type of the resource. The value should always be archives. + example: archives + readOnly: true + type: string + required: + - type + type: object + LogsArchiveDestination: + description: An archive's destination. + nullable: true + oneOf: + - $ref: '#/components/schemas/LogsArchiveDestinationAzure' + - $ref: '#/components/schemas/LogsArchiveDestinationGCS' + - $ref: '#/components/schemas/LogsArchiveDestinationS3' + required: + - type + - integration + LogsArchiveDestinationAzure: + description: The Azure archive destination. + properties: + container: + description: The container where the archive will be stored. + example: container-name + type: string + integration: + $ref: '#/components/schemas/LogsArchiveIntegrationAzure' + path: + description: The archive path. + type: string + region: + description: The region where the archive will be stored. + type: string + storage_account: + description: The associated storage account. + example: account-name + type: string + type: + $ref: '#/components/schemas/LogsArchiveDestinationAzureType' + required: + - storage_account + - container + - integration + - type + type: object + LogsArchiveDestinationAzureType: + default: azure + description: Type of the Azure archive destination. + enum: + - azure + example: azure + type: string + x-enum-varnames: + - AZURE + LogsArchiveDestinationGCS: + description: The GCS archive destination. + properties: + bucket: + description: The bucket where the archive will be stored. + example: bucket-name + type: string + integration: + $ref: '#/components/schemas/LogsArchiveIntegrationGCS' + path: + description: The archive path. + type: string + type: + $ref: '#/components/schemas/LogsArchiveDestinationGCSType' + required: + - bucket + - integration + - type + type: object + LogsArchiveDestinationGCSType: + default: gcs + description: Type of the GCS archive destination. + enum: + - gcs + example: gcs + type: string + x-enum-varnames: + - GCS + LogsArchiveDestinationS3: + description: The S3 archive destination. + properties: + bucket: + description: The bucket where the archive will be stored. + example: bucket-name + type: string + integration: + $ref: '#/components/schemas/LogsArchiveIntegrationS3' + path: + description: The archive path. + type: string + type: + $ref: '#/components/schemas/LogsArchiveDestinationS3Type' + required: + - bucket + - integration + - type + type: object + LogsArchiveDestinationS3Type: + default: s3 + description: Type of the S3 archive destination. + enum: + - s3 + example: s3 + type: string + x-enum-varnames: + - S3 + LogsArchiveIntegrationAzure: + description: The Azure archive's integration destination. + properties: + client_id: + description: A client ID. + example: aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa + type: string + tenant_id: + description: A tenant ID. + example: aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa + type: string + required: + - tenant_id + - client_id + type: object + LogsArchiveIntegrationGCS: + description: The GCS archive's integration destination. + properties: + client_email: + description: A client email. + example: youremail@example.com + type: string + project_id: + description: A project ID. + example: project-id + type: string + required: + - project_id + - client_email + type: object + LogsArchiveIntegrationS3: + description: The S3 Archive's integration destination. + properties: + account_id: + description: The account ID for the integration. + example: '123456789012' + type: string + role_name: + description: The path of the integration. + example: role-name + type: string + required: + - role_name + - account_id + type: object + LogsArchiveOrder: + description: A ordered list of archive IDs. + properties: + data: + $ref: '#/components/schemas/LogsArchiveOrderDefinition' + type: object + LogsArchiveOrderAttributes: + description: The attributes associated with the archive order. + properties: + archive_ids: + description: 'An ordered array of `` strings, the order of archive + IDs in the array + + define the overall archives order for Datadog.' + example: + - a2zcMylnM4OCHpYusxIi1g + - a2zcMylnM4OCHpYusxIi2g + - a2zcMylnM4OCHpYusxIi3g + items: + description: A given archive ID. + type: string + type: array + required: + - archive_ids + type: object + LogsArchiveOrderDefinition: + description: The definition of an archive order. + properties: + attributes: + $ref: '#/components/schemas/LogsArchiveOrderAttributes' + type: + $ref: '#/components/schemas/LogsArchiveOrderDefinitionType' + required: + - type + - attributes + type: object + LogsArchiveOrderDefinitionType: + default: archive_order + description: Type of the archive order definition. + enum: + - archive_order + example: archive_order + type: string + x-enum-varnames: + - ARCHIVE_ORDER + LogsArchiveState: + description: The state of the archive. + enum: + - UNKNOWN + - WORKING + - FAILING + - WORKING_AUTH_LEGACY + example: WORKING + type: string + x-enum-varnames: + - UNKNOWN + - WORKING + - FAILING + - WORKING_AUTH_LEGACY + LogsArchives: + description: The available archives. + properties: + data: + description: A list of archives. + items: + $ref: '#/components/schemas/LogsArchiveDefinition' + type: array + type: object + LogsCompute: + description: A compute rule to compute metrics or timeseries + properties: + aggregation: + $ref: '#/components/schemas/LogsAggregationFunction' + interval: + description: 'The time buckets'' size (only used for type=timeseries) + + Defaults to a resolution of 150 points' + example: 5m + type: string + metric: + description: The metric to use + example: '@duration' + type: string + type: + $ref: '#/components/schemas/LogsComputeType' + required: + - aggregation + type: object + LogsComputeType: + default: total + description: The type of compute + enum: + - timeseries + - total + type: string + x-enum-varnames: + - TIMESERIES + - TOTAL + LogsGroupBy: + description: A group by rule + properties: + facet: + description: The name of the facet to use (required) + example: host + type: string + histogram: + $ref: '#/components/schemas/LogsGroupByHistogram' + limit: + default: 10 + description: 'The maximum buckets to return for this group by. Note: at + most 10000 buckets are allowed. + + If grouping by multiple facets, the product of limits must not exceed + 10000.' + format: int64 + type: integer + missing: + $ref: '#/components/schemas/LogsGroupByMissing' + sort: + $ref: '#/components/schemas/LogsAggregateSort' + total: + $ref: '#/components/schemas/LogsGroupByTotal' + required: + - facet + type: object + LogsGroupByHistogram: + description: 'Used to perform a histogram computation (only for measure facets). + + Note: at most 100 buckets are allowed, the number of buckets is (max - min)/interval.' + properties: + interval: + description: The bin size of the histogram buckets + example: 10 + format: double + type: number + max: + description: 'The maximum value for the measure used in the histogram + + (values greater than this one are filtered out)' + example: 100 + format: double + type: number + min: + description: 'The minimum value for the measure used in the histogram + + (values smaller than this one are filtered out)' + example: 50 + format: double + type: number + required: + - interval + - min + - max + type: object + LogsGroupByMissing: + description: The value to use for logs that don't have the facet used to group + by + oneOf: + - $ref: '#/components/schemas/LogsGroupByMissingString' + - $ref: '#/components/schemas/LogsGroupByMissingNumber' + LogsGroupByMissingNumber: + description: The missing value to use if there is a number valued facet. + format: double + type: number + LogsGroupByMissingString: + description: The missing value to use if there is string valued facet. + type: string + LogsGroupByTotal: + default: false + description: A resulting object to put the given computes in over all the matching + records. + oneOf: + - $ref: '#/components/schemas/LogsGroupByTotalBoolean' + - $ref: '#/components/schemas/LogsGroupByTotalString' + - $ref: '#/components/schemas/LogsGroupByTotalNumber' + LogsGroupByTotalBoolean: + description: If set to true, creates an additional bucket labeled "$facet_total" + type: boolean + LogsGroupByTotalNumber: + description: A number to use as the key value for the total bucket + format: double + type: number + LogsGroupByTotalString: + description: A string to use as the key value for the total bucket + type: string + LogsListRequest: + description: The request for a logs list. + properties: + filter: + $ref: '#/components/schemas/LogsQueryFilter' + options: + $ref: '#/components/schemas/LogsQueryOptions' + page: + $ref: '#/components/schemas/LogsListRequestPage' + sort: + $ref: '#/components/schemas/LogsSort' + type: object + LogsListRequestPage: + description: Paging attributes for listing logs. + properties: + cursor: + description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + limit: + default: 10 + description: Maximum number of logs in the response. + example: 25 + format: int32 + maximum: 1000 + type: integer + type: object + LogsListResponse: + description: Response object with all logs matching the request and pagination + information. + properties: + data: + description: Array of logs matching the request. + items: + $ref: '#/components/schemas/Log' + type: array + links: + $ref: '#/components/schemas/LogsListResponseLinks' + meta: + $ref: '#/components/schemas/LogsResponseMetadata' + type: object + LogsListResponseLinks: + description: Links attributes. + properties: + next: + description: 'Link for the next set of results. Note that the request can + also be made using the + + POST endpoint.' + example: https://app.datadoghq.com/api/v2/logs/event?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + LogsMetricCompute: + description: The compute rule to compute the log-based metric. + properties: + aggregation_type: + $ref: '#/components/schemas/LogsMetricComputeAggregationType' + include_percentiles: + $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles' + path: + description: The path to the value the log-based metric will aggregate on + (only used if the aggregation type is a "distribution"). + example: '@duration' + type: string + required: + - aggregation_type + type: object + LogsMetricComputeAggregationType: + description: The type of aggregation to use. + enum: + - count + - distribution + example: distribution + type: string + x-enum-varnames: + - COUNT + - DISTRIBUTION + LogsMetricComputeIncludePercentiles: + description: 'Toggle to include or exclude percentile aggregations for distribution + metrics. + + Only present when the `aggregation_type` is `distribution`.' + example: true + type: boolean + LogsMetricCreateAttributes: + description: The object describing the Datadog log-based metric to create. + properties: + compute: + $ref: '#/components/schemas/LogsMetricCompute' + filter: + $ref: '#/components/schemas/LogsMetricFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/LogsMetricGroupBy' + type: array + required: + - compute + type: object + LogsMetricCreateData: + description: The new log-based metric properties. + properties: + attributes: + $ref: '#/components/schemas/LogsMetricCreateAttributes' + id: + $ref: '#/components/schemas/LogsMetricID' + type: + $ref: '#/components/schemas/LogsMetricType' + required: + - id + - type + - attributes + type: object + LogsMetricCreateRequest: + description: The new log-based metric body. + properties: + data: + $ref: '#/components/schemas/LogsMetricCreateData' + required: + - data + type: object + LogsMetricFilter: + description: The log-based metric filter. Logs matching this filter will be + aggregated in this metric. + properties: + query: + default: '*' + description: The search query - following the log search syntax. + example: service:web* AND @http.status_code:[200 TO 299] + type: string + type: object + LogsMetricGroupBy: + description: A group by rule. + properties: + path: + description: The path to the value the log-based metric will be aggregated + over. + example: '@http.status_code' + type: string + tag_name: + description: Eventual name of the tag that gets created. By default, the + path attribute is used as the tag name. + example: status_code + type: string + required: + - path + type: object + LogsMetricID: + description: The name of the log-based metric. + example: logs.page.load.count + type: string + LogsMetricResponse: + description: The log-based metric object. + properties: + data: + $ref: '#/components/schemas/LogsMetricResponseData' + type: object + LogsMetricResponseAttributes: + description: The object describing a Datadog log-based metric. + properties: + compute: + $ref: '#/components/schemas/LogsMetricResponseCompute' + filter: + $ref: '#/components/schemas/LogsMetricResponseFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/LogsMetricResponseGroupBy' + type: array + type: object + LogsMetricResponseCompute: + description: The compute rule to compute the log-based metric. + properties: + aggregation_type: + $ref: '#/components/schemas/LogsMetricResponseComputeAggregationType' + include_percentiles: + $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles' + path: + description: The path to the value the log-based metric will aggregate on + (only used if the aggregation type is a "distribution"). + example: '@duration' + type: string + type: object + LogsMetricResponseComputeAggregationType: + description: The type of aggregation to use. + enum: + - count + - distribution + example: distribution + type: string + x-enum-varnames: + - COUNT + - DISTRIBUTION + LogsMetricResponseData: + description: The log-based metric properties. + properties: + attributes: + $ref: '#/components/schemas/LogsMetricResponseAttributes' + id: + $ref: '#/components/schemas/LogsMetricID' + type: + $ref: '#/components/schemas/LogsMetricType' + type: object + LogsMetricResponseFilter: + description: The log-based metric filter. Logs matching this filter will be + aggregated in this metric. + properties: + query: + description: The search query - following the log search syntax. + example: service:web* AND @http.status_code:[200 TO 299] + type: string + type: object + LogsMetricResponseGroupBy: + description: A group by rule. + properties: + path: + description: The path to the value the log-based metric will be aggregated + over. + example: '@http.status_code' + type: string + tag_name: + description: Eventual name of the tag that gets created. By default, the + path attribute is used as the tag name. + example: status_code + type: string + type: object + LogsMetricType: + default: logs_metrics + description: The type of the resource. The value should always be logs_metrics. + enum: + - logs_metrics + example: logs_metrics + type: string + x-enum-varnames: + - LOGS_METRICS + LogsMetricUpdateAttributes: + description: The log-based metric properties that will be updated. + properties: + compute: + $ref: '#/components/schemas/LogsMetricUpdateCompute' + filter: + $ref: '#/components/schemas/LogsMetricFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/LogsMetricGroupBy' + type: array + type: object + LogsMetricUpdateCompute: + description: The compute rule to compute the log-based metric. + properties: + include_percentiles: + $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles' + type: object + LogsMetricUpdateData: + description: The new log-based metric properties. + properties: + attributes: + $ref: '#/components/schemas/LogsMetricUpdateAttributes' + type: + $ref: '#/components/schemas/LogsMetricType' + required: + - type + - attributes + type: object + LogsMetricUpdateRequest: + description: The new log-based metric body. + properties: + data: + $ref: '#/components/schemas/LogsMetricUpdateData' + required: + - data + type: object + LogsMetricsResponse: + description: All the available log-based metric objects. + properties: + data: + description: A list of log-based metric objects. + items: + $ref: '#/components/schemas/LogsMetricResponseData' + type: array + type: object + LogsQueryFilter: + description: The search and filter query settings + properties: + from: + default: now-15m + description: The minimum time for the requested logs, supports date math + and regular timestamps (milliseconds). + example: now-15m + type: string + indexes: + default: + - '*' + description: For customers with multiple indexes, the indexes to search. + Defaults to ['*'] which means all indexes. + example: + - main + - web + items: + description: The name of a log index. + type: string + type: array + query: + default: '*' + description: The search query - following the log search syntax. + example: service:web* AND @http.status_code:[200 TO 299] + type: string + storage_tier: + $ref: '#/components/schemas/LogsStorageTier' + to: + default: now + description: The maximum time for the requested logs, supports date math + and regular timestamps (milliseconds). + example: now + type: string + type: object + LogsQueryOptions: + description: 'Global query options that are used during the query. + + Note: you should supply either timezone or time offset, but not both. Otherwise, + the query will fail.' + properties: + timeOffset: + description: The time offset (in seconds) to apply to the query. + format: int64 + type: integer + timezone: + default: UTC + description: The timezone can be specified as GMT, UTC, an offset from UTC + (like UTC+1), or as a Timezone Database identifier (like America/New_York). + example: GMT + type: string + type: object + LogsResponseMetadata: + description: The metadata associated with a request + properties: + elapsed: + description: The time elapsed in milliseconds + example: 132 + format: int64 + type: integer + page: + $ref: '#/components/schemas/LogsResponseMetadataPage' + request_id: + description: The identifier of the request + example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR + type: string + status: + $ref: '#/components/schemas/LogsAggregateResponseStatus' + warnings: + description: 'A list of warnings (non fatal errors) encountered, partial + results might be returned if + + warnings are present in the response.' + items: + $ref: '#/components/schemas/LogsWarning' + type: array + type: object + LogsResponseMetadataPage: + description: Paging attributes. + properties: + after: + description: 'The cursor to use to get the next results, if any. To make + the next request, use the same + + parameters with the addition of the `page[cursor]`.' + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + LogsSort: + description: Sort parameters when querying logs. + enum: + - timestamp + - -timestamp + type: string + x-enum-varnames: + - TIMESTAMP_ASCENDING + - TIMESTAMP_DESCENDING + LogsSortOrder: + description: The order to use, ascending or descending + enum: + - asc + - desc + example: asc + type: string + x-enum-varnames: + - ASCENDING + - DESCENDING + LogsStorageTier: + default: indexes + description: Specifies storage type as indexes or online-archives + enum: + - indexes + - online-archives + example: indexes + type: string + x-enum-varnames: + - INDEXES + - ONLINE_ARCHIVES + LogsWarning: + description: A warning message indicating something that went wrong with the + query + properties: + code: + description: A unique code for this type of warning + example: unknown_index + type: string + detail: + description: A detailed explanation of this specific warning + example: 'indexes: foo, bar' + type: string + title: + description: A short human-readable summary of the warning + example: One or several indexes are missing or invalid, results hold data + from the other indexes + type: string + type: object + Metric: + description: Object for a single metric tag configuration. + example: + id: metric.foo.bar + type: metrics + properties: + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricType' + type: object + MetricActiveConfigurationType: + default: actively_queried_configurations + description: The metric actively queried configuration resource type. + enum: + - actively_queried_configurations + example: actively_queried_configurations + type: string + x-enum-varnames: + - ACTIVELY_QUERIED_CONFIGURATIONS + MetricAllTags: + description: Object for a single metric's indexed tags. + properties: + attributes: + $ref: '#/components/schemas/MetricAllTagsAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricType' + type: object + MetricAllTagsAttributes: + description: Object containing the definition of a metric's tags. + properties: + tags: + description: List of indexed tag value pairs. + example: + - sport:golf + - sport:football + - animal:dog + items: + description: Tag key-value pairs. + type: string + type: array + type: object + MetricAllTagsResponse: + description: Response object that includes a single metric's indexed tags. + properties: + data: + $ref: '#/components/schemas/MetricAllTags' + readOnly: true + type: object + MetricBulkConfigureTagsType: + default: metric_bulk_configure_tags + description: The metric bulk configure tags resource. + enum: + - metric_bulk_configure_tags + example: metric_bulk_configure_tags + type: string + x-enum-varnames: + - BULK_MANAGE_TAGS + MetricBulkTagConfigCreate: + description: Request object to bulk configure tags for metrics matching the + given prefix. + properties: + attributes: + $ref: '#/components/schemas/MetricBulkTagConfigCreateAttributes' + id: + $ref: '#/components/schemas/MetricBulkTagConfigNamePrefix' + type: + $ref: '#/components/schemas/MetricBulkConfigureTagsType' + required: + - id + - type + type: object + MetricBulkTagConfigCreateAttributes: + description: Optional parameters for bulk creating metric tag configurations. + properties: + emails: + $ref: '#/components/schemas/MetricBulkTagConfigEmailList' + exclude_tags_mode: + description: 'When set to true, the configuration will exclude the configured + tags and include any other submitted tags. + + When set to false, the configuration will include the configured tags + and exclude any other submitted tags. + + Defaults to false.' + type: boolean + tags: + $ref: '#/components/schemas/MetricBulkTagConfigTagNameList' + type: object + MetricBulkTagConfigCreateRequest: + description: Wrapper object for a single bulk tag configuration request. + properties: + data: + $ref: '#/components/schemas/MetricBulkTagConfigCreate' + required: + - data + type: object + MetricBulkTagConfigDelete: + description: Request object to bulk delete all tag configurations for metrics + matching the given prefix. + properties: + attributes: + $ref: '#/components/schemas/MetricBulkTagConfigDeleteAttributes' + id: + $ref: '#/components/schemas/MetricBulkTagConfigNamePrefix' + type: + $ref: '#/components/schemas/MetricBulkConfigureTagsType' + required: + - id + - type + type: object + MetricBulkTagConfigDeleteAttributes: + description: Optional parameters for bulk deleting metric tag configurations. + properties: + emails: + $ref: '#/components/schemas/MetricBulkTagConfigEmailList' + type: object + MetricBulkTagConfigDeleteRequest: + description: Wrapper object for a single bulk tag deletion request. + properties: + data: + $ref: '#/components/schemas/MetricBulkTagConfigDelete' + required: + - data + type: object + MetricBulkTagConfigEmailList: + description: A list of account emails to notify when the configuration is applied. + example: + - sue@example.com + - bob@example.com + items: + description: An email address. + format: email + type: string + type: array + MetricBulkTagConfigNamePrefix: + description: A text prefix to match against metric names. + example: kafka.lag + type: string + MetricBulkTagConfigResponse: + description: Wrapper for a single bulk tag configuration status response. + properties: + data: + $ref: '#/components/schemas/MetricBulkTagConfigStatus' + type: object + MetricBulkTagConfigStatus: + description: 'The status of a request to bulk configure metric tags. + + It contains the fields from the original request for reference.' + properties: + attributes: + $ref: '#/components/schemas/MetricBulkTagConfigStatusAttributes' + id: + $ref: '#/components/schemas/MetricBulkTagConfigNamePrefix' + type: + $ref: '#/components/schemas/MetricBulkConfigureTagsType' + required: + - id + - type + type: object + MetricBulkTagConfigStatusAttributes: + description: Optional attributes for the status of a bulk tag configuration + request. + properties: + emails: + $ref: '#/components/schemas/MetricBulkTagConfigEmailList' + exclude_tags_mode: + description: 'When set to true, the configuration will exclude the configured + tags and include any other submitted tags. + + When set to false, the configuration will include the configured tags + and exclude any other submitted tags.' + type: boolean + status: + description: The status of the request. + example: Accepted + type: string + tags: + $ref: '#/components/schemas/MetricBulkTagConfigTagNameList' + type: object + MetricBulkTagConfigTagNameList: + description: A list of tag names to apply to the configuration. + example: + - host + - pod_name + - is_shadow + items: + description: A metric tag name. + maxLength: 200 + pattern: ^[A-Za-z][A-Za-z0-9\.\-\_:\/]*$ + type: string + type: array + MetricContentEncoding: + default: deflate + description: HTTP header used to compress the media-type. + enum: + - deflate + - zstd1 + - gzip + example: deflate + type: string + x-enum-varnames: + - DEFLATE + - ZSTD1 + - GZIP + MetricCustomAggregation: + description: A time and space aggregation combination for use in query. + example: + space: sum + time: sum + properties: + space: + $ref: '#/components/schemas/MetricCustomSpaceAggregation' + time: + $ref: '#/components/schemas/MetricCustomTimeAggregation' + required: + - time + - space + type: object + MetricCustomAggregations: + description: 'A list of queryable aggregation combinations for a count, rate, + or gauge metric. + + By default, count and rate metrics require the (time: sum, space: sum) aggregation + and + + Gauge metrics require the (time: avg, space: avg) aggregation. + + Additional time & space combinations are also available: + + + - time: avg, space: avg + + - time: avg, space: max + + - time: avg, space: min + + - time: avg, space: sum + + - time: count, space: sum + + - time: max, space: max + + - time: min, space: min + + - time: sum, space: avg + + - time: sum, space: sum + + + Can only be applied to metrics that have a `metric_type` of `count`, `rate`, + or `gauge`.' + example: + - space: sum + time: sum + - space: sum + time: count + items: + $ref: '#/components/schemas/MetricCustomAggregation' + type: array + MetricCustomSpaceAggregation: + description: A space aggregation for use in query. + enum: + - avg + - max + - min + - sum + example: sum + type: string + x-enum-varnames: + - AVG + - MAX + - MIN + - SUM + MetricCustomTimeAggregation: + description: A time aggregation for use in query. + enum: + - avg + - count + - max + - min + - sum + example: sum + type: string + x-enum-varnames: + - AVG + - COUNT + - MAX + - MIN + - SUM + MetricDistinctVolume: + description: Object for a single metric's distinct volume. + properties: + attributes: + $ref: '#/components/schemas/MetricDistinctVolumeAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricDistinctVolumeType' + type: object + MetricDistinctVolumeAttributes: + description: Object containing the definition of a metric's distinct volume. + properties: + distinct_volume: + description: Distinct volume for the given metric. + example: 10 + format: int64 + type: integer + type: object + MetricDistinctVolumeType: + default: distinct_metric_volumes + description: The metric distinct volume type. + enum: + - distinct_metric_volumes + example: distinct_metric_volumes + type: string + x-enum-varnames: + - DISTINCT_METRIC_VOLUMES + MetricEstimate: + description: Object for a metric cardinality estimate. + properties: + attributes: + $ref: '#/components/schemas/MetricEstimateAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricEstimateResourceType' + type: object + MetricEstimateAttributes: + description: Object containing the definition of a metric estimate attribute. + properties: + estimate_type: + $ref: '#/components/schemas/MetricEstimateType' + estimated_at: + description: Timestamp when the cardinality estimate was requested. + example: '2022-04-27T09:48:37.463835Z' + format: date-time + type: string + estimated_output_series: + description: Estimated cardinality of the metric based on the queried configuration. + example: 50 + format: int64 + type: integer + type: object + MetricEstimateResourceType: + default: metric_cardinality_estimate + description: The metric estimate resource type. + enum: + - metric_cardinality_estimate + example: metric_cardinality_estimate + type: string + x-enum-varnames: + - METRIC_CARDINALITY_ESTIMATE + MetricEstimateResponse: + description: Response object that includes metric cardinality estimates. + properties: + data: + $ref: '#/components/schemas/MetricEstimate' + type: object + MetricEstimateType: + default: count_or_gauge + description: Estimate type based on the queried configuration. By default, `count_or_gauge` + is returned. `distribution` is returned for distribution metrics without percentiles + enabled. Lastly, `percentile` is returned if `filter[pct]=true` is queried + with a distribution metric. + enum: + - count_or_gauge + - distribution + - percentile + example: distribution + type: string + x-enum-varnames: + - COUNT_OR_GAUGE + - DISTRIBUTION + - PERCENTILE + MetricIngestedIndexedVolume: + description: Object for a single metric's ingested and indexed volume. + properties: + attributes: + $ref: '#/components/schemas/MetricIngestedIndexedVolumeAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricIngestedIndexedVolumeType' + type: object + MetricIngestedIndexedVolumeAttributes: + description: Object containing the definition of a metric's ingested and indexed + volume. + properties: + indexed_volume: + description: Indexed volume for the given metric. + example: 10 + format: int64 + type: integer + ingested_volume: + description: Ingested volume for the given metric. + example: 20 + format: int64 + type: integer + type: object + MetricIngestedIndexedVolumeType: + default: metric_volumes + description: The metric ingested and indexed volume type. + enum: + - metric_volumes + example: metric_volumes + type: string + x-enum-varnames: + - METRIC_VOLUMES + MetricIntakeType: + description: The type of metric. The available types are `0` (unspecified), + `1` (count), `2` (rate), and `3` (gauge). + enum: + - 0 + - 1 + - 2 + - 3 + format: int32 + type: integer + x-enum-varnames: + - UNSPECIFIED + - COUNT + - RATE + - GAUGE + MetricMetadata: + description: Metadata for the metric. + properties: + origin: + $ref: '#/components/schemas/MetricOrigin' + type: object + MetricName: + description: The metric name for this resource. + example: test.metric.latency + type: string + MetricOrigin: + description: Metric origin information. + properties: + metric_type: + default: 0 + description: The origin metric type code + format: int32 + maximum: 1000 + type: integer + product: + default: 0 + description: The origin product code + format: int32 + maximum: 1000 + type: integer + service: + default: 0 + description: The origin service code + format: int32 + maximum: 1000 + type: integer + type: object + MetricPayload: + description: The metrics' payload. + properties: + series: + description: A list of time series to submit to Datadog. + example: + - metric: system.load.1 + points: + - timestamp: 1475317847 + value: 0.7 + resources: + - name: dummyhost + type: host + items: + $ref: '#/components/schemas/MetricSeries' + type: array + required: + - series + type: object + MetricPoint: + description: A point object is of the form `{POSIX_timestamp, numeric_value}`. + example: + timestamp: 1575317847 + value: 0.5 + properties: + timestamp: + description: 'The timestamp should be in seconds and current. + + Current is defined as not more than 10 minutes in the future or more than + 1 hour in the past.' + format: int64 + type: integer + value: + description: The numeric value format should be a 64bit float gauge-type + value. + format: double + type: number + type: object + MetricResource: + description: Metric resource. + example: + name: dummyhost + type: host + properties: + name: + description: The name of the resource. + type: string + type: + description: The type of the resource. + type: string + type: object + MetricSeries: + description: 'A metric to submit to Datadog. + + See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties).' + properties: + interval: + description: If the type of the metric is rate or count, define the corresponding + interval. + example: 20 + format: int64 + type: integer + metadata: + $ref: '#/components/schemas/MetricMetadata' + metric: + description: The name of the timeseries. + example: system.load.1 + type: string + points: + description: Points relating to a metric. All points must be objects with + timestamp and a scalar value (cannot be a string). Timestamps should be + in POSIX time in seconds, and cannot be more than ten minutes in the future + or more than one hour in the past. + items: + $ref: '#/components/schemas/MetricPoint' + type: array + resources: + description: A list of resources to associate with this metric. + items: + $ref: '#/components/schemas/MetricResource' + type: array + source_type_name: + description: The source type name. + example: datadog + type: string + tags: + description: A list of tags associated with the metric. + example: + - environment:test + items: + description: Individual tags. + type: string + type: array + type: + $ref: '#/components/schemas/MetricIntakeType' + unit: + description: The unit of point value. + example: second + type: string + required: + - metric + - points + type: object + MetricSuggestedAggregations: + description: List of aggregation combinations that have been actively queried. + example: + - space: sum + time: sum + - space: sum + time: count + items: + $ref: '#/components/schemas/MetricCustomAggregation' + type: array + MetricSuggestedTagsAndAggregations: + description: Object for a single metric's actively queried tags and aggregations. + properties: + attributes: + $ref: '#/components/schemas/MetricSuggestedTagsAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricActiveConfigurationType' + type: object + MetricSuggestedTagsAndAggregationsResponse: + description: Response object that includes a single metric's actively queried + tags and aggregations. + properties: + data: + $ref: '#/components/schemas/MetricSuggestedTagsAndAggregations' + readOnly: true + type: object + MetricSuggestedTagsAttributes: + description: Object containing the definition of a metric's actively queried + tags and aggregations. + properties: + active_aggregations: + $ref: '#/components/schemas/MetricSuggestedAggregations' + active_tags: + description: List of tag keys that have been actively queried. + example: + - app + - datacenter + items: + description: Actively queried tag keys. + type: string + type: array + type: object + MetricTagConfiguration: + description: Object for a single metric tag configuration. + example: + attributes: + aggregations: + - space: avg + time: avg + created_at: '2020-03-25T09:48:37.463835Z' + metric_type: gauge + modified_at: '2020-04-25T09:48:37.463835Z' + tags: + - app + - datacenter + id: http.request.latency + type: manage_tags + properties: + attributes: + $ref: '#/components/schemas/MetricTagConfigurationAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricTagConfigurationType' + type: object + MetricTagConfigurationAttributes: + description: Object containing the definition of a metric tag configuration + attributes. + properties: + aggregations: + $ref: '#/components/schemas/MetricCustomAggregations' + created_at: + description: Timestamp when the tag configuration was created. + example: '2020-03-25T09:48:37.463835Z' + format: date-time + type: string + exclude_tags_mode: + description: 'When set to true, the configuration will exclude the configured + tags and include any other submitted tags. + + When set to false, the configuration will include the configured tags + and exclude any other submitted tags. + + Defaults to false. Requires `tags` property.' + type: boolean + include_percentiles: + description: 'Toggle to include or exclude percentile aggregations for distribution + metrics. + + Only present when the `metric_type` is `distribution`.' + example: true + type: boolean + metric_type: + $ref: '#/components/schemas/MetricTagConfigurationMetricTypes' + modified_at: + description: Timestamp when the tag configuration was last modified. + example: '2020-03-25T09:48:37.463835Z' + format: date-time + type: string + tags: + description: List of tag keys on which to group. + example: + - app + - datacenter + items: + description: Tag keys to group by. + type: string + type: array + type: object + MetricTagConfigurationCreateAttributes: + description: Object containing the definition of a metric tag configuration + to be created. + properties: + aggregations: + $ref: '#/components/schemas/MetricCustomAggregations' + exclude_tags_mode: + description: 'When set to true, the configuration will exclude the configured + tags and include any other submitted tags. + + When set to false, the configuration will include the configured tags + and exclude any other submitted tags. + + Defaults to false. Requires `tags` property.' + type: boolean + include_percentiles: + description: 'Toggle to include/exclude percentiles for a distribution metric. + + Defaults to false. Can only be applied to metrics that have a `metric_type` + of `distribution`.' + example: true + type: boolean + metric_type: + $ref: '#/components/schemas/MetricTagConfigurationMetricTypes' + tags: + default: [] + description: A list of tag keys that will be queryable for your metric. + example: + - app + - datacenter + items: + description: Tag keys to group by. + type: string + type: array + required: + - tags + - metric_type + type: object + MetricTagConfigurationCreateData: + description: Object for a single metric to be configure tags on. + example: + attributes: + include_percentiles: false + metric_type: distribution + tags: + - app + - datacenter + id: http.endpoint.request + type: manage_tags + properties: + attributes: + $ref: '#/components/schemas/MetricTagConfigurationCreateAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricTagConfigurationType' + required: + - id + - type + type: object + MetricTagConfigurationCreateRequest: + description: Request object that includes the metric that you would like to + configure tags for. + properties: + data: + $ref: '#/components/schemas/MetricTagConfigurationCreateData' + required: + - data + type: object + MetricTagConfigurationMetricTypes: + default: gauge + description: The metric's type. + enum: + - gauge + - count + - rate + - distribution + example: count + type: string + x-enum-varnames: + - GAUGE + - COUNT + - RATE + - DISTRIBUTION + MetricTagConfigurationResponse: + description: Response object which includes a single metric's tag configuration. + properties: + data: + $ref: '#/components/schemas/MetricTagConfiguration' + readOnly: true + type: object + MetricTagConfigurationType: + default: manage_tags + description: The metric tag configuration resource type. + enum: + - manage_tags + example: manage_tags + type: string + x-enum-varnames: + - MANAGE_TAGS + MetricTagConfigurationUpdateAttributes: + description: Object containing the definition of a metric tag configuration + to be updated. + properties: + aggregations: + $ref: '#/components/schemas/MetricCustomAggregations' + exclude_tags_mode: + description: 'When set to true, the configuration will exclude the configured + tags and include any other submitted tags. + + When set to false, the configuration will include the configured tags + and exclude any other submitted tags. + + Defaults to false. Requires `tags` property.' + type: boolean + include_percentiles: + description: 'Toggle to include/exclude percentiles for a distribution metric. + + Defaults to false. Can only be applied to metrics that have a `metric_type` + of `distribution`.' + example: true + type: boolean + tags: + default: [] + description: A list of tag keys that will be queryable for your metric. + example: + - app + - datacenter + items: + description: Tag keys to group by. + type: string + type: array + type: object + MetricTagConfigurationUpdateData: + description: Object for a single tag configuration to be edited. + example: + attributes: + group_by: + - app + - datacenter + include_percentiles: false + id: http.endpoint.request + type: manage_tags + properties: + attributes: + $ref: '#/components/schemas/MetricTagConfigurationUpdateAttributes' + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricTagConfigurationType' + required: + - id + - type + type: object + MetricTagConfigurationUpdateRequest: + description: Request object that includes the metric that you would like to + edit the tag configuration on. + properties: + data: + $ref: '#/components/schemas/MetricTagConfigurationUpdateData' + required: + - data + type: object + MetricType: + default: metrics + description: The metric resource type. + enum: + - metrics + example: metrics + type: string + x-enum-varnames: + - METRICS + MetricVolumes: + description: Possible response objects for a metric's volume. + oneOf: + - $ref: '#/components/schemas/MetricDistinctVolume' + - $ref: '#/components/schemas/MetricIngestedIndexedVolume' + MetricVolumesResponse: + description: Response object which includes a single metric's volume. + properties: + data: + $ref: '#/components/schemas/MetricVolumes' + readOnly: true + type: object + MetricsAggregator: + default: avg + description: The type of aggregation that can be performed on metrics-based + queries. + enum: + - avg + - min + - max + - sum + - last + - percentile + - mean + - l2norm + - area + example: avg + type: string + x-enum-varnames: + - AVG + - MIN + - MAX + - SUM + - LAST + - PERCENTILE + - MEAN + - L2NORM + - AREA + MetricsAndMetricTagConfigurations: + description: Object for a metrics and metric tag configurations. + oneOf: + - $ref: '#/components/schemas/Metric' + - $ref: '#/components/schemas/MetricTagConfiguration' + MetricsAndMetricTagConfigurationsResponse: + description: Response object that includes metrics and metric tag configurations. + properties: + data: + description: Array of metrics and metric tag configurations. + items: + $ref: '#/components/schemas/MetricsAndMetricTagConfigurations' + type: array + readOnly: true + type: object + MetricsDataSource: + default: metrics + description: A data source that is powered by the Metrics platform. + enum: + - metrics + - cloud_cost + example: metrics + type: string + x-enum-varnames: + - METRICS + - CLOUD_COST + MetricsScalarQuery: + description: An individual scalar metrics query. + properties: + aggregator: + $ref: '#/components/schemas/MetricsAggregator' + data_source: + $ref: '#/components/schemas/MetricsDataSource' + name: + description: The variable name for use in formulas. + type: string + query: + description: A classic metrics query string. + example: avg:system.cpu.user{*} by {env} + type: string + required: + - data_source + - query + - aggregator + type: object + MetricsTimeseriesQuery: + description: An individual timeseries metrics query. + properties: + data_source: + $ref: '#/components/schemas/MetricsDataSource' + name: + description: The variable name for use in formulas. + type: string + query: + description: A classic metrics query string. + example: avg:system.cpu.user{*} by {env} + type: string + required: + - data_source + - query + type: object + MonitorConfigPolicyAttributeCreateRequest: + description: Policy and policy type for a monitor configuration policy. + properties: + policy: + $ref: '#/components/schemas/MonitorConfigPolicyPolicyCreateRequest' + policy_type: + $ref: '#/components/schemas/MonitorConfigPolicyType' + required: + - policy_type + - policy + type: object + MonitorConfigPolicyAttributeEditRequest: + description: Policy and policy type for a monitor configuration policy. + properties: + policy: + $ref: '#/components/schemas/MonitorConfigPolicyPolicy' + policy_type: + $ref: '#/components/schemas/MonitorConfigPolicyType' + required: + - policy_type + - policy + type: object + MonitorConfigPolicyAttributeResponse: + description: Policy and policy type for a monitor configuration policy. + properties: + policy: + $ref: '#/components/schemas/MonitorConfigPolicyPolicy' + policy_type: + $ref: '#/components/schemas/MonitorConfigPolicyType' + type: object + MonitorConfigPolicyCreateData: + description: A monitor configuration policy data. + properties: + attributes: + $ref: '#/components/schemas/MonitorConfigPolicyAttributeCreateRequest' + type: + $ref: '#/components/schemas/MonitorConfigPolicyResourceType' + required: + - type + - attributes + type: object + MonitorConfigPolicyCreateRequest: + description: Request for creating a monitor configuration policy. + properties: + data: + $ref: '#/components/schemas/MonitorConfigPolicyCreateData' + required: + - data + type: object + MonitorConfigPolicyEditData: + description: A monitor configuration policy data. + properties: + attributes: + $ref: '#/components/schemas/MonitorConfigPolicyAttributeEditRequest' + id: + description: ID of this monitor configuration policy. + example: 00000000-0000-1234-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/MonitorConfigPolicyResourceType' + required: + - id + - type + - attributes + type: object + MonitorConfigPolicyEditRequest: + description: Request for editing a monitor configuration policy. + properties: + data: + $ref: '#/components/schemas/MonitorConfigPolicyEditData' + required: + - data + type: object + MonitorConfigPolicyListResponse: + description: Response for retrieving all monitor configuration policies. + properties: + data: + description: An array of monitor configuration policies. + items: + $ref: '#/components/schemas/MonitorConfigPolicyResponseData' + type: array + type: object + MonitorConfigPolicyPolicy: + description: Configuration for the policy. + oneOf: + - $ref: '#/components/schemas/MonitorConfigPolicyTagPolicy' + MonitorConfigPolicyPolicyCreateRequest: + description: Configuration for the policy. + oneOf: + - $ref: '#/components/schemas/MonitorConfigPolicyTagPolicyCreateRequest' + MonitorConfigPolicyResourceType: + default: monitor-config-policy + description: Monitor configuration policy resource type. + enum: + - monitor-config-policy + example: monitor-config-policy + type: string + x-enum-varnames: + - MONITOR_CONFIG_POLICY + MonitorConfigPolicyResponse: + description: Response for retrieving a monitor configuration policy. + properties: + data: + $ref: '#/components/schemas/MonitorConfigPolicyResponseData' + type: object + MonitorConfigPolicyResponseData: + description: A monitor configuration policy data. + properties: + attributes: + $ref: '#/components/schemas/MonitorConfigPolicyAttributeResponse' + id: + description: ID of this monitor configuration policy. + example: 00000000-0000-1234-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/MonitorConfigPolicyResourceType' + type: object + MonitorConfigPolicyTagPolicy: + description: Tag attributes of a monitor configuration policy. + properties: + tag_key: + description: The key of the tag. + example: datacenter + maxLength: 255 + type: string + tag_key_required: + description: If a tag key is required for monitor creation. + example: true + type: boolean + valid_tag_values: + description: Valid values for the tag. + example: + - prod + - staging + items: + maxLength: 255 + type: string + type: array + type: object + MonitorConfigPolicyTagPolicyCreateRequest: + description: Tag attributes of a monitor configuration policy. + properties: + tag_key: + description: The key of the tag. + example: datacenter + maxLength: 255 + type: string + tag_key_required: + description: If a tag key is required for monitor creation. + example: true + type: boolean + valid_tag_values: + description: Valid values for the tag. + example: + - prod + - staging + items: + maxLength: 255 + type: string + type: array + required: + - tag_key + - tag_key_required + - valid_tag_values + type: object + MonitorConfigPolicyType: + default: tag + description: The monitor configuration policy type. + enum: + - tag + example: tag + type: string + x-enum-varnames: + - TAG + MonitorDowntimeMatchResourceType: + default: downtime_match + description: Monitor Downtime Match resource type. + enum: + - downtime_match + example: downtime_match + type: string + x-enum-varnames: + - DOWNTIME_MATCH + MonitorDowntimeMatchResponse: + description: Response for retrieving all downtime matches for a monitor. + properties: + data: + description: An array of downtime matches. + items: + $ref: '#/components/schemas/MonitorDowntimeMatchResponseData' + type: array + meta: + $ref: '#/components/schemas/DowntimeMeta' + type: object + MonitorDowntimeMatchResponseAttributes: + description: Downtime match details. + properties: + end: + description: The end of the downtime. + example: 2020-01-02 03:04:00+00:00 + format: date-time + nullable: true + type: string + groups: + description: An array of groups associated with the downtime. + example: + - service:postgres + - team:frontend + items: + description: An array of groups. + example: service:postgres + type: string + type: array + scope: + $ref: '#/components/schemas/DowntimeScope' + start: + description: The start of the downtime. + example: 2020-01-02 03:04:00+00:00 + format: date-time + type: string + type: object + MonitorDowntimeMatchResponseData: + description: A downtime match. + properties: + attributes: + $ref: '#/components/schemas/MonitorDowntimeMatchResponseAttributes' + id: + description: The downtime ID. + example: 00000000-0000-1234-0000-000000000000 + nullable: true + type: string + type: + $ref: '#/components/schemas/MonitorDowntimeMatchResourceType' + type: object + MonitorType: + description: Attributes from the monitor that triggered the event. + nullable: true + properties: + created_at: + description: The POSIX timestamp of the monitor's creation in nanoseconds. + example: 1646318692000 + format: int64 + type: integer + group_status: + description: Monitor group status used when there is no `result_groups`. + format: int32 + maximum: 2147483647 + type: integer + groups: + description: Groups to which the monitor belongs. + items: + description: A group. + type: string + type: array + id: + description: The monitor ID. + format: int64 + type: integer + message: + description: The monitor message. + type: string + modified: + description: The monitor's last-modified timestamp. + format: int64 + type: integer + name: + description: The monitor name. + type: string + query: + description: The query that triggers the alert. + type: string + tags: + description: A list of tags attached to the monitor. + example: + - environment:test + items: + description: A tag. + type: string + type: array + templated_name: + description: The templated name of the monitor before resolving any template + variables. + type: string + type: + description: The monitor type. + type: string + type: object + MonthlyCostAttributionAttributes: + description: Cost Attribution by Tag for a given organization. + properties: + month: + description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`.' + format: date-time + type: string + org_name: + description: The name of the organization. + type: string + public_id: + description: The organization public ID. + type: string + tag_config_source: + description: The source of the cost attribution tag configuration and the + selected tags in the format `::://////`. + type: string + tags: + $ref: '#/components/schemas/CostAttributionTagNames' + updated_at: + description: Shows the most recent hour in the current months for all organizations + for which all costs were calculated. + type: string + values: + description: 'Fields in Cost Attribution by tag(s). Example: `infra_host_on_demand_cost`, + `infra_host_committed_cost`, `infra_host_total_cost`, `infra_host_percentage_in_org`, + `infra_host_percentage_in_account`.' + type: object + type: object + MonthlyCostAttributionBody: + description: Cost data. + properties: + attributes: + $ref: '#/components/schemas/MonthlyCostAttributionAttributes' + id: + description: Unique ID of the response. + type: string + type: + $ref: '#/components/schemas/CostAttributionType' + type: object + MonthlyCostAttributionMeta: + description: The object containing document metadata. + properties: + aggregates: + $ref: '#/components/schemas/CostAttributionAggregates' + pagination: + $ref: '#/components/schemas/MonthlyCostAttributionPagination' + type: object + MonthlyCostAttributionPagination: + description: The metadata for the current pagination. + properties: + next_record_id: + description: The cursor to use to get the next results, if any. To make + the next request, use the same parameters with the addition of the `next_record_id`. + nullable: true + type: string + type: object + MonthlyCostAttributionResponse: + description: Response containing the monthly cost attribution by tag(s). + properties: + data: + description: Response containing cost attribution. + items: + $ref: '#/components/schemas/MonthlyCostAttributionBody' + type: array + meta: + $ref: '#/components/schemas/MonthlyCostAttributionMeta' + type: object + NullableRelationshipToUser: + description: Relationship to user. + nullable: true + properties: + data: + $ref: '#/components/schemas/NullableRelationshipToUserData' + required: + - data + type: object + NullableRelationshipToUserData: + description: Relationship to user object. + nullable: true + properties: + id: + description: A unique identifier that represents the user. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/UsersType' + required: + - id + - type + type: object + OktaAccount: + description: Schema for an Okta account. + properties: + attributes: + $ref: '#/components/schemas/OktaAccountAttributes' + id: + description: The ID of the Okta account, a UUID hash of the account name. + example: f749daaf-682e-4208-a38d-c9b43162c609 + type: string + type: + $ref: '#/components/schemas/OktaAccountType' + required: + - attributes + - type + type: object + OktaAccountAttributes: + description: Attributes object for an Okta account. + properties: + api_key: + description: The API key of the Okta account. + type: string + writeOnly: true + auth_method: + description: The authorization method for an Okta account. + example: oauth + type: string + client_id: + description: The Client ID of an Okta app integration. + type: string + client_secret: + description: The client secret of an Okta app integration. + type: string + writeOnly: true + domain: + description: The domain of the Okta account. + example: https://example.okta.com/ + type: string + name: + description: The name of the Okta account. + example: Okta-Prod + type: string + required: + - auth_method + - domain + - name + type: object + OktaAccountRequest: + description: Request object for an Okta account. + properties: + data: + $ref: '#/components/schemas/OktaAccount' + required: + - data + type: object + OktaAccountResponse: + description: Response object for an Okta account. + properties: + data: + $ref: '#/components/schemas/OktaAccount' + type: object + OktaAccountResponseData: + description: Data object of an Okta account + properties: + attributes: + $ref: '#/components/schemas/OktaAccountAttributes' + id: + description: The ID of the Okta account, a UUID hash of the account name. + example: f749daaf-682e-4208-a38d-c9b43162c609 + type: string + type: + $ref: '#/components/schemas/OktaAccountType' + required: + - attributes + - id + - type + type: object + OktaAccountType: + default: okta-accounts + description: Account type for an Okta account. + enum: + - okta-accounts + example: okta-accounts + type: string + x-enum-varnames: + - OKTA_ACCOUNTS + OktaAccountUpdateRequest: + description: Payload schema when updating an Okta account. + properties: + data: + $ref: '#/components/schemas/OktaAccountUpdateRequestData' + required: + - data + type: object + OktaAccountUpdateRequestAttributes: + description: Attributes object for updating an Okta account. + properties: + api_key: + description: The API key of the Okta account. + type: string + writeOnly: true + auth_method: + description: The authorization method for an Okta account. + example: oauth + type: string + client_id: + description: The Client ID of an Okta app integration. + type: string + client_secret: + description: The client secret of an Okta app integration. + type: string + writeOnly: true + domain: + description: The domain associated with an Okta account. + example: https://dev-test.okta.com/ + type: string + required: + - auth_method + - domain + type: object + OktaAccountUpdateRequestData: + description: Data object for updating an Okta account. + properties: + attributes: + $ref: '#/components/schemas/OktaAccountUpdateRequestAttributes' + type: + $ref: '#/components/schemas/OktaAccountType' + OktaAccountsResponse: + description: The expected response schema when getting Okta accounts. + properties: + data: + description: List of Okta accounts. + items: + $ref: '#/components/schemas/OktaAccountResponseData' + type: array + type: object + OnDemandConcurrencyCap: + description: On-demand concurrency cap. + properties: + attributes: + $ref: '#/components/schemas/OnDemandConcurrencyCapAttributes' + type: + $ref: '#/components/schemas/OnDemandConcurrencyCapType' + type: object + OnDemandConcurrencyCapAttributes: + description: On-demand concurrency cap attributes. + properties: + on_demand_concurrency_cap: + description: Value of the on-demand concurrency cap. + format: double + type: number + type: object + OnDemandConcurrencyCapResponse: + description: On-demand concurrency cap response. + properties: + data: + $ref: '#/components/schemas/OnDemandConcurrencyCap' + type: object + OnDemandConcurrencyCapType: + description: On-demand concurrency cap type. + enum: + - on_demand_concurrency_cap + type: string + x-enum-varnames: + - ON_DEMAND_CONCURRENCY_CAP + OpsgenieServiceCreateAttributes: + description: The Opsgenie service attributes for a create request. + properties: + custom_url: + description: The custom URL for a custom region. + example: https://example.com + type: string + name: + description: The name for the Opsgenie service. + example: fake-opsgenie-service-name + type: string + opsgenie_api_key: + description: The Opsgenie API key for your Opsgenie service. + example: 00000000-0000-0000-0000-000000000000 + type: string + region: + $ref: '#/components/schemas/OpsgenieServiceRegionType' + required: + - name + - opsgenie_api_key + - region + type: object + OpsgenieServiceCreateData: + description: Opsgenie service data for a create request. + properties: + attributes: + $ref: '#/components/schemas/OpsgenieServiceCreateAttributes' + type: + $ref: '#/components/schemas/OpsgenieServiceType' + required: + - type + - attributes + type: object + OpsgenieServiceCreateRequest: + description: Create request for an Opsgenie service. + properties: + data: + $ref: '#/components/schemas/OpsgenieServiceCreateData' + required: + - data + type: object + OpsgenieServiceRegionType: + description: The region for the Opsgenie service. + enum: + - us + - eu + - custom + example: us + type: string + x-enum-varnames: + - US + - EU + - CUSTOM + OpsgenieServiceResponse: + description: Response of an Opsgenie service. + properties: + data: + $ref: '#/components/schemas/OpsgenieServiceResponseData' + required: + - data + type: object + OpsgenieServiceResponseAttributes: + description: The attributes from an Opsgenie service response. + properties: + custom_url: + description: The custom URL for a custom region. + example: null + nullable: true + type: string + name: + description: The name for the Opsgenie service. + example: fake-opsgenie-service-name + type: string + region: + $ref: '#/components/schemas/OpsgenieServiceRegionType' + type: object + OpsgenieServiceResponseData: + description: Opsgenie service data from a response. + properties: + attributes: + $ref: '#/components/schemas/OpsgenieServiceResponseAttributes' + id: + description: The ID of the Opsgenie service. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + type: string + type: + $ref: '#/components/schemas/OpsgenieServiceType' + required: + - id + - type + - attributes + type: object + OpsgenieServiceType: + default: opsgenie-service + description: Opsgenie service resource type. + enum: + - opsgenie-service + example: opsgenie-service + type: string + x-enum-varnames: + - OPSGENIE_SERVICE + OpsgenieServiceUpdateAttributes: + description: The Opsgenie service attributes for an update request. + properties: + custom_url: + description: The custom URL for a custom region. + example: https://example.com + nullable: true + type: string + name: + description: The name for the Opsgenie service. + example: fake-opsgenie-service-name + type: string + opsgenie_api_key: + description: The Opsgenie API key for your Opsgenie service. + example: 00000000-0000-0000-0000-000000000000 + type: string + region: + $ref: '#/components/schemas/OpsgenieServiceRegionType' + type: object + OpsgenieServiceUpdateData: + description: Opsgenie service for an update request. + properties: + attributes: + $ref: '#/components/schemas/OpsgenieServiceUpdateAttributes' + id: + description: The ID of the Opsgenie service. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + type: string + type: + $ref: '#/components/schemas/OpsgenieServiceType' + required: + - id + - type + - attributes + type: object + OpsgenieServiceUpdateRequest: + description: Update request for an Opsgenie service. + properties: + data: + $ref: '#/components/schemas/OpsgenieServiceUpdateData' + required: + - data + type: object + OpsgenieServicesResponse: + description: Response with a list of Opsgenie services. + properties: + data: + description: An array of Opsgenie services. + example: + - attributes: + custom_url: null + name: fake-opsgenie-service-name + region: us + id: 596da4af-0563-4097-90ff-07230c3f9db3 + type: opsgenie-service + - attributes: + custom_url: null + name: fake-opsgenie-service-name-2 + region: eu + id: 0d2937f1-b561-44fa-914a-99910f848014 + type: opsgenie-service + items: + $ref: '#/components/schemas/OpsgenieServiceResponseData' + type: array + required: + - data + type: object + Organization: + description: Organization object. + properties: + attributes: + $ref: '#/components/schemas/OrganizationAttributes' + id: + description: ID of the organization. + type: string + type: + $ref: '#/components/schemas/OrganizationsType' + required: + - type + type: object + OrganizationAttributes: + description: Attributes of the organization. + properties: + created_at: + description: Creation time of the organization. + format: date-time + type: string + description: + description: Description of the organization. + type: string + disabled: + description: Whether or not the organization is disabled. + type: boolean + modified_at: + description: Time of last organization modification. + format: date-time + type: string + name: + description: Name of the organization. + type: string + public_id: + description: Public ID of the organization. + type: string + sharing: + description: Sharing type of the organization. + type: string + url: + description: URL of the site that this organization exists at. + type: string + type: object + OrganizationsType: + default: orgs + description: Organizations resource type. + enum: + - orgs + example: orgs + type: string + x-enum-varnames: + - ORGS + OutcomeType: + default: outcome + description: The JSON:API type for an outcome. + enum: + - outcome + example: outcome + type: string + x-enum-varnames: + - OUTCOME + OutcomesBatchAttributes: + description: The JSON:API attributes for a batched set of scorecard outcomes. + properties: + results: + description: Set of scorecard outcomes to update. + items: + $ref: '#/components/schemas/OutcomesBatchRequestItem' + type: array + type: object + OutcomesBatchRequest: + description: Scorecard outcomes batch request. + properties: + data: + $ref: '#/components/schemas/OutcomesBatchRequestData' + type: object + OutcomesBatchRequestData: + description: Scorecard outcomes batch request data. + properties: + attributes: + $ref: '#/components/schemas/OutcomesBatchAttributes' + type: + $ref: '#/components/schemas/OutcomesBatchType' + type: object + OutcomesBatchRequestItem: + description: Scorecard outcome for a specific rule, for a given service within + a batched update. + properties: + remarks: + description: Any remarks regarding the scorecard rule's evaluation, and + supports HTML hyperlinks. + example: 'See: Services' + type: string + rule_id: + $ref: '#/components/schemas/RuleId' + service_name: + description: The unique name for a service in the catalog. + example: my-service + type: string + state: + $ref: '#/components/schemas/State' + required: + - rule_id + - service_name + - state + type: object + OutcomesBatchResponse: + description: Scorecard outcomes batch response. + properties: + data: + $ref: '#/components/schemas/OutcomesBatchResponseData' + meta: + $ref: '#/components/schemas/OutcomesBatchResponseMeta' + required: + - data + - meta + type: object + OutcomesBatchResponseAttributes: + description: The JSON:API attributes for an outcome. + properties: + created_at: + description: Creation time of the rule outcome. + format: date-time + type: string + modified_at: + description: Time of last rule outcome modification. + format: date-time + type: string + remarks: + description: Any remarks regarding the scorecard rule's evaluation, and + supports HTML hyperlinks. + example: 'See: Services' + type: string + service_name: + description: The unique name for a service in the catalog. + example: my-service + type: string + state: + $ref: '#/components/schemas/State' + type: object + OutcomesBatchResponseData: + description: List of rule outcomes which were affected during the bulk operation. + items: + $ref: '#/components/schemas/OutcomesResponseDataItem' + type: array + OutcomesBatchResponseMeta: + description: Metadata pertaining to the bulk operation. + properties: + total_received: + description: Total number of scorecard results received during the bulk + operation. + format: int64 + type: integer + total_updated: + description: Total number of scorecard results modified during the bulk + operation. + format: int64 + type: integer + type: object + OutcomesBatchType: + default: batched-outcome + description: The JSON:API type for scorecard outcomes. + enum: + - batched-outcome + example: batched-outcome + type: string + x-enum-varnames: + - BATCHED_OUTCOME + OutcomesResponse: + description: Scorecard outcomes - the result of a rule for a service. + properties: + data: + $ref: '#/components/schemas/OutcomesResponseData' + included: + $ref: '#/components/schemas/OutcomesResponseIncluded' + links: + $ref: '#/components/schemas/OutcomesResponseLinks' + type: object + OutcomesResponseData: + description: List of rule outcomes. + items: + $ref: '#/components/schemas/OutcomesResponseDataItem' + type: array + OutcomesResponseDataItem: + description: A single rule outcome. + properties: + attributes: + $ref: '#/components/schemas/OutcomesBatchResponseAttributes' + id: + description: The unique ID for a rule outcome. + type: string + relationships: + $ref: '#/components/schemas/RuleOutcomeRelationships' + type: + $ref: '#/components/schemas/OutcomeType' + type: object + OutcomesResponseIncluded: + description: Array of rule details. + items: + $ref: '#/components/schemas/OutcomesResponseIncludedItem' + type: array + OutcomesResponseIncludedItem: + description: Attributes of the included rule. + properties: + attributes: + $ref: '#/components/schemas/OutcomesResponseIncludedRuleAttributes' + id: + $ref: '#/components/schemas/RuleId' + type: + $ref: '#/components/schemas/RuleType' + type: object + OutcomesResponseIncludedRuleAttributes: + description: Details of a rule. + properties: + name: + description: Name of the rule. + example: Team Defined + type: string + scorecard_name: + description: The scorecard name to which this rule must belong. + example: Observability Best Practices + type: string + type: object + OutcomesResponseLinks: + description: Links attributes. + properties: + next: + description: Link for the next set of results. + example: /api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=100 + type: string + type: object + Pagination: + description: Pagination object. + properties: + total_count: + description: Total count. + format: int64 + type: integer + total_filtered_count: + description: Total count of elements matched by the filter. + format: int64 + type: integer + type: object + PartialAPIKey: + description: Partial Datadog API key. + properties: + attributes: + $ref: '#/components/schemas/PartialAPIKeyAttributes' + id: + description: ID of the API key. + type: string + relationships: + $ref: '#/components/schemas/APIKeyRelationships' + type: + $ref: '#/components/schemas/APIKeysType' + type: object + PartialAPIKeyAttributes: + description: Attributes of a partial API key. + properties: + category: + description: The category of the API key. + type: string + created_at: + description: Creation date of the API key. + example: '2020-11-23T10:00:00.000Z' + readOnly: true + type: string + last4: + description: The last four characters of the API key. + example: abcd + maxLength: 4 + minLength: 4 + readOnly: true + type: string + modified_at: + description: Date the API key was last modified. + example: '2020-11-23T10:00:00.000Z' + readOnly: true + type: string + name: + description: Name of the API key. + example: API Key for submitting metrics + type: string + remote_config_read_enabled: + description: The remote config read enabled status. + type: boolean + type: object + PartialApplicationKey: + description: Partial Datadog application key. + properties: + attributes: + $ref: '#/components/schemas/PartialApplicationKeyAttributes' + id: + description: ID of the application key. + type: string + relationships: + $ref: '#/components/schemas/ApplicationKeyRelationships' + type: + $ref: '#/components/schemas/ApplicationKeysType' + type: object + PartialApplicationKeyAttributes: + description: Attributes of a partial application key. + properties: + created_at: + description: Creation date of the application key. + example: '2020-11-23T10:00:00.000Z' + readOnly: true + type: string + last4: + description: The last four characters of the application key. + example: abcd + maxLength: 4 + minLength: 4 + readOnly: true + type: string + name: + description: Name of the application key. + example: Application Key for managing dashboards + type: string + scopes: + description: Array of scopes to grant the application key. + example: + - dashboards_read + - dashboards_write + - dashboards_public_share + items: + description: Name of scope. + type: string + nullable: true + type: array + type: object + PartialApplicationKeyResponse: + description: Response for retrieving a partial application key. + properties: + data: + $ref: '#/components/schemas/PartialApplicationKey' + included: + description: Array of objects related to the application key. + items: + $ref: '#/components/schemas/ApplicationKeyResponseIncludedItem' + type: array + type: object + Permission: + description: Permission object. + properties: + attributes: + $ref: '#/components/schemas/PermissionAttributes' + id: + description: ID of the permission. + type: string + type: + $ref: '#/components/schemas/PermissionsType' + required: + - type + type: object + PermissionAttributes: + description: Attributes of a permission. + properties: + created: + description: Creation time of the permission. + format: date-time + type: string + description: + description: Description of the permission. + type: string + display_name: + description: Displayed name for the permission. + type: string + display_type: + description: Display type. + type: string + group_name: + description: Name of the permission group. + type: string + name: + description: Name of the permission. + type: string + restricted: + description: Whether or not the permission is restricted. + type: boolean + type: object + PermissionsResponse: + description: Payload with API-returned permissions. + properties: + data: + description: Array of permissions. + items: + $ref: '#/components/schemas/Permission' + type: array + type: object + PermissionsType: + default: permissions + description: Permissions resource type. + enum: + - permissions + example: permissions + type: string + x-enum-varnames: + - PERMISSIONS + Powerpack: + description: Powerpacks are templated groups of dashboard widgets you can save + from an existing dashboard and turn into reusable packs in the widget tray. + properties: + data: + $ref: '#/components/schemas/PowerpackData' + type: object + PowerpackAttributes: + description: Powerpack attribute object. + properties: + description: + description: Description of this powerpack. + example: Powerpack for ABC + type: string + group_widget: + $ref: '#/components/schemas/PowerpackGroupWidget' + name: + description: Name of the powerpack. + example: Sample Powerpack + type: string + tags: + description: List of tags to identify this powerpack. + example: + - tag:foo1 + items: + maxLength: 80 + type: string + maxItems: 8 + type: array + template_variables: + description: List of template variables for this powerpack. + example: + - defaults: + - '*' + name: test + items: + $ref: '#/components/schemas/PowerpackTemplateVariable' + type: array + required: + - group_widget + - name + type: object + PowerpackData: + description: Powerpack data object. + properties: + attributes: + $ref: '#/components/schemas/PowerpackAttributes' + id: + description: ID of the powerpack. + type: string + relationships: + $ref: '#/components/schemas/PowerpackRelationships' + type: + description: Type of widget, must be powerpack. + example: powerpack + type: string + type: object + PowerpackGroupWidget: + description: Powerpack group widget definition object. + properties: + definition: + $ref: '#/components/schemas/PowerpackGroupWidgetDefinition' + layout: + $ref: '#/components/schemas/PowerpackGroupWidgetLayout' + live_span: + $ref: '#/components/schemas/WidgetLiveSpan' + required: + - definition + type: object + PowerpackGroupWidgetDefinition: + description: Powerpack group widget object. + properties: + layout_type: + description: Layout type of widgets. + example: ordered + type: string + show_title: + description: Boolean indicating whether powerpack group title should be + visible or not. + example: true + type: boolean + title: + description: Name for the group widget. + example: Sample Powerpack + type: string + type: + description: Type of widget, must be group. + example: group + type: string + widgets: + description: Widgets inside the powerpack. + example: + - definition: + content: example + type: note + layout: + height: 5 + width: 10 + x: 0 + y: 0 + items: + $ref: '#/components/schemas/PowerpackInnerWidgets' + type: array + required: + - widgets + - layout_type + - type + type: object + PowerpackGroupWidgetLayout: + description: Powerpack group widget layout. + properties: + height: + description: The height of the widget. Should be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + width: + description: The width of the widget. Should be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + x: + description: The position of the widget on the x (horizontal) axis. Should + be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + y: + description: The position of the widget on the y (vertical) axis. Should + be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - x + - y + - width + - height + type: object + PowerpackInnerWidgetLayout: + description: Powerpack inner widget layout. + properties: + height: + description: The height of the widget. Should be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + width: + description: The width of the widget. Should be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + x: + description: The position of the widget on the x (horizontal) axis. Should + be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + y: + description: The position of the widget on the y (vertical) axis. Should + be a non-negative integer. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - x + - y + - width + - height + type: object + PowerpackInnerWidgets: + description: Powerpack group widget definition of individual widgets. + properties: + definition: + additionalProperties: {} + description: Information about widget. + example: + definition: + content: example + type: note + type: object + layout: + $ref: '#/components/schemas/PowerpackInnerWidgetLayout' + required: + - definition + type: object + PowerpackRelationships: + description: Powerpack relationship object. + properties: + author: + $ref: '#/components/schemas/RelationshipToUser' + type: object + PowerpackResponse: + description: Response object which includes a single powerpack configuration. + properties: + data: + $ref: '#/components/schemas/PowerpackData' + included: + description: Array of objects related to the users. + items: + $ref: '#/components/schemas/User' + type: array + readOnly: true + type: object + PowerpackResponseLinks: + description: Links attributes. + properties: + first: + description: Link to last page. + type: string + last: + description: Link to first page. + example: https://app.datadoghq.com/api/v2/powerpacks?page[offset]=0&page[limit]=25 + nullable: true + type: string + next: + description: Link for the next set of results. + example: https://app.datadoghq.com/api/v2/powerpacks?page[offset]=25&page[limit]=25 + type: string + prev: + description: Link for the previous set of results. + nullable: true + type: string + self: + description: Link to current page. + example: https://app.datadoghq.com/api/v2/powerpacks + type: string + type: object + PowerpackTemplateVariable: + description: Powerpack template variables. + properties: + defaults: + description: One or many template variable default values within the saved + view, which are unioned together using `OR` if more than one is specified. + items: + description: One or many default values of the template variable. + minLength: 1 + type: string + type: array + name: + description: The name of the variable. + example: datacenter + type: string + required: + - name + type: object + PowerpacksResponseMeta: + description: Powerpack response metadata. + properties: + pagination: + $ref: '#/components/schemas/PowerpacksResponseMetaPagination' + type: object + PowerpacksResponseMetaPagination: + description: Powerpack response pagination metadata. + properties: + first_offset: + description: The first offset. + format: int64 + type: integer + last_offset: + description: The last offset. + format: int64 + nullable: true + type: integer + limit: + description: Pagination limit. + format: int64 + type: integer + next_offset: + description: The next offset. + format: int64 + type: integer + offset: + description: The offset. + format: int64 + type: integer + prev_offset: + description: The previous offset. + format: int64 + type: integer + total: + description: Total results. + format: int64 + type: integer + type: + description: Offset type. + type: string + type: object + ProcessSummariesMeta: + description: Response metadata object. + properties: + page: + $ref: '#/components/schemas/ProcessSummariesMetaPage' + type: object + ProcessSummariesMetaPage: + description: Paging attributes. + properties: + after: + description: 'The cursor used to get the next results, if any. To make the + next request, use the same + + parameters with the addition of the `page[cursor]`.' + example: 911abf1204838d9cdfcb9a96d0b6a1bd03e1b514074f1ce1737c4cbd + type: string + size: + description: Number of results returned. + format: int32 + maximum: 10000 + minimum: 0 + type: integer + type: object + ProcessSummariesResponse: + description: List of process summaries. + properties: + data: + description: Array of process summary objects. + items: + $ref: '#/components/schemas/ProcessSummary' + type: array + meta: + $ref: '#/components/schemas/ProcessSummariesMeta' + type: object + ProcessSummary: + description: Process summary object. + properties: + attributes: + $ref: '#/components/schemas/ProcessSummaryAttributes' + id: + description: Process ID. + type: string + type: + $ref: '#/components/schemas/ProcessSummaryType' + type: object + ProcessSummaryAttributes: + description: Attributes for a process summary. + properties: + cmdline: + description: Process command line. + type: string + host: + description: Host running the process. + type: string + pid: + description: Process ID. + format: int64 + type: integer + ppid: + description: Parent process ID. + format: int64 + type: integer + start: + description: Time the process was started. + type: string + tags: + description: List of tags associated with the process. + items: + description: A tag associated with the process. + type: string + type: array + timestamp: + description: Time the process was seen. + type: string + user: + description: Process owner. + type: string + type: object + ProcessSummaryType: + default: process + description: Type of process summary. + enum: + - process + example: process + type: string + x-enum-varnames: + - PROCESS + ProjectedCost: + description: Projected Cost data. + properties: + attributes: + $ref: '#/components/schemas/ProjectedCostAttributes' + id: + description: Unique ID of the response. + type: string + type: + $ref: '#/components/schemas/ProjectedCostType' + type: object + ProjectedCostAttributes: + description: Projected Cost attributes data. + properties: + charges: + description: List of charges data reported for the requested month. + items: + $ref: '#/components/schemas/ChargebackBreakdown' + type: array + date: + description: The month requested. + format: date-time + type: string + org_name: + description: The organization name. + type: string + projected_total_cost: + description: The total projected cost of products for the month. + format: double + type: number + public_id: + description: The organization public ID. + type: string + region: + description: The region of the Datadog instance that the organization belongs + to. + type: string + type: object + ProjectedCostResponse: + description: Projected Cost response. + properties: + data: + description: Response containing Projected Cost. + items: + $ref: '#/components/schemas/ProjectedCost' + type: array + type: object + ProjectedCostType: + default: projected_cost + description: Type of cost data. + enum: + - projected_cost + example: projected_cost + type: string + x-enum-varnames: + - PROJECt_COST + QueryFormula: + description: A formula for calculation based on one or more queries. + properties: + formula: + description: Formula string, referencing one or more queries with their + name property. + example: a+b + type: string + limit: + $ref: '#/components/schemas/FormulaLimit' + required: + - formula + type: object + QuerySortOrder: + default: desc + description: Direction of sort. + enum: + - asc + - desc + type: string + x-enum-varnames: + - ASC + - DESC + RUMAggregateBucketValue: + description: A bucket value, can be either a timeseries or a single value. + oneOf: + - $ref: '#/components/schemas/RUMAggregateBucketValueSingleString' + - $ref: '#/components/schemas/RUMAggregateBucketValueSingleNumber' + - $ref: '#/components/schemas/RUMAggregateBucketValueTimeseries' + RUMAggregateBucketValueSingleNumber: + description: A single number value. + format: double + type: number + RUMAggregateBucketValueSingleString: + description: A single string value. + type: string + RUMAggregateBucketValueTimeseries: + description: A timeseries array. + items: + $ref: '#/components/schemas/RUMAggregateBucketValueTimeseriesPoint' + type: array + x-generate-alias-as-model: true + RUMAggregateBucketValueTimeseriesPoint: + description: A timeseries point. + properties: + time: + description: The time value for this point. + example: '2020-06-08T11:55:00.123Z' + format: date-time + type: string + value: + description: The value for this point. + example: 19 + format: double + type: number + type: object + RUMAggregateRequest: + description: The object sent with the request to retrieve aggregation buckets + of RUM events from your organization. + properties: + compute: + description: The list of metrics or timeseries to compute for the retrieved + buckets. + items: + $ref: '#/components/schemas/RUMCompute' + type: array + filter: + $ref: '#/components/schemas/RUMQueryFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/RUMGroupBy' + type: array + options: + $ref: '#/components/schemas/RUMQueryOptions' + page: + $ref: '#/components/schemas/RUMQueryPageOptions' + type: object + RUMAggregateSort: + description: A sort rule. + example: + aggregation: count + order: asc + properties: + aggregation: + $ref: '#/components/schemas/RUMAggregationFunction' + metric: + description: The metric to sort by (only used for `type=measure`). + example: '@duration' + type: string + order: + $ref: '#/components/schemas/RUMSortOrder' + type: + $ref: '#/components/schemas/RUMAggregateSortType' + type: object + RUMAggregateSortType: + default: alphabetical + description: The type of sorting algorithm. + enum: + - alphabetical + - measure + type: string + x-enum-varnames: + - ALPHABETICAL + - MEASURE + RUMAggregationBucketsResponse: + description: The query results. + properties: + buckets: + description: The list of matching buckets, one item per bucket. + items: + $ref: '#/components/schemas/RUMBucketResponse' + type: array + type: object + RUMAggregationFunction: + description: An aggregation function. + enum: + - count + - cardinality + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + - median + example: pc90 + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - PERCENTILE_75 + - PERCENTILE_90 + - PERCENTILE_95 + - PERCENTILE_98 + - PERCENTILE_99 + - SUM + - MIN + - MAX + - AVG + - MEDIAN + RUMAnalyticsAggregateResponse: + description: The response object for the RUM events aggregate API endpoint. + properties: + data: + $ref: '#/components/schemas/RUMAggregationBucketsResponse' + links: + $ref: '#/components/schemas/RUMResponseLinks' + meta: + $ref: '#/components/schemas/RUMResponseMetadata' + type: object + RUMApplication: + description: RUM application. + properties: + attributes: + $ref: '#/components/schemas/RUMApplicationAttributes' + id: + description: RUM application ID. + example: abcd1234-0000-0000-abcd-1234abcd5678 + type: string + type: + $ref: '#/components/schemas/RUMApplicationType' + required: + - attributes + - id + - type + type: object + RUMApplicationAttributes: + description: RUM application attributes. + properties: + application_id: + description: ID of the RUM application. + example: abcd1234-0000-0000-abcd-1234abcd5678 + type: string + client_token: + description: Client token of the RUM application. + example: abcd1234efgh5678ijkl90abcd1234efgh0 + type: string + created_at: + description: Timestamp in ms of the creation date. + example: 1659479836169 + format: int64 + type: integer + created_by_handle: + description: Handle of the creator user. + example: john.doe + type: string + hash: + description: Hash of the RUM application. Optional. + type: string + is_active: + description: Indicates if the RUM application is active. + example: true + type: boolean + name: + description: Name of the RUM application. + example: my_rum_application + type: string + org_id: + description: Org ID of the RUM application. + example: 999 + format: int32 + maximum: 2147483647 + type: integer + type: + description: Type of the RUM application. Supported values are `browser`, + `ios`, `android`, `react-native`, `flutter`. + example: browser + type: string + updated_at: + description: Timestamp in ms of the last update date. + example: 1659479836169 + format: int64 + type: integer + updated_by_handle: + description: Handle of the updater user. + example: jane.doe + type: string + required: + - application_id + - client_token + - created_at + - created_by_handle + - name + - org_id + - type + - updated_at + - updated_by_handle + type: object + RUMApplicationCreate: + description: RUM application creation. + properties: + attributes: + $ref: '#/components/schemas/RUMApplicationCreateAttributes' + type: + $ref: '#/components/schemas/RUMApplicationCreateType' + required: + - attributes + - type + type: object + RUMApplicationCreateAttributes: + description: RUM application creation attributes. + properties: + name: + description: Name of the RUM application. + example: my_new_rum_application + type: string + type: + description: Type of the RUM application. Supported values are `browser`, + `ios`, `android`, `react-native`, `flutter`. + example: browser + type: string + required: + - name + type: object + RUMApplicationCreateRequest: + description: RUM application creation request attributes. + properties: + data: + $ref: '#/components/schemas/RUMApplicationCreate' + required: + - data + type: object + RUMApplicationCreateType: + default: rum_application_create + description: RUM application creation type. + enum: + - rum_application_create + example: rum_application_create + type: string + x-enum-varnames: + - RUM_APPLICATION_CREATE + RUMApplicationList: + description: RUM application list. + properties: + attributes: + $ref: '#/components/schemas/RUMApplicationListAttributes' + id: + description: RUM application ID. + example: abcd1234-0000-0000-abcd-1234abcd5678 + type: string + type: + $ref: '#/components/schemas/RUMApplicationListType' + required: + - attributes + - type + type: object + RUMApplicationListAttributes: + description: RUM application list attributes. + properties: + application_id: + description: ID of the RUM application. + example: abcd1234-0000-0000-abcd-1234abcd5678 + type: string + created_at: + description: Timestamp in ms of the creation date. + example: 1659479836169 + format: int64 + type: integer + created_by_handle: + description: Handle of the creator user. + example: john.doe + type: string + hash: + description: Hash of the RUM application. Optional. + type: string + is_active: + description: Indicates if the RUM application is active. + example: true + type: boolean + name: + description: Name of the RUM application. + example: my_rum_application + type: string + org_id: + description: Org ID of the RUM application. + example: 999 + format: int32 + maximum: 2147483647 + type: integer + type: + description: Type of the RUM application. Supported values are `browser`, + `ios`, `android`, `react-native`, `flutter`. + example: browser + type: string + updated_at: + description: Timestamp in ms of the last update date. + example: 1659479836169 + format: int64 + type: integer + updated_by_handle: + description: Handle of the updater user. + example: jane.doe + type: string + required: + - application_id + - created_at + - created_by_handle + - name + - org_id + - type + - updated_at + - updated_by_handle + type: object + RUMApplicationListType: + default: rum_application + description: RUM application list type. + enum: + - rum_application + example: rum_application + type: string + x-enum-varnames: + - RUM_APPLICATION + RUMApplicationResponse: + description: RUM application response. + properties: + data: + $ref: '#/components/schemas/RUMApplication' + type: object + RUMApplicationType: + default: rum_application + description: RUM application response type. + enum: + - rum_application + example: rum_application + type: string + x-enum-varnames: + - RUM_APPLICATION + RUMApplicationUpdate: + description: RUM application update. + properties: + attributes: + $ref: '#/components/schemas/RUMApplicationUpdateAttributes' + id: + description: RUM application ID. + example: abcd1234-0000-0000-abcd-1234abcd5678 + type: string + type: + $ref: '#/components/schemas/RUMApplicationUpdateType' + required: + - id + - type + type: object + RUMApplicationUpdateAttributes: + description: RUM application update attributes. + properties: + name: + description: Name of the RUM application. + example: updated_name_for_my_existing_rum_application + type: string + type: + description: Type of the RUM application. Supported values are `browser`, + `ios`, `android`, `react-native`, `flutter`. + example: browser + type: string + type: object + RUMApplicationUpdateRequest: + description: RUM application update request. + properties: + data: + $ref: '#/components/schemas/RUMApplicationUpdate' + required: + - data + type: object + RUMApplicationUpdateType: + default: rum_application_update + description: RUM application update type. + enum: + - rum_application_update + example: rum_application_update + type: string + x-enum-varnames: + - RUM_APPLICATION_UPDATE + RUMApplicationsResponse: + description: RUM applications response. + properties: + data: + description: RUM applications array response. + items: + $ref: '#/components/schemas/RUMApplicationList' + type: array + type: object + RUMBucketResponse: + description: Bucket values. + properties: + by: + additionalProperties: + description: The values for each group-by. + type: string + description: The key-value pairs for each group-by. + example: + '@session.type': user + '@type': view + type: object + computes: + additionalProperties: + $ref: '#/components/schemas/RUMAggregateBucketValue' + description: A map of the metric name to value for regular compute, or a + list of values for a timeseries. + type: object + type: object + RUMCompute: + description: A compute rule to compute metrics or timeseries. + properties: + aggregation: + $ref: '#/components/schemas/RUMAggregationFunction' + interval: + description: 'The time buckets'' size (only used for type=timeseries) + + Defaults to a resolution of 150 points.' + example: 5m + type: string + metric: + description: The metric to use. + example: '@duration' + type: string + type: + $ref: '#/components/schemas/RUMComputeType' + required: + - aggregation + type: object + RUMComputeType: + default: total + description: The type of compute. + enum: + - timeseries + - total + type: string + x-enum-varnames: + - TIMESERIES + - TOTAL + RUMEvent: + description: Object description of a RUM event after being processed and stored + by Datadog. + properties: + attributes: + $ref: '#/components/schemas/RUMEventAttributes' + id: + description: Unique ID of the event. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: '#/components/schemas/RUMEventType' + type: object + RUMEventAttributes: + description: JSON object containing all event attributes and their associated + values. + properties: + attributes: + additionalProperties: {} + description: JSON object of attributes from RUM events. + example: + customAttribute: 123 + duration: 2345 + type: object + service: + description: 'The name of the application or service generating RUM events. + + It is used to switch from RUM to APM, so make sure you define the same + + value when you use both products.' + example: web-app + type: string + tags: + description: Array of tags associated with your event. + example: + - team:A + items: + description: Tag associated with your event. + type: string + type: array + timestamp: + description: Timestamp of your event. + example: '2019-01-02T09:42:36.320Z' + format: date-time + type: string + type: object + RUMEventType: + default: rum + description: Type of the event. + enum: + - rum + example: rum + type: string + x-enum-varnames: + - RUM + RUMEventsResponse: + description: Response object with all events matching the request and pagination + information. + properties: + data: + description: Array of events matching the request. + items: + $ref: '#/components/schemas/RUMEvent' + type: array + links: + $ref: '#/components/schemas/RUMResponseLinks' + meta: + $ref: '#/components/schemas/RUMResponseMetadata' + type: object + RUMGroupBy: + description: A group-by rule. + properties: + facet: + description: The name of the facet to use (required). + example: '@view.time_spent' + type: string + histogram: + $ref: '#/components/schemas/RUMGroupByHistogram' + limit: + default: 10 + description: The maximum buckets to return for this group-by. + format: int64 + type: integer + missing: + $ref: '#/components/schemas/RUMGroupByMissing' + sort: + $ref: '#/components/schemas/RUMAggregateSort' + total: + $ref: '#/components/schemas/RUMGroupByTotal' + required: + - facet + type: object + RUMGroupByHistogram: + description: 'Used to perform a histogram computation (only for measure facets). + + Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval.' + properties: + interval: + description: The bin size of the histogram buckets. + example: 10 + format: double + type: number + max: + description: 'The maximum value for the measure used in the histogram + + (values greater than this one are filtered out).' + example: 100 + format: double + type: number + min: + description: 'The minimum value for the measure used in the histogram + + (values smaller than this one are filtered out).' + example: 50 + format: double + type: number + required: + - interval + - min + - max + type: object + RUMGroupByMissing: + description: The value to use for logs that don't have the facet used to group + by. + oneOf: + - $ref: '#/components/schemas/RUMGroupByMissingString' + - $ref: '#/components/schemas/RUMGroupByMissingNumber' + RUMGroupByMissingNumber: + description: The missing value to use if there is a number valued facet. + format: double + type: number + RUMGroupByMissingString: + description: The missing value to use if there is string valued facet. + type: string + RUMGroupByTotal: + default: false + description: A resulting object to put the given computes in over all the matching + records. + oneOf: + - $ref: '#/components/schemas/RUMGroupByTotalBoolean' + - $ref: '#/components/schemas/RUMGroupByTotalString' + - $ref: '#/components/schemas/RUMGroupByTotalNumber' + RUMGroupByTotalBoolean: + description: If set to true, creates an additional bucket labeled "$facet_total". + type: boolean + RUMGroupByTotalNumber: + description: A number to use as the key value for the total bucket. + format: double + type: number + RUMGroupByTotalString: + description: A string to use as the key value for the total bucket. + type: string + RUMQueryFilter: + description: The search and filter query settings. + properties: + from: + default: now-15m + description: The minimum time for the requested events; supports date (in + [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, + hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds + are optional), math, and regular timestamps (in milliseconds). + example: now-15m + type: string + query: + default: '*' + description: The search query following the RUM search syntax. + example: '@type:session AND @session.type:user' + type: string + to: + default: now + description: The maximum time for the requested events; supports date (in + [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, + hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds + are optional), math, and regular timestamps (in milliseconds). + example: now + type: string + type: object + RUMQueryOptions: + description: 'Global query options that are used during the query. + + Note: Only supply timezone or time offset, not both. Otherwise, the query + fails.' + properties: + time_offset: + description: The time offset (in seconds) to apply to the query. + format: int64 + type: integer + timezone: + default: UTC + description: The timezone can be specified as GMT, UTC, an offset from UTC + (like UTC+1), or as a Timezone Database identifier (like America/New_York). + example: GMT + type: string + type: object + RUMQueryPageOptions: + description: Paging attributes for listing events. + properties: + cursor: + description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + limit: + default: 10 + description: Maximum number of events in the response. + example: 25 + format: int32 + maximum: 1000 + type: integer + type: object + RUMResponseLinks: + description: Links attributes. + properties: + next: + description: 'Link for the next set of results. Note that the request can + also be made using the + + POST endpoint.' + example: https://app.datadoghq.com/api/v2/rum/event?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + RUMResponseMetadata: + description: The metadata associated with a request. + properties: + elapsed: + description: The time elapsed in milliseconds. + example: 132 + format: int64 + type: integer + page: + $ref: '#/components/schemas/RUMResponsePage' + request_id: + description: The identifier of the request. + example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR + type: string + status: + $ref: '#/components/schemas/RUMResponseStatus' + warnings: + description: 'A list of warnings (non-fatal errors) encountered. Partial + results may return if + + warnings are present in the response.' + items: + $ref: '#/components/schemas/RUMWarning' + type: array + type: object + RUMResponsePage: + description: Paging attributes. + properties: + after: + description: The cursor to use to get the next results, if any. To make + the next request, use the same parameters with the addition of `page[cursor]`. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + RUMResponseStatus: + description: The status of the response. + enum: + - done + - timeout + example: done + type: string + x-enum-varnames: + - DONE + - TIMEOUT + RUMSearchEventsRequest: + description: The request for a RUM events list. + properties: + filter: + $ref: '#/components/schemas/RUMQueryFilter' + options: + $ref: '#/components/schemas/RUMQueryOptions' + page: + $ref: '#/components/schemas/RUMQueryPageOptions' + sort: + $ref: '#/components/schemas/RUMSort' + type: object + RUMSort: + description: Sort parameters when querying events. + enum: + - timestamp + - -timestamp + type: string + x-enum-varnames: + - TIMESTAMP_ASCENDING + - TIMESTAMP_DESCENDING + RUMSortOrder: + description: The order to use, ascending or descending. + enum: + - asc + - desc + example: asc + type: string + x-enum-varnames: + - ASCENDING + - DESCENDING + RUMWarning: + description: A warning message indicating something that went wrong with the + query. + properties: + code: + description: A unique code for this type of warning. + example: unknown_index + type: string + detail: + description: A detailed explanation of this specific warning. + example: 'indexes: foo, bar' + type: string + title: + description: A short human-readable summary of the warning. + example: One or several indexes are missing or invalid, results hold data + from the other indexes + type: string + type: object + RelationshipToIncidentAttachment: + description: A relationship reference for attachments. + properties: + data: + description: An array of incident attachments. + items: + $ref: '#/components/schemas/RelationshipToIncidentAttachmentData' + type: array + required: + - data + type: object + RelationshipToIncidentAttachmentData: + description: The attachment relationship data. + properties: + id: + description: A unique identifier that represents the attachment. + example: 00000000-0000-abcd-1000-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentAttachmentType' + required: + - id + - type + type: object + RelationshipToIncidentImpactData: + description: Relationship to impact object. + properties: + id: + description: A unique identifier that represents the impact. + example: 00000000-0000-0000-2345-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentImpactsType' + required: + - id + - type + type: object + RelationshipToIncidentImpacts: + description: Relationship to impacts. + properties: + data: + description: An array of incident impacts. + items: + $ref: '#/components/schemas/RelationshipToIncidentImpactData' + type: array + required: + - data + type: object + RelationshipToIncidentIntegrationMetadataData: + description: A relationship reference for an integration metadata object. + example: + id: 00000000-abcd-0002-0000-000000000000 + type: incident_integrations + properties: + id: + description: A unique identifier that represents the integration metadata. + example: 00000000-abcd-0001-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentIntegrationMetadataType' + required: + - id + - type + type: object + RelationshipToIncidentIntegrationMetadatas: + description: A relationship reference for multiple integration metadata objects. + example: + data: + - id: 00000000-abcd-0005-0000-000000000000 + type: incident_integrations + - id: 00000000-abcd-0006-0000-000000000000 + type: incident_integrations + properties: + data: + description: Integration metadata relationship array + example: + - id: 00000000-abcd-0003-0000-000000000000 + type: incident_integrations + - id: 00000000-abcd-0004-0000-000000000000 + type: incident_integrations + items: + $ref: '#/components/schemas/RelationshipToIncidentIntegrationMetadataData' + type: array + required: + - data + type: object + RelationshipToIncidentPostmortem: + description: A relationship reference for postmortems. + example: + data: + id: 00000000-0000-abcd-3000-000000000000 + type: incident_postmortems + properties: + data: + $ref: '#/components/schemas/RelationshipToIncidentPostmortemData' + required: + - data + type: object + RelationshipToIncidentPostmortemData: + description: The postmortem relationship data. + example: + id: 00000000-0000-abcd-2000-000000000000 + type: incident_postmortems + properties: + id: + description: A unique identifier that represents the postmortem. + example: 00000000-0000-abcd-1000-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentPostmortemType' + required: + - id + - type + type: object + RelationshipToIncidentResponderData: + description: Relationship to impact object. + properties: + id: + description: A unique identifier that represents the responder. + example: 00000000-0000-0000-2345-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentRespondersType' + required: + - id + - type + type: object + RelationshipToIncidentResponders: + description: Relationship to incident responders. + properties: + data: + description: An array of incident responders. + items: + $ref: '#/components/schemas/RelationshipToIncidentResponderData' + type: array + required: + - data + type: object + RelationshipToIncidentUserDefinedFieldData: + description: Relationship to impact object. + properties: + id: + description: A unique identifier that represents the responder. + example: 00000000-0000-0000-2345-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentUserDefinedFieldType' + required: + - id + - type + type: object + RelationshipToIncidentUserDefinedFields: + description: Relationship to incident user defined fields. + properties: + data: + description: An array of user defined fields. + items: + $ref: '#/components/schemas/RelationshipToIncidentUserDefinedFieldData' + type: array + required: + - data + type: object + RelationshipToOrganization: + description: Relationship to an organization. + properties: + data: + $ref: '#/components/schemas/RelationshipToOrganizationData' + required: + - data + type: object + RelationshipToOrganizationData: + description: Relationship to organization object. + properties: + id: + description: ID of the organization. + example: 00000000-0000-beef-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/OrganizationsType' + required: + - id + - type + type: object + RelationshipToOrganizations: + description: Relationship to organizations. + properties: + data: + description: Relationships to organization objects. + example: [] + items: + $ref: '#/components/schemas/RelationshipToOrganizationData' + type: array + required: + - data + type: object + RelationshipToOutcome: + description: The JSON:API relationship to a scorecard outcome. + properties: + data: + $ref: '#/components/schemas/RelationshipToOutcomeData' + type: object + RelationshipToOutcomeData: + description: The JSON:API relationship to an outcome, which returns the related + rule id. + properties: + id: + $ref: '#/components/schemas/RuleId' + type: + $ref: '#/components/schemas/RuleType' + type: object + RelationshipToPermission: + description: Relationship to a permissions object. + properties: + data: + $ref: '#/components/schemas/RelationshipToPermissionData' + type: object + RelationshipToPermissionData: + description: Relationship to permission object. + properties: + id: + description: ID of the permission. + type: string + type: + $ref: '#/components/schemas/PermissionsType' + type: object + RelationshipToPermissions: + description: Relationship to multiple permissions objects. + properties: + data: + description: Relationships to permission objects. + items: + $ref: '#/components/schemas/RelationshipToPermissionData' + type: array + type: object + RelationshipToRole: + description: Relationship to role. + properties: + data: + $ref: '#/components/schemas/RelationshipToRoleData' + type: object + RelationshipToRoleData: + description: Relationship to role object. + properties: + id: + description: The unique identifier of the role. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + type: + $ref: '#/components/schemas/RolesType' + type: object + RelationshipToRoles: + description: Relationship to roles. + properties: + data: + description: An array containing type and the unique identifier of a role. + items: + $ref: '#/components/schemas/RelationshipToRoleData' + type: array + type: object + RelationshipToRule: + description: Scorecard create rule response relationship. + properties: + scorecard: + $ref: '#/components/schemas/RelationshipToRuleData' + type: object + RelationshipToRuleData: + description: Relationship data for a rule. + properties: + data: + $ref: '#/components/schemas/RelationshipToRuleDataObject' + type: object + RelationshipToRuleDataObject: + description: Rule relationship data. + properties: + id: + description: The unique ID for a scorecard. + example: 00000000-0000-beef-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/ScorecardType' + type: object + RelationshipToSAMLAssertionAttribute: + description: AuthN Mapping relationship to SAML Assertion Attribute. + properties: + data: + $ref: '#/components/schemas/RelationshipToSAMLAssertionAttributeData' + required: + - data + type: object + RelationshipToSAMLAssertionAttributeData: + description: Data of AuthN Mapping relationship to SAML Assertion Attribute. + properties: + id: + description: The ID of the SAML assertion attribute. + example: '0' + type: string + type: + $ref: '#/components/schemas/SAMLAssertionAttributesType' + required: + - id + - type + type: object + RelationshipToTeamLinkData: + description: Relationship between a link and a team + properties: + id: + description: The team link's identifier + example: f9bb8444-af7f-11ec-ac2c-da7ad0900001 + type: string + type: + $ref: '#/components/schemas/TeamLinkType' + required: + - id + - type + type: object + RelationshipToTeamLinks: + description: Relationship between a team and a team link + properties: + data: + description: Related team links + items: + $ref: '#/components/schemas/RelationshipToTeamLinkData' + type: array + links: + $ref: '#/components/schemas/TeamRelationshipsLinks' + type: object + RelationshipToUser: + description: Relationship to user. + properties: + data: + $ref: '#/components/schemas/RelationshipToUserData' + required: + - data + type: object + RelationshipToUserData: + description: Relationship to user object. + properties: + id: + description: A unique identifier that represents the user. + example: 00000000-0000-0000-2345-000000000000 + type: string + type: + $ref: '#/components/schemas/UsersType' + required: + - id + - type + type: object + RelationshipToUserTeamPermission: + description: Relationship between a user team permission and a team + properties: + data: + $ref: '#/components/schemas/RelationshipToUserTeamPermissionData' + links: + $ref: '#/components/schemas/TeamRelationshipsLinks' + type: object + RelationshipToUserTeamPermissionData: + description: Related user team permission data + properties: + id: + description: The ID of the user team permission + example: UserTeamPermissions-aeadc05e-98a8-11ec-ac2c-da7ad0900001-416595 + type: string + type: + $ref: '#/components/schemas/UserTeamPermissionType' + required: + - id + - type + type: object + RelationshipToUserTeamTeam: + description: Relationship between team membership and team + properties: + data: + $ref: '#/components/schemas/RelationshipToUserTeamTeamData' + required: + - data + type: object + RelationshipToUserTeamTeamData: + description: The team associated with the membership + properties: + id: + description: The ID of the team associated with the membership + example: d7e15d9d-d346-43da-81d8-3d9e71d9a5e9 + type: string + type: + $ref: '#/components/schemas/UserTeamTeamType' + required: + - id + - type + type: object + RelationshipToUserTeamUser: + description: Relationship between team membership and user + properties: + data: + $ref: '#/components/schemas/RelationshipToUserTeamUserData' + required: + - data + type: object + RelationshipToUserTeamUserData: + description: A user's relationship with a team + properties: + id: + description: The ID of the user associated with the team + example: b8626d7e-cedd-11eb-abf5-da7ad0900001 + type: string + type: + $ref: '#/components/schemas/UserTeamUserType' + required: + - id + - type + type: object + RelationshipToUsers: + description: Relationship to users. + properties: + data: + description: Relationships to user objects. + example: [] + items: + $ref: '#/components/schemas/RelationshipToUserData' + type: array + required: + - data + type: object + ReorderRetentionFiltersRequest: + description: A list of retention filters to reorder. + properties: + data: + description: A list of retention filters objects. + items: + $ref: '#/components/schemas/RetentionFilterWithoutAttributes' + type: array + required: + - data + type: object + ResponseMetaAttributes: + description: Object describing meta attributes of response. + properties: + page: + $ref: '#/components/schemas/Pagination' + type: object + RestrictionPolicy: + description: Restriction policy object. + properties: + attributes: + $ref: '#/components/schemas/RestrictionPolicyAttributes' + id: + description: The identifier, always equivalent to the value specified in + the `resource_id` path parameter. + example: dashboard:abc-def-ghi + type: string + type: + $ref: '#/components/schemas/RestrictionPolicyType' + required: + - type + - id + - attributes + type: object + RestrictionPolicyAttributes: + description: Restriction policy attributes. + example: + bindings: [] + properties: + bindings: + description: An array of bindings. + items: + $ref: '#/components/schemas/RestrictionPolicyBinding' + type: array + required: + - bindings + type: object + RestrictionPolicyBinding: + description: Specifies which principals are associated with a relation. + properties: + principals: + description: 'An array of principals. A principal is a subject or group + of subjects. + + Each principal is formatted as `type:id`. Supported types: `role`, `team`, + `user`, and `org`. + + The org ID can be obtained through the api/v2/current_user API. + + The user principal type accepts service account IDs.' + example: + - role:00000000-0000-1111-0000-000000000000 + items: + description: 'Subject or group of subjects. Each principal is formatted + as `type:id`. + + Supported types: `role`, `team`, `user`, and `org`. + + The org ID can be obtained through the api/v2/current_user API. + + The user principal type accepts service account IDs.' + type: string + type: array + relation: + description: The role/level of access. + example: editor + type: string + required: + - relation + - principals + type: object + RestrictionPolicyResponse: + description: Response containing information about a single restriction policy. + properties: + data: + $ref: '#/components/schemas/RestrictionPolicy' + required: + - data + type: object + RestrictionPolicyType: + default: restriction_policy + description: Restriction policy type. + enum: + - restriction_policy + example: restriction_policy + type: string + x-enum-varnames: + - RESTRICTION_POLICY + RestrictionPolicyUpdateRequest: + description: Update request for a restriction policy. + properties: + data: + $ref: '#/components/schemas/RestrictionPolicy' + required: + - data + type: object + RetentionFilter: + description: The definition of the retention filter. + properties: + attributes: + $ref: '#/components/schemas/RetentionFilterAttributes' + id: + description: The ID of the retention filter. + example: 7RBOb7dLSYWI01yc3pIH8w + type: string + type: + $ref: '#/components/schemas/ApmRetentionFilterType' + required: + - id + - type + - attributes + type: object + RetentionFilterAll: + description: The definition of the retention filter. + properties: + attributes: + $ref: '#/components/schemas/RetentionFilterAllAttributes' + id: + description: The ID of the retention filter. + example: 7RBOb7dLSYWI01yc3pIH8w + type: string + type: + $ref: '#/components/schemas/ApmRetentionFilterType' + required: + - id + - type + - attributes + type: object + RetentionFilterAllAttributes: + description: The attributes of the retention filter. + properties: + created_at: + description: The creation timestamp of the retention filter. + format: int64 + type: integer + created_by: + description: The creator of the retention filter. + type: string + editable: + description: Shows whether the filter can be edited. + example: true + type: boolean + enabled: + description: The status of the retention filter (Enabled/Disabled). + example: true + type: boolean + execution_order: + description: The execution order of the retention filter. + format: int64 + type: integer + filter: + $ref: '#/components/schemas/SpansFilter' + filter_type: + $ref: '#/components/schemas/RetentionFilterAllType' + modified_at: + description: The modification timestamp of the retention filter. + format: int64 + type: integer + modified_by: + description: The modifier of the retention filter. + type: string + name: + description: The name of the retention filter. + example: my retention filter + type: string + rate: + description: 'Sample rate to apply to spans going through this retention + filter, + + a value of 1.0 keeps all spans matching the query.' + example: 1.0 + format: double + type: number + type: object + RetentionFilterAllType: + default: spans-sampling-processor + description: The type of retention filter. + enum: + - spans-sampling-processor + - spans-errors-sampling-processor + - spans-appsec-sampling-processor + type: string + x-enum-varnames: + - SPANS_SAMPLING_PROCESSOR + - SPANS_ERRORS_SAMPLING_PROCESSOR + - SPANS_APPSEC_SAMPLING_PROCESSOR + RetentionFilterAttributes: + description: The attributes of the retention filter. + properties: + created_at: + description: The creation timestamp of the retention filter. + format: int64 + type: integer + created_by: + description: The creator of the retention filter. + type: string + editable: + description: Shows whether the filter can be edited. + example: true + type: boolean + enabled: + description: The status of the retention filter (Enabled/Disabled). + example: true + type: boolean + execution_order: + description: The execution order of the retention filter. + format: int64 + type: integer + filter: + $ref: '#/components/schemas/SpansFilter' + filter_type: + $ref: '#/components/schemas/RetentionFilterType' + modified_at: + description: The modification timestamp of the retention filter. + format: int64 + type: integer + modified_by: + description: The modifier of the retention filter. + type: string + name: + description: The name of the retention filter. + example: my retention filter + type: string + rate: + description: 'Sample rate to apply to spans going through this retention + filter, + + a value of 1.0 keeps all spans matching the query.' + example: 1.0 + format: double + type: number + type: object + RetentionFilterCreateAttributes: + description: The object describing the configuration of the retention filter + to create/update. + properties: + enabled: + description: Enable/Disable the retention filter. + example: true + type: boolean + filter: + $ref: '#/components/schemas/SpansFilterCreate' + filter_type: + $ref: '#/components/schemas/RetentionFilterType' + name: + description: The name of the retention filter. + example: my retention filter + type: string + rate: + description: 'Sample rate to apply to spans going through this retention + filter, + + a value of 1.0 keeps all spans matching the query.' + example: 1.0 + format: double + type: number + required: + - name + - filter + - enabled + - filter_type + - rate + type: object + RetentionFilterCreateData: + description: The body of the retention filter to be created. + properties: + attributes: + $ref: '#/components/schemas/RetentionFilterCreateAttributes' + type: + $ref: '#/components/schemas/ApmRetentionFilterType' + required: + - attributes + - type + type: object + RetentionFilterCreateRequest: + description: The body of the retention filter to be created. + properties: + data: + $ref: '#/components/schemas/RetentionFilterCreateData' + required: + - data + type: object + RetentionFilterResponse: + description: The retention filters definition. + properties: + data: + $ref: '#/components/schemas/RetentionFilter' + type: object + RetentionFilterType: + default: spans-sampling-processor + description: The type of retention filter. The value should always be spans-sampling-processor. + enum: + - spans-sampling-processor + example: spans-sampling-processor + type: string + x-enum-varnames: + - SPANS_SAMPLING_PROCESSOR + RetentionFilterUpdateData: + description: The body of the retention filter to be updated. + properties: + attributes: + $ref: '#/components/schemas/RetentionFilterCreateAttributes' + id: + description: The ID of the retention filter. + example: retention-filter-id + type: string + type: + $ref: '#/components/schemas/ApmRetentionFilterType' + required: + - id + - attributes + - type + type: object + RetentionFilterUpdateRequest: + description: The body of the retention filter to be updated. + properties: + data: + $ref: '#/components/schemas/RetentionFilterUpdateData' + required: + - data + type: object + RetentionFilterWithoutAttributes: + description: The retention filter object . + properties: + id: + description: The ID of the retention filter. + example: 7RBOb7dLSYWI01yc3pIH8w + type: string + type: + $ref: '#/components/schemas/ApmRetentionFilterType' + required: + - id + - type + type: object + RetentionFiltersResponse: + description: An ordered list of retention filters. + properties: + data: + description: A list of retention filters objects. + items: + $ref: '#/components/schemas/RetentionFilterAll' + type: array + required: + - data + type: object + Role: + description: Role object returned by the API. + properties: + attributes: + $ref: '#/components/schemas/RoleAttributes' + id: + description: The unique identifier of the role. + type: string + relationships: + $ref: '#/components/schemas/RoleResponseRelationships' + type: + $ref: '#/components/schemas/RolesType' + required: + - type + type: object + RoleAttributes: + description: Attributes of the role. + properties: + created_at: + description: Creation time of the role. + format: date-time + readOnly: true + type: string + modified_at: + description: Time of last role modification. + format: date-time + readOnly: true + type: string + name: + description: The name of the role. The name is neither unique nor a stable + identifier of the role. + type: string + user_count: + description: Number of users with that role. + format: int64 + readOnly: true + type: integer + type: object + RoleClone: + description: Data for the clone role request. + properties: + attributes: + $ref: '#/components/schemas/RoleCloneAttributes' + type: + $ref: '#/components/schemas/RolesType' + required: + - type + - attributes + type: object + RoleCloneAttributes: + description: Attributes required to create a new role by cloning an existing + one. + properties: + name: + description: Name of the new role that is cloned. + example: cloned-role + type: string + required: + - name + type: object + RoleCloneRequest: + description: Request to create a role by cloning an existing role. + properties: + data: + $ref: '#/components/schemas/RoleClone' + required: + - data + type: object + RoleCreateAttributes: + description: Attributes of the created role. + properties: + created_at: + description: Creation time of the role. + format: date-time + readOnly: true + type: string + modified_at: + description: Time of last role modification. + format: date-time + readOnly: true + type: string + name: + description: Name of the role. + example: developers + type: string + required: + - name + type: object + RoleCreateData: + description: Data related to the creation of a role. + properties: + attributes: + $ref: '#/components/schemas/RoleCreateAttributes' + relationships: + $ref: '#/components/schemas/RoleRelationships' + type: + $ref: '#/components/schemas/RolesType' + required: + - attributes + type: object + RoleCreateRequest: + description: Create a role. + properties: + data: + $ref: '#/components/schemas/RoleCreateData' + required: + - data + type: object + RoleCreateResponse: + description: Response containing information about a created role. + properties: + data: + $ref: '#/components/schemas/RoleCreateResponseData' + type: object + RoleCreateResponseData: + description: Role object returned by the API. + properties: + attributes: + $ref: '#/components/schemas/RoleCreateAttributes' + id: + description: The unique identifier of the role. + type: string + relationships: + $ref: '#/components/schemas/RoleResponseRelationships' + type: + $ref: '#/components/schemas/RolesType' + required: + - type + type: object + RoleRelationships: + description: Relationships of the role object. + properties: + permissions: + $ref: '#/components/schemas/RelationshipToPermissions' + users: + $ref: '#/components/schemas/RelationshipToUsers' + type: object + RoleResponse: + description: Response containing information about a single role. + properties: + data: + $ref: '#/components/schemas/Role' + type: object + RoleResponseRelationships: + description: Relationships of the role object returned by the API. + properties: + permissions: + $ref: '#/components/schemas/RelationshipToPermissions' + type: object + RoleUpdateAttributes: + description: Attributes of the role. + properties: + created_at: + description: Creation time of the role. + format: date-time + readOnly: true + type: string + modified_at: + description: Time of last role modification. + format: date-time + readOnly: true + type: string + name: + description: Name of the role. + type: string + type: object + RoleUpdateData: + description: Data related to the update of a role. + properties: + attributes: + $ref: '#/components/schemas/RoleUpdateAttributes' + id: + description: The unique identifier of the role. + example: 00000000-0000-1111-0000-000000000000 + type: string + relationships: + $ref: '#/components/schemas/RoleRelationships' + type: + $ref: '#/components/schemas/RolesType' + required: + - attributes + - type + - id + type: object + RoleUpdateRequest: + description: Update a role. + properties: + data: + $ref: '#/components/schemas/RoleUpdateData' + required: + - data + type: object + RoleUpdateResponse: + description: Response containing information about an updated role. + properties: + data: + $ref: '#/components/schemas/RoleUpdateResponseData' + type: object + RoleUpdateResponseData: + description: Role object returned by the API. + properties: + attributes: + $ref: '#/components/schemas/RoleUpdateAttributes' + id: + description: The unique identifier of the role. + type: string + relationships: + $ref: '#/components/schemas/RoleResponseRelationships' + type: + $ref: '#/components/schemas/RolesType' + required: + - type + type: object + RolesResponse: + description: Response containing information about multiple roles. + properties: + data: + description: Array of returned roles. + items: + $ref: '#/components/schemas/Role' + type: array + meta: + $ref: '#/components/schemas/ResponseMetaAttributes' + type: object + RolesSort: + default: name + description: Sorting options for roles. + enum: + - name + - -name + - modified_at + - -modified_at + - user_count + - -user_count + type: string + x-enum-varnames: + - NAME_ASCENDING + - NAME_DESCENDING + - MODIFIED_AT_ASCENDING + - MODIFIED_AT_DESCENDING + - USER_COUNT_ASCENDING + - USER_COUNT_DESCENDING + RolesType: + default: roles + description: Roles type. + enum: + - roles + example: roles + type: string + x-enum-varnames: + - ROLES + RuleAttributes: + description: Details of a rule. + properties: + category: + deprecated: true + description: The scorecard name to which this rule must belong. + type: string + created_at: + description: Creation time of the rule outcome. + format: date-time + type: string + custom: + description: Defines if the rule is a custom rule. + type: boolean + description: + description: Explanation of the rule. + type: string + enabled: + description: If enabled, the rule is calculated as part of the score. + example: true + type: boolean + modified_at: + description: Time of the last rule outcome modification. + format: date-time + type: string + name: + description: Name of the rule. + example: Team Defined + type: string + owner: + description: Owner of the rule. + type: string + scorecard_name: + description: The scorecard name to which this rule must belong. + example: Deployments automated via Deployment Trains + type: string + type: object + RuleId: + description: The unique ID for a scorecard rule. + example: 00000000-0000-beef-0000-000000000000 + type: string + RuleOutcomeRelationships: + description: The JSON:API relationship to a scorecard rule. + properties: + rule: + $ref: '#/components/schemas/RelationshipToOutcome' + type: object + RuleType: + default: rule + description: The JSON:API type for scorecard rules. + enum: + - rule + example: rule + type: string + x-enum-varnames: + - RULE + SAMLAssertionAttribute: + description: SAML assertion attribute. + properties: + attributes: + $ref: '#/components/schemas/SAMLAssertionAttributeAttributes' + id: + description: The ID of the SAML assertion attribute. + example: '0' + type: string + type: + $ref: '#/components/schemas/SAMLAssertionAttributesType' + required: + - id + - type + type: object + SAMLAssertionAttributeAttributes: + description: Key/Value pair of attributes used in SAML assertion attributes. + properties: + attribute_key: + description: Key portion of a key/value pair of the attribute sent from + the Identity Provider. + example: member-of + type: string + attribute_value: + description: Value portion of a key/value pair of the attribute sent from + the Identity Provider. + example: Development + type: string + type: object + SAMLAssertionAttributesType: + default: saml_assertion_attributes + description: SAML assertion attributes resource type. + enum: + - saml_assertion_attributes + example: saml_assertion_attributes + type: string + x-enum-varnames: + - SAML_ASSERTION_ATTRIBUTES + ScalarColumn: + description: A single column in a scalar query response. + oneOf: + - $ref: '#/components/schemas/GroupScalarColumn' + - $ref: '#/components/schemas/DataScalarColumn' + ScalarColumnTypeGroup: + default: group + description: The type of column present for groups. + enum: + - group + example: group + type: string + x-enum-varnames: + - GROUP + ScalarColumnTypeNumber: + default: number + description: The type of column present for numbers. + enum: + - number + example: number + type: string + x-enum-varnames: + - NUMBER + ScalarFormulaQueryRequest: + description: A wrapper request around one scalar query to be executed. + properties: + data: + $ref: '#/components/schemas/ScalarFormulaRequest' + required: + - data + type: object + ScalarFormulaQueryResponse: + description: A message containing one or more responses to scalar queries. + properties: + data: + $ref: '#/components/schemas/ScalarResponse' + errors: + description: An error generated when processing a request. + type: string + type: object + ScalarFormulaRequest: + description: A single scalar query to be executed. + properties: + attributes: + $ref: '#/components/schemas/ScalarFormulaRequestAttributes' + type: + $ref: '#/components/schemas/ScalarFormulaRequestType' + required: + - type + - attributes + type: object + ScalarFormulaRequestAttributes: + description: The object describing a scalar formula request. + properties: + formulas: + description: List of formulas to be calculated and returned as responses. + items: + $ref: '#/components/schemas/QueryFormula' + type: array + from: + description: Start date (inclusive) of the query in milliseconds since the + Unix epoch. + example: 1568899800000 + format: int64 + type: integer + queries: + $ref: '#/components/schemas/ScalarFormulaRequestQueries' + to: + description: End date (exclusive) of the query in milliseconds since the + Unix epoch. + example: 1568923200000 + format: int64 + type: integer + required: + - to + - from + - queries + type: object + ScalarFormulaRequestQueries: + description: List of queries to be run and used as inputs to the formulas. + items: + $ref: '#/components/schemas/ScalarQuery' + type: array + ScalarFormulaRequestType: + default: scalar_request + description: The type of the resource. The value should always be scalar_request. + enum: + - scalar_request + example: scalar_request + type: string + x-enum-varnames: + - SCALAR_REQUEST + ScalarFormulaResponseAtrributes: + description: The object describing a scalar response. + properties: + columns: + description: List of response columns, each corresponding to an individual + formula or query in the request and with values in parallel arrays matching + the series list. + items: + $ref: '#/components/schemas/ScalarColumn' + type: array + type: object + ScalarFormulaResponseType: + default: scalar_response + description: The type of the resource. The value should always be scalar_response. + enum: + - scalar_response + example: scalar_response + type: string + x-enum-varnames: + - SCALAR_RESPONSE + ScalarMeta: + description: Metadata for the resulting numerical values. + properties: + unit: + description: 'Detailed information about the unit. + + First element describes the "primary unit" (for example, `bytes` in `bytes + per second`). + + The second element describes the "per unit" (for example, `second` in + `bytes per second`). + + If the second element is not present, the API returns null.' + items: + $ref: '#/components/schemas/Unit' + nullable: true + type: array + type: object + ScalarQuery: + description: An individual scalar query to one of the basic Datadog data sources. + example: + aggregator: avg + data_source: metrics + query: avg:system.cpu.user{*} by {env} + oneOf: + - $ref: '#/components/schemas/MetricsScalarQuery' + - $ref: '#/components/schemas/EventsScalarQuery' + ScalarResponse: + description: A message containing the response to a scalar query. + properties: + attributes: + $ref: '#/components/schemas/ScalarFormulaResponseAtrributes' + type: + $ref: '#/components/schemas/ScalarFormulaResponseType' + type: object + ScorecardType: + default: scorecard + description: The JSON:API type for scorecard. + enum: + - scorecard + example: scorecard + type: string + x-enum-varnames: + - SCORECARD + SecurityFilter: + description: The security filter's properties. + properties: + attributes: + $ref: '#/components/schemas/SecurityFilterAttributes' + id: + $ref: '#/components/schemas/SecurityFilterID' + type: + $ref: '#/components/schemas/SecurityFilterType' + type: object + SecurityFilterAttributes: + description: The object describing a security filter. + properties: + exclusion_filters: + description: The list of exclusion filters applied in this security filter. + items: + $ref: '#/components/schemas/SecurityFilterExclusionFilterResponse' + type: array + filtered_data_type: + $ref: '#/components/schemas/SecurityFilterFilteredDataType' + is_builtin: + description: Whether the security filter is the built-in filter. + example: false + type: boolean + is_enabled: + description: Whether the security filter is enabled. + example: false + type: boolean + name: + description: The security filter name. + example: Custom security filter + type: string + query: + description: The security filter query. Logs accepted by this query will + be accepted by this filter. + example: service:api + type: string + version: + description: The version of the security filter. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + type: object + SecurityFilterCreateAttributes: + description: Object containing the attributes of the security filter to be created. + properties: + exclusion_filters: + description: Exclusion filters to exclude some logs from the security filter. + example: + - name: Exclude staging + query: source:staging + items: + $ref: '#/components/schemas/SecurityFilterExclusionFilter' + type: array + filtered_data_type: + $ref: '#/components/schemas/SecurityFilterFilteredDataType' + is_enabled: + description: Whether the security filter is enabled. + example: true + type: boolean + name: + description: The name of the security filter. + example: Custom security filter + type: string + query: + description: The query of the security filter. + example: service:api + type: string + required: + - name + - query + - exclusion_filters + - filtered_data_type + - is_enabled + type: object + SecurityFilterCreateData: + description: Object for a single security filter. + properties: + attributes: + $ref: '#/components/schemas/SecurityFilterCreateAttributes' + type: + $ref: '#/components/schemas/SecurityFilterType' + required: + - type + - attributes + type: object + SecurityFilterCreateRequest: + description: Request object that includes the security filter that you would + like to create. + properties: + data: + $ref: '#/components/schemas/SecurityFilterCreateData' + required: + - data + type: object + SecurityFilterExclusionFilter: + description: Exclusion filter for the security filter. + example: + name: Exclude staging + query: source:staging + properties: + name: + description: Exclusion filter name. + example: Exclude staging + type: string + query: + description: Exclusion filter query. Logs that match this query are excluded + from the security filter. + example: source:staging + type: string + required: + - name + - query + type: object + SecurityFilterExclusionFilterResponse: + description: A single exclusion filter. + properties: + name: + description: The exclusion filter name. + example: Exclude staging + type: string + query: + description: The exclusion filter query. + example: source:staging + type: string + type: object + SecurityFilterFilteredDataType: + description: The filtered data type. + enum: + - logs + example: logs + type: string + x-enum-varnames: + - LOGS + SecurityFilterID: + description: The ID of the security filter. + example: 3dd-0uc-h1s + type: string + SecurityFilterMeta: + description: Optional metadata associated to the response. + properties: + warning: + description: A warning message. + example: All the security filters are disabled. As a result, no logs are + being analyzed. + type: string + type: object + SecurityFilterResponse: + description: Response object which includes a single security filter. + properties: + data: + $ref: '#/components/schemas/SecurityFilter' + meta: + $ref: '#/components/schemas/SecurityFilterMeta' + type: object + SecurityFilterType: + default: security_filters + description: The type of the resource. The value should always be `security_filters`. + enum: + - security_filters + example: security_filters + type: string + x-enum-varnames: + - SECURITY_FILTERS + SecurityFilterUpdateAttributes: + description: The security filters properties to be updated. + properties: + exclusion_filters: + description: Exclusion filters to exclude some logs from the security filter. + example: [] + items: + $ref: '#/components/schemas/SecurityFilterExclusionFilter' + type: array + filtered_data_type: + $ref: '#/components/schemas/SecurityFilterFilteredDataType' + is_enabled: + description: Whether the security filter is enabled. + example: true + type: boolean + name: + description: The name of the security filter. + example: Custom security filter + type: string + query: + description: The query of the security filter. + example: service:api + type: string + version: + description: The version of the security filter to update. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + type: object + SecurityFilterUpdateData: + description: The new security filter properties. + properties: + attributes: + $ref: '#/components/schemas/SecurityFilterUpdateAttributes' + type: + $ref: '#/components/schemas/SecurityFilterType' + required: + - type + - attributes + type: object + SecurityFilterUpdateRequest: + description: The new security filter body. + properties: + data: + $ref: '#/components/schemas/SecurityFilterUpdateData' + required: + - data + type: object + SecurityFiltersResponse: + description: All the available security filters objects. + properties: + data: + description: A list of security filters objects. + items: + $ref: '#/components/schemas/SecurityFilter' + type: array + meta: + $ref: '#/components/schemas/SecurityFilterMeta' + type: object + SecurityMonitoringFilter: + description: The rule's suppression filter. + properties: + action: + $ref: '#/components/schemas/SecurityMonitoringFilterAction' + query: + description: Query for selecting logs to apply the filtering action. + type: string + type: object + SecurityMonitoringFilterAction: + description: The type of filtering action. + enum: + - require + - suppress + type: string + x-enum-varnames: + - REQUIRE + - SUPPRESS + SecurityMonitoringListRulesResponse: + description: List of rules. + properties: + data: + description: Array containing the list of rules. + items: + $ref: '#/components/schemas/SecurityMonitoringRuleResponse' + type: array + meta: + $ref: '#/components/schemas/ResponseMetaAttributes' + type: object + SecurityMonitoringRuleCase: + description: Case when signal is generated. + properties: + condition: + description: 'A rule case contains logical operations (`>`,`>=`, `&&`, `||`) + to determine if a signal should be generated + + based on the event counts in the previously defined queries.' + type: string + name: + description: Name of the case. + type: string + notifications: + description: Notification targets for each rule case. + items: + description: Notification. + type: string + type: array + status: + $ref: '#/components/schemas/SecurityMonitoringRuleSeverity' + type: object + SecurityMonitoringRuleCaseCreate: + description: Case when signal is generated. + properties: + condition: + description: 'A rule case contains logical operations (`>`,`>=`, `&&`, `||`) + to determine if a signal should be generated + + based on the event counts in the previously defined queries.' + type: string + name: + description: Name of the case. + type: string + notifications: + description: Notification targets for each rule case. + items: + description: Notification. + type: string + type: array + status: + $ref: '#/components/schemas/SecurityMonitoringRuleSeverity' + required: + - status + type: object + SecurityMonitoringRuleCreatePayload: + description: Create a new rule. + oneOf: + - $ref: '#/components/schemas/SecurityMonitoringStandardRuleCreatePayload' + - $ref: '#/components/schemas/SecurityMonitoringSignalRuleCreatePayload' + - $ref: '#/components/schemas/CloudConfigurationRuleCreatePayload' + SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv: + description: 'If true, signals in non-production environments have a lower severity + than what is defined by the rule case, which can reduce signal noise. + + The severity is decreased by one level: `CRITICAL` in production becomes `HIGH` + in non-production, `HIGH` becomes `MEDIUM` and so on. `INFO` remains `INFO`. + + The decrement is applied when the environment tag of the signal starts with + `staging`, `test` or `dev`.' + example: false + type: boolean + SecurityMonitoringRuleDetectionMethod: + description: The detection method. + enum: + - threshold + - new_value + - anomaly_detection + - impossible_travel + - hardcoded + - third_party + type: string + x-enum-varnames: + - THRESHOLD + - NEW_VALUE + - ANOMALY_DETECTION + - IMPOSSIBLE_TRAVEL + - HARDCODED + - THIRD_PARTY + SecurityMonitoringRuleEvaluationWindow: + description: 'A time window is specified to match when at least one of the cases + matches true. This is a sliding window + + and evaluates in real time.' + enum: + - 0 + - 60 + - 300 + - 600 + - 900 + - 1800 + - 3600 + - 7200 + format: int32 + type: integer + x-enum-varnames: + - ZERO_MINUTES + - ONE_MINUTE + - FIVE_MINUTES + - TEN_MINUTES + - FIFTEEN_MINUTES + - THIRTY_MINUTES + - ONE_HOUR + - TWO_HOURS + SecurityMonitoringRuleHardcodedEvaluatorType: + description: Hardcoded evaluator type. + enum: + - log4shell + type: string + x-enum-varnames: + - LOG4SHELL + SecurityMonitoringRuleImpossibleTravelOptions: + description: Options on impossible travel rules. + properties: + baselineUserLocations: + $ref: '#/components/schemas/SecurityMonitoringRuleImpossibleTravelOptionsBaselineUserLocations' + type: object + SecurityMonitoringRuleImpossibleTravelOptionsBaselineUserLocations: + description: 'If true, signals are suppressed for the first 24 hours. In that + time, Datadog learns the user''s regular + + access locations. This can be helpful to reduce noise and infer VPN usage + or credentialed API access.' + example: true + type: boolean + SecurityMonitoringRuleKeepAlive: + description: "Once a signal is generated, the signal will remain \u201Copen\u201D + if a case is matched at least once within\nthis keep alive window." + enum: + - 0 + - 60 + - 300 + - 600 + - 900 + - 1800 + - 3600 + - 7200 + - 10800 + - 21600 + format: int32 + type: integer + x-enum-varnames: + - ZERO_MINUTES + - ONE_MINUTE + - FIVE_MINUTES + - TEN_MINUTES + - FIFTEEN_MINUTES + - THIRTY_MINUTES + - ONE_HOUR + - TWO_HOURS + - THREE_HOURS + - SIX_HOURS + SecurityMonitoringRuleMaxSignalDuration: + description: "A signal will \u201Cclose\u201D regardless of the query being + matched once the time exceeds the maximum duration.\nThis time is calculated + from the first seen timestamp." + enum: + - 0 + - 60 + - 300 + - 600 + - 900 + - 1800 + - 3600 + - 7200 + - 10800 + - 21600 + - 43200 + - 86400 + format: int32 + type: integer + x-enum-varnames: + - ZERO_MINUTES + - ONE_MINUTE + - FIVE_MINUTES + - TEN_MINUTES + - FIFTEEN_MINUTES + - THIRTY_MINUTES + - ONE_HOUR + - TWO_HOURS + - THREE_HOURS + - SIX_HOURS + - TWELVE_HOURS + - ONE_DAY + SecurityMonitoringRuleNewValueOptions: + description: Options on new value rules. + properties: + forgetAfter: + $ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsForgetAfter' + learningDuration: + $ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsLearningDuration' + learningMethod: + $ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsLearningMethod' + learningThreshold: + $ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsLearningThreshold' + type: object + SecurityMonitoringRuleNewValueOptionsForgetAfter: + description: The duration in days after which a learned value is forgotten. + enum: + - 1 + - 2 + - 7 + - 14 + - 21 + - 28 + format: int32 + type: integer + x-enum-varnames: + - ONE_DAY + - TWO_DAYS + - ONE_WEEK + - TWO_WEEKS + - THREE_WEEKS + - FOUR_WEEKS + SecurityMonitoringRuleNewValueOptionsLearningDuration: + default: 0 + description: 'The duration in days during which values are learned, and after + which signals will be generated for values that + + weren''t learned. If set to 0, a signal will be generated for all new values + after the first value is learned.' + enum: + - 0 + - 1 + - 7 + format: int32 + type: integer + x-enum-varnames: + - ZERO_DAYS + - ONE_DAY + - SEVEN_DAYS + SecurityMonitoringRuleNewValueOptionsLearningMethod: + default: duration + description: The learning method used to determine when signals should be generated + for values that weren't learned. + enum: + - duration + - threshold + type: string + x-enum-varnames: + - DURATION + - THRESHOLD + SecurityMonitoringRuleNewValueOptionsLearningThreshold: + default: 0 + description: A number of occurrences after which signals will be generated for + values that weren't learned. + enum: + - 0 + - 1 + format: int32 + type: integer + x-enum-varnames: + - ZERO_OCCURRENCES + - ONE_OCCURRENCE + SecurityMonitoringRuleOptions: + description: Options on rules. + properties: + complianceRuleOptions: + $ref: '#/components/schemas/CloudConfigurationComplianceRuleOptions' + decreaseCriticalityBasedOnEnv: + $ref: '#/components/schemas/SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv' + detectionMethod: + $ref: '#/components/schemas/SecurityMonitoringRuleDetectionMethod' + evaluationWindow: + $ref: '#/components/schemas/SecurityMonitoringRuleEvaluationWindow' + hardcodedEvaluatorType: + $ref: '#/components/schemas/SecurityMonitoringRuleHardcodedEvaluatorType' + impossibleTravelOptions: + $ref: '#/components/schemas/SecurityMonitoringRuleImpossibleTravelOptions' + keepAlive: + $ref: '#/components/schemas/SecurityMonitoringRuleKeepAlive' + maxSignalDuration: + $ref: '#/components/schemas/SecurityMonitoringRuleMaxSignalDuration' + newValueOptions: + $ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptions' + thirdPartyRuleOptions: + $ref: '#/components/schemas/SecurityMonitoringRuleThirdPartyOptions' + type: object + SecurityMonitoringRuleQuery: + description: Query for matching rule. + oneOf: + - $ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery' + - $ref: '#/components/schemas/SecurityMonitoringSignalRuleQuery' + SecurityMonitoringRuleQueryAggregation: + description: The aggregation type. + enum: + - count + - cardinality + - sum + - max + - new_value + - geo_data + - event_count + - none + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - SUM + - MAX + - NEW_VALUE + - GEO_DATA + - EVENT_COUNT + - NONE + SecurityMonitoringRuleResponse: + description: Create a new rule. + oneOf: + - $ref: '#/components/schemas/SecurityMonitoringStandardRuleResponse' + - $ref: '#/components/schemas/SecurityMonitoringSignalRuleResponse' + SecurityMonitoringRuleSeverity: + description: Severity of the Security Signal. + enum: + - info + - low + - medium + - high + - critical + example: critical + type: string + x-enum-varnames: + - INFO + - LOW + - MEDIUM + - HIGH + - CRITICAL + SecurityMonitoringRuleThirdPartyOptions: + description: Options on third party rules. + properties: + defaultNotifications: + description: Notification targets for the logs that do not correspond to + any of the cases. + items: + description: Notification. + type: string + type: array + defaultStatus: + $ref: '#/components/schemas/SecurityMonitoringRuleSeverity' + rootQueries: + description: Queries to be combined with third party case queries. Each + of them can have different group by fields, to aggregate differently based + on the type of alert. + items: + $ref: '#/components/schemas/SecurityMonitoringThirdPartyRootQuery' + type: array + signalTitleTemplate: + description: A template for the signal title; if omitted, the title is generated + based on the case name. + type: string + type: object + SecurityMonitoringRuleTypeCreate: + description: The rule type. + enum: + - application_security + - log_detection + - workload_security + type: string + x-enum-varnames: + - APPLICATION_SECURITY + - LOG_DETECTION + - WORKLOAD_SECURITY + SecurityMonitoringRuleTypeRead: + description: The rule type. + enum: + - log_detection + - infrastructure_configuration + - workload_security + - cloud_configuration + - application_security + type: string + x-enum-varnames: + - LOG_DETECTION + - INFRASTRUCTURE_CONFIGURATION + - WORKLOAD_SECURITY + - CLOUD_CONFIGURATION + - APPLICATION_SECURITY + SecurityMonitoringRuleUpdatePayload: + description: Update an existing rule. + properties: + cases: + description: Cases for generating signals. + items: + $ref: '#/components/schemas/SecurityMonitoringRuleCase' + type: array + complianceSignalOptions: + $ref: '#/components/schemas/CloudConfigurationRuleComplianceSignalOptions' + filters: + description: Additional queries to filter matched events before they are + processed. + items: + $ref: '#/components/schemas/SecurityMonitoringFilter' + type: array + hasExtendedTitle: + description: Whether the notifications include the triggering group-by values + in their title. + example: true + type: boolean + isEnabled: + description: Whether the rule is enabled. + type: boolean + message: + description: Message for generated signals. + type: string + name: + description: Name of the rule. + type: string + options: + $ref: '#/components/schemas/SecurityMonitoringRuleOptions' + queries: + description: Queries for selecting logs which are part of the rule. + items: + $ref: '#/components/schemas/SecurityMonitoringRuleQuery' + type: array + tags: + description: Tags for generated signals. + items: + description: Tag. + type: string + type: array + thirdPartyCases: + description: Cases for generating signals from third party rules. Only available + for third party rules. + example: [] + items: + $ref: '#/components/schemas/SecurityMonitoringThirdPartyRuleCase' + type: array + version: + description: The version of the rule being updated. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + type: object + SecurityMonitoringSignal: + description: Object description of a security signal. + properties: + attributes: + $ref: '#/components/schemas/SecurityMonitoringSignalAttributes' + id: + description: The unique ID of the security signal. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: '#/components/schemas/SecurityMonitoringSignalType' + type: object + SecurityMonitoringSignalArchiveComment: + description: Optional comment to display on archived signals. + type: string + SecurityMonitoringSignalArchiveReason: + description: Reason a signal is archived. + enum: + - none + - false_positive + - testing_or_maintenance + - investigated_case_opened + - other + type: string + x-enum-varnames: + - NONE + - FALSE_POSITIVE + - TESTING_OR_MAINTENANCE + - INVESTIGATED_CASE_OPENED + - OTHER + SecurityMonitoringSignalAssigneeUpdateAttributes: + description: Attributes describing the new assignee of a security signal. + properties: + assignee: + $ref: '#/components/schemas/SecurityMonitoringTriageUser' + version: + $ref: '#/components/schemas/SecurityMonitoringSignalVersion' + required: + - assignee + type: object + SecurityMonitoringSignalAssigneeUpdateData: + description: Data containing the patch for changing the assignee of a signal. + properties: + attributes: + $ref: '#/components/schemas/SecurityMonitoringSignalAssigneeUpdateAttributes' + required: + - attributes + type: object + SecurityMonitoringSignalAssigneeUpdateRequest: + description: Request body for changing the assignee of a given security monitoring + signal. + properties: + data: + $ref: '#/components/schemas/SecurityMonitoringSignalAssigneeUpdateData' + required: + - data + type: object + SecurityMonitoringSignalAttributes: + additionalProperties: {} + description: 'The object containing all signal attributes and their + + associated values.' + properties: + custom: + additionalProperties: {} + description: A JSON object of attributes in the security signal. + example: + workflow: + first_seen: '2020-06-23T14:46:01.000Z' + last_seen: '2020-06-23T14:46:49.000Z' + rule: + id: 0f5-e0c-805 + name: 'Brute Force Attack Grouped By User ' + version: 12 + type: object + message: + description: The message in the security signal defined by the rule that + generated the signal. + example: Detect Account Take Over (ATO) through brute force attempts + type: string + tags: + description: An array of tags associated with the security signal. + example: + - security:attack + - technique:T1110-brute-force + items: + description: The tag associated with the security signal. + type: string + type: array + timestamp: + description: The timestamp of the security signal. + example: '2019-01-02T09:42:36.320Z' + format: date-time + type: string + type: object + SecurityMonitoringSignalIncidentIds: + description: Array of incidents that are associated with this signal. + items: + description: Public ID attribute of the incident that is associated with the + signal. + example: 2066 + format: int64 + type: integer + type: array + SecurityMonitoringSignalIncidentsUpdateAttributes: + description: Attributes describing the new list of related signals for a security + signal. + properties: + incident_ids: + $ref: '#/components/schemas/SecurityMonitoringSignalIncidentIds' + version: + $ref: '#/components/schemas/SecurityMonitoringSignalVersion' + required: + - incident_ids + type: object + SecurityMonitoringSignalIncidentsUpdateData: + description: Data containing the patch for changing the related incidents of + a signal. + properties: + attributes: + $ref: '#/components/schemas/SecurityMonitoringSignalIncidentsUpdateAttributes' + required: + - attributes + type: object + SecurityMonitoringSignalIncidentsUpdateRequest: + description: Request body for changing the related incidents of a given security + monitoring signal. + properties: + data: + $ref: '#/components/schemas/SecurityMonitoringSignalIncidentsUpdateData' + required: + - data + type: object + SecurityMonitoringSignalListRequest: + description: The request for a security signal list. + properties: + filter: + $ref: '#/components/schemas/SecurityMonitoringSignalListRequestFilter' + page: + $ref: '#/components/schemas/SecurityMonitoringSignalListRequestPage' + sort: + $ref: '#/components/schemas/SecurityMonitoringSignalsSort' + type: object + SecurityMonitoringSignalListRequestFilter: + description: Search filters for listing security signals. + properties: + from: + description: The minimum timestamp for requested security signals. + example: '2019-01-02T09:42:36.320Z' + format: date-time + type: string + query: + description: Search query for listing security signals. + example: security:attack status:high + type: string + to: + description: The maximum timestamp for requested security signals. + example: '2019-01-03T09:42:36.320Z' + format: date-time + type: string + type: object + SecurityMonitoringSignalListRequestPage: + description: The paging attributes for listing security signals. + properties: + cursor: + description: A list of results using the cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + limit: + default: 10 + description: The maximum number of security signals in the response. + example: 25 + format: int32 + maximum: 1000 + type: integer + type: object + SecurityMonitoringSignalMetadataType: + default: signal_metadata + description: The type of event. + enum: + - signal_metadata + example: signal_metadata + type: string + x-enum-varnames: + - SIGNAL_METADATA + SecurityMonitoringSignalResponse: + description: Security Signal response data object. + properties: + data: + $ref: '#/components/schemas/SecurityMonitoringSignal' + type: object + SecurityMonitoringSignalRuleCreatePayload: + description: Create a new signal correlation rule. + properties: + cases: + description: Cases for generating signals. + example: [] + items: + $ref: '#/components/schemas/SecurityMonitoringRuleCaseCreate' + type: array + filters: + description: Additional queries to filter matched events before they are + processed. + items: + $ref: '#/components/schemas/SecurityMonitoringFilter' + type: array + hasExtendedTitle: + description: Whether the notifications include the triggering group-by values + in their title. + example: true + type: boolean + isEnabled: + description: Whether the rule is enabled. + example: true + type: boolean + message: + description: Message for generated signals. + example: '' + type: string + name: + description: The name of the rule. + example: My security monitoring rule. + type: string + options: + $ref: '#/components/schemas/SecurityMonitoringRuleOptions' + queries: + description: Queries for selecting signals which are part of the rule. + example: [] + items: + $ref: '#/components/schemas/SecurityMonitoringSignalRuleQuery' + type: array + tags: + description: Tags for generated signals. + example: + - env:prod + - team:security + items: + description: Tag. + type: string + type: array + type: + $ref: '#/components/schemas/SecurityMonitoringSignalRuleType' + required: + - name + - isEnabled + - queries + - options + - cases + - message + type: object + SecurityMonitoringSignalRuleQuery: + description: Query for matching rule on signals. + properties: + aggregation: + $ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation' + correlatedByFields: + description: Fields to group by. + items: + description: Field. + type: string + type: array + correlatedQueryIndex: + description: Index of the rule query used to retrieve the correlated field. + format: int32 + maximum: 9 + type: integer + metrics: + description: Group of target fields to aggregate over. + items: + description: Field. + type: string + type: array + name: + description: Name of the query. + type: string + ruleId: + description: Rule ID to match on signals. + example: org-ru1-e1d + type: string + required: + - ruleId + type: object + SecurityMonitoringSignalRuleResponse: + description: Rule. + properties: + cases: + description: Cases for generating signals. + items: + $ref: '#/components/schemas/SecurityMonitoringRuleCase' + type: array + createdAt: + description: When the rule was created, timestamp in milliseconds. + format: int64 + type: integer + creationAuthorId: + description: User ID of the user who created the rule. + format: int64 + type: integer + deprecationDate: + description: When the rule will be deprecated, timestamp in milliseconds. + format: int64 + type: integer + filters: + description: Additional queries to filter matched events before they are + processed. + items: + $ref: '#/components/schemas/SecurityMonitoringFilter' + type: array + hasExtendedTitle: + description: Whether the notifications include the triggering group-by values + in their title. + type: boolean + id: + description: The ID of the rule. + type: string + isDefault: + description: Whether the rule is included by default. + type: boolean + isDeleted: + description: Whether the rule has been deleted. + type: boolean + isEnabled: + description: Whether the rule is enabled. + type: boolean + message: + description: Message for generated signals. + type: string + name: + description: The name of the rule. + type: string + options: + $ref: '#/components/schemas/SecurityMonitoringRuleOptions' + queries: + description: Queries for selecting logs which are part of the rule. + items: + $ref: '#/components/schemas/SecurityMonitoringSignalRuleResponseQuery' + type: array + tags: + description: Tags for generated signals. + items: + description: Tag. + type: string + type: array + type: + $ref: '#/components/schemas/SecurityMonitoringSignalRuleType' + updateAuthorId: + description: User ID of the user who updated the rule. + format: int64 + type: integer + version: + description: The version of the rule. + format: int64 + type: integer + SecurityMonitoringSignalRuleResponseQuery: + description: Query for matching rule on signals. + properties: + aggregation: + $ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation' + correlatedByFields: + description: Fields to correlate by. + items: + description: Field. + type: string + type: array + correlatedQueryIndex: + description: Index of the rule query used to retrieve the correlated field. + format: int32 + maximum: 9 + type: integer + defaultRuleId: + description: Default Rule ID to match on signals. + example: d3f-ru1-e1d + type: string + distinctFields: + description: Field for which the cardinality is measured. Sent as an array. + items: + description: Field. + type: string + type: array + groupByFields: + description: Fields to group by. + items: + description: Field. + type: string + type: array + metrics: + description: Group of target fields to aggregate over. + items: + description: Field. + type: string + type: array + name: + description: Name of the query. + type: string + ruleId: + description: Rule ID to match on signals. + example: org-ru1-e1d + type: string + type: object + SecurityMonitoringSignalRuleType: + description: The rule type. + enum: + - signal_correlation + type: string + x-enum-varnames: + - SIGNAL_CORRELATION + SecurityMonitoringSignalState: + description: The new triage state of the signal. + enum: + - open + - archived + - under_review + example: open + type: string + x-enum-varnames: + - OPEN + - ARCHIVED + - UNDER_REVIEW + SecurityMonitoringSignalStateUpdateAttributes: + description: Attributes describing the change of state of a security signal. + properties: + archive_comment: + $ref: '#/components/schemas/SecurityMonitoringSignalArchiveComment' + archive_reason: + $ref: '#/components/schemas/SecurityMonitoringSignalArchiveReason' + state: + $ref: '#/components/schemas/SecurityMonitoringSignalState' + version: + $ref: '#/components/schemas/SecurityMonitoringSignalVersion' + required: + - state + type: object + SecurityMonitoringSignalStateUpdateData: + description: Data containing the patch for changing the state of a signal. + properties: + attributes: + $ref: '#/components/schemas/SecurityMonitoringSignalStateUpdateAttributes' + id: + description: The unique ID of the security signal. + type: + $ref: '#/components/schemas/SecurityMonitoringSignalMetadataType' + required: + - attributes + type: object + SecurityMonitoringSignalStateUpdateRequest: + description: Request body for changing the state of a given security monitoring + signal. + properties: + data: + $ref: '#/components/schemas/SecurityMonitoringSignalStateUpdateData' + required: + - data + type: object + SecurityMonitoringSignalTriageAttributes: + description: Attributes describing a triage state update operation over a security + signal. + properties: + archive_comment: + $ref: '#/components/schemas/SecurityMonitoringSignalArchiveComment' + archive_comment_timestamp: + description: Timestamp of the last edit to the comment. + format: int64 + minimum: 0 + type: integer + archive_comment_user: + $ref: '#/components/schemas/SecurityMonitoringTriageUser' + archive_reason: + $ref: '#/components/schemas/SecurityMonitoringSignalArchiveReason' + assignee: + $ref: '#/components/schemas/SecurityMonitoringTriageUser' + incident_ids: + $ref: '#/components/schemas/SecurityMonitoringSignalIncidentIds' + state: + $ref: '#/components/schemas/SecurityMonitoringSignalState' + state_update_timestamp: + description: Timestamp of the last update to the signal state. + format: int64 + minimum: 0 + type: integer + state_update_user: + $ref: '#/components/schemas/SecurityMonitoringTriageUser' + required: + - assignee + - state + - incident_ids + type: object + SecurityMonitoringSignalTriageUpdateData: + description: Data containing the updated triage attributes of the signal. + properties: + attributes: + $ref: '#/components/schemas/SecurityMonitoringSignalTriageAttributes' + id: + description: The unique ID of the security signal. + type: string + type: + $ref: '#/components/schemas/SecurityMonitoringSignalMetadataType' + type: object + SecurityMonitoringSignalTriageUpdateResponse: + description: The response returned after all triage operations, containing the + updated signal triage data. + properties: + data: + $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateData' + required: + - data + type: object + SecurityMonitoringSignalType: + default: signal + description: The type of event. + enum: + - signal + example: signal + type: string + x-enum-varnames: + - SIGNAL + SecurityMonitoringSignalVersion: + description: Version of the updated signal. If server side version is higher, + update will be rejected. + format: int64 + type: integer + SecurityMonitoringSignalsListResponse: + description: 'The response object with all security signals matching the request + + and pagination information.' + properties: + data: + description: An array of security signals matching the request. + items: + $ref: '#/components/schemas/SecurityMonitoringSignal' + type: array + links: + $ref: '#/components/schemas/SecurityMonitoringSignalsListResponseLinks' + meta: + $ref: '#/components/schemas/SecurityMonitoringSignalsListResponseMeta' + type: object + SecurityMonitoringSignalsListResponseLinks: + description: Links attributes. + properties: + next: + description: 'The link for the next set of results. **Note**: The request + can also be made using the + + POST endpoint.' + example: https://app.datadoghq.com/api/v2/security_monitoring/signals?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + SecurityMonitoringSignalsListResponseMeta: + description: Meta attributes. + properties: + page: + $ref: '#/components/schemas/SecurityMonitoringSignalsListResponseMetaPage' + type: object + SecurityMonitoringSignalsListResponseMetaPage: + description: Paging attributes. + properties: + after: + description: 'The cursor used to get the next results, if any. To make the + next request, use the same + + parameters with the addition of the `page[cursor]`.' + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + SecurityMonitoringSignalsSort: + description: The sort parameters used for querying security signals. + enum: + - timestamp + - -timestamp + type: string + x-enum-varnames: + - TIMESTAMP_ASCENDING + - TIMESTAMP_DESCENDING + SecurityMonitoringStandardRuleCreatePayload: + description: Create a new rule. + properties: + cases: + description: Cases for generating signals. + example: [] + items: + $ref: '#/components/schemas/SecurityMonitoringRuleCaseCreate' + type: array + filters: + description: Additional queries to filter matched events before they are + processed. + items: + $ref: '#/components/schemas/SecurityMonitoringFilter' + type: array + hasExtendedTitle: + description: Whether the notifications include the triggering group-by values + in their title. + example: true + type: boolean + isEnabled: + description: Whether the rule is enabled. + example: true + type: boolean + message: + description: Message for generated signals. + example: '' + type: string + name: + description: The name of the rule. + example: My security monitoring rule. + type: string + options: + $ref: '#/components/schemas/SecurityMonitoringRuleOptions' + queries: + description: Queries for selecting logs which are part of the rule. + example: [] + items: + $ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery' + type: array + tags: + description: Tags for generated signals. + example: + - env:prod + - team:security + items: + description: Tag. + type: string + type: array + thirdPartyCases: + description: Cases for generating signals from third party rules. Only available + for third party rules. + example: [] + items: + $ref: '#/components/schemas/SecurityMonitoringThirdPartyRuleCaseCreate' + type: array + type: + $ref: '#/components/schemas/SecurityMonitoringRuleTypeCreate' + required: + - name + - isEnabled + - queries + - options + - cases + - message + type: object + SecurityMonitoringStandardRuleQuery: + description: Query for matching rule. + properties: + aggregation: + $ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation' + distinctFields: + description: Field for which the cardinality is measured. Sent as an array. + items: + description: Field. + type: string + type: array + groupByFields: + description: Fields to group by. + items: + description: Field. + type: string + type: array + hasOptionalGroupByFields: + description: When false, events without a group-by value are ignored by + the rule. When true, events with missing group-by fields are processed + with `N/A`, replacing the missing values. + example: false + readOnly: true + type: boolean + metric: + deprecated: true + description: '(Deprecated) The target field to aggregate over when using + the sum or max + + aggregations. `metrics` field should be used instead.' + type: string + metrics: + description: Group of target fields to aggregate over when using the sum, + max, geo data, or new value aggregations. The sum, max, and geo data aggregations + only accept one value in this list, whereas the new value aggregation + accepts up to five values. + items: + description: Field. + type: string + type: array + name: + description: Name of the query. + type: string + query: + description: Query to run on logs. + example: a > 3 + type: string + type: object + SecurityMonitoringStandardRuleResponse: + description: Rule. + properties: + cases: + description: Cases for generating signals. + items: + $ref: '#/components/schemas/SecurityMonitoringRuleCase' + type: array + complianceSignalOptions: + $ref: '#/components/schemas/CloudConfigurationRuleComplianceSignalOptions' + createdAt: + description: When the rule was created, timestamp in milliseconds. + format: int64 + type: integer + creationAuthorId: + description: User ID of the user who created the rule. + format: int64 + type: integer + deprecationDate: + description: When the rule will be deprecated, timestamp in milliseconds. + format: int64 + type: integer + filters: + description: Additional queries to filter matched events before they are + processed. + items: + $ref: '#/components/schemas/SecurityMonitoringFilter' + type: array + hasExtendedTitle: + description: Whether the notifications include the triggering group-by values + in their title. + type: boolean + id: + description: The ID of the rule. + type: string + isDefault: + description: Whether the rule is included by default. + type: boolean + isDeleted: + description: Whether the rule has been deleted. + type: boolean + isEnabled: + description: Whether the rule is enabled. + type: boolean + message: + description: Message for generated signals. + type: string + name: + description: The name of the rule. + type: string + options: + $ref: '#/components/schemas/SecurityMonitoringRuleOptions' + queries: + description: Queries for selecting logs which are part of the rule. + items: + $ref: '#/components/schemas/SecurityMonitoringStandardRuleQuery' + type: array + tags: + description: Tags for generated signals. + items: + description: Tag. + type: string + type: array + thirdPartyCases: + description: Cases for generating signals from third party rules. Only available + for third party rules. + example: [] + items: + $ref: '#/components/schemas/SecurityMonitoringThirdPartyRuleCase' + type: array + type: + $ref: '#/components/schemas/SecurityMonitoringRuleTypeRead' + updateAuthorId: + description: User ID of the user who updated the rule. + format: int64 + type: integer + version: + description: The version of the rule. + format: int64 + type: integer + SecurityMonitoringThirdPartyRootQuery: + description: A query to be combined with the third party case query. + properties: + groupByFields: + description: Fields to group by. + items: + description: Field. + type: string + type: array + query: + description: Query to run on logs. + example: source:cloudtrail + type: string + type: object + SecurityMonitoringThirdPartyRuleCase: + description: Case when signal is generated by a third party rule. + properties: + name: + description: Name of the case. + type: string + notifications: + description: Notification targets for each rule case. + items: + description: Notification. + type: string + type: array + query: + description: A query to map a third party event to this case. + type: string + status: + $ref: '#/components/schemas/SecurityMonitoringRuleSeverity' + type: object + SecurityMonitoringThirdPartyRuleCaseCreate: + description: Case when a signal is generated by a third party rule. + properties: + name: + description: Name of the case. + type: string + notifications: + description: Notification targets for each rule case. + items: + description: Notification. + type: string + type: array + query: + description: A query to map a third party event to this case. + type: string + status: + $ref: '#/components/schemas/SecurityMonitoringRuleSeverity' + required: + - status + type: object + SecurityMonitoringTriageUser: + description: Object representing a given user entity. + properties: + handle: + description: The handle for this user account. + type: string + icon: + description: Gravatar icon associated to the user. + example: /path/to/matching/gravatar/icon + readOnly: true + type: string + id: + description: Numerical ID assigned by Datadog to this user account. + format: int64 + type: integer + name: + description: The name for this user account. + nullable: true + type: string + uuid: + description: UUID assigned by Datadog to this user account. + example: 773b045d-ccf8-4808-bd3b-955ef6a8c940 + type: string + required: + - uuid + type: object + SensitiveDataScannerConfigRequest: + description: Group reorder request. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerReorderConfig' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + required: + - data + - meta + type: object + SensitiveDataScannerConfiguration: + description: A Sensitive Data Scanner configuration. + properties: + id: + description: ID of the configuration. + type: string + type: + $ref: '#/components/schemas/SensitiveDataScannerConfigurationType' + type: object + SensitiveDataScannerConfigurationData: + description: A Sensitive Data Scanner configuration data. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerConfiguration' + type: object + SensitiveDataScannerConfigurationRelationships: + description: Relationships of the configuration. + properties: + groups: + $ref: '#/components/schemas/SensitiveDataScannerGroupList' + type: object + SensitiveDataScannerConfigurationType: + default: sensitive_data_scanner_configuration + description: Sensitive Data Scanner configuration type. + enum: + - sensitive_data_scanner_configuration + example: sensitive_data_scanner_configuration + type: string + x-enum-varnames: + - SENSITIVE_DATA_SCANNER_CONFIGURATIONS + SensitiveDataScannerCreateGroupResponse: + description: Create group response. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerGroupResponse' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + type: object + SensitiveDataScannerCreateRuleResponse: + description: Create rule response. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerRuleResponse' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + type: object + SensitiveDataScannerFilter: + description: Filter for the Scanning Group. + properties: + query: + description: Query to filter the events. + type: string + type: object + SensitiveDataScannerGetConfigIncludedArray: + description: Included objects from relationships. + items: + $ref: '#/components/schemas/SensitiveDataScannerGetConfigIncludedItem' + type: array + SensitiveDataScannerGetConfigIncludedItem: + description: An object related to the configuration. + oneOf: + - $ref: '#/components/schemas/SensitiveDataScannerRuleIncludedItem' + - $ref: '#/components/schemas/SensitiveDataScannerGroupIncludedItem' + SensitiveDataScannerGetConfigResponse: + description: Get all groups response. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerGetConfigResponseData' + included: + $ref: '#/components/schemas/SensitiveDataScannerGetConfigIncludedArray' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMeta' + type: object + SensitiveDataScannerGetConfigResponseData: + description: Response data related to the scanning groups. + properties: + attributes: + additionalProperties: {} + description: Attributes of the Sensitive Data configuration. + type: object + id: + description: ID of the configuration. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerConfigurationRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerConfigurationType' + type: object + SensitiveDataScannerGroup: + description: A scanning group. + properties: + id: + description: ID of the group. + type: string + type: + $ref: '#/components/schemas/SensitiveDataScannerGroupType' + type: object + SensitiveDataScannerGroupAttributes: + description: Attributes of the Sensitive Data Scanner group. + properties: + description: + description: Description of the group. + type: string + filter: + $ref: '#/components/schemas/SensitiveDataScannerFilter' + is_enabled: + description: Whether or not the group is enabled. + type: boolean + name: + description: Name of the group. + type: string + product_list: + description: List of products the scanning group applies. + items: + $ref: '#/components/schemas/SensitiveDataScannerProduct' + type: array + type: object + SensitiveDataScannerGroupCreate: + description: Data related to the creation of a group. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerGroupAttributes' + relationships: + $ref: '#/components/schemas/SensitiveDataScannerGroupRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerGroupType' + required: + - type + - attributes + type: object + SensitiveDataScannerGroupCreateRequest: + description: Create group request. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerGroupCreate' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + type: object + SensitiveDataScannerGroupData: + description: A scanning group data. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerGroup' + type: object + SensitiveDataScannerGroupDeleteRequest: + description: Delete group request. + properties: + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + required: + - meta + type: object + SensitiveDataScannerGroupDeleteResponse: + description: Delete group response. + properties: + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + type: object + SensitiveDataScannerGroupIncludedItem: + description: A Scanning Group included item. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerGroupAttributes' + id: + description: ID of the group. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerGroupRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerGroupType' + type: object + SensitiveDataScannerGroupItem: + description: Data related to a Sensitive Data Scanner Group. + properties: + id: + description: ID of the group. + type: string + type: + $ref: '#/components/schemas/SensitiveDataScannerGroupType' + type: object + SensitiveDataScannerGroupList: + description: List of groups, ordered. + properties: + data: + description: List of groups. The order is important. + items: + $ref: '#/components/schemas/SensitiveDataScannerGroupItem' + type: array + type: object + SensitiveDataScannerGroupRelationships: + description: Relationships of the group. + properties: + configuration: + $ref: '#/components/schemas/SensitiveDataScannerConfigurationData' + rules: + $ref: '#/components/schemas/SensitiveDataScannerRuleData' + type: object + SensitiveDataScannerGroupResponse: + description: Response data related to the creation of a group. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerGroupAttributes' + id: + description: ID of the group. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerGroupRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerGroupType' + type: object + SensitiveDataScannerGroupType: + default: sensitive_data_scanner_group + description: Sensitive Data Scanner group type. + enum: + - sensitive_data_scanner_group + example: sensitive_data_scanner_group + type: string + x-enum-varnames: + - SENSITIVE_DATA_SCANNER_GROUP + SensitiveDataScannerGroupUpdate: + description: Data related to the update of a group. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerGroupAttributes' + id: + description: ID of the group. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerGroupRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerGroupType' + type: object + SensitiveDataScannerGroupUpdateRequest: + description: Update group request. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerGroupUpdate' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + required: + - data + - meta + type: object + SensitiveDataScannerGroupUpdateResponse: + description: Update group response. + properties: + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + type: object + SensitiveDataScannerMeta: + description: Meta response containing information about the API. + properties: + count_limit: + description: Maximum number of scanning rules allowed for the org. + format: int64 + type: integer + group_count_limit: + description: Maximum number of scanning groups allowed for the org. + format: int64 + type: integer + has_highlight_enabled: + description: Whether or not scanned events are highlighted in Logs or RUM + for the org. + type: boolean + has_multi_pass_enabled: + description: Whether or not scanned events have multi-pass enabled. + type: boolean + is_pci_compliant: + description: Whether or not the org is compliant to the payment card industry + standard. + type: boolean + version: + description: Version of the API. + example: 0 + format: int64 + minimum: 0 + type: integer + type: object + SensitiveDataScannerMetaVersionOnly: + description: Meta payload containing information about the API. + properties: + version: + description: Version of the API (optional). + example: 0 + format: int64 + minimum: 0 + type: integer + type: object + SensitiveDataScannerProduct: + default: logs + description: Datadog product onto which Sensitive Data Scanner can be activated. + enum: + - logs + - rum + - events + - apm + type: string + x-enum-varnames: + - LOGS + - RUM + - EVENTS + - APM + SensitiveDataScannerReorderConfig: + description: Data related to the reordering of scanning groups. + properties: + id: + description: ID of the configuration. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerConfigurationRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerConfigurationType' + type: object + SensitiveDataScannerReorderGroupsResponse: + description: Group reorder response. + properties: + meta: + $ref: '#/components/schemas/SensitiveDataScannerMeta' + type: object + SensitiveDataScannerRule: + description: Rule item included in the group. + properties: + id: + description: ID of the rule. + type: string + type: + $ref: '#/components/schemas/SensitiveDataScannerRuleType' + type: object + SensitiveDataScannerRuleAttributes: + description: Attributes of the Sensitive Data Scanner rule. + properties: + description: + description: Description of the rule. + type: string + excluded_namespaces: + description: Attributes excluded from the scan. If namespaces is provided, + it has to be a sub-path of the namespaces array. + example: + - admin.name + items: + type: string + type: array + is_enabled: + description: Whether or not the rule is enabled. + type: boolean + name: + description: Name of the rule. + type: string + namespaces: + description: 'Attributes included in the scan. If namespaces is empty or + missing, all attributes except excluded_namespaces are scanned. + + If both are missing the whole event is scanned.' + example: + - admin + items: + type: string + type: array + pattern: + description: Not included if there is a relationship to a standard pattern. + type: string + priority: + description: Integer from 1 (high) to 5 (low) indicating rule issue severity. + format: int64 + maximum: 5 + minimum: 1 + type: integer + tags: + description: List of tags. + items: + type: string + type: array + text_replacement: + $ref: '#/components/schemas/SensitiveDataScannerTextReplacement' + type: object + SensitiveDataScannerRuleCreate: + description: Data related to the creation of a rule. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerRuleAttributes' + relationships: + $ref: '#/components/schemas/SensitiveDataScannerRuleRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerRuleType' + required: + - type + - attributes + - relationships + type: object + SensitiveDataScannerRuleCreateRequest: + description: Create rule request. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerRuleCreate' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + required: + - data + - meta + type: object + SensitiveDataScannerRuleData: + description: Rules included in the group. + properties: + data: + description: Rules included in the group. The order is important. + items: + $ref: '#/components/schemas/SensitiveDataScannerRule' + type: array + type: object + SensitiveDataScannerRuleDeleteRequest: + description: Delete rule request. + properties: + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + required: + - meta + type: object + SensitiveDataScannerRuleDeleteResponse: + description: Delete rule response. + properties: + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + type: object + SensitiveDataScannerRuleIncludedItem: + description: A Scanning Rule included item. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerRuleAttributes' + id: + description: ID of the rule. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerRuleRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerRuleType' + type: object + SensitiveDataScannerRuleRelationships: + description: Relationships of a scanning rule. + properties: + group: + $ref: '#/components/schemas/SensitiveDataScannerGroupData' + standard_pattern: + $ref: '#/components/schemas/SensitiveDataScannerStandardPatternData' + type: object + SensitiveDataScannerRuleResponse: + description: Response data related to the creation of a rule. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerRuleAttributes' + id: + description: ID of the rule. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerRuleRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerRuleType' + type: object + SensitiveDataScannerRuleType: + default: sensitive_data_scanner_rule + description: Sensitive Data Scanner rule type. + enum: + - sensitive_data_scanner_rule + example: sensitive_data_scanner_rule + type: string + x-enum-varnames: + - SENSITIVE_DATA_SCANNER_RULE + SensitiveDataScannerRuleUpdate: + description: Data related to the update of a rule. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerRuleAttributes' + id: + description: ID of the rule. + type: string + relationships: + $ref: '#/components/schemas/SensitiveDataScannerRuleRelationships' + type: + $ref: '#/components/schemas/SensitiveDataScannerRuleType' + type: object + SensitiveDataScannerRuleUpdateRequest: + description: Update rule request. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerRuleUpdate' + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + required: + - data + - meta + type: object + SensitiveDataScannerRuleUpdateResponse: + description: Update rule response. + properties: + meta: + $ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly' + type: object + SensitiveDataScannerStandardPattern: + description: Data containing the standard pattern id. + properties: + id: + description: ID of the standard pattern. + type: string + type: + $ref: '#/components/schemas/SensitiveDataScannerStandardPatternType' + type: object + SensitiveDataScannerStandardPatternAttributes: + description: Attributes of the Sensitive Data Scanner standard pattern. + properties: + description: + description: Description of the standard pattern. + type: string + included_keywords: + description: List of included keywords. + items: + type: string + type: array + name: + description: Name of the standard pattern. + type: string + pattern: + description: Regex to match. + type: string + priority: + description: Integer from 1 (high) to 5 (low) indicating standard pattern + issue severity. + format: int64 + maximum: 5 + minimum: 1 + type: integer + tags: + description: List of tags. + items: + type: string + type: array + type: object + SensitiveDataScannerStandardPatternData: + description: A standard pattern. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerStandardPattern' + type: object + SensitiveDataScannerStandardPatternType: + default: sensitive_data_scanner_standard_pattern + description: Sensitive Data Scanner standard pattern type. + enum: + - sensitive_data_scanner_standard_pattern + example: sensitive_data_scanner_standard_pattern + type: string + x-enum-varnames: + - SENSITIVE_DATA_SCANNER_STANDARD_PATTERN + SensitiveDataScannerStandardPatternsResponse: + description: List Standard patterns response. + items: + $ref: '#/components/schemas/SensitiveDataScannerStandardPatternsResponseItem' + type: array + SensitiveDataScannerStandardPatternsResponseData: + description: List Standard patterns response data. + properties: + data: + $ref: '#/components/schemas/SensitiveDataScannerStandardPatternsResponse' + type: object + SensitiveDataScannerStandardPatternsResponseItem: + description: Standard pattern item. + properties: + attributes: + $ref: '#/components/schemas/SensitiveDataScannerStandardPatternAttributes' + id: + description: ID of the standard pattern. + type: string + type: + $ref: '#/components/schemas/SensitiveDataScannerStandardPatternType' + type: object + SensitiveDataScannerTextReplacement: + description: Object describing how the scanned event will be replaced. + properties: + number_of_chars: + description: 'Required if type == ''partial_replacement_from_beginning'' + + or ''partial_replacement_from_end''. It must be > 0.' + format: int64 + minimum: 0 + type: integer + replacement_string: + description: Required if type == 'replacement_string'. + type: string + type: + $ref: '#/components/schemas/SensitiveDataScannerTextReplacementType' + type: object + SensitiveDataScannerTextReplacementType: + default: none + description: 'Type of the replacement text. None means no replacement. + + hash means the data will be stubbed. replacement_string means that + + one can chose a text to replace the data. partial_replacement_from_beginning + + allows a user to partially replace the data from the beginning, and + + partial_replacement_from_end on the other hand, allows to replace data from + + the end.' + enum: + - none + - hash + - replacement_string + - partial_replacement_from_beginning + - partial_replacement_from_end + type: string + x-enum-varnames: + - NONE + - HASH + - REPLACEMENT_STRING + - PARTIAL_REPLACEMENT_FROM_BEGINNING + - PARTIAL_REPLACEMENT_FROM_END + ServiceAccountCreateAttributes: + description: Attributes of the created user. + properties: + email: + description: The email of the user. + example: jane.doe@example.com + type: string + name: + description: The name of the user. + type: string + service_account: + description: Whether the user is a service account. Must be true. + example: true + type: boolean + title: + description: The title of the user. + type: string + required: + - email + - service_account + type: object + ServiceAccountCreateData: + description: Object to create a service account User. + properties: + attributes: + $ref: '#/components/schemas/ServiceAccountCreateAttributes' + relationships: + $ref: '#/components/schemas/UserRelationships' + type: + $ref: '#/components/schemas/UsersType' + required: + - attributes + - type + type: object + ServiceAccountCreateRequest: + description: Create a service account. + properties: + data: + $ref: '#/components/schemas/ServiceAccountCreateData' + required: + - data + type: object + ServiceDefinitionCreateResponse: + description: Create service definitions response. + properties: + data: + description: Create service definitions response payload. + items: + $ref: '#/components/schemas/ServiceDefinitionData' + type: array + type: object + ServiceDefinitionData: + description: Service definition data. + properties: + attributes: + $ref: '#/components/schemas/ServiceDefinitionDataAttributes' + id: + description: Service definition id. + type: string + type: + description: Service definition type. + type: string + type: object + ServiceDefinitionDataAttributes: + description: Service definition attributes. + properties: + meta: + $ref: '#/components/schemas/ServiceDefinitionMeta' + schema: + $ref: '#/components/schemas/ServiceDefinitionSchema' + type: object + ServiceDefinitionGetResponse: + description: Get service definition response. + properties: + data: + $ref: '#/components/schemas/ServiceDefinitionData' + type: object + ServiceDefinitionMeta: + description: Metadata about a service definition. + properties: + github-html-url: + description: GitHub HTML URL. + type: string + ingested-schema-version: + description: Ingestion schema version. + type: string + ingestion-source: + description: Ingestion source of the service definition. + type: string + last-modified-time: + description: Last modified time of the service definition. + type: string + origin: + description: User defined origin of the service definition. + type: string + origin-detail: + description: User defined origin's detail of the service definition. + type: string + warnings: + description: A list of schema validation warnings. + items: + $ref: '#/components/schemas/ServiceDefinitionMetaWarnings' + type: array + type: object + ServiceDefinitionMetaWarnings: + description: Schema validation warnings. + properties: + instance-location: + description: The warning instance location. + type: string + keyword-location: + description: The warning keyword location. + type: string + message: + description: The warning message. + type: string + type: object + ServiceDefinitionRaw: + description: Service Definition in raw JSON/YAML representation. + example: '--- + + schema-version: v2 + + dd-service: my-service + + ' + type: string + ServiceDefinitionSchema: + description: Service definition schema. + oneOf: + - $ref: '#/components/schemas/ServiceDefinitionV1' + - $ref: '#/components/schemas/ServiceDefinitionV2' + - $ref: '#/components/schemas/ServiceDefinitionV2Dot1' + - $ref: '#/components/schemas/ServiceDefinitionV2Dot2' + type: object + ServiceDefinitionSchemaVersions: + description: Schema versions + enum: + - v1 + - v2 + - v2.1 + - v2.2 + type: string + x-enum-varnames: + - V1 + - V2 + - V2_1 + - V2_2 + ServiceDefinitionV1: + deprecated: true + description: Deprecated - Service definition V1 for providing additional service + metadata and integrations. + properties: + contact: + $ref: '#/components/schemas/ServiceDefinitionV1Contact' + extensions: + additionalProperties: {} + description: Extensions to V1 schema. + example: + myorg/extension: extensionValue + type: object + external-resources: + description: A list of external links related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV1Resource' + type: array + info: + $ref: '#/components/schemas/ServiceDefinitionV1Info' + integrations: + $ref: '#/components/schemas/ServiceDefinitionV1Integrations' + org: + $ref: '#/components/schemas/ServiceDefinitionV1Org' + schema-version: + $ref: '#/components/schemas/ServiceDefinitionV1Version' + tags: + description: A set of custom tags. + example: + - my:tag + - service:tag + items: + type: string + type: array + required: + - schema-version + - info + type: object + ServiceDefinitionV1Contact: + description: Contact information about the service. + properties: + email: + description: "Service owner\u2019s email." + example: contact@datadoghq.com + format: email + type: string + slack: + description: "Service owner\u2019s Slack channel." + example: https://yourcompany.slack.com/archives/channel123 + type: string + type: object + ServiceDefinitionV1Info: + description: Basic information about a service. + properties: + dd-service: + description: Unique identifier of the service. Must be unique across all + services and is used to match with a service in Datadog. + example: myservice + type: string + description: + description: A short description of the service. + example: A shopping cart service + type: string + display-name: + description: A friendly name of the service. + example: My Service + type: string + service-tier: + description: Service tier. + example: Tier 1 + type: string + required: + - dd-service + type: object + ServiceDefinitionV1Integrations: + description: Third party integrations that Datadog supports. + properties: + pagerduty: + $ref: '#/components/schemas/ServiceDefinitionV1Pagerduty' + type: object + ServiceDefinitionV1Org: + description: Org related information about the service. + properties: + application: + description: App feature this service supports. + example: E-Commerce + type: string + team: + description: Team that owns the service. + example: my-team + type: string + type: object + ServiceDefinitionV1Pagerduty: + description: PagerDuty service URL for the service. + example: https://my-org.pagerduty.com/service-directory/PMyService + type: string + ServiceDefinitionV1Resource: + description: Service's external links. + properties: + name: + description: Link name. + example: Runbook + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV1ResourceType' + url: + description: Link URL. + example: https://my-runbook + type: string + required: + - name + - type + - url + type: object + ServiceDefinitionV1ResourceType: + description: Link type. + enum: + - doc + - wiki + - runbook + - url + - repo + - dashboard + - oncall + - code + - link + example: runbook + type: string + x-enum-varnames: + - DOC + - WIKI + - RUNBOOK + - URL + - REPO + - DASHBOARD + - ONCALL + - CODE + - LINK + ServiceDefinitionV1Version: + default: v1 + description: Schema version being used. + enum: + - v1 + example: v1 + type: string + x-enum-varnames: + - V1 + ServiceDefinitionV2: + description: Service definition V2 for providing service metadata and integrations. + properties: + contacts: + description: A list of contacts related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Contact' + type: array + dd-service: + description: Unique identifier of the service. Must be unique across all + services and is used to match with a service in Datadog. + example: my-service + type: string + dd-team: + description: Experimental feature. A Team handle that matches a Team in + the Datadog Teams product. + example: my-team + type: string + docs: + description: A list of documentation related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Doc' + type: array + extensions: + additionalProperties: {} + description: Extensions to V2 schema. + example: + myorg/extension: extensionValue + type: object + integrations: + $ref: '#/components/schemas/ServiceDefinitionV2Integrations' + links: + description: A list of links related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Link' + type: array + repos: + description: A list of code repositories related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Repo' + type: array + schema-version: + $ref: '#/components/schemas/ServiceDefinitionV2Version' + tags: + description: A set of custom tags. + example: + - my:tag + - service:tag + items: + type: string + type: array + team: + description: Team that owns the service. + example: my-team + type: string + required: + - schema-version + - dd-service + type: object + ServiceDefinitionV2Contact: + description: Service owner's contacts information. + oneOf: + - $ref: '#/components/schemas/ServiceDefinitionV2Email' + - $ref: '#/components/schemas/ServiceDefinitionV2Slack' + - $ref: '#/components/schemas/ServiceDefinitionV2MSTeams' + ServiceDefinitionV2Doc: + description: Service documents. + properties: + name: + description: Document name. + example: Architecture + type: string + provider: + description: Document provider. + example: google drive + type: string + url: + description: Document URL. + example: https://gdrive/mydoc + type: string + required: + - name + - url + type: object + ServiceDefinitionV2Dot1: + description: Service definition v2.1 for providing service metadata and integrations. + properties: + application: + description: Identifier for a group of related services serving a product + feature, which the service is a part of. + example: my-app + type: string + contacts: + description: A list of contacts related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1Contact' + type: array + dd-service: + description: Unique identifier of the service. Must be unique across all + services and is used to match with a service in Datadog. + example: my-service + type: string + description: + description: A short description of the service. + example: My service description + type: string + extensions: + additionalProperties: {} + description: Extensions to v2.1 schema. + example: + myorg/extension: extensionValue + type: object + integrations: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1Integrations' + lifecycle: + description: The current life cycle phase of the service. + example: sandbox + type: string + links: + description: A list of links related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1Link' + type: array + schema-version: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1Version' + tags: + description: A set of custom tags. + example: + - my:tag + - service:tag + items: + type: string + type: array + team: + description: Team that owns the service. It is used to locate a team defined + in Datadog Teams if it exists. + example: my-team + type: string + tier: + description: Importance of the service. + example: High + type: string + required: + - schema-version + - dd-service + type: object + ServiceDefinitionV2Dot1Contact: + description: Service owner's contacts information. + oneOf: + - $ref: '#/components/schemas/ServiceDefinitionV2Dot1Email' + - $ref: '#/components/schemas/ServiceDefinitionV2Dot1Slack' + - $ref: '#/components/schemas/ServiceDefinitionV2Dot1MSTeams' + ServiceDefinitionV2Dot1Email: + description: Service owner's email. + properties: + contact: + description: Contact value. + example: contact@datadoghq.com + format: email + type: string + name: + description: Contact email. + example: Team Email + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1EmailType' + required: + - type + - contact + type: object + ServiceDefinitionV2Dot1EmailType: + description: Contact type. + enum: + - email + example: email + type: string + x-enum-varnames: + - EMAIL + ServiceDefinitionV2Dot1Integrations: + description: Third party integrations that Datadog supports. + properties: + opsgenie: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1Opsgenie' + pagerduty: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1Pagerduty' + type: object + ServiceDefinitionV2Dot1Link: + description: Service's external links. + properties: + name: + description: Link name. + example: Runbook + type: string + provider: + description: Link provider. + example: Github + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1LinkType' + url: + description: Link URL. + example: https://my-runbook + type: string + required: + - name + - type + - url + type: object + ServiceDefinitionV2Dot1LinkType: + description: Link type. + enum: + - doc + - repo + - runbook + - dashboard + - other + example: runbook + type: string + x-enum-varnames: + - DOC + - REPO + - RUNBOOK + - DASHBOARD + - OTHER + ServiceDefinitionV2Dot1MSTeams: + description: Service owner's Microsoft Teams. + properties: + contact: + description: Contact value. + example: https://teams.microsoft.com/myteam + type: string + name: + description: Contact Microsoft Teams. + example: My team channel + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1MSTeamsType' + required: + - type + - contact + type: object + ServiceDefinitionV2Dot1MSTeamsType: + description: Contact type. + enum: + - microsoft-teams + example: microsoft-teams + type: string + x-enum-varnames: + - MICROSOFT_TEAMS + ServiceDefinitionV2Dot1Opsgenie: + description: Opsgenie integration for the service. + properties: + region: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1OpsgenieRegion' + service-url: + description: Opsgenie service url. + example: https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000 + type: string + required: + - service-url + type: object + ServiceDefinitionV2Dot1OpsgenieRegion: + description: Opsgenie instance region. + enum: + - US + - EU + example: US + type: string + x-enum-varnames: + - US + - EU + ServiceDefinitionV2Dot1Pagerduty: + description: PagerDuty integration for the service. + properties: + service-url: + description: PagerDuty service url. + example: https://my-org.pagerduty.com/service-directory/PMyService + type: string + type: object + ServiceDefinitionV2Dot1Slack: + description: Service owner's Slack channel. + properties: + contact: + description: Slack Channel. + example: https://yourcompany.slack.com/archives/channel123 + type: string + name: + description: Contact Slack. + example: Team Slack + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2Dot1SlackType' + required: + - type + - contact + type: object + ServiceDefinitionV2Dot1SlackType: + description: Contact type. + enum: + - slack + example: slack + type: string + x-enum-varnames: + - SLACK + ServiceDefinitionV2Dot1Version: + default: v2.1 + description: Schema version being used. + enum: + - v2.1 + example: v2.1 + type: string + x-enum-varnames: + - V2_1 + ServiceDefinitionV2Dot2: + description: Service definition v2.2 for providing service metadata and integrations. + properties: + application: + description: Identifier for a group of related services serving a product + feature, which the service is a part of. + example: my-app + type: string + contacts: + description: A list of contacts related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2Contact' + type: array + dd-service: + description: Unique identifier of the service. Must be unique across all + services and is used to match with a service in Datadog. + example: my-service + type: string + description: + description: A short description of the service. + example: My service description + type: string + extensions: + additionalProperties: {} + description: Extensions to v2.2 schema. + example: + myorg/extension: extensionValue + type: object + integrations: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2Integrations' + languages: + description: 'The service''s programming language. Datadog recognizes the + following languages: `dotnet`, `go`, `java`, `js`, `php`, `python`, `ruby`, + and `c++`.' + example: + - dotnet + - go + - java + - js + - php + - python + - ruby + - c++ + items: + type: string + type: array + lifecycle: + description: The current life cycle phase of the service. + example: sandbox + type: string + links: + description: A list of links related to the services. + items: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2Link' + type: array + schema-version: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2Version' + tags: + description: A set of custom tags. + example: + - my:tag + - service:tag + items: + type: string + type: array + team: + description: Team that owns the service. It is used to locate a team defined + in Datadog Teams if it exists. + example: my-team + type: string + tier: + description: Importance of the service. + example: High + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2Type' + required: + - schema-version + - dd-service + type: object + ServiceDefinitionV2Dot2Contact: + description: Service owner's contacts information. + properties: + contact: + description: Contact value. + example: https://teams.microsoft.com/myteam + type: string + name: + description: Contact Name. + example: My team channel + type: string + type: + description: 'Contact type. Datadog recognizes the following types: `email`, + `slack`, and `microsoft-teams`.' + example: slack + type: string + required: + - type + - contact + type: object + ServiceDefinitionV2Dot2Integrations: + description: Third party integrations that Datadog supports. + properties: + opsgenie: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2Opsgenie' + pagerduty: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2Pagerduty' + type: object + ServiceDefinitionV2Dot2Link: + description: Service's external links. + properties: + name: + description: Link name. + example: Runbook + type: string + provider: + description: Link provider. + example: Github + type: string + type: + description: 'Link type. Datadog recognizes the following types: `runbook`, + `doc`, `repo`, `dashboard`, and `other`.' + example: runbook + type: string + url: + description: Link URL. + example: https://my-runbook + type: string + required: + - name + - type + - url + type: object + ServiceDefinitionV2Dot2Opsgenie: + description: Opsgenie integration for the service. + properties: + region: + $ref: '#/components/schemas/ServiceDefinitionV2Dot2OpsgenieRegion' + service-url: + description: Opsgenie service url. + example: https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000 + type: string + required: + - service-url + type: object + ServiceDefinitionV2Dot2OpsgenieRegion: + description: Opsgenie instance region. + enum: + - US + - EU + example: US + type: string + x-enum-varnames: + - US + - EU + ServiceDefinitionV2Dot2Pagerduty: + description: PagerDuty integration for the service. + properties: + service-url: + description: PagerDuty service url. + example: https://my-org.pagerduty.com/service-directory/PMyService + type: string + type: object + ServiceDefinitionV2Dot2Type: + description: The type of service. + enum: + - web + - db + - cache + - function + - browser + - mobile + - custom + example: web + type: string + x-enum-varnames: + - WEB + - DB + - CACHE + - FUNCTION + - BROSWER + - MOBILE + - CUSTOM + ServiceDefinitionV2Dot2Version: + default: v2.2 + description: Schema version being used. + enum: + - v2.2 + example: v2.2 + type: string + x-enum-varnames: + - V2_2 + ServiceDefinitionV2Email: + description: Service owner's email. + properties: + contact: + description: Contact value. + example: contact@datadoghq.com + format: email + type: string + name: + description: Contact email. + example: Team Email + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2EmailType' + required: + - type + - contact + type: object + ServiceDefinitionV2EmailType: + description: Contact type. + enum: + - email + example: email + type: string + x-enum-varnames: + - EMAIL + ServiceDefinitionV2Integrations: + description: Third party integrations that Datadog supports. + properties: + opsgenie: + $ref: '#/components/schemas/ServiceDefinitionV2Opsgenie' + pagerduty: + $ref: '#/components/schemas/ServiceDefinitionV2Pagerduty' + type: object + ServiceDefinitionV2Link: + description: Service's external links. + properties: + name: + description: Link name. + example: Runbook + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2LinkType' + url: + description: Link URL. + example: https://my-runbook + type: string + required: + - name + - type + - url + type: object + ServiceDefinitionV2LinkType: + description: Link type. + enum: + - doc + - wiki + - runbook + - url + - repo + - dashboard + - oncall + - code + - link + example: runbook + type: string + x-enum-varnames: + - DOC + - WIKI + - RUNBOOK + - URL + - REPO + - DASHBOARD + - ONCALL + - CODE + - LINK + ServiceDefinitionV2MSTeams: + description: Service owner's Microsoft Teams. + properties: + contact: + description: Contact value. + example: https://teams.microsoft.com/myteam + type: string + name: + description: Contact Microsoft Teams. + example: My team channel + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2MSTeamsType' + required: + - type + - contact + type: object + ServiceDefinitionV2MSTeamsType: + description: Contact type. + enum: + - microsoft-teams + example: microsoft-teams + type: string + x-enum-varnames: + - MICROSOFT_TEAMS + ServiceDefinitionV2Opsgenie: + description: Opsgenie integration for the service. + properties: + region: + $ref: '#/components/schemas/ServiceDefinitionV2OpsgenieRegion' + service-url: + description: Opsgenie service url. + example: https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000 + type: string + required: + - service-url + type: object + ServiceDefinitionV2OpsgenieRegion: + description: Opsgenie instance region. + enum: + - US + - EU + example: US + type: string + x-enum-varnames: + - US + - EU + ServiceDefinitionV2Pagerduty: + description: PagerDuty service URL for the service. + example: https://my-org.pagerduty.com/service-directory/PMyService + type: string + ServiceDefinitionV2Repo: + description: Service code repositories. + properties: + name: + description: Repository name. + example: Source Code + type: string + provider: + description: Repository provider. + example: GitHub + type: string + url: + description: Repository URL. + example: https://github.com/DataDog/schema + type: string + required: + - name + - url + type: object + ServiceDefinitionV2Slack: + description: Service owner's Slack channel. + properties: + contact: + description: Slack Channel. + example: https://yourcompany.slack.com/archives/channel123 + type: string + name: + description: Contact Slack. + example: Team Slack + type: string + type: + $ref: '#/components/schemas/ServiceDefinitionV2SlackType' + required: + - type + - contact + type: object + ServiceDefinitionV2SlackType: + description: Contact type. + enum: + - slack + example: slack + type: string + x-enum-varnames: + - SLACK + ServiceDefinitionV2Version: + default: v2 + description: Schema version being used. + enum: + - v2 + example: v2 + type: string + x-enum-varnames: + - V2 + ServiceDefinitionsCreateRequest: + description: Create service definitions request. + oneOf: + - $ref: '#/components/schemas/ServiceDefinitionV2Dot2' + - $ref: '#/components/schemas/ServiceDefinitionV2Dot1' + - $ref: '#/components/schemas/ServiceDefinitionV2' + - $ref: '#/components/schemas/ServiceDefinitionRaw' + ServiceDefinitionsListResponse: + description: Create service definitions response. + properties: + data: + description: Data representing service definitions. + items: + $ref: '#/components/schemas/ServiceDefinitionData' + type: array + type: object + SlackIntegrationMetadata: + description: Incident integration metadata for the Slack integration. + properties: + channels: + description: Array of Slack channels in this integration metadata. + example: [] + items: + $ref: '#/components/schemas/SlackIntegrationMetadataChannelItem' + type: array + required: + - channels + type: object + SlackIntegrationMetadataChannelItem: + description: Item in the Slack integration metadata channel array. + properties: + channel_id: + description: Slack channel ID. + example: C0123456789 + type: string + channel_name: + description: Name of the Slack channel. + example: '#example-channel-name' + type: string + redirect_url: + description: URL redirecting to the Slack channel. + example: https://slack.com/app_redirect?channel=C0123456789&team=T01234567 + type: string + team_id: + description: Slack team ID. + example: T01234567 + type: string + required: + - channel_id + - channel_name + - redirect_url + type: object + SortDirection: + default: desc + description: The direction to sort by. + enum: + - desc + - asc + type: string + x-enum-varnames: + - DESC + - ASC + Span: + description: Object description of a spans after being processed and stored + by Datadog. + properties: + attributes: + $ref: '#/components/schemas/SpansAttributes' + id: + description: Unique ID of the Span. + example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA + type: string + type: + $ref: '#/components/schemas/SpansType' + type: object + SpansAggregateBucket: + description: Spans aggregate. + properties: + attributes: + $ref: '#/components/schemas/SpansAggregateBucketAttributes' + id: + description: ID of the spans aggregate. + type: string + type: + $ref: '#/components/schemas/SpansAggregateBucketType' + type: object + SpansAggregateBucketAttributes: + description: A bucket values. + properties: + by: + additionalProperties: + description: The values for each group by. + description: The key, value pairs for each group by. + example: + '@state': success + '@version': abc + type: object + compute: + description: The compute data. + type: object + computes: + additionalProperties: + $ref: '#/components/schemas/SpansAggregateBucketValue' + description: A map of the metric name -> value for regular compute or list + of values for a timeseries. + type: object + type: object + SpansAggregateBucketType: + description: The spans aggregate bucket type. + enum: + - bucket + example: bucket + type: string + x-enum-varnames: + - BUCKET + SpansAggregateBucketValue: + description: A bucket value, can be either a timeseries or a single value. + oneOf: + - $ref: '#/components/schemas/SpansAggregateBucketValueSingleString' + - $ref: '#/components/schemas/SpansAggregateBucketValueSingleNumber' + - $ref: '#/components/schemas/SpansAggregateBucketValueTimeseries' + SpansAggregateBucketValueSingleNumber: + description: A single number value. + format: double + type: number + SpansAggregateBucketValueSingleString: + description: A single string value. + type: string + SpansAggregateBucketValueTimeseries: + description: A timeseries array. + items: + $ref: '#/components/schemas/SpansAggregateBucketValueTimeseriesPoint' + type: array + x-generate-alias-as-model: true + SpansAggregateBucketValueTimeseriesPoint: + description: A timeseries point. + properties: + time: + description: The time value for this point. + example: '2023-06-08T11:55:00Z' + type: string + value: + description: The value for this point. + example: 19 + format: double + type: number + type: object + SpansAggregateData: + description: The object containing the query content. + properties: + attributes: + $ref: '#/components/schemas/SpansAggregateRequestAttributes' + type: + $ref: '#/components/schemas/SpansAggregateRequestType' + type: object + SpansAggregateRequest: + description: The object sent with the request to retrieve a list of aggregated + spans from your organization. + properties: + data: + $ref: '#/components/schemas/SpansAggregateData' + type: object + SpansAggregateRequestAttributes: + description: The object containing all the query parameters. + properties: + compute: + description: The list of metrics or timeseries to compute for the retrieved + buckets. + items: + $ref: '#/components/schemas/SpansCompute' + type: array + filter: + $ref: '#/components/schemas/SpansQueryFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/SpansGroupBy' + type: array + options: + $ref: '#/components/schemas/SpansQueryOptions' + type: object + SpansAggregateRequestType: + default: aggregate_request + description: The type of resource. The value should always be aggregate_request. + enum: + - aggregate_request + example: aggregate_request + type: string + x-enum-varnames: + - AGGREGATE_REQUEST + SpansAggregateResponse: + description: The response object for the spans aggregate API endpoint. + properties: + data: + description: The list of matching buckets, one item per bucket. + items: + $ref: '#/components/schemas/SpansAggregateBucket' + type: array + meta: + $ref: '#/components/schemas/SpansAggregateResponseMetadata' + type: object + SpansAggregateResponseMetadata: + description: The metadata associated with a request. + properties: + elapsed: + description: The time elapsed in milliseconds. + example: 132 + format: int64 + type: integer + request_id: + description: The identifier of the request. + example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR + type: string + status: + $ref: '#/components/schemas/SpansAggregateResponseStatus' + warnings: + description: 'A list of warnings (non fatal errors) encountered, partial + results might be returned if + + warnings are present in the response.' + items: + $ref: '#/components/schemas/SpansWarning' + type: array + type: object + SpansAggregateResponseStatus: + description: The status of the response. + enum: + - done + - timeout + example: done + type: string + x-enum-varnames: + - DONE + - TIMEOUT + SpansAggregateSort: + description: A sort rule. + example: + aggregation: count + order: asc + properties: + aggregation: + $ref: '#/components/schemas/SpansAggregationFunction' + metric: + description: The metric to sort by (only used for `type=measure`). + example: '@duration' + type: string + order: + $ref: '#/components/schemas/SpansSortOrder' + type: + $ref: '#/components/schemas/SpansAggregateSortType' + type: object + SpansAggregateSortType: + default: alphabetical + description: The type of sorting algorithm. + enum: + - alphabetical + - measure + type: string + x-enum-varnames: + - ALPHABETICAL + - MEASURE + SpansAggregationFunction: + description: An aggregation function. + enum: + - count + - cardinality + - pc75 + - pc90 + - pc95 + - pc98 + - pc99 + - sum + - min + - max + - avg + - median + example: pc90 + type: string + x-enum-varnames: + - COUNT + - CARDINALITY + - PERCENTILE_75 + - PERCENTILE_90 + - PERCENTILE_95 + - PERCENTILE_98 + - PERCENTILE_99 + - SUM + - MIN + - MAX + - AVG + - MEDIAN + SpansAttributes: + description: JSON object containing all span attributes and their associated + values. + properties: + attributes: + additionalProperties: {} + description: JSON object of attributes from your span. + example: + customAttribute: 123 + duration: 2345 + type: object + custom: + additionalProperties: {} + description: JSON object of custom spans data. + type: object + end_timestamp: + description: End timestamp of your span. + example: '2023-01-02T09:42:36.420Z' + format: date-time + type: string + env: + description: Name of the environment from where the spans are being sent. + example: prod + type: string + host: + description: Name of the machine from where the spans are being sent. + example: i-0123 + type: string + ingestion_reason: + description: The reason why the span was ingested. + example: rule + type: string + parent_id: + description: Id of the span that's parent of this span. + example: '0' + type: string + resource_hash: + description: Unique identifier of the resource. + example: a12345678b91c23d + type: string + resource_name: + description: The name of the resource. + example: agent + type: string + retained_by: + description: The reason why the span was indexed. + example: retention_filter + type: string + service: + description: 'The name of the application or service generating the span + events. + + It is used to switch from APM to Logs, so make sure you define the same + + value when you use both products.' + example: agent + type: string + single_span: + description: Whether or not the span was collected as a stand-alone span. + Always associated to "single_span" ingestion_reason if true. + example: true + type: boolean + span_id: + description: Id of the span. + example: '1234567890987654321' + type: string + start_timestamp: + description: Start timestamp of your span. + example: '2023-01-02T09:42:36.320Z' + format: date-time + type: string + tags: + description: Array of tags associated with your span. + example: + - team:A + items: + description: Tag associated with your span. + type: string + type: array + trace_id: + description: Id of the trace to which the span belongs. + example: '1234567890987654321' + type: string + type: + description: The type of the span. + example: web + type: string + type: object + SpansCompute: + description: A compute rule to compute metrics or timeseries. + properties: + aggregation: + $ref: '#/components/schemas/SpansAggregationFunction' + interval: + description: 'The time buckets'' size (only used for type=timeseries) + + Defaults to a resolution of 150 points.' + example: 5m + type: string + metric: + description: The metric to use. + example: '@duration' + type: string + type: + $ref: '#/components/schemas/SpansComputeType' + required: + - aggregation + type: object + SpansComputeType: + default: total + description: The type of compute. + enum: + - timeseries + - total + type: string + x-enum-varnames: + - TIMESERIES + - TOTAL + SpansFilter: + description: The spans filter used to index spans. + properties: + query: + description: The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). + example: '@http.status_code:200 service:my-service' + type: string + type: object + SpansFilterCreate: + description: The spans filter. Spans matching this filter will be indexed and + stored. + properties: + query: + description: The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). + example: '@http.status_code:200 service:my-service' + type: string + required: + - query + type: object + SpansGroupBy: + description: A group by rule. + properties: + facet: + description: The name of the facet to use (required). + example: host + type: string + histogram: + $ref: '#/components/schemas/SpansGroupByHistogram' + limit: + default: 10 + description: The maximum buckets to return for this group by. + format: int64 + type: integer + missing: + $ref: '#/components/schemas/SpansGroupByMissing' + sort: + $ref: '#/components/schemas/SpansAggregateSort' + total: + $ref: '#/components/schemas/SpansGroupByTotal' + required: + - facet + type: object + SpansGroupByHistogram: + description: 'Used to perform a histogram computation (only for measure facets). + + Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval.' + properties: + interval: + description: The bin size of the histogram buckets. + example: 10 + format: double + type: number + max: + description: 'The maximum value for the measure used in the histogram + + (values greater than this one are filtered out).' + example: 100 + format: double + type: number + min: + description: 'The minimum value for the measure used in the histogram + + (values smaller than this one are filtered out).' + example: 50 + format: double + type: number + required: + - interval + - min + - max + type: object + SpansGroupByMissing: + description: The value to use for spans that don't have the facet used to group + by. + oneOf: + - $ref: '#/components/schemas/SpansGroupByMissingString' + - $ref: '#/components/schemas/SpansGroupByMissingNumber' + SpansGroupByMissingNumber: + description: The missing value to use if there is a number valued facet. + format: double + type: number + SpansGroupByMissingString: + description: The missing value to use if there is string valued facet. + type: string + SpansGroupByTotal: + default: false + description: A resulting object to put the given computes in over all the matching + records. + oneOf: + - $ref: '#/components/schemas/SpansGroupByTotalBoolean' + - $ref: '#/components/schemas/SpansGroupByTotalString' + - $ref: '#/components/schemas/SpansGroupByTotalNumber' + SpansGroupByTotalBoolean: + description: If set to true, creates an additional bucket labeled "$facet_total". + type: boolean + SpansGroupByTotalNumber: + description: A number to use as the key value for the total bucket. + format: double + type: number + SpansGroupByTotalString: + description: A string to use as the key value for the total bucket. + type: string + SpansListRequest: + description: The request for a spans list. + properties: + data: + $ref: '#/components/schemas/SpansListRequestData' + type: object + SpansListRequestAttributes: + description: The object containing all the query parameters. + properties: + filter: + $ref: '#/components/schemas/SpansQueryFilter' + options: + $ref: '#/components/schemas/SpansQueryOptions' + page: + $ref: '#/components/schemas/SpansListRequestPage' + sort: + $ref: '#/components/schemas/SpansSort' + type: object + SpansListRequestData: + description: The object containing the query content. + properties: + attributes: + $ref: '#/components/schemas/SpansListRequestAttributes' + type: + $ref: '#/components/schemas/SpansListRequestType' + type: object + SpansListRequestPage: + description: Paging attributes for listing spans. + properties: + cursor: + description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + limit: + default: 10 + description: Maximum number of spans in the response. + example: 25 + format: int32 + maximum: 1000 + type: integer + type: object + SpansListRequestType: + default: search_request + description: The type of resource. The value should always be search_request. + enum: + - search_request + example: search_request + type: string + x-enum-varnames: + - SEARCH_REQUEST + SpansListResponse: + description: Response object with all spans matching the request and pagination + information. + properties: + data: + description: Array of spans matching the request. + items: + $ref: '#/components/schemas/Span' + type: array + links: + $ref: '#/components/schemas/SpansListResponseLinks' + meta: + $ref: '#/components/schemas/SpansListResponseMetadata' + type: object + SpansListResponseLinks: + description: Links attributes. + properties: + next: + description: 'Link for the next set of results. Note that the request can + also be made using the + + POST endpoint.' + example: https://app.datadoghq.com/api/v2/spans/event?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + SpansListResponseMetadata: + description: The metadata associated with a request. + properties: + elapsed: + description: The time elapsed in milliseconds. + example: 132 + format: int64 + type: integer + page: + $ref: '#/components/schemas/SpansResponseMetadataPage' + request_id: + description: The identifier of the request. + example: MWlFUjVaWGZTTTZPYzM0VXp1OXU2d3xLSVpEMjZKQ0VKUTI0dEYtM3RSOFVR + type: string + status: + $ref: '#/components/schemas/SpansAggregateResponseStatus' + warnings: + description: 'A list of warnings (non fatal errors) encountered, partial + results might be returned if + + warnings are present in the response.' + items: + $ref: '#/components/schemas/SpansWarning' + type: array + type: object + SpansMetricCompute: + description: The compute rule to compute the span-based metric. + properties: + aggregation_type: + $ref: '#/components/schemas/SpansMetricComputeAggregationType' + include_percentiles: + $ref: '#/components/schemas/SpansMetricComputeIncludePercentiles' + path: + description: The path to the value the span-based metric will aggregate + on (only used if the aggregation type is a "distribution"). + example: '@duration' + type: string + required: + - aggregation_type + type: object + SpansMetricComputeAggregationType: + description: The type of aggregation to use. + enum: + - count + - distribution + example: distribution + type: string + x-enum-varnames: + - COUNT + - DISTRIBUTION + SpansMetricComputeIncludePercentiles: + description: 'Toggle to include or exclude percentile aggregations for distribution + metrics. + + Only present when the `aggregation_type` is `distribution`.' + example: false + type: boolean + SpansMetricCreateAttributes: + description: The object describing the Datadog span-based metric to create. + properties: + compute: + $ref: '#/components/schemas/SpansMetricCompute' + filter: + $ref: '#/components/schemas/SpansMetricFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/SpansMetricGroupBy' + type: array + required: + - compute + type: object + SpansMetricCreateData: + description: The new span-based metric properties. + properties: + attributes: + $ref: '#/components/schemas/SpansMetricCreateAttributes' + id: + $ref: '#/components/schemas/SpansMetricID' + type: + $ref: '#/components/schemas/SpansMetricType' + required: + - id + - type + - attributes + type: object + SpansMetricCreateRequest: + description: The new span-based metric body. + properties: + data: + $ref: '#/components/schemas/SpansMetricCreateData' + required: + - data + type: object + SpansMetricFilter: + description: The span-based metric filter. Spans matching this filter will be + aggregated in this metric. + properties: + query: + default: '*' + description: The search query - following the span search syntax. + example: '@http.status_code:200 service:my-service' + type: string + type: object + SpansMetricGroupBy: + description: A group by rule. + properties: + path: + description: The path to the value the span-based metric will be aggregated + over. + example: resource_name + type: string + tag_name: + description: Eventual name of the tag that gets created. By default, the + path attribute is used as the tag name. + example: resource_name + type: string + required: + - path + type: object + SpansMetricID: + description: The name of the span-based metric. + example: my.metric + type: string + SpansMetricResponse: + description: The span-based metric object. + properties: + data: + $ref: '#/components/schemas/SpansMetricResponseData' + type: object + SpansMetricResponseAttributes: + description: The object describing a Datadog span-based metric. + properties: + compute: + $ref: '#/components/schemas/SpansMetricResponseCompute' + filter: + $ref: '#/components/schemas/SpansMetricResponseFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/SpansMetricResponseGroupBy' + type: array + type: object + SpansMetricResponseCompute: + description: The compute rule to compute the span-based metric. + properties: + aggregation_type: + $ref: '#/components/schemas/SpansMetricComputeAggregationType' + include_percentiles: + $ref: '#/components/schemas/SpansMetricComputeIncludePercentiles' + path: + description: The path to the value the span-based metric will aggregate + on (only used if the aggregation type is a "distribution"). + example: '@duration' + type: string + type: object + SpansMetricResponseData: + description: The span-based metric properties. + properties: + attributes: + $ref: '#/components/schemas/SpansMetricResponseAttributes' + id: + $ref: '#/components/schemas/SpansMetricID' + type: + $ref: '#/components/schemas/SpansMetricType' + type: object + SpansMetricResponseFilter: + description: The span-based metric filter. Spans matching this filter will be + aggregated in this metric. + properties: + query: + description: The search query - following the span search syntax. + example: '@http.status_code:200 service:my-service' + type: string + type: object + SpansMetricResponseGroupBy: + description: A group by rule. + properties: + path: + description: The path to the value the span-based metric will be aggregated + over. + example: resource_name + type: string + tag_name: + description: Eventual name of the tag that gets created. By default, the + path attribute is used as the tag name. + example: resource_name + type: string + type: object + SpansMetricType: + default: spans_metrics + description: The type of resource. The value should always be spans_metrics. + enum: + - spans_metrics + example: spans_metrics + type: string + x-enum-varnames: + - SPANS_METRICS + SpansMetricUpdateAttributes: + description: The span-based metric properties that will be updated. + properties: + compute: + $ref: '#/components/schemas/SpansMetricUpdateCompute' + filter: + $ref: '#/components/schemas/SpansMetricFilter' + group_by: + description: The rules for the group by. + items: + $ref: '#/components/schemas/SpansMetricGroupBy' + type: array + type: object + SpansMetricUpdateCompute: + description: The compute rule to compute the span-based metric. + properties: + include_percentiles: + $ref: '#/components/schemas/SpansMetricComputeIncludePercentiles' + type: object + SpansMetricUpdateData: + description: The new span-based metric properties. + properties: + attributes: + $ref: '#/components/schemas/SpansMetricUpdateAttributes' + type: + $ref: '#/components/schemas/SpansMetricType' + required: + - type + - attributes + type: object + SpansMetricUpdateRequest: + description: The new span-based metric body. + properties: + data: + $ref: '#/components/schemas/SpansMetricUpdateData' + required: + - data + type: object + SpansMetricsResponse: + description: All the available span-based metric objects. + properties: + data: + description: A list of span-based metric objects. + items: + $ref: '#/components/schemas/SpansMetricResponseData' + type: array + type: object + SpansQueryFilter: + description: The search and filter query settings. + properties: + from: + default: now-15m + description: The minimum time for the requested spans, supports date-time + ISO8601, date math, and regular timestamps (milliseconds). + example: now-15m + type: string + query: + default: '*' + description: The search query - following the span search syntax. + example: service:web* AND @http.status_code:[200 TO 299] + type: string + to: + default: now + description: The maximum time for the requested spans, supports date-time + ISO8601, date math, and regular timestamps (milliseconds). + example: now + type: string + type: object + SpansQueryOptions: + description: 'Global query options that are used during the query. + + Note: You should only supply timezone or time offset but not both otherwise + the query will fail.' + properties: + timeOffset: + description: The time offset (in seconds) to apply to the query. + format: int64 + type: integer + timezone: + default: UTC + description: The timezone can be specified as GMT, UTC, an offset from UTC + (like UTC+1), or as a Timezone Database identifier (like America/New_York). + example: GMT + type: string + type: object + SpansResponseMetadataPage: + description: Paging attributes. + properties: + after: + description: 'The cursor to use to get the next results, if any. To make + the next request, use the same + + parameters with the addition of the `page[cursor]`.' + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + type: string + type: object + SpansSort: + description: Sort parameters when querying spans. + enum: + - timestamp + - -timestamp + type: string + x-enum-varnames: + - TIMESTAMP_ASCENDING + - TIMESTAMP_DESCENDING + SpansSortOrder: + description: The order to use, ascending or descending. + enum: + - asc + - desc + example: asc + type: string + x-enum-varnames: + - ASCENDING + - DESCENDING + SpansType: + default: spans + description: Type of the span. + enum: + - spans + example: spans + type: string + x-enum-varnames: + - SPANS + SpansWarning: + description: A warning message indicating something that went wrong with the + query. + properties: + code: + description: A unique code for this type of warning. + example: unknown_index + type: string + detail: + description: A detailed explanation of this specific warning. + example: 'indexes: foo, bar' + type: string + title: + description: A short human-readable summary of the warning. + example: One or several indexes are missing or invalid, results hold data + from the other indexes + type: string + type: object + State: + description: The state of the rule evaluation. + enum: + - pass + - fail + - skip + example: pass + type: string + x-enum-varnames: + - PASS + - FAIL + - SKIP + TagsEventAttribute: + description: Array of tags associated with your event. + example: + - team:A + items: + description: Tag associated with your event. + type: string + type: array + Team: + description: A team + properties: + attributes: + $ref: '#/components/schemas/TeamAttributes' + id: + description: The team's identifier + example: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: string + relationships: + $ref: '#/components/schemas/TeamRelationships' + type: + $ref: '#/components/schemas/TeamType' + required: + - attributes + - id + - type + type: object + TeamAttributes: + description: Team attributes + properties: + avatar: + description: Unicode representation of the avatar for the team, limited + to a single grapheme + example: "\U0001F951" + nullable: true + type: string + banner: + description: Banner selection for the team + format: int64 + nullable: true + type: integer + created_at: + description: Creation date of the team + format: date-time + type: string + description: + description: Free-form markdown description/content for the team's homepage + nullable: true + type: string + handle: + description: The team's identifier + example: example-team + maxLength: 195 + type: string + hidden_modules: + description: Collection of hidden modules for the team + items: + description: String identifier of the module + type: string + type: array + link_count: + description: The number of links belonging to the team + format: int32 + maximum: 2147483647 + readOnly: true + type: integer + modified_at: + description: Modification date of the team + format: date-time + type: string + name: + description: The name of the team + example: Example Team + maxLength: 200 + type: string + summary: + description: A brief summary of the team, derived from the `description` + maxLength: 120 + nullable: true + type: string + user_count: + description: The number of users belonging to the team + format: int32 + maximum: 2147483647 + readOnly: true + type: integer + visible_modules: + description: Collection of visible modules for the team + items: + description: String identifier of the module + type: string + type: array + required: + - handle + - name + type: object + TeamCreate: + description: Team create + properties: + attributes: + $ref: '#/components/schemas/TeamCreateAttributes' + relationships: + $ref: '#/components/schemas/TeamCreateRelationships' + type: + $ref: '#/components/schemas/TeamType' + required: + - attributes + - type + type: object + TeamCreateAttributes: + description: Team creation attributes + properties: + avatar: + description: Unicode representation of the avatar for the team, limited + to a single grapheme + example: "\U0001F951" + nullable: true + type: string + banner: + description: Banner selection for the team + format: int64 + nullable: true + type: integer + description: + description: Free-form markdown description/content for the team's homepage + type: string + handle: + description: The team's identifier + example: example-team + maxLength: 195 + type: string + hidden_modules: + description: Collection of hidden modules for the team + items: + description: String identifier of the module + type: string + type: array + name: + description: The name of the team + example: Example Team + maxLength: 200 + type: string + visible_modules: + description: Collection of visible modules for the team + items: + description: String identifier of the module + type: string + type: array + required: + - handle + - name + type: object + TeamCreateRelationships: + description: Relationships formed with the team on creation + properties: + users: + $ref: '#/components/schemas/RelationshipToUsers' + type: object + TeamCreateRequest: + description: Request to create a team + properties: + data: + $ref: '#/components/schemas/TeamCreate' + required: + - data + type: object + TeamIncluded: + description: Included resources related to the team + oneOf: + - $ref: '#/components/schemas/User' + - $ref: '#/components/schemas/TeamLink' + - $ref: '#/components/schemas/UserTeamPermission' + TeamLink: + description: Team link + properties: + attributes: + $ref: '#/components/schemas/TeamLinkAttributes' + id: + description: The team link's identifier + example: b8626d7e-cedd-11eb-abf5-da7ad0900001 + type: string + type: + $ref: '#/components/schemas/TeamLinkType' + required: + - attributes + - id + - type + type: object + TeamLinkAttributes: + description: Team link attributes + properties: + label: + description: The link's label + example: Link label + maxLength: 256 + type: string + position: + description: The link's position, used to sort links for the team + format: int32 + maximum: 2147483647 + type: integer + team_id: + description: ID of the team the link is associated with + readOnly: true + type: string + url: + description: The URL for the link + example: https://example.com + type: string + required: + - label + - url + type: object + TeamLinkCreate: + description: Team link create + properties: + attributes: + $ref: '#/components/schemas/TeamLinkAttributes' + type: + $ref: '#/components/schemas/TeamLinkType' + required: + - attributes + - type + type: object + TeamLinkCreateRequest: + description: Team link create request + properties: + data: + $ref: '#/components/schemas/TeamLinkCreate' + required: + - data + type: object + TeamLinkResponse: + description: Team link response + properties: + data: + $ref: '#/components/schemas/TeamLink' + type: object + TeamLinkType: + default: team_links + description: Team link type + enum: + - team_links + example: team_links + type: string + x-enum-varnames: + - TEAM_LINKS + TeamLinksResponse: + description: Team links response + properties: + data: + description: Team links response data + items: + $ref: '#/components/schemas/TeamLink' + type: array + type: object + TeamPermissionSetting: + description: Team permission setting + properties: + attributes: + $ref: '#/components/schemas/TeamPermissionSettingAttributes' + id: + description: The team permission setting's identifier + example: TeamPermission-aeadc05e-98a8-11ec-ac2c-da7ad0900001-edit + type: string + type: + $ref: '#/components/schemas/TeamPermissionSettingType' + required: + - id + - type + type: object + TeamPermissionSettingAttributes: + description: Team permission setting attributes + properties: + action: + $ref: '#/components/schemas/TeamPermissionSettingSerializerAction' + editable: + description: Whether or not the permission setting is editable by the current + user + readOnly: true + type: boolean + options: + $ref: '#/components/schemas/TeamPermissionSettingValues' + title: + description: The team permission name + readOnly: true + type: string + value: + $ref: '#/components/schemas/TeamPermissionSettingValue' + type: object + TeamPermissionSettingResponse: + description: Team permission setting response + properties: + data: + $ref: '#/components/schemas/TeamPermissionSetting' + type: object + TeamPermissionSettingSerializerAction: + description: The identifier for the action + enum: + - manage_membership + - edit + readOnly: true + type: string + x-enum-varnames: + - MANAGE_MEMBERSHIP + - EDIT + TeamPermissionSettingType: + default: team_permission_settings + description: Team permission setting type + enum: + - team_permission_settings + example: team_permission_settings + type: string + x-enum-varnames: + - TEAM_PERMISSION_SETTINGS + TeamPermissionSettingUpdate: + description: Team permission setting update + properties: + attributes: + $ref: '#/components/schemas/TeamPermissionSettingUpdateAttributes' + type: + $ref: '#/components/schemas/TeamPermissionSettingType' + required: + - type + type: object + TeamPermissionSettingUpdateAttributes: + description: Team permission setting update attributes + properties: + value: + $ref: '#/components/schemas/TeamPermissionSettingValue' + type: object + TeamPermissionSettingUpdateRequest: + description: Team permission setting update request + properties: + data: + $ref: '#/components/schemas/TeamPermissionSettingUpdate' + required: + - data + type: object + TeamPermissionSettingValue: + description: What type of user is allowed to perform the specified action + enum: + - admins + - members + - organization + - user_access_manage + - teams_manage + type: string + x-enum-varnames: + - ADMINS + - MEMBERS + - ORGANIZATION + - USER_ACCESS_MANAGE + - TEAMS_MANAGE + TeamPermissionSettingValues: + description: Possible values for action + items: + $ref: '#/components/schemas/TeamPermissionSettingValue' + readOnly: true + type: array + TeamPermissionSettingsResponse: + description: Team permission settings response + properties: + data: + description: Team permission settings response data + items: + $ref: '#/components/schemas/TeamPermissionSetting' + type: array + type: object + TeamRelationships: + description: Resources related to a team + properties: + team_links: + $ref: '#/components/schemas/RelationshipToTeamLinks' + user_team_permissions: + $ref: '#/components/schemas/RelationshipToUserTeamPermission' + type: object + TeamRelationshipsLinks: + description: Links attributes. + properties: + related: + description: Related link. + example: /api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links + type: string + type: object + TeamResponse: + description: Response with a team + properties: + data: + $ref: '#/components/schemas/Team' + type: object + TeamType: + default: team + description: Team type + enum: + - team + example: team + type: string + x-enum-varnames: + - TEAM + TeamUpdate: + description: Team update request + properties: + attributes: + $ref: '#/components/schemas/TeamUpdateAttributes' + relationships: + $ref: '#/components/schemas/TeamUpdateRelationships' + type: + $ref: '#/components/schemas/TeamType' + required: + - attributes + - type + type: object + TeamUpdateAttributes: + description: Team update attributes + properties: + avatar: + description: Unicode representation of the avatar for the team, limited + to a single grapheme + example: "\U0001F951" + nullable: true + type: string + banner: + description: Banner selection for the team + format: int64 + nullable: true + type: integer + color: + description: An identifier for the color representing the team + format: int32 + maximum: 13 + minimum: 0 + type: integer + description: + description: Free-form markdown description/content for the team's homepage + type: string + handle: + description: The team's identifier + example: example-team + maxLength: 195 + type: string + hidden_modules: + description: Collection of hidden modules for the team + items: + description: String identifier of the module + type: string + type: array + name: + description: The name of the team + example: Example Team + maxLength: 200 + type: string + visible_modules: + description: Collection of visible modules for the team + items: + description: String identifier of the module + type: string + type: array + required: + - handle + - name + type: object + TeamUpdateRelationships: + description: Team update relationships + properties: + team_links: + $ref: '#/components/schemas/RelationshipToTeamLinks' + type: object + TeamUpdateRequest: + description: Team update request + properties: + data: + $ref: '#/components/schemas/TeamUpdate' + required: + - data + type: object + TeamsField: + description: Supported teams field. + enum: + - id + - name + - handle + - summary + - description + - avatar + - banner + - visible_modules + - hidden_modules + - created_at + - modified_at + - user_count + - link_count + - team_links + - user_team_permissions + type: string + x-enum-varnames: + - ID + - NAME + - HANDLE + - SUMMARY + - DESCRIPTION + - AVATAR + - BANNER + - VISIBLE_MODULES + - HIDDEN_MODULES + - CREATED_AT + - MODIFIED_AT + - USER_COUNT + - LINK_COUNT + - TEAM_LINKS + - USER_TEAM_PERMISSIONS + TeamsResponse: + description: Response with multiple teams + properties: + data: + description: Teams response data + items: + $ref: '#/components/schemas/Team' + type: array + included: + description: Resources related to the team + items: + $ref: '#/components/schemas/TeamIncluded' + type: array + links: + $ref: '#/components/schemas/TeamsResponseLinks' + meta: + $ref: '#/components/schemas/TeamsResponseMeta' + type: object + TeamsResponseLinks: + description: Teams response links. + properties: + first: + description: First link. + type: string + last: + description: Last link. + nullable: true + type: string + next: + description: Next link. + type: string + prev: + description: Previous link. + nullable: true + type: string + self: + description: Current link. + type: string + type: object + TeamsResponseMeta: + description: Teams response metadata. + properties: + pagination: + $ref: '#/components/schemas/TeamsResponseMetaPagination' + type: object + TeamsResponseMetaPagination: + description: Teams response metadata. + properties: + first_offset: + description: The first offset. + format: int64 + type: integer + last_offset: + description: The last offset. + format: int64 + type: integer + limit: + description: Pagination limit. + format: int64 + type: integer + next_offset: + description: The next offset. + format: int64 + type: integer + offset: + description: The offset. + format: int64 + type: integer + prev_offset: + description: The previous offset. + format: int64 + type: integer + total: + description: Total results. + format: int64 + type: integer + type: + description: Offset type. + type: string + type: object + TimeseriesFormulaQueryRequest: + description: A request wrapper around a single timeseries query to be executed. + properties: + data: + $ref: '#/components/schemas/TimeseriesFormulaRequest' + required: + - data + type: object + TimeseriesFormulaQueryResponse: + description: A message containing one response to a timeseries query made with + timeseries formula query request. + properties: + data: + $ref: '#/components/schemas/TimeseriesResponse' + errors: + description: The error generated by the request. + type: string + type: object + TimeseriesFormulaRequest: + description: A single timeseries query to be executed. + properties: + attributes: + $ref: '#/components/schemas/TimeseriesFormulaRequestAttributes' + type: + $ref: '#/components/schemas/TimeseriesFormulaRequestType' + required: + - type + - attributes + type: object + TimeseriesFormulaRequestAttributes: + description: The object describing a timeseries formula request. + properties: + formulas: + description: List of formulas to be calculated and returned as responses. + items: + $ref: '#/components/schemas/QueryFormula' + type: array + from: + description: Start date (inclusive) of the query in milliseconds since the + Unix epoch. + example: 1568899800000 + format: int64 + type: integer + interval: + description: 'A time interval in milliseconds. + + May be overridden by a larger interval if the query would result in + + too many points for the specified timeframe. + + Defaults to a reasonable interval for the given timeframe.' + example: 5000 + format: int64 + type: integer + queries: + $ref: '#/components/schemas/TimeseriesFormulaRequestQueries' + to: + description: End date (exclusive) of the query in milliseconds since the + Unix epoch. + example: 1568923200000 + format: int64 + type: integer + required: + - to + - from + - queries + type: object + TimeseriesFormulaRequestQueries: + description: List of queries to be run and used as inputs to the formulas. + items: + $ref: '#/components/schemas/TimeseriesQuery' + type: array + TimeseriesFormulaRequestType: + default: timeseries_request + description: The type of the resource. The value should always be timeseries_request. + enum: + - timeseries_request + example: timeseries_request + type: string + x-enum-varnames: + - TIMESERIES_REQUEST + TimeseriesFormulaResponseType: + default: timeseries_response + description: The type of the resource. The value should always be timeseries_response. + enum: + - timeseries_response + example: timeseries_response + type: string + x-enum-varnames: + - TIMESERIES_RESPONSE + TimeseriesQuery: + description: An individual timeseries query to one of the basic Datadog data + sources. + example: + data_source: metrics + query: avg:system.cpu.user{*} by {env} + oneOf: + - $ref: '#/components/schemas/MetricsTimeseriesQuery' + - $ref: '#/components/schemas/EventsTimeseriesQuery' + TimeseriesResponse: + description: A message containing the response to a timeseries query. + properties: + attributes: + $ref: '#/components/schemas/TimeseriesResponseAttributes' + type: + $ref: '#/components/schemas/TimeseriesFormulaResponseType' + type: object + TimeseriesResponseAttributes: + description: The object describing a timeseries response. + properties: + series: + $ref: '#/components/schemas/TimeseriesResponseSeriesList' + times: + $ref: '#/components/schemas/TimeseriesResponseTimes' + values: + $ref: '#/components/schemas/TimeseriesResponseValuesList' + type: object + TimeseriesResponseSeries: + description: '' + properties: + group_tags: + $ref: '#/components/schemas/GroupTags' + query_index: + description: The index of the query in the "formulas" array (or "queries" + array if no "formulas" was specified). + example: 0 + format: int32 + maximum: 2147483647 + type: integer + unit: + description: 'Detailed information about the unit. + + The first element describes the "primary unit" (for example, `bytes` in + `bytes per second`). + + The second element describes the "per unit" (for example, `second` in + `bytes per second`). + + If the second element is not present, the API returns null.' + items: + $ref: '#/components/schemas/Unit' + type: array + type: object + TimeseriesResponseSeriesList: + description: Array of response series. The index here corresponds to the index + in the `formulas` or `queries` array from the request. + items: + $ref: '#/components/schemas/TimeseriesResponseSeries' + type: array + TimeseriesResponseTimes: + description: Array of times, 1-1 match with individual values arrays. + items: + description: Start date (inclusive) of the query in seconds since the Unix + epoch. + example: 1568899800000 + format: int64 + type: integer + type: array + TimeseriesResponseValues: + description: Array of values for an individual formula or query. + example: + - 1575317847.0 + - 0.5 + items: + description: An individual value for a given time. + format: double + nullable: true + type: number + type: array + TimeseriesResponseValuesList: + description: Array of value-arrays. The index here corresponds to the index + in the `formulas` or `queries` array from the request. + items: + $ref: '#/components/schemas/TimeseriesResponseValues' + type: array + Unit: + description: Object containing the metric unit family, scale factor, name, and + short name. + nullable: true + properties: + family: + description: Unit family, allows for conversion between units of the same + family, for scaling. + example: time + type: string + name: + description: Unit name + example: minute + type: string + plural: + description: Plural form of the unit name. + example: minutes + type: string + scale_factor: + description: Factor for scaling between units of the same family. + example: 60.0 + format: double + type: number + short_name: + description: Abbreviation of the unit. + example: min + type: string + type: object + UsageApplicationSecurityMonitoringResponse: + description: Application Security Monitoring usage response. + properties: + data: + description: Response containing Application Security Monitoring usage. + items: + $ref: '#/components/schemas/UsageDataObject' + type: array + type: object + UsageAttributesObject: + description: Usage attributes data. + properties: + org_name: + description: The organization name. + type: string + product_family: + description: The product for which usage is being reported. + type: string + public_id: + description: The organization public ID. + type: string + region: + description: The region of the Datadog instance that the organization belongs + to. + type: string + timeseries: + description: List of usage data reported for each requested hour. + items: + $ref: '#/components/schemas/UsageTimeSeriesObject' + type: array + usage_type: + $ref: '#/components/schemas/HourlyUsageType' + type: object + UsageDataObject: + description: Usage data. + properties: + attributes: + $ref: '#/components/schemas/UsageAttributesObject' + id: + description: Unique ID of the response. + type: string + type: + $ref: '#/components/schemas/UsageTimeSeriesType' + type: object + UsageLambdaTracedInvocationsResponse: + description: Lambda Traced Invocations usage response. + properties: + data: + description: Response containing Lambda Traced Invocations usage. + items: + $ref: '#/components/schemas/UsageDataObject' + type: array + type: object + UsageObservabilityPipelinesResponse: + description: Observability Pipelines usage response. + properties: + data: + description: Response containing Observability Pipelines usage. + items: + $ref: '#/components/schemas/UsageDataObject' + type: array + type: object + UsageTimeSeriesObject: + description: Usage timeseries data. + properties: + timestamp: + description: Datetime in ISO-8601 format, UTC. The hour for the usage. + format: date-time + type: string + value: + description: Contains the number measured for the given usage_type during + the hour. + format: int64 + nullable: true + type: integer + type: object + UsageTimeSeriesType: + default: usage_timeseries + description: Type of usage data. + enum: + - usage_timeseries + example: usage_timeseries + type: string + x-enum-varnames: + - USAGE_TIMESERIES + User: + description: User object returned by the API. + properties: + attributes: + $ref: '#/components/schemas/UserAttributes' + id: + description: ID of the user. + type: string + relationships: + $ref: '#/components/schemas/UserResponseRelationships' + type: + $ref: '#/components/schemas/UsersType' + type: object + UserAttributes: + description: Attributes of user object returned by the API. + properties: + created_at: + description: Creation time of the user. + format: date-time + type: string + disabled: + description: Whether the user is disabled. + type: boolean + email: + description: Email of the user. + type: string + handle: + description: Handle of the user. + type: string + icon: + description: URL of the user's icon. + type: string + modified_at: + description: Time that the user was last modified. + format: date-time + type: string + name: + description: Name of the user. + nullable: true + type: string + service_account: + description: Whether the user is a service account. + type: boolean + status: + description: Status of the user. + type: string + title: + description: Title of the user. + nullable: true + type: string + verified: + description: Whether the user is verified. + type: boolean + type: object + UserCreateAttributes: + description: Attributes of the created user. + properties: + email: + description: The email of the user. + example: jane.doe@example.com + type: string + name: + description: The name of the user. + type: string + title: + description: The title of the user. + type: string + required: + - email + type: object + UserCreateData: + description: Object to create a user. + properties: + attributes: + $ref: '#/components/schemas/UserCreateAttributes' + relationships: + $ref: '#/components/schemas/UserRelationships' + type: + $ref: '#/components/schemas/UsersType' + required: + - attributes + - type + type: object + UserCreateRequest: + description: Create a user. + properties: + data: + $ref: '#/components/schemas/UserCreateData' + required: + - data + type: object + UserInvitationData: + description: Object to create a user invitation. + properties: + relationships: + $ref: '#/components/schemas/UserInvitationRelationships' + type: + $ref: '#/components/schemas/UserInvitationsType' + required: + - type + - relationships + type: object + UserInvitationDataAttributes: + description: Attributes of a user invitation. + properties: + created_at: + description: Creation time of the user invitation. + format: date-time + type: string + expires_at: + description: Time of invitation expiration. + format: date-time + type: string + invite_type: + description: Type of invitation. + type: string + uuid: + description: UUID of the user invitation. + type: string + type: object + UserInvitationRelationships: + description: Relationships data for user invitation. + properties: + user: + $ref: '#/components/schemas/RelationshipToUser' + required: + - user + type: object + UserInvitationResponse: + description: User invitation as returned by the API. + properties: + data: + $ref: '#/components/schemas/UserInvitationResponseData' + type: object + UserInvitationResponseData: + description: Object of a user invitation returned by the API. + properties: + attributes: + $ref: '#/components/schemas/UserInvitationDataAttributes' + id: + description: ID of the user invitation. + type: string + relationships: + $ref: '#/components/schemas/UserInvitationRelationships' + type: + $ref: '#/components/schemas/UserInvitationsType' + type: object + UserInvitationsRequest: + description: Object to invite users to join the organization. + properties: + data: + description: List of user invitations. + example: [] + items: + $ref: '#/components/schemas/UserInvitationData' + type: array + required: + - data + type: object + UserInvitationsResponse: + description: User invitations as returned by the API. + properties: + data: + description: Array of user invitations. + items: + $ref: '#/components/schemas/UserInvitationResponseData' + type: array + type: object + UserInvitationsType: + default: user_invitations + description: User invitations type. + enum: + - user_invitations + example: user_invitations + type: string + x-enum-varnames: + - USER_INVITATIONS + UserRelationships: + description: Relationships of the user object. + properties: + roles: + $ref: '#/components/schemas/RelationshipToRoles' + type: object + UserResponse: + description: Response containing information about a single user. + properties: + data: + $ref: '#/components/schemas/User' + included: + description: Array of objects related to the user. + items: + $ref: '#/components/schemas/UserResponseIncludedItem' + type: array + type: object + UserResponseIncludedItem: + description: An object related to a user. + oneOf: + - $ref: '#/components/schemas/Organization' + - $ref: '#/components/schemas/Permission' + - $ref: '#/components/schemas/Role' + UserResponseRelationships: + description: Relationships of the user object returned by the API. + properties: + org: + $ref: '#/components/schemas/RelationshipToOrganization' + other_orgs: + $ref: '#/components/schemas/RelationshipToOrganizations' + other_users: + $ref: '#/components/schemas/RelationshipToUsers' + roles: + $ref: '#/components/schemas/RelationshipToRoles' + type: object + UserTeam: + description: A user's relationship with a team + properties: + attributes: + $ref: '#/components/schemas/UserTeamAttributes' + id: + description: The ID of a user's relationship with a team + example: TeamMembership-aeadc05e-98a8-11ec-ac2c-da7ad0900001-38835 + type: string + relationships: + $ref: '#/components/schemas/UserTeamRelationships' + type: + $ref: '#/components/schemas/UserTeamType' + required: + - id + - type + type: object + UserTeamAttributes: + description: Team membership attributes + properties: + provisioned_by: + description: 'The mechanism responsible for provisioning the team relationship. + + Possible values: null for added by a user, "service_account" if added + by a service account, and "saml_mapping" if provisioned via SAML mapping.' + nullable: true + readOnly: true + type: string + provisioned_by_id: + description: UUID of the User or Service Account who provisioned this team + membership, or null if provisioned via SAML mapping. + nullable: true + readOnly: true + type: string + role: + $ref: '#/components/schemas/UserTeamRole' + type: object + UserTeamCreate: + description: A user's relationship with a team + properties: + attributes: + $ref: '#/components/schemas/UserTeamAttributes' + relationships: + $ref: '#/components/schemas/UserTeamRelationships' + type: + $ref: '#/components/schemas/UserTeamType' + required: + - type + type: object + UserTeamPermission: + description: A user's permissions for a given team + properties: + attributes: + $ref: '#/components/schemas/UserTeamPermissionAttributes' + id: + description: The user team permission's identifier + example: UserTeamPermissions-aeadc05e-98a8-11ec-ac2c-da7ad0900001-416595 + type: string + type: + $ref: '#/components/schemas/UserTeamPermissionType' + required: + - id + - type + type: object + UserTeamPermissionAttributes: + description: User team permission attributes + properties: + permissions: + description: Object of team permission actions and boolean values that a + logged in user can perform on this team. + readOnly: true + type: object + type: object + UserTeamPermissionType: + default: user_team_permissions + description: User team permission type + enum: + - user_team_permissions + example: user_team_permissions + type: string + x-enum-varnames: + - USER_TEAM_PERMISSIONS + UserTeamRelationships: + description: Relationship between membership and a user + properties: + team: + $ref: '#/components/schemas/RelationshipToUserTeamTeam' + user: + $ref: '#/components/schemas/RelationshipToUserTeamUser' + type: object + UserTeamRequest: + description: Team membership request + properties: + data: + $ref: '#/components/schemas/UserTeamCreate' + required: + - data + type: object + UserTeamResponse: + description: Team membership response + properties: + data: + $ref: '#/components/schemas/UserTeam' + type: object + UserTeamRole: + description: The user's role within the team + enum: + - admin + nullable: true + type: string + x-enum-varnames: + - ADMIN + UserTeamTeamType: + default: team + description: User team team type + enum: + - team + example: team + type: string + x-enum-varnames: + - TEAM + UserTeamType: + default: team_memberships + description: Team membership type + enum: + - team_memberships + example: team_memberships + type: string + x-enum-varnames: + - TEAM_MEMBERSHIPS + UserTeamUpdate: + description: A user's relationship with a team + properties: + attributes: + $ref: '#/components/schemas/UserTeamAttributes' + type: + $ref: '#/components/schemas/UserTeamType' + required: + - type + type: object + UserTeamUpdateRequest: + description: Team membership request + properties: + data: + $ref: '#/components/schemas/UserTeamUpdate' + required: + - data + type: object + UserTeamUserType: + default: users + description: User team user type + enum: + - users + example: users + type: string + x-enum-varnames: + - USERS + UserTeamsResponse: + description: Team memberships response + properties: + data: + description: Team memberships response data + items: + $ref: '#/components/schemas/UserTeam' + type: array + links: + $ref: '#/components/schemas/TeamsResponseLinks' + meta: + $ref: '#/components/schemas/TeamsResponseMeta' + type: object + UserUpdateAttributes: + description: Attributes of the edited user. + properties: + disabled: + description: If the user is enabled or disabled. + type: boolean + email: + description: The email of the user. + type: string + name: + description: The name of the user. + type: string + type: object + UserUpdateData: + description: Object to update a user. + properties: + attributes: + $ref: '#/components/schemas/UserUpdateAttributes' + id: + description: ID of the user. + example: 00000000-0000-feed-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/UsersType' + required: + - attributes + - type + - id + type: object + UserUpdateRequest: + description: Update a user. + properties: + data: + $ref: '#/components/schemas/UserUpdateData' + required: + - data + type: object + UsersResponse: + description: Response containing information about multiple users. + properties: + data: + description: Array of returned users. + items: + $ref: '#/components/schemas/User' + type: array + included: + description: Array of objects related to the users. + items: + $ref: '#/components/schemas/UserResponseIncludedItem' + type: array + meta: + $ref: '#/components/schemas/ResponseMetaAttributes' + readOnly: true + type: object + UsersType: + default: users + description: Users resource type. + enum: + - users + example: users + type: string + x-enum-varnames: + - USERS + WidgetLiveSpan: + description: The available timeframes depend on the widget you are using. + enum: + - 1m + - 5m + - 10m + - 15m + - 30m + - 1h + - 4h + - 1d + - 2d + - 1w + - 1mo + - 3mo + - 6mo + - 1y + - alert + example: 5m + type: string + x-enum-varnames: + - PAST_ONE_MINUTE + - PAST_FIVE_MINUTES + - PAST_TEN_MINUTES + - PAST_FIFTEEN_MINUTES + - PAST_THIRTY_MINUTES + - PAST_ONE_HOUR + - PAST_FOUR_HOURS + - PAST_ONE_DAY + - PAST_TWO_DAYS + - PAST_ONE_WEEK + - PAST_ONE_MONTH + - PAST_THREE_MONTHS + - PAST_SIX_MONTHS + - PAST_ONE_YEAR + - ALERT securitySchemes: AuthZ: description: This API uses OAuth 2 with the implicit grant flow. @@ -4373,7 +20550,7 @@ components: an organization. Mute and unmute hosts. The ability to write monitors is not required to set downtimes. monitors_read: View monitors. - monitors_write: Edit, mute, and delete individual monitors. + monitors_write: Edit and delete individual monitors. security_monitoring_filters_read: Read Security Filters. security_monitoring_filters_write: Create, edit, and delete Security Filters. security_monitoring_findings_read: View CSPM Findings. @@ -4432,43 +20609,8386 @@ info: version: '1.0' openapi: 3.0.0 paths: + /api/v2/api_keys: + get: + description: List all API keys available for your account. + operationId: ListAPIKeys + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - $ref: '#/components/parameters/APIKeysSortParameter' + - $ref: '#/components/parameters/APIKeyFilterParameter' + - $ref: '#/components/parameters/APIKeyFilterCreatedAtStartParameter' + - $ref: '#/components/parameters/APIKeyFilterCreatedAtEndParameter' + - $ref: '#/components/parameters/APIKeyFilterModifiedAtStartParameter' + - $ref: '#/components/parameters/APIKeyFilterModifiedAtEndParameter' + - $ref: '#/components/parameters/APIKeyIncludeParameter' + - $ref: '#/components/parameters/APIKeyReadConfigReadEnabledParameter' + - $ref: '#/components/parameters/APIKeyCategoryParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/APIKeysResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all API keys + tags: + - Key Management + post: + description: Create an API key. + operationId: CreateAPIKey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/APIKeyCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/APIKeyResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an API key + tags: + - Key Management + x-codegen-request-body-name: body + /api/v2/api_keys/{api_key_id}: + delete: + description: Delete an API key. + operationId: DeleteAPIKey + parameters: + - $ref: '#/components/parameters/APIKeyId' + responses: + '204': + description: No Content + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an API key + tags: + - Key Management + get: + description: Get an API key. + operationId: GetAPIKey + parameters: + - $ref: '#/components/parameters/APIKeyId' + - $ref: '#/components/parameters/APIKeyIncludeParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/APIKeyResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get API key + tags: + - Key Management + patch: + description: Update an API key. + operationId: UpdateAPIKey + parameters: + - $ref: '#/components/parameters/APIKeyId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/APIKeyUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/APIKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Edit an API key + tags: + - Key Management + x-codegen-request-body-name: body /api/v2/apm/config/metrics: get: - description: Get the list of configured span-based metrics with their definitions. - operationId: ListSpansMetrics + description: Get the list of configured span-based metrics with their definitions. + operationId: ListSpansMetrics + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SpansMetricsResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all span-based metrics + tags: + - Spans Metrics + post: + description: 'Create a metric based on your ingested spans in your organization. + + Returns the span-based metric object from the request body when the request + is successful.' + operationId: CreateSpansMetric + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SpansMetricCreateRequest' + description: The definition of the new span-based metric. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SpansMetricResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a span-based metric + tags: + - Spans Metrics + x-codegen-request-body-name: body + /api/v2/apm/config/metrics/{metric_id}: + delete: + description: Delete a specific span-based metric from your organization. + operationId: DeleteSpansMetric + parameters: + - $ref: '#/components/parameters/SpansMetricIDParameter' + responses: + '204': + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a span-based metric + tags: + - Spans Metrics + get: + description: Get a specific span-based metric from your organization. + operationId: GetSpansMetric + parameters: + - $ref: '#/components/parameters/SpansMetricIDParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SpansMetricResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a span-based metric + tags: + - Spans Metrics + patch: + description: 'Update a specific span-based metric from your organization. + + Returns the span-based metric object from the request body when the request + is successful.' + operationId: UpdateSpansMetric + parameters: + - $ref: '#/components/parameters/SpansMetricIDParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SpansMetricUpdateRequest' + description: New definition of the span-based metric. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SpansMetricResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a span-based metric + tags: + - Spans Metrics + x-codegen-request-body-name: body + /api/v2/apm/config/retention-filters: + get: + description: Get the list of APM retention filters. + operationId: ListApmRetentionFilters + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RetentionFiltersResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List all APM retention filters + tags: + - APM Retention Filters + post: + description: 'Create a retention filter to index spans in your organization. + + Returns the retention filter definition when the request is successful.' + operationId: CreateApmRetentionFilter + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RetentionFilterCreateRequest' + description: The definition of the new retention filter. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RetentionFilterResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a retention filter + tags: + - APM Retention Filters + x-codegen-request-body-name: body + /api/v2/apm/config/retention-filters-execution-order: + put: + description: Re-order the execution order of retention filters. + operationId: ReorderApmRetentionFilters + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReorderRetentionFiltersRequest' + description: The list of retention filters in the new order. + required: true + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Re-order retention filters + tags: + - APM Retention Filters + x-codegen-request-body-name: body + /api/v2/apm/config/retention-filters/{filter_id}: + delete: + description: Delete a specific retention filter from your organization. + operationId: DeleteApmRetentionFilter + parameters: + - $ref: '#/components/parameters/RetentionFilterIdParam' + responses: + '200': + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a retention filter + tags: + - APM Retention Filters + get: + description: Get an APM retention filter. + operationId: GetApmRetentionFilter + parameters: + - $ref: '#/components/parameters/RetentionFilterIdParam' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RetentionFilterResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a given APM retention filter + tags: + - APM Retention Filters + put: + description: Update a retention filter from your organization. + operationId: UpdateApmRetentionFilter + parameters: + - $ref: '#/components/parameters/RetentionFilterIdParam' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RetentionFilterUpdateRequest' + description: The updated definition of the retention filter. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RetentionFilterResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a retention filter + tags: + - APM Retention Filters + x-codegen-request-body-name: body + /api/v2/application_keys: + get: + description: List all application keys available for your org + operationId: ListApplicationKeys + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - $ref: '#/components/parameters/ApplicationKeysSortParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter' + - $ref: '#/components/parameters/ApplicationKeyIncludeParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListApplicationKeysResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all application keys + tags: + - Key Management + /api/v2/application_keys/{app_key_id}: + delete: + description: Delete an application key + operationId: DeleteApplicationKey + parameters: + - $ref: '#/components/parameters/ApplicationKeyID' + responses: + '204': + description: No Content + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an application key + tags: + - Key Management + x-codegen-request-body-name: body + get: + description: Get an application key for your org. + operationId: GetApplicationKey + parameters: + - $ref: '#/components/parameters/ApplicationKeyID' + - $ref: '#/components/parameters/ApplicationKeyIncludeParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get an application key + tags: + - Key Management + patch: + description: Edit an application key + operationId: UpdateApplicationKey + parameters: + - $ref: '#/components/parameters/ApplicationKeyID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Edit an application key + tags: + - Key Management + x-codegen-request-body-name: body + /api/v2/audit/events: + get: + description: 'List endpoint returns events that match a Audit Logs search query. + + [Results are paginated][1]. + + + Use this endpoint to see your latest Audit Logs events. + + + [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination' + operationId: ListAuditLogs + parameters: + - description: Search query following Audit Logs syntax. + example: '@type:session @application_id:xxxx' + in: query + name: filter[query] + required: false + schema: + type: string + - description: Minimum timestamp for requested events. + example: '2019-01-02T09:42:36.320Z' + in: query + name: filter[from] + required: false + schema: + format: date-time + type: string + - description: Maximum timestamp for requested events. + example: '2019-01-03T09:42:36.320Z' + in: query + name: filter[to] + required: false + schema: + format: date-time + type: string + - description: Order of events in results. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/AuditLogsSort' + - description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Maximum number of events in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 10 + format: int32 + maximum: 1000 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuditLogsEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a list of Audit Logs events + tags: + - Audit + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/audit/events/search: + post: + description: 'List endpoint returns Audit Logs events that match an Audit search + query. + + [Results are paginated][1]. + + + Use this endpoint to build complex Audit Logs events filtering and search. + + + [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination' + operationId: SearchAuditLogs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuditLogsSearchEventsRequest' + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuditLogsEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Search Audit Logs events + tags: + - Audit + x-codegen-request-body-name: body + x-pagination: + cursorParam: body.page.cursor + cursorPath: meta.page.after + limitParam: body.page.limit + resultsPath: data + /api/v2/authn_mappings: + get: + description: List all AuthN Mappings in the org. + operationId: ListAuthNMappings + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - description: Sort AuthN Mappings depending on the given field. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/AuthNMappingsSort' + - description: Filter all mappings by the given string. + in: query + name: filter + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthNMappingsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List all AuthN Mappings + tags: + - AuthN Mappings + x-permission: OPEN() + post: + description: Create an AuthN Mapping. + operationId: CreateAuthNMapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthNMappingCreateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthNMappingResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Create an AuthN Mapping + tags: + - AuthN Mappings + x-codegen-request-body-name: body + x-permission: OR(USER_ACCESS_MANAGE) + /api/v2/authn_mappings/{authn_mapping_id}: + delete: + description: Delete an AuthN Mapping specified by AuthN Mapping UUID. + operationId: DeleteAuthNMapping + parameters: + - $ref: '#/components/parameters/AuthNMappingID' + responses: + '204': + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Delete an AuthN Mapping + tags: + - AuthN Mappings + x-permission: OR(USER_ACCESS_MANAGE) + get: + description: Get an AuthN Mapping specified by the AuthN Mapping UUID. + operationId: GetAuthNMapping + parameters: + - $ref: '#/components/parameters/AuthNMappingID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthNMappingResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get an AuthN Mapping by UUID + tags: + - AuthN Mappings + x-permission: OPEN() + patch: + description: Edit an AuthN Mapping. + operationId: UpdateAuthNMapping + parameters: + - $ref: '#/components/parameters/AuthNMappingID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthNMappingUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AuthNMappingResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Edit an AuthN Mapping + tags: + - AuthN Mappings + x-codegen-request-body-name: body + x-permission: OR(USER_ACCESS_MANAGE) + /api/v2/ci/pipeline: + post: + description: 'Send your pipeline event to your Datadog platform over HTTP. For + details about how pipeline executions are modeled and what execution types + we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/). + + + Pipeline events can be submitted with a timestamp that is up to 18 hours in + the past.' + operationId: CreateCIAppPipelineEvent + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppCreatePipelineEventRequest' + required: true + responses: + '202': + content: + application/json: + schema: + type: object + description: Request accepted for processing + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Forbidden + '408': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Request Timeout + '413': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Payload Too Large + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Too Many Requests + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Internal Server Error + '503': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPCIAppErrors' + description: Service Unavailable + security: + - apiKeyAuth: [] + summary: Send pipeline event + tags: + - CI Visibility Pipelines + x-codegen-request-body-name: body + /api/v2/ci/pipelines/analytics/aggregate: + post: + description: Use this API endpoint to aggregate CI Visibility pipeline events + into buckets of computed metrics and timeseries. + operationId: AggregateCIAppPipelineEvents + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppPipelinesAggregateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppPipelinesAnalyticsAggregateResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ci_visibility_read + summary: Aggregate pipelines events + tags: + - CI Visibility Pipelines + x-codegen-request-body-name: body + /api/v2/ci/pipelines/events: + get: + description: 'List endpoint returns CI Visibility pipeline events that match + a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/). + + [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + + + Use this endpoint to see your latest pipeline events.' + operationId: ListCIAppPipelineEvents + parameters: + - description: Search query following log syntax. + example: '@ci.provider.name:github @ci.pipeline.name:Pull Request Labeler' + in: query + name: filter[query] + required: false + schema: + type: string + - description: Minimum timestamp for requested events. + example: '2019-01-02T09:42:36.320Z' + in: query + name: filter[from] + required: false + schema: + format: date-time + type: string + - description: Maximum timestamp for requested events. + example: '2019-01-03T09:42:36.320Z' + in: query + name: filter[to] + required: false + schema: + format: date-time + type: string + - description: Order of events in results. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/CIAppSort' + - description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Maximum number of events in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 10 + format: int32 + maximum: 1000 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppPipelineEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ci_visibility_read + summary: Get a list of pipelines events + tags: + - CI Visibility Pipelines + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/ci/pipelines/events/search: + post: + description: 'List endpoint returns CI Visibility pipeline events that match + a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/). + + [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + + + Use this endpoint to build complex events filtering and search.' + operationId: SearchCIAppPipelineEvents + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppPipelineEventsRequest' + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppPipelineEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ci_visibility_read + summary: Search pipelines events + tags: + - CI Visibility Pipelines + x-codegen-request-body-name: body + x-pagination: + cursorParam: body.page.cursor + cursorPath: meta.page.after + limitParam: body.page.limit + resultsPath: data + /api/v2/ci/tests/analytics/aggregate: + post: + description: The API endpoint to aggregate CI Visibility test events into buckets + of computed metrics and timeseries. + operationId: AggregateCIAppTestEvents + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppTestsAggregateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppTestsAnalyticsAggregateResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ci_visibility_read + summary: Aggregate tests events + tags: + - CI Visibility Tests + x-codegen-request-body-name: body + /api/v2/ci/tests/events: + get: + description: 'List endpoint returns CI Visibility test events that match a [log + search query](https://docs.datadoghq.com/logs/explorer/search_syntax/). + + [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + + + Use this endpoint to see your latest test events.' + operationId: ListCIAppTestEvents + parameters: + - description: Search query following log syntax. + example: '@test.name:test_foo @test.suite:github.com/DataDog/dd-go/model' + in: query + name: filter[query] + required: false + schema: + type: string + - description: Minimum timestamp for requested events. + example: '2019-01-02T09:42:36.320Z' + in: query + name: filter[from] + required: false + schema: + format: date-time + type: string + - description: Maximum timestamp for requested events. + example: '2019-01-03T09:42:36.320Z' + in: query + name: filter[to] + required: false + schema: + format: date-time + type: string + - description: Order of events in results. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/CIAppSort' + - description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Maximum number of events in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 10 + format: int32 + maximum: 1000 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppTestEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ci_visibility_read + summary: Get a list of tests events + tags: + - CI Visibility Tests + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/ci/tests/events/search: + post: + description: 'List endpoint returns CI Visibility test events that match a [log + search query](https://docs.datadoghq.com/logs/explorer/search_syntax/). + + [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + + + Use this endpoint to build complex events filtering and search.' + operationId: SearchCIAppTestEvents + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppTestEventsRequest' + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CIAppTestEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - ci_visibility_read + summary: Search tests events + tags: + - CI Visibility Tests + x-codegen-request-body-name: body + x-pagination: + cursorParam: body.page.cursor + cursorPath: meta.page.after + limitParam: body.page.limit + resultsPath: data + /api/v2/container_images: + get: + description: Get all Container Images for your organization. + operationId: ListContainerImages + parameters: + - description: Comma-separated list of tags to filter Container Images by. + example: short_image:redis,status:running + in: query + name: filter[tags] + required: false + schema: + type: string + - description: Comma-separated list of tags to group Container Images by. + example: registry,image_tags + in: query + name: group_by + required: false + schema: + type: string + - description: Attribute to sort Container Images by. + example: container_count + in: query + name: sort + required: false + schema: + type: string + - description: Maximum number of results returned. + in: query + name: page[size] + required: false + schema: + default: 1000 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + - description: 'String to query the next page of results. + + This key is provided with each valid response from the API in `meta.pagination.next_cursor`.' + in: query + name: page[cursor] + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ContainerImagesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get all Container Images + tags: + - Container Images + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.pagination.next_cursor + limitParam: page[size] + resultsPath: data + /api/v2/containers: + get: + description: Get all containers for your organization. + operationId: ListContainers + parameters: + - description: Comma-separated list of tags to filter containers by. + example: env:prod,short_image:cassandra + in: query + name: filter[tags] + required: false + schema: + type: string + - description: Comma-separated list of tags to group containers by. + example: datacenter,cluster + in: query + name: group_by + required: false + schema: + type: string + - description: Attribute to sort containers by. + example: started_at + in: query + name: sort + required: false + schema: + type: string + - description: Maximum number of results returned. + in: query + name: page[size] + required: false + schema: + default: 1000 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + - description: 'String to query the next page of results. + + This key is provided with each valid response from the API in `meta.pagination.next_cursor`.' + in: query + name: page[cursor] + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ContainersResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get All Containers + tags: + - Containers + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.pagination.next_cursor + limitParam: page[size] + resultsPath: data + /api/v2/cost/aws_cur_config: + get: + description: List the AWS CUR configs. + operationId: ListCostAWSCURConfigs + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List Cloud Cost Management AWS CUR configs + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_READ + post: + description: Create a Cloud Cost Management account for an AWS CUR config. + operationId: CreateCostAWSCURConfig + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigPostRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create Cloud Cost Management AWS CUR config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_WRITE + /api/v2/cost/aws_cur_config/{cloud_account_id}: + delete: + description: Archive a Cloud Cost Management Account. + operationId: DeleteCostAWSCURConfig + parameters: + - $ref: '#/components/parameters/CloudAccountID' + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete Cloud Cost Management AWS CUR config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_WRITE + patch: + description: Update the status of an AWS CUR config (active/archived). + operationId: UpdateCostAWSCURConfig + parameters: + - $ref: '#/components/parameters/CloudAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigPatchRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update Cloud Cost Management AWS CUR config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_WRITE + /api/v2/cost/aws_related_accounts: + get: + description: List the AWS accounts in an organization by calling 'organizations:ListAccounts' + from the specified management account. + operationId: ListAWSRelatedAccounts + parameters: + - description: The ID of the management account to filter by. + example: '123456789123' + in: query + name: filter[management_account_id] + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AWSRelatedAccountsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List related AWS accounts + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_READ + /api/v2/cost/azure_uc_config: + get: + description: List the Azure configs. + operationId: ListCostAzureUCConfigs + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List Cloud Cost Management Azure configs + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_READ + post: + description: Create a Cloud Cost Management account for an Azure config. + operationId: CreateCostAzureUCConfigs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPostRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPairsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create Cloud Cost Management Azure configs + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_WRITE + /api/v2/cost/azure_uc_config/{cloud_account_id}: + delete: + description: Archive a Cloud Cost Management Account. + operationId: DeleteCostAzureUCConfig + parameters: + - $ref: '#/components/parameters/CloudAccountID' + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete Cloud Cost Management Azure config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_WRITE + patch: + description: Update the status of an Azure config (active/archived). + operationId: UpdateCostAzureUCConfigs + parameters: + - $ref: '#/components/parameters/CloudAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPatchRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPairsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update Cloud Cost Management Azure config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_WRITE + /api/v2/cost/enabled: + get: + description: Get the Cloud Cost Management activity. + operationId: GetCloudCostActivity + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CloudCostActivityResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Cloud Cost Enabled + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - CLOUD_COST_MANAGEMENT_READ + /api/v2/cost_by_tag/active_billing_dimensions: + get: + description: Get active billing dimensions for cost attribution. Cost data for + a given month becomes available no later than the 17th of the following month. + operationId: GetActiveBillingDimensions + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/ActiveBillingDimensionsResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + '429': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get active billing dimensions for cost attribution + tags: + - Usage Metering + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/cost_by_tag/monthly_cost_attribution: + get: + description: "Get monthly cost attribution by tag across multi-org and single + root-org accounts.\nCost Attribution data for a given month becomes available + no later than the 17th of the following month.\nThis API endpoint is paginated. + To make sure you receive all records, check if the value of `next_record_id` + is\nset in the response. If it is, make another request and pass `next_record_id` + as a parameter.\nPseudo code example:\n```\nresponse := GetMonthlyCostAttribution(start_month, + end_month)\ncursor := response.metadata.pagination.next_record_id\nWHILE cursor + != null BEGIN\n sleep(5 seconds) # Avoid running into rate limit\n response + := GetMonthlyCostAttribution(start_month, end_month, next_record_id=cursor)\n + \ cursor := response.metadata.pagination.next_record_id\nEND\n```" + operationId: GetMonthlyCostAttribution + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost beginning in this month.' + in: query + name: start_month + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost ending this month.' + in: query + name: end_month + required: true + schema: + format: date-time + type: string + - description: 'Comma-separated list specifying cost types (e.g., `_on_demand_cost`, + `_committed_cost`, `_total_cost`) + and the + + proportions (`_percentage_in_org`, `_percentage_in_account`). + Use `*` to retrieve all fields. + + Example: `infra_host_on_demand_cost,infra_host_percentage_in_account` + + To obtain the complete list of active billing dimensions that can be used + to replace + + `` in the field names, make a request to the [Get active + billing dimensions API](https://docs.datadoghq.com/api/latest/usage-metering/#get-active-billing-dimensions-for-cost-attribution).' + in: query + name: fields + required: true + schema: + type: string + - description: 'The direction to sort by: `[desc, asc]`.' + in: query + name: sort_direction + required: false + schema: + $ref: '#/components/schemas/SortDirection' + - description: 'The billing dimension to sort by. Always sorted by total cost. + Example: `infra_host`.' + in: query + name: sort_name + required: false + schema: + type: string + - description: 'Comma separated list of tag keys used to group cost. If no value + is provided the cost will not be broken down by tags. + + To see which tags are available, look for the value of `tag_config_source` + in the API response.' + in: query + name: tag_breakdown_keys + required: false + schema: + type: string + - description: List following results with a next_record_id provided in the + previous query. + in: query + name: next_record_id + required: false + schema: + type: string + - description: Include child org cost in the response. Defaults to `true`. + in: query + name: include_descendants + required: false + schema: + default: true + type: boolean + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/MonthlyCostAttributionResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + '429': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get Monthly Cost Attribution + tags: + - Usage Metering + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/current_user/application_keys: + get: + description: List all application keys available for current user + operationId: ListCurrentUserApplicationKeys + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - $ref: '#/components/parameters/ApplicationKeysSortParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter' + - $ref: '#/components/parameters/ApplicationKeyIncludeParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListApplicationKeysResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all application keys owned by current user + tags: + - Key Management + post: + description: Create an application key for current user + operationId: CreateCurrentUserApplicationKey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an application key for current user + tags: + - Key Management + x-codegen-request-body-name: body + /api/v2/current_user/application_keys/{app_key_id}: + delete: + description: Delete an application key owned by current user + operationId: DeleteCurrentUserApplicationKey + parameters: + - $ref: '#/components/parameters/ApplicationKeyID' + responses: + '204': + description: No Content + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an application key owned by current user + tags: + - Key Management + get: + description: Get an application key owned by current user + operationId: GetCurrentUserApplicationKey + parameters: + - $ref: '#/components/parameters/ApplicationKeyID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get one application key owned by current user + tags: + - Key Management + patch: + description: Edit an application key owned by current user + operationId: UpdateCurrentUserApplicationKey + parameters: + - $ref: '#/components/parameters/ApplicationKeyID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationKeyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Edit an application key owned by current user + tags: + - Key Management + x-codegen-request-body-name: body + /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards: + delete: + description: Delete dashboards from an existing dashboard list. + operationId: DeleteDashboardListItems + parameters: + - description: ID of the dashboard list to delete items from. + in: path + name: dashboard_list_id + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListDeleteItemsRequest' + description: Dashboards to delete from the dashboard list. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListDeleteItemsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete items from a dashboard list + tags: + - Dashboard Lists + x-codegen-request-body-name: body + get: + description: "Fetch the dashboard list\u2019s dashboard definitions." + operationId: GetDashboardListItems + parameters: + - description: ID of the dashboard list to get items from. + in: path + name: dashboard_list_id + required: true + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListItems' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get items of a Dashboard List + tags: + - Dashboard Lists + post: + description: Add dashboards to an existing dashboard list. + operationId: CreateDashboardListItems + parameters: + - description: ID of the dashboard list to add items to. + in: path + name: dashboard_list_id + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListAddItemsRequest' + description: Dashboards to add to the dashboard list. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListAddItemsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Add Items to a Dashboard List + tags: + - Dashboard Lists + x-codegen-request-body-name: body + put: + description: Update dashboards of an existing dashboard list. + operationId: UpdateDashboardListItems + parameters: + - description: ID of the dashboard list to update items from. + in: path + name: dashboard_list_id + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListUpdateItemsRequest' + description: New dashboards of the dashboard list. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardListUpdateItemsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update items of a dashboard list + tags: + - Dashboard Lists + x-codegen-request-body-name: body + /api/v2/dora/deployment: + post: + description: 'Use this API endpoint to provide data about deployments for DORA + metrics. + + + This is necessary for: + + - Deployment Frequency + + - Change Lead Time + + - Change Failure Rate' + operationId: CreateDORADeployment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DORADeploymentRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DORADeploymentResponse' + description: OK + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/DORADeploymentResponse' + description: OK - but delayed due to incident + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + summary: Send a deployment event for DORA Metrics + tags: + - DORA Metrics + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in private beta. + + If you want to request access, complete the [form](https://forms.gle/Eqq6uXfGjYxmqpjDA).' + /api/v2/dora/incident: + post: + description: 'Use this API endpoint to provide data about incidents for DORA + metrics. + + + This is necessary for: + + - Change Failure Rate + + - Time to Restore' + operationId: CreateDORAIncident + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DORAIncidentRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DORAIncidentResponse' + description: OK + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/DORAIncidentResponse' + description: OK - but delayed due to incident + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + summary: Send an incident event for DORA Metrics + tags: + - DORA Metrics + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in private beta. + + If you want to request access, complete the [form](https://forms.gle/Eqq6uXfGjYxmqpjDA).' + /api/v2/downtime: + get: + description: Get all scheduled downtimes. + operationId: ListDowntimes + parameters: + - description: Only return downtimes that are active when the request is made. + in: query + name: current_only + required: false + schema: + type: boolean + - description: 'Comma-separated list of resource paths for related resources + to include in the response. Supported resource + + paths are `created_by` and `monitor`.' + in: query + name: include + required: false + schema: + example: created_by,monitor + type: string + - $ref: '#/components/parameters/PageOffset' + - description: Maximum number of downtimes in the response. + example: 100 + in: query + name: page[limit] + required: false + schema: + default: 30 + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListDowntimesResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Get all downtimes + tags: + - Downtimes + x-pagination: + limitParam: page[limit] + pageOffsetParam: page[offset] + resultsPath: data + post: + description: Schedule a downtime. + operationId: CreateDowntime + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DowntimeCreateRequest' + description: Schedule a downtime request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DowntimeResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Schedule a downtime + tags: + - Downtimes + x-codegen-request-body-name: body + /api/v2/downtime/{downtime_id}: + delete: + description: Cancel a downtime. + operationId: CancelDowntime + parameters: + - description: ID of the downtime to cancel. + in: path + name: downtime_id + required: true + schema: + example: 00000000-0000-1234-0000-000000000000 + type: string + responses: + '204': + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Downtime not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Cancel a downtime + tags: + - Downtimes + get: + description: Get downtime detail by `downtime_id`. + operationId: GetDowntime + parameters: + - description: ID of the downtime to fetch. + in: path + name: downtime_id + required: true + schema: + example: 00000000-0000-1234-0000-000000000000 + type: string + - description: 'Comma-separated list of resource paths for related resources + to include in the response. Supported resource + + paths are `created_by` and `monitor`.' + in: query + name: include + required: false + schema: + example: created_by,monitor + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DowntimeResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Get a downtime + tags: + - Downtimes + patch: + description: Update a downtime by `downtime_id`. + operationId: UpdateDowntime + parameters: + - description: ID of the downtime to update. + in: path + name: downtime_id + required: true + schema: + example: 00e000000-0000-1234-0000-000000000000 + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DowntimeUpdateRequest' + description: Update a downtime request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DowntimeResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Downtime not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Update a downtime + tags: + - Downtimes + x-codegen-request-body-name: body + /api/v2/events: + get: + description: 'List endpoint returns events that match an events search query. + + [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + + + Use this endpoint to see your latest events.' + operationId: ListEvents + parameters: + - description: Search query following events syntax. + in: query + name: filter[query] + required: false + schema: + type: string + - description: Minimum timestamp for requested events. + in: query + name: filter[from] + required: false + schema: + type: string + - description: Maximum timestamp for requested events. + in: query + name: filter[to] + required: false + schema: + type: string + - description: Order of events in results. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/EventsSort' + - description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Maximum number of events in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 10 + format: int32 + maximum: 1000 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventsListResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - events_read + summary: Get a list of events + tags: + - Events + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/events/search: + post: + description: 'List endpoint returns events that match an events search query. + + [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + + + Use this endpoint to build complex events filtering and search.' + operationId: SearchEvents + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/EventsListRequest' + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/EventsListResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - events_read + summary: Search events + tags: + - Events + x-codegen-request-body-name: body + x-pagination: + cursorParam: body.page.cursor + cursorPath: meta.page.after + limitParam: body.page.limit + resultsPath: data + /api/v2/incidents: + get: + description: Get all incidents for the user's organization. + operationId: ListIncidents + parameters: + - $ref: '#/components/parameters/IncidentIncludeQueryParameter' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get a list of incidents + tags: + - Incidents + x-pagination: + limitParam: page[size] + pageOffsetParam: page[offset] + resultsPath: data + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create an incident. + operationId: CreateIncident + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentCreateRequest' + description: Incident payload. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/search: + get: + description: Search for incidents matching a certain query. + operationId: SearchIncidents + parameters: + - $ref: '#/components/parameters/IncidentSearchIncludeQueryParameter' + - $ref: '#/components/parameters/IncidentSearchQueryQueryParameter' + - $ref: '#/components/parameters/IncidentSearchSortQueryParameter' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentSearchResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Search for incidents + tags: + - Incidents + x-pagination: + limitParam: page[size] + pageOffsetParam: page[offset] + resultsPath: data.attributes.incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}: + delete: + description: Deletes an existing incident from the users organization. + operationId: DeleteIncident + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an existing incident + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get the details of an incident by `incident_id`. + operationId: GetIncident + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIncludeQueryParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get the details of an incident + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Updates an incident. Provide only the attributes that should be + updated as this request is a partial update. + operationId: UpdateIncident + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIncludeQueryParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentUpdateRequest' + description: Incident Payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an existing incident + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}/attachments: + get: + description: Get all attachments for a given incident. + operationId: ListIncidentAttachments + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentAttachmentIncludeQueryParameter' + - $ref: '#/components/parameters/IncidentAttachmentFilterQueryParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentAttachmentsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get a list of attachments + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: The bulk update endpoint for creating, updating, and deleting attachments + for a given incident. + operationId: UpdateIncidentAttachments + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentAttachmentIncludeQueryParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentAttachmentUpdateRequest' + description: Incident Attachment Payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentAttachmentUpdateResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create, update, and delete incident attachments + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}/relationships/integrations: + get: + description: Get all integration metadata for an incident. + operationId: ListIncidentIntegrations + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataListResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get a list of an incident's integration metadata + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create an incident integration metadata. + operationId: CreateIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataCreateRequest' + description: Incident integration metadata payload. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident integration metadata + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}: + delete: + description: Delete an incident integration metadata. + operationId: DeleteIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIntegrationMetadataIDPathParameter' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident integration metadata + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get incident integration metadata details. + operationId: GetIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIntegrationMetadataIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident integration metadata details + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Update an existing incident integration metadata. + operationId: UpdateIncidentIntegration + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentIntegrationMetadataIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataPatchRequest' + description: Incident integration metadata payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentIntegrationMetadataResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an existing incident integration metadata + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}/relationships/todos: + get: + description: Get all todos for an incident. + operationId: ListIncidentTodos + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentTodoListResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get a list of an incident's todos + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create an incident todo. + operationId: CreateIncidentTodo + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentTodoCreateRequest' + description: Incident todo payload. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentTodoResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident todo + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/{incident_id}/relationships/todos/{todo_id}: + delete: + description: Delete an incident todo. + operationId: DeleteIncidentTodo + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentTodoIDPathParameter' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident todo + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get incident todo details. + operationId: GetIncidentTodo + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentTodoIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentTodoResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident todo details + tags: + - Incidents + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Update an incident todo. + operationId: UpdateIncidentTodo + parameters: + - $ref: '#/components/parameters/IncidentIDPathParameter' + - $ref: '#/components/parameters/IncidentTodoIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentTodoPatchRequest' + description: Incident todo payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentTodoResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident todo + tags: + - Incidents + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/integration/gcp/accounts: + get: + description: List all GCP STS-enabled service accounts configured in your Datadog + account. + operationId: ListGCPSTSAccounts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GCPSTSServiceAccountsResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List all GCP STS-enabled service accounts + tags: + - GCP Integration + post: + description: Create a new entry within Datadog for your STS enabled service + account. + operationId: CreateGCPSTSAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GCPSTSServiceAccountCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/GCPSTSServiceAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a new entry for your service account + tags: + - GCP Integration + x-codegen-request-body-name: body + /api/v2/integration/gcp/accounts/{account_id}: + delete: + description: Delete an STS enabled GCP account from within Datadog. + operationId: DeleteGCPSTSAccount + parameters: + - $ref: '#/components/parameters/GCPSTSServiceAccountID' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an STS enabled GCP Account + tags: + - GCP Integration + patch: + description: Update an STS enabled service account. + operationId: UpdateGCPSTSAccount + parameters: + - $ref: '#/components/parameters/GCPSTSServiceAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GCPSTSServiceAccountUpdateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/GCPSTSServiceAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update STS Service Account + tags: + - GCP Integration + x-codegen-request-body-name: body + /api/v2/integration/gcp/sts_delegate: + get: + description: List your Datadog-GCP STS delegate account configured in your Datadog + account. + operationId: GetGCPSTSDelegate + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GCPSTSDelegateAccountResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List delegate account + tags: + - GCP Integration + x-codegen-request-body-name: body + post: + description: Create a Datadog GCP principal. + operationId: MakeGCPSTSDelegate + requestBody: + content: + application/json: + schema: + example: {} + type: object + description: Create a delegate service account within Datadog. + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GCPSTSDelegateAccountResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a Datadog GCP principal + tags: + - GCP Integration + x-codegen-request-body-name: body + /api/v2/integration/opsgenie/services: + get: + description: Get a list of all services from the Datadog Opsgenie integration. + operationId: ListOpsgenieServices + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OpsgenieServicesResponse' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all service objects + tags: + - Opsgenie Integration + post: + description: Create a new service object in the Opsgenie integration. + operationId: CreateOpsgenieService + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpsgenieServiceCreateRequest' + description: Opsgenie service payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/OpsgenieServiceResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a new service object + tags: + - Opsgenie Integration + x-codegen-request-body-name: body + /api/v2/integration/opsgenie/services/{integration_service_id}: + delete: + description: Delete a single service object in the Datadog Opsgenie integration. + operationId: DeleteOpsgenieService + parameters: + - $ref: '#/components/parameters/OpsgenieServiceIDPathParameter' + responses: + '204': + 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 single service object + tags: + - Opsgenie Integration + get: + description: Get a single service from the Datadog Opsgenie integration. + operationId: GetOpsgenieService + parameters: + - $ref: '#/components/parameters/OpsgenieServiceIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OpsgenieServiceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a single service object + tags: + - Opsgenie Integration + patch: + description: Update a single service object in the Datadog Opsgenie integration. + operationId: UpdateOpsgenieService + parameters: + - $ref: '#/components/parameters/OpsgenieServiceIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpsgenieServiceUpdateRequest' + description: Opsgenie service payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OpsgenieServiceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a single service object + tags: + - Opsgenie Integration + x-codegen-request-body-name: body + /api/v2/integrations/cloudflare/accounts: + get: + description: List Cloudflare accounts. + operationId: ListCloudflareAccounts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CloudflareAccountsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Cloudflare accounts + tags: + - Cloudflare Integration + post: + description: Create a Cloudflare account. + operationId: CreateCloudflareAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CloudflareAccountCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CloudflareAccountResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Add Cloudflare account + tags: + - Cloudflare Integration + x-codegen-request-body-name: body + /api/v2/integrations/cloudflare/accounts/{account_id}: + delete: + description: Delete a Cloudflare account. + operationId: DeleteCloudflareAccount + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Cloudflare account + tags: + - Cloudflare Integration + get: + description: Get a Cloudflare account. + operationId: GetCloudflareAccount + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CloudflareAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get Cloudflare account + tags: + - Cloudflare Integration + patch: + description: Update a Cloudflare account. + operationId: UpdateCloudflareAccount + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CloudflareAccountUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CloudflareAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update Cloudflare account + tags: + - Cloudflare Integration + x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts: + get: + description: List Confluent accounts. + operationId: ListConfluentAccount + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Confluent accounts + tags: + - Confluent Cloud + post: + description: Create a Confluent account. + operationId: CreateConfluentAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountCreateRequest' + description: Confluent payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Add Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts/{account_id}: + delete: + description: Delete a Confluent account with the provided account ID. + operationId: DeleteConfluentAccount + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Confluent account + tags: + - Confluent Cloud + get: + description: Get the Confluent account with the provided account ID. + operationId: GetConfluentAccount + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get Confluent account + tags: + - Confluent Cloud + patch: + description: Update the Confluent account with the provided account ID. + operationId: UpdateConfluentAccount + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountUpdateRequest' + description: Confluent payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts/{account_id}/resources: + get: + description: Get a Confluent resource for the account associated with the provided + ID. + operationId: ListConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourcesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Confluent Account resources + tags: + - Confluent Cloud + post: + description: Create a Confluent resource for the account associated with the + provided ID. + operationId: CreateConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceRequest' + description: Confluent payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Add resource to Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + /api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}: + delete: + description: Delete a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: DeleteConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ConfluentResourceID' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete resource from Confluent account + tags: + - Confluent Cloud + get: + description: Get a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: GetConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ConfluentResourceID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get resource from Confluent account + tags: + - Confluent Cloud + patch: + description: Update a Confluent resource with the provided resource id for the + account associated with the provided account ID. + operationId: UpdateConfluentResource + parameters: + - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ConfluentResourceID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceRequest' + description: Confluent payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConfluentResourceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update resource in Confluent account + tags: + - Confluent Cloud + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - STANDARD + /api/v2/integrations/fastly/accounts: + get: + description: List Fastly accounts. + operationId: ListFastlyAccounts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyAccountsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Fastly accounts + tags: + - Fastly Integration + post: + description: Create a Fastly account. + operationId: CreateFastlyAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyAccountCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyAccountResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Add Fastly account + tags: + - Fastly Integration + x-codegen-request-body-name: body + /api/v2/integrations/fastly/accounts/{account_id}: + delete: + description: Delete a Fastly account. + operationId: DeleteFastlyAccount + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Fastly account + tags: + - Fastly Integration + get: + description: Get a Fastly account. + operationId: GetFastlyAccount + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get Fastly account + tags: + - Fastly Integration + patch: + description: Update a Fastly account. + operationId: UpdateFastlyAccount + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyAccountUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update Fastly account + tags: + - Fastly Integration + x-codegen-request-body-name: body + /api/v2/integrations/fastly/accounts/{account_id}/services: + get: + description: List Fastly services for an account. + operationId: ListFastlyServices + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyServicesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Fastly services + tags: + - Fastly Integration + post: + description: Create a Fastly service for an account. + operationId: CreateFastlyService + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyServiceRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyServiceResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Add Fastly service + tags: + - Fastly Integration + x-codegen-request-body-name: body + /api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}: + delete: + description: Delete a Fastly service for an account. + operationId: DeleteFastlyService + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + - $ref: '#/components/parameters/FastlyServiceID' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Fastly service + tags: + - Fastly Integration + get: + description: Get a Fastly service for an account. + operationId: GetFastlyService + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + - $ref: '#/components/parameters/FastlyServiceID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyServiceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get Fastly service + tags: + - Fastly Integration + patch: + description: Update a Fastly service for an account. + operationId: UpdateFastlyService + parameters: + - $ref: '#/components/parameters/FastlyAccountID' + - $ref: '#/components/parameters/FastlyServiceID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyServiceRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FastlyServiceResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update Fastly service + tags: + - Fastly Integration + x-codegen-request-body-name: body + /api/v2/integrations/okta/accounts: + get: + description: List Okta accounts. + operationId: ListOktaAccounts + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OktaAccountsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List Okta accounts + tags: + - Okta Integration + post: + description: Create an Okta account. + operationId: CreateOktaAccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OktaAccountRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/OktaAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Add Okta account + tags: + - Okta Integration + x-codegen-request-body-name: body + /api/v2/integrations/okta/accounts/{account_id}: + delete: + description: Delete an Okta account. + operationId: DeleteOktaAccount + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete Okta account + tags: + - Okta Integration + get: + description: Get an Okta account. + operationId: GetOktaAccount + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OktaAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get Okta account + tags: + - Okta Integration + patch: + description: Update an Okta account. + operationId: UpdateOktaAccount + parameters: + - description: None + in: path + name: account_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OktaAccountUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OktaAccountResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update Okta account + tags: + - Okta Integration + x-codegen-request-body-name: body + /api/v2/ip_allowlist: + get: + description: Returns the IP allowlist and its enabled or disabled state. + operationId: GetIPAllowlist + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IPAllowlistResponse' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get IP Allowlist + tags: + - IP Allowlist + patch: + description: Edit the entries in the IP allowlist, and enable or disable it. + operationId: UpdateIPAllowlist + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IPAllowlistUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IPAllowlistResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update IP Allowlist + tags: + - IP Allowlist + x-codegen-request-body-name: body + /api/v2/logs: + post: + description: 'Send your logs to your Datadog platform over HTTP. Limits per + HTTP request are: + + + - Maximum content size per payload (uncompressed): 5MB + + - Maximum size for a single log: 1MB + + - Maximum array size if sending multiple logs in an array: 1000 entries + + + Any log exceeding 1MB is accepted and truncated by Datadog: + + - For a single log request, the API truncates the log at 1MB and returns a + 2xx. + + - For a multi-logs request, the API processes all logs, truncates only logs + larger than 1MB, and returns a 2xx. + + + Datadog recommends sending your logs compressed. + + Add the `Content-Encoding: gzip` header to the request when sending compressed + logs. + + Log events can be submitted with a timestamp that is up to 18 hours in the + past. + + + The status codes answered by the HTTP API are: + + - 202: Accepted: the request has been accepted for processing + + - 400: Bad request (likely an issue in the payload formatting) + + - 401: Unauthorized (likely a missing API Key) + + - 403: Permission issue (likely using an invalid API Key) + + - 408: Request Timeout, request should be retried after some time + + - 413: Payload too large (batch is above 5MB uncompressed) + + - 429: Too Many Requests, request should be retried after some time + + - 500: Internal Server Error, the server encountered an unexpected condition + that prevented it from fulfilling the request, request should be retried after + some time + + - 503: Service Unavailable, the server is not ready to handle the request + probably because it is overloaded, request should be retried after some time' + operationId: SubmitLog + parameters: + - description: HTTP header used to compress the media-type. + in: header + name: Content-Encoding + required: false + schema: + $ref: '#/components/schemas/ContentEncoding' + - description: Log tags can be passed as query parameters with `text/plain` + content type. + example: env:prod,user:my-user + in: query + name: ddtags + required: false + schema: + type: string + requestBody: + content: + application/json: + examples: + multi-json-messages: + description: Pass multiple log objects at once. + summary: Multi JSON Messages + value: + - ddsource: nginx + ddtags: env:staging,version:5.1 + hostname: i-012345678 + message: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello + service: payment + - ddsource: nginx + ddtags: env:staging,version:5.1 + hostname: i-012345679 + message: 2019-11-19T14:37:58,995 INFO [process.name][20081] World + service: payment + simple-json-message: + description: Log attributes can be passed as `key:value` pairs in + valid JSON messages. + summary: Simple JSON Message + value: + ddsource: nginx + ddtags: env:staging,version:5.1 + hostname: i-012345678 + message: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello + World + service: payment + schema: + $ref: '#/components/schemas/HTTPLog' + application/logplex-1: + examples: + multi-raw-message: + description: Submit log messages. + summary: Multi Logplex Messages + value: '2019-11-19T14:37:58,995 INFO [process.name][20081] Hello + + 2019-11-19T14:37:58,995 INFO [process.name][20081] World' + simple-logplex-message: + description: Submit log string. + summary: Simple Logplex Message + value: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World + schema: + type: string + text/plain: + examples: + multi-raw-message: + description: Submit log string. + summary: Multi Raw Messages + value: '2019-11-19T14:37:58,995 INFO [process.name][20081] Hello + + 2019-11-19T14:37:58,995 INFO [process.name][20081] World + + ' + simple-raw-message: + description: 'Submit log string. Log attributes can be passed as query + parameters in the URL. This enables the addition of tags or the + source by using the `ddtags` and `ddsource` parameters: `?host=my-hostname&service=my-service&ddsource=my-source&ddtags=env:prod,user:my-user`.' + summary: Simple Raw Message + value: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World + schema: + type: string + description: Log to send (JSON format). + required: true + responses: + '202': + content: + application/json: + schema: + type: object + description: Request accepted for processing (always 202 empty JSON). + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Forbidden + '408': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Request Timeout + '413': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Payload Too Large + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Too Many Requests + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Internal Server Error + '503': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPLogErrors' + description: Service Unavailable + security: + - apiKeyAuth: [] + servers: + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: The regional site for customers. + enum: + - datadoghq.com + - us3.datadoghq.com + - us5.datadoghq.com + - ap1.datadoghq.com + - datadoghq.eu + - ddog-gov.com + subdomain: + default: http-intake.logs + description: The subdomain where the API is deployed. + - url: '{protocol}://{name}' + variables: + name: + default: http-intake.logs.datadoghq.com + description: Full site DNS name. + protocol: + default: https + description: The protocol for accessing the API. + - url: https://{subdomain}.{site} + variables: + site: + default: datadoghq.com + description: Any Datadog deployment. + subdomain: + default: http-intake.logs + description: The subdomain where the API is deployed. + summary: Send logs + tags: + - Logs + x-codegen-request-body-name: body + /api/v2/logs/analytics/aggregate: + post: + description: The API endpoint to aggregate events into buckets and compute metrics + and timeseries. + operationId: AggregateLogs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsAggregateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsAggregateResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Aggregate events + tags: + - Logs + x-codegen-request-body-name: body + /api/v2/logs/config/archive-order: + get: + description: 'Get the current order of your archives. + + This endpoint takes no JSON arguments.' + operationId: GetLogsArchiveOrder + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchiveOrder' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get archive order + tags: + - Logs Archives + put: + description: 'Update the order of your archives. Since logs are processed sequentially, + reordering an archive may change + + the structure and content of the data processed by other archives. + + + **Note**: Using the `PUT` method updates your archive''s order by replacing + the current order + + with the new one.' + operationId: UpdateLogsArchiveOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchiveOrder' + description: An object containing the new ordered list of archive IDs. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchiveOrder' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update archive order + tags: + - Logs Archives + x-codegen-request-body-name: body + /api/v2/logs/config/archives: + get: + description: Get the list of configured logs archives with their definitions. + operationId: ListLogsArchives + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchives' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get all archives + tags: + - Logs Archives + post: + description: Create an archive in your organization. + operationId: CreateLogsArchive + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchiveCreateRequest' + description: The definition of the new archive. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchive' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create an archive + tags: + - Logs Archives + x-codegen-request-body-name: body + /api/v2/logs/config/archives/{archive_id}: + delete: + description: Delete a given archive from your organization. + operationId: DeleteLogsArchive + parameters: + - $ref: '#/components/parameters/ArchiveID' + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete an archive + tags: + - Logs Archives + get: + description: Get a specific archive from your organization. + operationId: GetLogsArchive + parameters: + - $ref: '#/components/parameters/ArchiveID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchive' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get an archive + tags: + - Logs Archives + put: + description: 'Update a given archive configuration. + + + **Note**: Using this method updates your archive configuration by **replacing** + + your current configuration with the new one sent to your Datadog organization.' + operationId: UpdateLogsArchive + parameters: + - $ref: '#/components/parameters/ArchiveID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchiveCreateRequest' + description: New definition of the archive. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsArchive' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update an archive + tags: + - Logs Archives + x-codegen-request-body-name: body + /api/v2/logs/config/archives/{archive_id}/readers: + delete: + description: Removes a role from an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) + operationId: RemoveRoleFromArchive + parameters: + - $ref: '#/components/parameters/ArchiveID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToRole' + required: true + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Revoke role from an archive + tags: + - Logs Archives + x-codegen-request-body-name: body + get: + description: Returns all read roles a given archive is restricted to. + operationId: ListArchiveReadRoles + parameters: + - $ref: '#/components/parameters/ArchiveID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RolesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List read roles for an archive + tags: + - Logs Archives + x-codegen-request-body-name: body + post: + description: Adds a read role to an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) + operationId: AddReadRoleToArchive + parameters: + - $ref: '#/components/parameters/ArchiveID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToRole' + required: true + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Grant role to an archive + tags: + - Logs Archives + x-codegen-request-body-name: body + /api/v2/logs/config/metrics: + get: + description: Get the list of configured log-based metrics with their definitions. + operationId: ListLogsMetrics + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsMetricsResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get all log-based metrics + tags: + - Logs Metrics + post: + description: 'Create a metric based on your ingested logs in your organization. + + Returns the log-based metric object from the request body when the request + is successful.' + operationId: CreateLogsMetric + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsMetricCreateRequest' + description: The definition of the new log-based metric. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsMetricResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a log-based metric + tags: + - Logs Metrics + x-codegen-request-body-name: body + /api/v2/logs/config/metrics/{metric_id}: + delete: + description: Delete a specific log-based metric from your organization. + operationId: DeleteLogsMetric + parameters: + - $ref: '#/components/parameters/MetricID' + responses: + '204': + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a log-based metric + tags: + - Logs Metrics + get: + description: Get a specific log-based metric from your organization. + operationId: GetLogsMetric + parameters: + - $ref: '#/components/parameters/MetricID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsMetricResponse' + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get a log-based metric + tags: + - Logs Metrics + patch: + description: 'Update a specific log-based metric from your organization. + + Returns the log-based metric object from the request body when the request + is successful.' + operationId: UpdateLogsMetric + parameters: + - $ref: '#/components/parameters/MetricID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsMetricUpdateRequest' + description: New definition of the log-based metric. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsMetricResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a log-based metric + tags: + - Logs Metrics + x-codegen-request-body-name: body + /api/v2/logs/events: + get: + description: 'List endpoint returns logs that match a log search query. + + [Results are paginated][1]. + + + Use this endpoint to see your latest logs. + + + **If you are considering archiving logs for your organization, + + consider use of the Datadog archive capabilities instead of the log list API. + + See [Datadog Logs Archive documentation][2].** + + + [1]: /logs/guide/collect-multiple-logs-with-pagination + + [2]: https://docs.datadoghq.com/logs/archives' + operationId: ListLogsGet + parameters: + - description: Search query following logs syntax. + example: '@datacenter:us @role:db' + in: query + name: filter[query] + required: false + schema: + type: string + - description: 'For customers with multiple indexes, the indexes to search. + + Defaults to ''*'' which means all indexes' + example: + - main + - web + explode: false + in: query + name: filter[indexes] + required: false + schema: + items: + description: The name of a log index. + type: string + type: array + - description: Minimum timestamp for requested logs. + example: '2019-01-02T09:42:36.320Z' + in: query + name: filter[from] + required: false + schema: + format: date-time + type: string + - description: Maximum timestamp for requested logs. + example: '2019-01-03T09:42:36.320Z' + in: query + name: filter[to] + required: false + schema: + format: date-time + type: string + - description: Specifies the storage type to be used + example: indexes + in: query + name: filter[storage_tier] + required: false + schema: + $ref: '#/components/schemas/LogsStorageTier' + - description: Order of logs in results. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/LogsSort' + - description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Maximum number of logs in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 10 + format: int32 + maximum: 1000 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsListResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a list of logs + tags: + - Logs + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/logs/events/search: + post: + description: 'List endpoint returns logs that match a log search query. + + [Results are paginated][1]. + + + Use this endpoint to build complex logs filtering and search. + + + **If you are considering archiving logs for your organization, + + consider use of the Datadog archive capabilities instead of the log list API. + + See [Datadog Logs Archive documentation][2].** + + + [1]: /logs/guide/collect-multiple-logs-with-pagination + + [2]: https://docs.datadoghq.com/logs/archives' + operationId: ListLogs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LogsListRequest' + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsListResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Search logs + tags: + - Logs + x-codegen-request-body-name: body + x-pagination: + cursorParam: body.page.cursor + cursorPath: meta.page.after + limitParam: body.page.limit + resultsPath: data + /api/v2/metrics: + get: + description: "Returns all metrics that can be configured in the Metrics Summary + page or with Metrics without Limits\u2122 (matching additional filters if + specified)." + operationId: ListTagConfigurations + parameters: + - description: Filter custom metrics that have configured tags. + example: true + in: query + name: filter[configured] + required: false + schema: + type: boolean + - description: Filter tag configurations by configured tags. + example: app + in: query + name: filter[tags_configured] + required: false + schema: + description: Tag keys to filter by. + type: string + - description: Filter metrics by metric type. + in: query + name: filter[metric_type] + required: false + schema: + $ref: '#/components/schemas/MetricTagConfigurationMetricTypes' + - description: 'Filter distributions with additional percentile + + aggregations enabled or disabled.' + example: true + in: query + name: filter[include_percentiles] + required: false + schema: + type: boolean + - description: '(Beta) Filter custom metrics that have or have not been queried + in the specified window[seconds]. + + If no window is provided or the window is less than 2 hours, a default of + 2 hours will be applied.' + example: true + in: query + name: filter[queried] + required: false + schema: + type: boolean + - description: 'Filter metrics that have been submitted with the given tags. + Supports boolean and wildcard expressions. + + Can only be combined with the filter[queried] filter.' + example: env IN (staging,test) AND service:web + in: query + name: filter[tags] + required: false + schema: + type: string + - description: 'The number of seconds of look back (from now) to apply to a + filter[tag] or filter[queried] query. + + Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).' + example: 3600 + in: query + name: window[seconds] + required: false + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricsAndMetricTagConfigurationsResponse' + description: Success + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: Get a list of metrics + tags: + - Metrics + /api/v2/metrics/config/bulk-tags: + delete: + description: 'Delete all custom lists of queryable tag keys for a set of existing + count, gauge, rate, and distribution metrics. + + Metrics are selected by passing a metric name prefix. + + Results can be sent to a set of account email addresses, just like the same + operation in the Datadog web app. + + Can only be used with application keys of users with the `Manage Tags for + Metrics` permission.' + operationId: DeleteBulkTagsMetricsConfiguration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MetricBulkTagConfigDeleteRequest' + required: true + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricBulkTagConfigResponse' + description: Accepted + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + summary: Delete tags for multiple metrics + tags: + - Metrics + x-codegen-request-body-name: body + post: + description: 'Create and define a list of queryable tag keys for a set of existing + count, gauge, rate, and distribution metrics. + + Metrics are selected by passing a metric name prefix. Use the Delete method + of this API path to remove tag configurations. + + Results can be sent to a set of account email addresses, just like the same + operation in the Datadog web app. + + If multiple calls include the same metric, the last configuration applied + (not by submit order) is used, do not + + expect deterministic ordering of concurrent calls. The `exclude_tags_mode` + value will set all metrics that match the prefix to + + the same exclusion state, metric tag configurations do not support mixed inclusion + and exclusion for tags on the same metric. + + Can only be used with application keys of users with the `Manage Tags for + Metrics` permission.' + operationId: CreateBulkTagsMetricsConfiguration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MetricBulkTagConfigCreateRequest' + required: true + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricBulkTagConfigResponse' + description: Accepted + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + summary: Configure tags for multiple metrics + tags: + - Metrics + x-codegen-request-body-name: body + /api/v2/metrics/{metric_name}/active-configurations: + get: + description: List tags and aggregations that are actively queried on dashboards + and monitors for a given metric name. + operationId: ListActiveMetricConfigurations + parameters: + - $ref: '#/components/parameters/MetricName' + - description: 'The number of seconds of look back (from now). + + Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum + value is 2,630,000 (1 month).' + example: 7200 + in: query + name: window[seconds] + required: false + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricSuggestedTagsAndAggregationsResponse' + description: Success + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: List active tags and aggregations + tags: + - Metrics + /api/v2/metrics/{metric_name}/all-tags: + get: + description: View indexed tag key-value pairs for a given metric name. + operationId: ListTagsByMetricName + parameters: + - $ref: '#/components/parameters/MetricName' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricAllTagsResponse' + description: Success + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: List tags by metric name + tags: + - Metrics + /api/v2/metrics/{metric_name}/estimate: + get: + description: Returns the estimated cardinality for a metric with a given tag, + percentile and number of aggregations configuration using Metrics without + Limits™. + operationId: EstimateMetricsOutputSeries + parameters: + - $ref: '#/components/parameters/MetricName' + - description: Filtered tag keys that the metric is configured to query with. + example: app,host + in: query + name: filter[groups] + required: false + schema: + type: string + - description: The number of hours of look back (from now) to estimate cardinality + with. + example: 49 + in: query + name: filter[hours_ago] + required: false + schema: + format: int32 + maximum: 2147483647 + type: integer + - description: The number of aggregations that a `count`, `rate`, or `gauge` + metric is configured to use. Max number of aggregation combos is 9. + example: 1 + in: query + name: filter[num_aggregations] + required: false + schema: + format: int32 + maximum: 9 + type: integer + - description: A boolean, for distribution metrics only, to estimate cardinality + if the metric includes additional percentile aggregators. + example: true + in: query + name: filter[pct] + required: false + schema: + type: boolean + - description: A window, in hours, from the look back to estimate cardinality + with. + example: 6 + in: query + name: filter[timespan_h] + required: false + schema: + format: int32 + maximum: 2147483647 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricEstimateResponse' + description: Success + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Tag Configuration Cardinality Estimator + tags: + - Metrics + x-dd-ownership: + notification_configuration: + manual_escalation_policy: '[Points Aggregation] Primary' + prod_high_urgency: '@pagerduty-Points-Aggregation @slack-points-aggr-ops' + prod_low_urgency: '@slack-points-aggr-ops' + slack_support_channel: '#points-aggregation' + staging_high_urgency: '@slack-points-aggr-stg-ops' + staging_low_urgency: '@slack-points-aggr-stg-ops' + team: points-aggregation + team_escalation: '[Points Aggregation] Primary' + x-permission: + operator: OPEN + permissions: [] + /api/v2/metrics/{metric_name}/tags: + delete: + description: 'Deletes a metric''s tag configuration. Can only be used with application + + keys from users with the `Manage Tags for Metrics` permission.' + operationId: DeleteTagConfiguration + parameters: + - $ref: '#/components/parameters/MetricName' + responses: + '204': + description: No Content + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + summary: Delete a tag configuration + tags: + - Metrics + get: + description: Returns the tag configuration for the given metric name. + operationId: ListTagConfigurationByName + parameters: + - $ref: '#/components/parameters/MetricName' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricTagConfigurationResponse' + description: Success + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: List tag configuration by name + tags: + - Metrics + patch: + description: 'Update the tag configuration of a metric or percentile aggregations + of a distribution metric or custom aggregations + + of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true + the behavior is changed + + from an allow-list to a deny-list, and tags in the defined list will not be + queryable. + + Can only be used with application keys from users with the `Manage Tags for + Metrics` permission. This endpoint requires + + a tag configuration to be created first.' + operationId: UpdateTagConfiguration + parameters: + - $ref: '#/components/parameters/MetricName' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MetricTagConfigurationUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricTagConfigurationResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unprocessable Entity + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + summary: Update a tag configuration + tags: + - Metrics + x-codegen-request-body-name: body + post: + description: 'Create and define a list of queryable tag keys for an existing + count/gauge/rate/distribution metric. + + Optionally, include percentile aggregations on any distribution metric or + configure custom aggregations + + on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true + the behavior is changed + + from an allow-list to a deny-list, and tags in the defined list will not be + queryable. + + Can only be used with application keys of users with the `Manage Tags for + Metrics` permission.' + operationId: CreateTagConfiguration + parameters: + - $ref: '#/components/parameters/MetricName' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MetricTagConfigurationCreateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricTagConfigurationResponse' + description: Created + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + summary: Create a tag configuration + tags: + - Metrics + x-codegen-request-body-name: body + /api/v2/metrics/{metric_name}/volumes: + get: + description: 'View distinct metrics volumes for the given metric name. + + + Custom metrics generated in-app from other products will return `null` for + ingested volumes.' + operationId: ListVolumesByMetricName + parameters: + - $ref: '#/components/parameters/MetricName' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MetricVolumesResponse' + description: Success + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List distinct metric volumes by metric name + tags: + - Metrics + /api/v2/monitor/policy: + get: + description: Get all monitor configuration policies. + operationId: ListMonitorConfigPolicies + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorConfigPolicyListResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Get all monitor configuration policies + tags: + - Monitors + post: + description: Create a monitor configuration policy. + operationId: CreateMonitorConfigPolicy + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorConfigPolicyCreateRequest' + description: Create a monitor configuration policy request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorConfigPolicyResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a monitor configuration policy + tags: + - Monitors + x-codegen-request-body-name: body + /api/v2/monitor/policy/{policy_id}: + delete: + description: Delete a monitor configuration policy. + operationId: DeleteMonitorConfigPolicy + parameters: + - description: ID of the monitor configuration policy. + in: path + name: policy_id + required: true + schema: + example: 00000000-0000-1234-0000-000000000000 + type: string + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a monitor configuration policy + tags: + - Monitors + get: + description: Get a monitor configuration policy by `policy_id`. + operationId: GetMonitorConfigPolicy + parameters: + - description: ID of the monitor configuration policy. + in: path + name: policy_id + required: true + schema: + example: 00000000-0000-1234-0000-000000000000 + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorConfigPolicyResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_read + summary: Get a monitor configuration policy + tags: + - Monitors + patch: + description: Edit a monitor configuration policy. + operationId: UpdateMonitorConfigPolicy + parameters: + - description: ID of the monitor configuration policy. + in: path + name: policy_id + required: true + schema: + example: 00000000-0000-1234-0000-000000000000 + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorConfigPolicyEditRequest' + description: Description of the update. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorConfigPolicyResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Edit a monitor configuration policy + tags: + - Monitors + x-codegen-request-body-name: body + /api/v2/monitor/{monitor_id}/downtime_matches: + get: + description: Get all active downtimes for the specified monitor. + operationId: ListMonitorDowntimes + parameters: + - description: The id of the monitor. + in: path + name: monitor_id + required: true + schema: + format: int64 + type: integer + - $ref: '#/components/parameters/PageOffset' + - description: Maximum number of downtimes in the response. + example: 100 + in: query + name: page[limit] + required: false + schema: + default: 30 + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorDowntimeMatchResponse' + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Monitor Not Found error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - monitors_downtime + summary: Get active downtimes for a monitor + tags: + - Downtimes + x-codegen-request-body-name: body + x-pagination: + limitParam: page[limit] + pageOffsetParam: page[offset] + resultsPath: data + /api/v2/permissions: + get: + description: Returns a list of all permissions, including name, description, + and ID. + operationId: ListPermissions + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: List permissions + tags: + - Roles + /api/v2/posture_management/findings: + get: + description: "Get a list of CSPM findings.\n\n### Filtering\n\nFilters can be + applied by appending query parameters to the URL.\n\n - Using a single filter: + `?filter[attribute_key]=attribute_value`\n - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...`\n + \ - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2`\n\nHere, + `attribute_key` can be any of the filter keys described further below.\n\nQuery + parameters of type `integer` support comparison operators (`>`, `>=`, `<`, + `<=`). This is particularly useful when filtering by `evaluation_changed_at` + or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`.\n\nYou + can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` + to filter for any non-AWS resources.\n\nThe operator must come after the equal + sign. For example, to filter with the `>=` operator, add the operator after + the equal sign: `filter[evaluation_changed_at]=>=1678809373257`.\n\nQuery + parameters must be only among the documented ones and with values of correct + types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) + are not allowed.\n\n### Response\n\nThe response includes an array of finding + objects, pagination metadata, and a count of items that match the query.\n\nEach + finding object contains the following:\n\n- The finding ID that can be used + in a `GetFinding` request to retrieve the full finding details.\n- Core attributes, + including status, evaluation, high-level resource details, muted state, and + rule details.\n- `evaluation_changed_at` and `resource_discovery_date` time + stamps.\n- An array of associated tags.\n" + operationId: ListFindings + parameters: + - description: Limit the number of findings returned. Must be <= 1000. + example: 50 + in: query + name: page[limit] + required: false + schema: + default: 100 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + - description: Return findings for a given snapshot of time (Unix ms). + example: 1678721573794 + in: query + name: snapshot_timestamp + required: false + schema: + format: int64 + minimum: 1 + type: integer + - description: Return the next page of findings pointed to by the cursor. + example: eyJhZnRlciI6IkFRQUFBWWJiaEJXQS1OY1dqUUFBQUFCQldXSmlhRUpYUVVGQlJFSktkbTlDTUdaWFRVbDNRVUUiLCJ2YWx1ZXMiOlsiY3JpdGljYWwiXX0= + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Return findings that have these associated tags (repeatable). + example: filter[tags]=cloud_provider:aws&filter[tags]=aws_account:999999999999 + in: query + name: filter[tags] + required: false + schema: + type: string + - description: Return findings that have changed from pass to fail or vice versa + on a specified date (Unix ms) or date range (using comparison operators). + example: '>=1678721573794' + in: query + name: filter[evaluation_changed_at] + required: false + schema: + type: string + - description: Set to `true` to return findings that are muted. Set to `false` + to return unmuted findings. + in: query + name: filter[muted] + required: false + schema: + type: boolean + - description: Return findings for the specified rule ID. + in: query + name: filter[rule_id] + required: false + schema: + type: string + - description: Return findings for the specified rule. + in: query + name: filter[rule_name] + required: false + schema: + type: string + - description: Return only findings for the specified resource type. + in: query + name: filter[resource_type] + required: false + schema: + type: string + - description: Return findings that were found on a specified date (Unix ms) + or date range (using comparison operators). + example: '>=1678721573794' + in: query + name: filter[discovery_timestamp] + required: false + schema: + type: string + - description: Return only `pass` or `fail` findings. + example: pass + in: query + name: filter[evaluation] + required: false + schema: + $ref: '#/components/schemas/FindingEvaluation' + - description: Return only findings with the specified status. + example: critical + in: query + name: filter[status] + required: false + schema: + $ref: '#/components/schemas/FindingStatus' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListFindingsResponse' + description: OK + '400': + $ref: '#/components/responses/FindingsBadRequestResponse' + '403': + $ref: '#/components/responses/FindingsForbiddenResponse' + '404': + $ref: '#/components/responses/FindingsNotFoundResponse' + '429': + $ref: '#/components/responses/FindingsTooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_findings_read + summary: List findings + tags: + - Security Monitoring + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.cursor + limitParam: page[limit] + resultsPath: data + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Mute or unmute findings. + operationId: MuteFindings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkMuteFindingsRequest' + description: "### Attributes\n\nAll findings are updated with the same attributes. + The request body must include at least two attributes: `muted` and `reason`.\nThe + allowed reasons depend on whether the finding is being muted or unmuted:\n + \ - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, + `OTHER`.\n - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, + `OTHER`.\n\n### Meta\n\nThe request body must include a list of the finding + IDs to be updated.\n" + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/BulkMuteFindingsResponse' + description: OK + '400': + $ref: '#/components/responses/FindingsBadRequestResponse' + '403': + $ref: '#/components/responses/FindingsForbiddenResponse' + '404': + $ref: '#/components/responses/FindingsNotFoundResponse' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: 'Invalid Request: The server understands the request syntax + but cannot process it due to invalid data.' + '429': + $ref: '#/components/responses/FindingsTooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Mute or unmute a batch of findings + tags: + - Security Monitoring + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/posture_management/findings/{finding_id}: + get: + description: Returns a single finding with message and resource configuration. + operationId: GetFinding + parameters: + - description: The ID of the finding. + in: path + name: finding_id + required: true + schema: + type: string + - description: Return the finding for a given snapshot of time (Unix ms). + example: 1678721573794 + in: query + name: snapshot_timestamp + required: false + schema: + format: int64 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetFindingResponse' + description: OK + '400': + $ref: '#/components/responses/FindingsBadRequestResponse' + '403': + $ref: '#/components/responses/FindingsForbiddenResponse' + '404': + $ref: '#/components/responses/FindingsNotFoundResponse' + '429': + $ref: '#/components/responses/FindingsTooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_findings_read + summary: Get a finding + tags: + - Security Monitoring + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/powerpacks: + get: + description: Get a list of all powerpacks. + operationId: ListPowerpacks + parameters: + - description: Maximum number of powerpacks in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 25 + format: int64 + maximum: 1000 + type: integer + - $ref: '#/components/parameters/PageOffset' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListPowerpacksResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get all powerpacks + tags: + - Powerpack + x-pagination: + limitParam: page[limit] + pageOffsetParam: page[offset] + resultsPath: data + post: + description: Create a powerpack. + operationId: CreatePowerpack + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Powerpack' + description: Create a powerpack request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PowerpackResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Create a new powerpack + tags: + - Powerpack + x-codegen-request-body-name: body + /api/v2/powerpacks/{powerpack_id}: + delete: + description: Delete a powerpack. + operationId: DeletePowerpack + parameters: + - description: Powerpack id + in: path + name: powerpack_id + required: true + schema: + type: string + responses: + '204': + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Powerpack Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Delete a powerpack + tags: + - Powerpack + get: + description: Get a powerpack. + operationId: GetPowerpack + parameters: + - description: ID of the powerpack. + in: path + name: powerpack_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PowerpackResponse' + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Powerpack Not Found. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: Get a Powerpack + tags: + - Powerpack + patch: + description: Update a powerpack. + operationId: UpdatePowerpack + parameters: + - description: ID of the powerpack. + in: path + name: powerpack_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Powerpack' + description: Update a powerpack request body. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PowerpackResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Powerpack Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_write + summary: Update a powerpack + tags: + - Powerpack + x-codegen-request-body-name: body + /api/v2/processes: + get: + description: Get all processes for your organization. + operationId: ListProcesses + parameters: + - description: String to search processes by. + in: query + name: search + required: false + schema: + type: string + - description: Comma-separated list of tags to filter processes by. + example: account:prod,user:admin + in: query + name: tags + required: false + schema: + type: string + - description: 'Unix timestamp (number of seconds since epoch) of the start + of the query window. + + If not provided, the start of the query window will be 15 minutes before + the `to` timestamp. If neither + + `from` nor `to` are provided, the query window will be `[now - 15m, now]`.' + in: query + name: from + required: false + schema: + format: int64 + type: integer + - description: 'Unix timestamp (number of seconds since epoch) of the end of + the query window. + + If not provided, the end of the query window will be 15 minutes after the + `from` timestamp. If neither + + `from` nor `to` are provided, the query window will be `[now - 15m, now]`.' + in: query + name: to + required: false + schema: + format: int64 + type: integer + - description: Maximum number of results returned. + in: query + name: page[limit] + required: false + schema: + default: 1000 + format: int32 + maximum: 10000 + minimum: 1 + type: integer + - description: 'String to query the next page of results. + + This key is provided with each valid response from the API in `meta.page.after`.' + in: query + name: page[cursor] + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProcessSummariesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get all processes + tags: + - Processes + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/query/scalar: + post: + description: 'Query scalar values (as seen on Query Value, Table, and Toplist + widgets). + + Multiple data sources are supported with the ability to + + process the data using formulas and functions.' + operationId: QueryScalarData + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScalarFormulaQueryRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ScalarFormulaQueryResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - timeseries_query + summary: Query scalar data across multiple products + tags: + - Metrics + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring + (RUM), and Cloud Cost Management data sources. + + Support for logs is in beta. We are gradually onboarding support for more + sources. If you have any + + feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).' + /api/v2/query/timeseries: + post: + description: 'Query timeseries data across various data sources and + + process the data by applying formulas and functions.' + operationId: QueryTimeseriesData + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TimeseriesFormulaQueryRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TimeseriesFormulaQueryResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - timeseries_query + summary: Query timeseries data across multiple products + tags: + - Metrics + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring + (RUM), and Cloud Cost Management data sources. + + Support for logs is in beta. We are gradually onboarding support for more + sources. If you have any + + feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).' + /api/v2/restriction_policy/{resource_id}: + delete: + description: Deletes the restriction policy associated with a specified resource. + operationId: DeleteRestrictionPolicy + parameters: + - $ref: '#/components/parameters/ResourceID' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a restriction policy + tags: + - Restriction Policies + get: + description: Retrieves the restriction policy associated with a specified resource. + operationId: GetRestrictionPolicy + parameters: + - $ref: '#/components/parameters/ResourceID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionPolicyResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a restriction policy + tags: + - Restriction Policies + post: + description: 'Updates the restriction policy associated with a resource. + + + #### Supported resources + + Restriction policies can be applied to the following resources: + + - Connections: `connection` + + - Dashboards: `dashboard` + + - Notebooks: `notebook` + + - Security Rules: `security-rule` + + - Service Level Objectives: `slo` + + + #### Supported relations for resources + + Resource Type | Supported Relations + + -------------------------|-------------------------- + + Connections | `viewer`, `editor`, `resolver` + + Dashboards | `viewer`, `editor` + + Notebooks | `viewer`, `editor` + + Security Rules | `viewer`, `editor` + + Service Level Objectives | `viewer`, `editor`' + operationId: UpdateRestrictionPolicy + parameters: + - $ref: '#/components/parameters/ResourceID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionPolicyUpdateRequest' + description: Restriction policy payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionPolicyResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a restriction policy + tags: + - Restriction Policies + x-codegen-request-body-name: body + /api/v2/roles: + get: + description: Returns all roles, including their names and their unique identifiers. + operationId: ListRoles + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - description: 'Sort roles depending on the given field. Sort order is **ascending** + by default. + + Sort order is **descending** if the field is prefixed by a negative sign, + for example: + + `sort=-name`.' + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/RolesSort' + - description: Filter all roles by the given string. + in: query + name: filter + required: false + schema: + type: string + - description: Filter all roles by the given list of role IDs. + in: query + name: filter[id] + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RolesResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: List roles + tags: + - Roles + post: + description: Create a new role for your organization. + operationId: CreateRole + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RoleCreateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RoleCreateResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Create role + tags: + - Roles + x-codegen-request-body-name: body + /api/v2/roles/{role_id}: + delete: + description: Disables a role. + operationId: DeleteRole + parameters: + - $ref: '#/components/parameters/RoleID' + responses: + '204': + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Delete role + tags: + - Roles + x-codegen-request-body-name: body + get: + description: "Get a role in the organization specified by the role\u2019s `role_id`." + operationId: GetRole + parameters: + - $ref: '#/components/parameters/RoleID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RoleResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: Get a role + tags: + - Roles + x-codegen-request-body-name: body + patch: + description: Edit a role. Can only be used with application keys belonging to + administrators. + operationId: UpdateRole + parameters: + - $ref: '#/components/parameters/RoleID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RoleUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RoleUpdateResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Update a role + tags: + - Roles + x-codegen-request-body-name: body + /api/v2/roles/{role_id}/clone: + post: + description: Clone an existing role + operationId: CloneRole + parameters: + - $ref: '#/components/parameters/RoleID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RoleCloneRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RoleResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Conflict + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Create a new role by cloning an existing role + tags: + - Roles + x-codegen-request-body-name: body + x-permission: OR(USER_ACCESS_MANAGE) + /api/v2/roles/{role_id}/permissions: + delete: + description: Removes a permission from a role. + operationId: RemovePermissionFromRole + parameters: + - $ref: '#/components/parameters/RoleID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToPermission' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Revoke permission + tags: + - Roles + x-codegen-request-body-name: body + get: + description: Returns a list of all permissions for a single role. + operationId: ListRolePermissions + parameters: + - $ref: '#/components/parameters/RoleID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: List permissions for a role + tags: + - Roles + x-codegen-request-body-name: body + post: + description: Adds a permission to a role. + operationId: AddPermissionToRole + parameters: + - $ref: '#/components/parameters/RoleID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToPermission' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Grant permission to a role + tags: + - Roles + x-codegen-request-body-name: body + /api/v2/roles/{role_id}/users: + delete: + description: Removes a user from a role. + operationId: RemoveUserFromRole + parameters: + - $ref: '#/components/parameters/RoleID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToUser' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Remove a user from a role + tags: + - Roles + x-codegen-request-body-name: body + get: + description: Gets all users of a role. + operationId: ListRoleUsers + parameters: + - $ref: '#/components/parameters/RoleID' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - description: 'User attribute to order results by. Sort order is **ascending** + by default. + + Sort order is **descending** if the field is prefixed by a negative sign, + + for example `sort=-name`. Options: `name`, `email`, `status`.' + in: query + name: sort + required: false + schema: + default: name + type: string + - description: Filter all users by the given string. Defaults to no filtering. + in: query + name: filter + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: Get all users of a role + tags: + - Roles + post: + description: Adds a user to a role. + operationId: AddUserToRole + parameters: + - $ref: '#/components/parameters/RoleID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToUser' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + summary: Add a user to a role + tags: + - Roles + x-codegen-request-body-name: body + /api/v2/rum/analytics/aggregate: + post: + description: The API endpoint to aggregate RUM events into buckets of computed + metrics and timeseries. + operationId: AggregateRUMEvents + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RUMAggregateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RUMAnalyticsAggregateResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Aggregate RUM events + tags: + - RUM + x-codegen-request-body-name: body + /api/v2/rum/applications: + get: + description: List all the RUM applications in your organization. + operationId: GetRUMApplications + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RUMApplicationsResponse' + description: OK + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List all the RUM applications + tags: + - RUM + post: + description: Create a new RUM application in your organization. + operationId: CreateRUMApplication + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RUMApplicationCreateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RUMApplicationResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a new RUM application + tags: + - RUM + x-codegen-request-body-name: body + /api/v2/rum/applications/{id}: + delete: + description: Delete an existing RUM application in your organization. + operationId: DeleteRUMApplication + parameters: + - description: RUM application ID. + in: path + name: id + required: true + schema: + type: string + responses: + '204': + description: No Content + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete a RUM application + tags: + - RUM + get: + description: Get the RUM application with given ID in your organization. + operationId: GetRUMApplication + parameters: + - description: RUM application ID. + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RUMApplicationResponse' + description: OK + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get a RUM application + tags: + - RUM + patch: + description: Update the RUM application with given ID in your organization. + operationId: UpdateRUMApplication + parameters: + - description: RUM application ID. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RUMApplicationUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RUMApplicationResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unprocessable Entity. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update a RUM application + tags: + - RUM + x-codegen-request-body-name: body + /api/v2/rum/events: + get: + description: 'List endpoint returns events that match a RUM search query. + + [Results are paginated][1]. + + + Use this endpoint to see your latest RUM events. + + + [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination' + operationId: ListRUMEvents + parameters: + - description: Search query following RUM syntax. + example: '@type:session @application_id:xxxx' + in: query + name: filter[query] + required: false + schema: + type: string + - description: Minimum timestamp for requested events. + example: '2019-01-02T09:42:36.320Z' + in: query + name: filter[from] + required: false + schema: + format: date-time + type: string + - description: Maximum timestamp for requested events. + example: '2019-01-03T09:42:36.320Z' + in: query + name: filter[to] + required: false + schema: + format: date-time + type: string + - description: Order of events in results. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/RUMSort' + - description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Maximum number of events in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 10 + format: int32 + maximum: 1000 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RUMEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get a list of RUM events + tags: + - RUM + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/rum/events/search: + post: + description: 'List endpoint returns RUM events that match a RUM search query. + + [Results are paginated][1]. + + + Use this endpoint to build complex RUM events filtering and search. + + + [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination' + operationId: SearchRUMEvents + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RUMSearchEventsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RUMEventsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Search RUM events + tags: + - RUM + x-codegen-request-body-name: body + x-pagination: + cursorParam: body.page.cursor + cursorPath: meta.page.after + limitParam: body.page.limit + resultsPath: data + /api/v2/saml_configurations/idp_metadata: + post: + description: 'Endpoint for uploading IdP metadata for SAML setup. + + + Use this endpoint to upload or replace IdP metadata for SAML login configuration.' + operationId: UploadIdPMetadata + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/IdPMetadataFormData' + required: true + responses: + '200': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Upload IdP metadata + tags: + - Organizations + x-codegen-request-body-name: body + /api/v2/scorecard/outcomes: + get: + description: Fetches all rule outcomes. + operationId: ListScorecardOutcomes + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageOffset' + - description: Include related rule details in the response. + in: query + name: include + required: false + schema: + example: rule + type: string + - description: Return only specified values in the outcome attributes. + in: query + name: fields[outcome] + required: false + schema: + example: state, service_name + type: string + - description: Return only specified values in the included rule details. + in: query + name: fields[rule] + required: false + schema: + example: name + type: string + - description: Filter the outcomes on a specific service name. + in: query + name: filter[outcome][service_name] + required: false + schema: + example: web-store + type: string + - description: Filter the outcomes by a specific state. + in: query + name: filter[outcome][state] + required: false + schema: + example: fail + type: string + - description: Filter outcomes on whether a rule is enabled/disabled. + in: query + name: filter[rule][enabled] + required: false + schema: + example: true + type: boolean + - description: Filter outcomes based on rule ID. + in: query + name: filter[rule][id] + required: false + schema: + example: f4485c79-0762-449c-96cf-c31e54a659f6 + type: string + - description: Filter outcomes based on rule name. + in: query + name: filter[rule][name] + required: false + schema: + example: SLOs Defined + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OutcomesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_read + summary: List all rule outcomes + tags: + - Service Scorecards + x-pagination: + limitParam: page[size] + pageOffsetParam: page[offset] + resultsPath: data + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/scorecard/outcomes/batch: + post: + description: Sets multiple service-rule outcomes in a single batched request. + operationId: CreateScorecardOutcomesBatch + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OutcomesBatchRequest' + description: Set of scorecard outcomes. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/OutcomesBatchResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_write + summary: Create outcomes batch + tags: + - Service Scorecards + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in private beta. To request access, + fill out this [sign-up form](https://forms.gle/CcEyp1uJmZpxRv8U8), + + and we will be in touch. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/scorecard/rules: + get: + description: Fetch all rules. + operationId: ListScorecardRules + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageOffset' + - description: Include related scorecard details in the response. + in: query + name: include + required: false + schema: + example: scorecard + type: string + - description: Filter the rules on a rule ID. + in: query + name: filter[rule][id] + required: false + schema: + example: 37d2f990-c885-4972-949b-8b798213a166 + type: string + - description: Filter for enabled rules only. + in: query + name: filter[rule][enabled] + required: false + schema: + example: true + type: boolean + - description: Filter for custom rules only. + in: query + name: filter[rule][custom] + required: false + schema: + example: true + type: boolean + - description: Filter rules on the rule name. + in: query + name: filter[rule][name] + required: false + schema: + example: Code Repos Defined + type: string + - description: Filter rules on the rule description. + in: query + name: filter[rule][description] + required: false + schema: + example: Identifying + type: string + - description: Return only specific fields in the response for rule attributes. + in: query + name: fields[rule] + required: false + schema: + example: name, description + type: string + - description: Return only specific fields in the included response for scorecard + attributes. + in: query + name: fields[scorecard] + required: false + schema: + example: name + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListRulesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_read + summary: List all rules + tags: + - Service Scorecards + x-pagination: + limitParam: page[size] + pageOffsetParam: page[offset] + resultsPath: data + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Creates a new rule. + operationId: CreateScorecardRule + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRuleRequest' + description: Rule attributes. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRuleResponse' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_write + summary: Create a new rule + tags: + - Service Scorecards + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in private beta. To request access, + fill out this [sign-up form](https://forms.gle/CcEyp1uJmZpxRv8U8), + + and we will be in touch. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/scorecard/rules/{rule_id}: + delete: + description: Deletes a single rule. + operationId: DeleteScorecardRule + parameters: + - $ref: '#/components/parameters/RuleId' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_write + summary: Delete a rule + tags: + - Service Scorecards + x-unstable: '**Note**: This endpoint is in private beta. To request access, + fill out this [sign-up form](https://forms.gle/CcEyp1uJmZpxRv8U8), + + and we will be in touch. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/security/cloud_workload/policy/download: + get: + description: 'The download endpoint generates a Cloud Workload Security policy + file from your currently active + + Cloud Workload Security rules, and downloads them as a .policy file. This + file can then be deployed to + + your Agents to update the policy running in your environment.' + operationId: DownloadCloudWorkloadPolicyFile + responses: + '200': + content: + application/yaml: + schema: + format: binary + type: string + description: OK + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get the latest Cloud Workload Security policy + tags: + - Cloud Workload Security + /api/v2/security_monitoring/cloud_workload_security/agent_rules: + get: + description: Get the list of Agent rules. + operationId: ListCloudWorkloadSecurityAgentRules responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SpansMetricsResponse' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRulesListResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all span-based metrics + summary: Get all Cloud Workload Security Agent rules tags: - - Spans Metrics + - Cloud Workload Security post: - description: 'Create a metric based on your ingested spans in your organization. - - Returns the span-based metric object from the request body when the request - is successful.' - operationId: CreateSpansMetric + description: Create a new Agent rule with the given parameters. + operationId: CreateCloudWorkloadSecurityAgentRule requestBody: content: application/json: schema: - $ref: '#/components/schemas/SpansMetricCreateRequest' - description: The definition of the new span-based metric. + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest' + description: The definition of the new Agent rule. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SpansMetricResponse' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -4478,16 +28998,16 @@ paths: $ref: '#/components/responses/ConflictResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a span-based metric + summary: Create a Cloud Workload Security Agent rule tags: - - Spans Metrics + - Cloud Workload Security x-codegen-request-body-name: body - /api/v2/apm/config/metrics/{metric_id}: + /api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}: delete: - description: Delete a specific span-based metric from your organization. - operationId: DeleteSpansMetric + description: Delete a specific Agent rule. + operationId: DeleteCloudWorkloadSecurityAgentRule parameters: - - $ref: '#/components/parameters/SpansMetricIDParameter' + - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID' responses: '204': description: OK @@ -4497,20 +29017,20 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a span-based metric + summary: Delete a Cloud Workload Security Agent rule tags: - - Spans Metrics + - Cloud Workload Security get: - description: Get a specific span-based metric from your organization. - operationId: GetSpansMetric + description: Get the details of a specific Agent rule. + operationId: GetCloudWorkloadSecurityAgentRule parameters: - - $ref: '#/components/parameters/SpansMetricIDParameter' + - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SpansMetricResponse' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' @@ -4518,30 +29038,29 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a span-based metric + summary: Get a Cloud Workload Security Agent rule tags: - - Spans Metrics + - Cloud Workload Security patch: - description: 'Update a specific span-based metric from your organization. + description: 'Update a specific Agent rule. - Returns the span-based metric object from the request body when the request - is successful.' - operationId: UpdateSpansMetric + Returns the Agent rule object when the request is successful.' + operationId: UpdateCloudWorkloadSecurityAgentRule parameters: - - $ref: '#/components/parameters/SpansMetricIDParameter' + - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/SpansMetricUpdateRequest' - description: New definition of the span-based metric. + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest' + description: New definition of the Agent rule. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/SpansMetricResponse' + $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -4549,48 +29068,58 @@ paths: $ref: '#/components/responses/NotAuthorizedResponse' '404': $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConcurrentModificationResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a span-based metric + summary: Update a Cloud Workload Security Agent rule tags: - - Spans Metrics + - Cloud Workload Security x-codegen-request-body-name: body - /api/v2/apm/config/retention-filters: + /api/v2/security_monitoring/configuration/security_filters: get: - description: Get the list of APM retention filters. - operationId: ListApmRetentionFilters + description: Get the list of configured security filters with their definitions. + operationId: ListSecurityFilters responses: '200': content: application/json: schema: - $ref: '#/components/schemas/RetentionFiltersResponse' + $ref: '#/components/schemas/SecurityFiltersResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List all APM retention filters + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_read + summary: Get all security filters tags: - - APM Retention Filters + - Security Monitoring post: - description: 'Create a retention filter to index spans in your organization. + description: 'Create a security filter. - Returns the retention filter definition when the request is successful.' - operationId: CreateApmRetentionFilter + + See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) + + for more examples.' + operationId: CreateSecurityFilter requestBody: content: application/json: schema: - $ref: '#/components/schemas/RetentionFilterCreateRequest' - description: The definition of the new retention filter. + $ref: '#/components/schemas/SecurityFilterCreateRequest' + description: The definition of the new security filter. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/RetentionFilterResponse' + $ref: '#/components/schemas/SecurityFilterResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -4600,42 +29129,23 @@ paths: $ref: '#/components/responses/ConflictResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a retention filter - tags: - - APM Retention Filters - x-codegen-request-body-name: body - /api/v2/apm/config/retention-filters-execution-order: - put: - description: Re-order the execution order of retention filters. - operationId: ReorderApmRetentionFilters - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReorderRetentionFiltersRequest' - description: The list of retention filters in the new order. - required: true - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Re-order retention filters + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_write + summary: Create a security filter tags: - - APM Retention Filters + - Security Monitoring x-codegen-request-body-name: body - /api/v2/apm/config/retention-filters/{filter_id}: + /api/v2/security_monitoring/configuration/security_filters/{security_filter_id}: delete: - description: Delete a specific retention filter from your organization. - operationId: DeleteApmRetentionFilter + description: Delete a specific security filter. + operationId: DeleteSecurityFilter parameters: - - $ref: '#/components/parameters/RetentionFilterIdParam' + - $ref: '#/components/parameters/SecurityFilterID' responses: - '200': + '204': description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' @@ -4643,20 +29153,30 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a retention filter + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_write + summary: Delete a security filter tags: - - APM Retention Filters + - Security Monitoring get: - description: Get an APM retention filter. - operationId: GetApmRetentionFilter + description: 'Get the details of a specific security filter. + + + See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) + + for more examples.' + operationId: GetSecurityFilter parameters: - - $ref: '#/components/parameters/RetentionFilterIdParam' + - $ref: '#/components/parameters/SecurityFilterID' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/RetentionFilterResponse' + $ref: '#/components/schemas/SecurityFilterResponse' description: OK '403': $ref: '#/components/responses/NotAuthorizedResponse' @@ -4664,27 +29184,34 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a given APM retention filter + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_read + summary: Get a security filter tags: - - APM Retention Filters - put: - description: Update a retention filter from your organization. - operationId: UpdateApmRetentionFilter + - Security Monitoring + patch: + description: 'Update a specific security filter. + + Returns the security filter object when the request is successful.' + operationId: UpdateSecurityFilter parameters: - - $ref: '#/components/parameters/RetentionFilterIdParam' + - $ref: '#/components/parameters/SecurityFilterID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/RetentionFilterUpdateRequest' - description: The updated definition of the retention filter. + $ref: '#/components/schemas/SecurityFilterUpdateRequest' + description: New definition of the security filter. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/RetentionFilterResponse' + $ref: '#/components/schemas/SecurityFilterResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -4692,118 +29219,60 @@ paths: $ref: '#/components/responses/NotAuthorizedResponse' '404': $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConcurrentModificationResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a retention filter + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_write + summary: Update a security filter tags: - - APM Retention Filters + - Security Monitoring x-codegen-request-body-name: body - /api/v2/audit/events: + /api/v2/security_monitoring/rules: get: - description: 'List endpoint returns events that match a Audit Logs search query. - - [Results are paginated][1]. - - - Use this endpoint to see your latest Audit Logs events. - - - [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination' - operationId: ListAuditLogs + description: List rules. + operationId: ListSecurityMonitoringRules parameters: - - description: Search query following Audit Logs syntax. - example: '@type:session @application_id:xxxx' - in: query - name: filter[query] - required: false - schema: - type: string - - description: Minimum timestamp for requested events. - example: '2019-01-02T09:42:36.320Z' - in: query - name: filter[from] - required: false - schema: - format: date-time - type: string - - description: Maximum timestamp for requested events. - example: '2019-01-03T09:42:36.320Z' - in: query - name: filter[to] - required: false - schema: - format: date-time - type: string - - description: Order of events in results. - in: query - name: sort - required: false - schema: - $ref: '#/components/schemas/AuditLogsSort' - - description: List following results with a cursor provided in the previous - query. - example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== - in: query - name: page[cursor] - required: false - schema: - type: string - - description: Maximum number of events in the response. - example: 25 - in: query - name: page[limit] - required: false - schema: - default: 10 - format: int32 - maximum: 1000 - type: integer + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AuditLogsEventsResponse' + $ref: '#/components/schemas/SecurityMonitoringListRulesResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a list of Audit Logs events + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_read + summary: List rules tags: - - Audit - x-pagination: - cursorParam: page[cursor] - cursorPath: meta.page.after - limitParam: page[limit] - resultsPath: data - /api/v2/audit/events/search: + - Security Monitoring post: - description: 'List endpoint returns Audit Logs events that match an Audit search - query. - - [Results are paginated][1]. - - - Use this endpoint to build complex Audit Logs events filtering and search. - - - [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination' - operationId: SearchAuditLogs + description: Create a detection rule. + operationId: CreateSecurityMonitoringRule requestBody: content: application/json: schema: - $ref: '#/components/schemas/AuditLogsSearchEventsRequest' - required: false + $ref: '#/components/schemas/SecurityMonitoringRuleCreatePayload' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AuditLogsEventsResponse' + $ref: '#/components/schemas/SecurityMonitoringRuleResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -4811,246 +29280,153 @@ paths: $ref: '#/components/responses/NotAuthorizedResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Search Audit Logs events + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Create a detection rule tags: - - Audit + - Security Monitoring x-codegen-request-body-name: body - x-pagination: - cursorParam: body.page.cursor - cursorPath: meta.page.after - limitParam: body.page.limit - resultsPath: data - /api/v2/dashboard/lists/manual/{dashboard_list_id}/dashboards: + /api/v2/security_monitoring/rules/{rule_id}: delete: - description: Delete dashboards from an existing dashboard list. - operationId: DeleteDashboardListItems + description: Delete an existing rule. Default rules cannot be deleted. + operationId: DeleteSecurityMonitoringRule parameters: - - description: ID of the dashboard list to delete items from. - in: path - name: dashboard_list_id - required: true - schema: - format: int64 - type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DashboardListDeleteItemsRequest' - description: Dashboards to delete from the dashboard list. - required: true + - $ref: '#/components/parameters/SecurityMonitoringRuleID' responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DashboardListDeleteItemsResponse' + '204': description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + $ref: '#/components/responses/NotAuthorizedResponse' '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete items from a dashboard list + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Delete an existing rule tags: - - Dashboard Lists - x-codegen-request-body-name: body + - Security Monitoring get: - description: "Fetch the dashboard list\u2019s dashboard definitions." - operationId: GetDashboardListItems + description: Get a rule's details. + operationId: GetSecurityMonitoringRule parameters: - - description: ID of the dashboard list to get items from. - in: path - name: dashboard_list_id - required: true - schema: - format: int64 - type: integer + - $ref: '#/components/parameters/SecurityMonitoringRuleID' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/DashboardListItems' + $ref: '#/components/schemas/SecurityMonitoringRuleResponse' description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - dashboards_read - summary: Get items of a Dashboard List - tags: - - Dashboard Lists - post: - description: Add dashboards to an existing dashboard list. - operationId: CreateDashboardListItems - parameters: - - description: ID of the dashboard list to add items to. - in: path - name: dashboard_list_id - required: true - schema: - format: int64 - type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DashboardListAddItemsRequest' - description: Dashboards to add to the dashboard list. - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/DashboardListAddItemsResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add Items to a Dashboard List + - security_monitoring_rules_read + summary: Get a rule's details tags: - - Dashboard Lists - x-codegen-request-body-name: body + - Security Monitoring put: - description: Update dashboards of an existing dashboard list. - operationId: UpdateDashboardListItems + description: 'Update an existing rule. When updating `cases`, `queries` or `options`, + the whole field + + must be included. For example, when modifying a query all queries must be + included. + + Default rules can only be updated to be enabled and to change notifications.' + operationId: UpdateSecurityMonitoringRule parameters: - - description: ID of the dashboard list to update items from. - in: path - name: dashboard_list_id - required: true - schema: - format: int64 - type: integer + - $ref: '#/components/parameters/SecurityMonitoringRuleID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/DashboardListUpdateItemsRequest' - description: New dashboards of the dashboard list. + $ref: '#/components/schemas/SecurityMonitoringRuleUpdatePayload' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/DashboardListUpdateItemsResponse' + $ref: '#/components/schemas/SecurityMonitoringRuleResponse' description: OK '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/ConcurrentModificationResponse' '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + $ref: '#/components/responses/NotAuthorizedResponse' '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found + $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update items of a dashboard list + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Update an existing rule tags: - - Dashboard Lists + - Security Monitoring x-codegen-request-body-name: body - /api/v2/events: + /api/v2/security_monitoring/signals: get: - description: 'List endpoint returns events that match an events search query. - - [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + description: 'The list endpoint returns security signals that match a search + query. + Both this endpoint and the POST endpoint can be used interchangeably when + listing - Use this endpoint to see your latest events.' - operationId: ListEvents + security signals.' + operationId: ListSecurityMonitoringSignals parameters: - - description: Search query following events syntax. + - description: The search query for security signals. + example: security:attack status:high in: query name: filter[query] required: false schema: type: string - - description: Minimum timestamp for requested events. + - description: The minimum timestamp for requested security signals. + example: '2019-01-02T09:42:36.320Z' in: query name: filter[from] required: false schema: + format: date-time type: string - - description: Maximum timestamp for requested events. + - description: The maximum timestamp for requested security signals. + example: '2019-01-03T09:42:36.320Z' in: query name: filter[to] required: false schema: + format: date-time type: string - - description: Order of events in results. + - description: The order of the security signals in results. in: query name: sort required: false schema: - $ref: '#/components/schemas/EventsSort' - - description: List following results with a cursor provided in the previous - query. + $ref: '#/components/schemas/SecurityMonitoringSignalsSort' + - description: A list of results using the cursor provided in the previous query. example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== in: query name: page[cursor] required: false schema: type: string - - description: Maximum number of events in the response. + - description: The maximum number of security signals in the response. example: 25 in: query name: page[limit] @@ -5065,7 +29441,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EventsListResponse' + $ref: '#/components/schemas/SecurityMonitoringSignalsListResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -5077,39 +29453,35 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - events_read - summary: Get a list of events + - security_monitoring_signals_read + summary: Get a quick list of security signals tags: - - Events + - Security Monitoring x-pagination: cursorParam: page[cursor] cursorPath: meta.page.after limitParam: page[limit] resultsPath: data - x-unstable: '**Note**: This endpoint is in beta. - - For access, contact [Datadog support](https://docs.datadoghq.com/help/).' - /api/v2/events/search: + /api/v2/security_monitoring/signals/search: post: - description: 'List endpoint returns events that match an events search query. - - [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + description: 'Returns security signals that match a search query. + Both this endpoint and the GET endpoint can be used interchangeably for listing - Use this endpoint to build complex events filtering and search.' - operationId: SearchEvents + security signals.' + operationId: SearchSecurityMonitoringSignals requestBody: content: application/json: schema: - $ref: '#/components/schemas/EventsListRequest' + $ref: '#/components/schemas/SecurityMonitoringSignalListRequest' required: false responses: '200': content: application/json: schema: - $ref: '#/components/schemas/EventsListResponse' + $ref: '#/components/schemas/SecurityMonitoringSignalsListResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -5121,831 +29493,957 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - events_read - summary: Search events + - security_monitoring_signals_read + summary: Get a list of security signals tags: - - Events + - Security Monitoring x-codegen-request-body-name: body x-pagination: cursorParam: body.page.cursor cursorPath: meta.page.after limitParam: body.page.limit resultsPath: data - x-unstable: '**Note**: This endpoint is in beta. - - For access, contact [Datadog support](https://docs.datadoghq.com/help/).' - /api/v2/integration/gcp/accounts: + /api/v2/security_monitoring/signals/{signal_id}: get: - description: List all GCP STS-enabled service accounts configured in your Datadog - account. - operationId: ListGCPSTSAccounts + description: Get a signal's details. + operationId: GetSecurityMonitoringSignal + parameters: + - $ref: '#/components/parameters/SignalID' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/GCPSTSServiceAccountsResponse' + $ref: '#/components/schemas/SecurityMonitoringSignalResponse' description: OK - '403': - $ref: '#/components/responses/NotAuthorizedResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List all GCP STS-enabled service accounts + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_signals_read + summary: Get a signal's details tags: - - GCP Integration - post: - description: Create a new entry within Datadog for your STS enabled service - account. - operationId: CreateGCPSTSAccount + - Security Monitoring + /api/v2/security_monitoring/signals/{signal_id}/assignee: + patch: + description: Modify the triage assignee of a security signal. + operationId: EditSecurityMonitoringSignalAssignee + parameters: + - $ref: '#/components/parameters/SignalID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/GCPSTSServiceAccountCreateRequest' + $ref: '#/components/schemas/SecurityMonitoringSignalAssigneeUpdateRequest' + description: Attributes describing the signal update. required: true responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/GCPSTSServiceAccountResponse' + $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' - '401': - $ref: '#/components/responses/UnauthorizedResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '409': - $ref: '#/components/responses/ConflictResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a new entry for your service account + summary: Modify the triage assignee of a security signal tags: - - GCP Integration + - Security Monitoring x-codegen-request-body-name: body - /api/v2/integration/gcp/accounts/{account_id}: - delete: - description: Delete an STS enabled GCP account from within Datadog. - operationId: DeleteGCPSTSAccount - parameters: - - $ref: '#/components/parameters/GCPSTSServiceAccountID' - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete an STS enabled GCP Account - tags: - - GCP Integration + /api/v2/security_monitoring/signals/{signal_id}/incidents: patch: - description: Update an STS enabled service account. - operationId: UpdateGCPSTSAccount + description: Change the related incidents for a security signal. + operationId: EditSecurityMonitoringSignalIncidents parameters: - - $ref: '#/components/parameters/GCPSTSServiceAccountID' + - $ref: '#/components/parameters/SignalID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/GCPSTSServiceAccountUpdateRequest' + $ref: '#/components/schemas/SecurityMonitoringSignalIncidentsUpdateRequest' + description: Attributes describing the signal update. required: true responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/GCPSTSServiceAccountResponse' + $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update STS Service Account - tags: - - GCP Integration - x-codegen-request-body-name: body - /api/v2/integration/gcp/sts_delegate: - get: - description: List your Datadog-GCP STS delegate account configured in your Datadog - account. - operationId: GetGCPSTSDelegate - responses: - '200': content: application/json: schema: - $ref: '#/components/schemas/GCPSTSDelegateAccountResponse' - description: OK + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: List delegate account - tags: - - GCP Integration - x-codegen-request-body-name: body - post: - description: Create a Datadog GCP principal. - operationId: MakeGCPSTSDelegate - requestBody: - content: - application/json: - schema: - example: {} - type: object - description: Create a delegate service account within Datadog. - required: false - responses: - '200': content: application/json: schema: - $ref: '#/components/schemas/GCPSTSDelegateAccountResponse' - description: OK - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '409': - $ref: '#/components/responses/ConflictResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a Datadog GCP principal - tags: - - GCP Integration - x-codegen-request-body-name: body - /api/v2/integration/opsgenie/services: - get: - description: Get a list of all services from the Datadog Opsgenie integration. - operationId: ListOpsgenieServices - responses: - '200': + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': content: application/json: schema: - $ref: '#/components/schemas/OpsgenieServicesResponse' - description: OK - '403': - $ref: '#/components/responses/ForbiddenResponse' + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all service objects + summary: Change the related incidents of a security signal tags: - - Opsgenie Integration - post: - description: Create a new service object in the Opsgenie integration. - operationId: CreateOpsgenieService + - Security Monitoring + x-codegen-request-body-name: body + /api/v2/security_monitoring/signals/{signal_id}/state: + patch: + description: Change the triage state of a security signal. + operationId: EditSecurityMonitoringSignalState + parameters: + - $ref: '#/components/parameters/SignalID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpsgenieServiceCreateRequest' - description: Opsgenie service payload + $ref: '#/components/schemas/SecurityMonitoringSignalStateUpdateRequest' + description: Attributes describing the signal update. required: true responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/OpsgenieServiceResponse' - description: CREATED - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '409': - $ref: '#/components/responses/ConflictResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a new service object - tags: - - Opsgenie Integration - x-codegen-request-body-name: body - /api/v2/integration/opsgenie/services/{integration_service_id}: - delete: - description: Delete a single service object in the Datadog Opsgenie integration. - operationId: DeleteOpsgenieService - parameters: - - $ref: '#/components/parameters/OpsgenieServiceIDPathParameter' - responses: - '204': + $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a single service object + summary: Change the triage state of a security signal tags: - - Opsgenie Integration + - Security Monitoring + x-codegen-request-body-name: body + /api/v2/sensitive-data-scanner/config: get: - description: Get a single service from the Datadog Opsgenie integration. - operationId: GetOpsgenieService - parameters: - - $ref: '#/components/parameters/OpsgenieServiceIDPathParameter' + description: List all the Scanning groups in your organization. + operationId: ListScanningGroups responses: '200': content: application/json: schema: - $ref: '#/components/schemas/OpsgenieServiceResponse' + $ref: '#/components/schemas/SensitiveDataScannerGetConfigResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '409': - $ref: '#/components/responses/ConflictResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a single service object + summary: List Scanning Groups tags: - - Opsgenie Integration + - Sensitive Data Scanner patch: - description: Update a single service object in the Datadog Opsgenie integration. - operationId: UpdateOpsgenieService - parameters: - - $ref: '#/components/parameters/OpsgenieServiceIDPathParameter' + description: Reorder the list of groups. + operationId: ReorderScanningGroups requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpsgenieServiceUpdateRequest' - description: Opsgenie service payload. + $ref: '#/components/schemas/SensitiveDataScannerConfigRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/OpsgenieServiceResponse' + $ref: '#/components/schemas/SensitiveDataScannerReorderGroupsResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '409': - $ref: '#/components/responses/ConflictResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a single service object - tags: - - Opsgenie Integration - x-codegen-request-body-name: body - /api/v2/integrations/cloudflare/accounts: - get: - description: List Cloudflare accounts. - operationId: ListCloudflareAccounts - responses: - '200': content: application/json: schema: - $ref: '#/components/schemas/CloudflareAccountsResponse' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List Cloudflare accounts + summary: Reorder Groups tags: - - Cloudflare Integration + - Sensitive Data Scanner + x-codegen-request-body-name: body + /api/v2/sensitive-data-scanner/config/groups: post: - description: Create a Cloudflare account. - operationId: CreateCloudflareAccount + description: 'Create a scanning group. + + The request MAY include a configuration relationship. + + A rules relationship can be omitted entirely, but if it is included it MUST + be + + null or an empty array (rules cannot be created at the same time). + + The new group will be ordered last within the configuration.' + operationId: CreateScanningGroup requestBody: content: application/json: schema: - $ref: '#/components/schemas/CloudflareAccountCreateRequest' + $ref: '#/components/schemas/SensitiveDataScannerGroupCreateRequest' required: true responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/CloudflareAccountResponse' - description: CREATED + $ref: '#/components/schemas/SensitiveDataScannerCreateGroupResponse' + description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add Cloudflare account + summary: Create Scanning Group tags: - - Cloudflare Integration + - Sensitive Data Scanner x-codegen-request-body-name: body - /api/v2/integrations/cloudflare/accounts/{account_id}: + /api/v2/sensitive-data-scanner/config/groups/{group_id}: delete: - description: Delete a Cloudflare account. - operationId: DeleteCloudflareAccount + description: Delete a given group. + operationId: DeleteScanningGroup parameters: - - description: None - in: path - name: account_id + - $ref: '#/components/parameters/SensitiveDataScannerGroupID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SensitiveDataScannerGroupDeleteRequest' required: true - schema: - type: string responses: - '204': + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SensitiveDataScannerGroupDeleteResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete Cloudflare account + summary: Delete Scanning Group tags: - - Cloudflare Integration - get: - description: Get a Cloudflare account. - operationId: GetCloudflareAccount + - Sensitive Data Scanner + x-codegen-request-body-name: body + patch: + description: 'Update a group, including the order of the rules. + + Rules within the group are reordered by including a rules relationship. If + the rules + + relationship is present, its data section MUST contain linkages for all of + the rules + + currently in the group, and MUST NOT contain any others.' + operationId: UpdateScanningGroup parameters: - - description: None - in: path - name: account_id + - $ref: '#/components/parameters/SensitiveDataScannerGroupID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SensitiveDataScannerGroupUpdateRequest' required: true - schema: - type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/CloudflareAccountResponse' + $ref: '#/components/schemas/SensitiveDataScannerGroupUpdateResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get Cloudflare account + summary: Update Scanning Group tags: - - Cloudflare Integration - patch: - description: Update a Cloudflare account. - operationId: UpdateCloudflareAccount - parameters: - - description: None - in: path - name: account_id - required: true - schema: - type: string + - Sensitive Data Scanner + x-codegen-request-body-name: body + /api/v2/sensitive-data-scanner/config/rules: + post: + description: 'Create a scanning rule in a sensitive data scanner group, ordered + last. + + The posted rule MUST include a group relationship. + + It MUST include either a standard_pattern relationship or a regex attribute, + but not both. + + If included_attributes is empty or missing, we will scan all attributes except + + excluded_attributes. If both are missing, we will scan the whole event.' + operationId: CreateScanningRule requestBody: content: application/json: schema: - $ref: '#/components/schemas/CloudflareAccountUpdateRequest' + $ref: '#/components/schemas/SensitiveDataScannerRuleCreateRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/CloudflareAccountResponse' + $ref: '#/components/schemas/SensitiveDataScannerCreateRuleResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update Cloudflare account + summary: Create Scanning Rule tags: - - Cloudflare Integration + - Sensitive Data Scanner x-codegen-request-body-name: body - /api/v2/integrations/confluent-cloud/accounts: - get: - description: List Confluent accounts. - operationId: ListConfluentAccount + /api/v2/sensitive-data-scanner/config/rules/{rule_id}: + delete: + description: Delete a given rule. + operationId: DeleteScanningRule + parameters: + - $ref: '#/components/parameters/SensitiveDataScannerRuleID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SensitiveDataScannerRuleDeleteRequest' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ConfluentAccountsResponse' + $ref: '#/components/schemas/SensitiveDataScannerRuleDeleteResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List Confluent accounts + summary: Delete Scanning Rule tags: - - Confluent Cloud - post: - description: Create a Confluent account. - operationId: CreateConfluentAccount + - Sensitive Data Scanner + x-codegen-request-body-name: body + patch: + description: 'Update a scanning rule. + + The request body MUST NOT include a standard_pattern relationship, as that + relationship + + is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern + + relationship will also result in an error.' + operationId: UpdateScanningRule + parameters: + - $ref: '#/components/parameters/SensitiveDataScannerRuleID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConfluentAccountCreateRequest' - description: Confluent payload + $ref: '#/components/schemas/SensitiveDataScannerRuleUpdateRequest' required: true responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/ConfluentAccountResponse' + $ref: '#/components/schemas/SensitiveDataScannerRuleUpdateResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add Confluent account + summary: Update Scanning Rule tags: - - Confluent Cloud + - Sensitive Data Scanner x-codegen-request-body-name: body - /api/v2/integrations/confluent-cloud/accounts/{account_id}: - delete: - description: Delete a Confluent account with the provided account ID. - operationId: DeleteConfluentAccount - parameters: - - $ref: '#/components/parameters/ConfluentAccountID' + /api/v2/sensitive-data-scanner/config/standard-patterns: + get: + description: Returns all standard patterns. + operationId: ListStandardPatterns responses: - '204': + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SensitiveDataScannerStandardPatternsResponseData' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication Error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete Confluent account + summary: List standard patterns tags: - - Confluent Cloud - get: - description: Get the Confluent account with the provided account ID. - operationId: GetConfluentAccount + - Sensitive Data Scanner + /api/v2/series: + post: + description: "The metrics end-point allows you to post time-series data that + can be graphed on Datadog\u2019s dashboards.\nThe maximum payload size is + 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed + size of less than 5 megabytes (5242880 bytes).\n\nIf you\u2019re submitting + metrics directly to the Datadog API without using DogStatsD, expect:\n\n- + 64 bits for the timestamp\n- 64 bits for the value\n- 20 bytes for the metric + names\n- 50 bytes for the timeseries\n- The full payload is approximately + 100 bytes.\n\nHost name is one of the resources in the Resources field." + operationId: SubmitMetrics parameters: - - $ref: '#/components/parameters/ConfluentAccountID' + - description: HTTP header used to compress the media-type. + in: header + name: Content-Encoding + required: false + schema: + $ref: '#/components/schemas/MetricContentEncoding' + requestBody: + content: + application/json: + examples: + dynamic-points: + description: "Post time-series data that can be graphed on Datadog\u2019s + dashboards." + externalValue: examples/metrics/dynamic-points.json.sh + summary: Dynamic Points + x-variables: + NOW: $(date +%s) + schema: + $ref: '#/components/schemas/MetricPayload' + required: true responses: - '200': + '202': content: application/json: schema: - $ref: '#/components/schemas/ConfluentAccountResponse' - description: OK + $ref: '#/components/schemas/IntakePayloadAccepted' + description: Payload accepted '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '408': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Request timeout + '413': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Payload too large '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get Confluent account + security: + - apiKeyAuth: [] + summary: Submit metrics tags: - - Confluent Cloud - patch: - description: Update the Confluent account with the provided account ID. - operationId: UpdateConfluentAccount - parameters: - - $ref: '#/components/parameters/ConfluentAccountID' + - Metrics + x-codegen-request-body-name: body + /api/v2/service_accounts: + post: + description: Create a service account for your organization. + operationId: CreateServiceAccount requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConfluentAccountUpdateRequest' - description: Confluent payload + $ref: '#/components/schemas/ServiceAccountCreateRequest' required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/ConfluentAccountResponse' + $ref: '#/components/schemas/UserResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update Confluent account + summary: Create a service account tags: - - Confluent Cloud + - Service Accounts x-codegen-request-body-name: body - /api/v2/integrations/confluent-cloud/accounts/{account_id}/resources: + /api/v2/service_accounts/{service_account_id}/application_keys: get: - description: Get a Confluent resource for the account associated with the provided - ID. - operationId: ListConfluentResource + description: List all application keys available for this service account. + operationId: ListServiceAccountApplicationKeys parameters: - - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ServiceAccountID' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - $ref: '#/components/parameters/ApplicationKeysSortParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter' + - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ConfluentResourcesResponse' + $ref: '#/components/schemas/ListApplicationKeysResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List Confluent Account resources + summary: List application keys for this service account tags: - - Confluent Cloud + - Service Accounts post: - description: Create a Confluent resource for the account associated with the - provided ID. - operationId: CreateConfluentResource + description: Create an application key for this service account. + operationId: CreateServiceAccountApplicationKey parameters: - - $ref: '#/components/parameters/ConfluentAccountID' + - $ref: '#/components/parameters/ServiceAccountID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConfluentResourceRequest' - description: Confluent payload + $ref: '#/components/schemas/ApplicationKeyCreateRequest' required: true responses: '201': content: application/json: schema: - $ref: '#/components/schemas/ConfluentResourceResponse' - description: OK + $ref: '#/components/schemas/ApplicationKeyResponse' + description: Created '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add resource to Confluent account + summary: Create an application key for this service account tags: - - Confluent Cloud + - Service Accounts x-codegen-request-body-name: body - /api/v2/integrations/confluent-cloud/accounts/{account_id}/resources/{resource_id}: + /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}: delete: - description: Delete a Confluent resource with the provided resource id for the - account associated with the provided account ID. - operationId: DeleteConfluentResource + description: Delete an application key owned by this service account. + operationId: DeleteServiceAccountApplicationKey parameters: - - $ref: '#/components/parameters/ConfluentAccountID' - - $ref: '#/components/parameters/ConfluentResourceID' + - $ref: '#/components/parameters/ServiceAccountID' + - $ref: '#/components/parameters/ApplicationKeyID' responses: '204': - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' + description: No Content '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete resource from Confluent account + summary: Delete an application key for this service account tags: - - Confluent Cloud + - Service Accounts get: - description: Get a Confluent resource with the provided resource id for the - account associated with the provided account ID. - operationId: GetConfluentResource + description: Get an application key owned by this service account. + operationId: GetServiceAccountApplicationKey parameters: - - $ref: '#/components/parameters/ConfluentAccountID' - - $ref: '#/components/parameters/ConfluentResourceID' + - $ref: '#/components/parameters/ServiceAccountID' + - $ref: '#/components/parameters/ApplicationKeyID' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ConfluentResourceResponse' + $ref: '#/components/schemas/PartialApplicationKeyResponse' description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get resource from Confluent account + summary: Get one application key for this service account tags: - - Confluent Cloud + - Service Accounts patch: - description: Update a Confluent resource with the provided resource id for the - account associated with the provided account ID. - operationId: UpdateConfluentResource + description: Edit an application key owned by this service account. + operationId: UpdateServiceAccountApplicationKey parameters: - - $ref: '#/components/parameters/ConfluentAccountID' - - $ref: '#/components/parameters/ConfluentResourceID' + - $ref: '#/components/parameters/ServiceAccountID' + - $ref: '#/components/parameters/ApplicationKeyID' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConfluentResourceRequest' - description: Confluent payload + $ref: '#/components/schemas/ApplicationKeyUpdateRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ConfluentResourceResponse' + $ref: '#/components/schemas/PartialApplicationKeyResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': - $ref: '#/components/responses/ForbiddenResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update resource in Confluent account + summary: Edit an application key for this service account tags: - - Confluent Cloud + - Service Accounts x-codegen-request-body-name: body - x-permission: - operator: OR - permissions: - - STANDARD - /api/v2/integrations/fastly/accounts: + /api/v2/services: get: - description: List Fastly accounts. - operationId: ListFastlyAccounts + description: Get all incident services uploaded for the requesting user's organization. + If the `include[users]` query parameter is provided, the included attribute + will contain the users related to these incident services. + operationId: ListIncidentServices + parameters: + - $ref: '#/components/parameters/IncidentServiceIncludeQueryParameter' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageOffset' + - $ref: '#/components/parameters/IncidentServiceSearchQueryParameter' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/FastlyAccountsResponse' + $ref: '#/components/schemas/IncidentServicesResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List Fastly accounts + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get a list of all incident services tags: - - Fastly Integration + - Incident Services + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: - description: Create a Fastly account. - operationId: CreateFastlyAccount + description: Creates a new incident service. + operationId: CreateIncidentService requestBody: content: application/json: schema: - $ref: '#/components/schemas/FastlyAccountCreateRequest' + $ref: '#/components/schemas/IncidentServiceCreateRequest' + description: Incident Service Payload. required: true responses: '201': content: application/json: schema: - $ref: '#/components/schemas/FastlyAccountResponse' + $ref: '#/components/schemas/IncidentServiceResponse' description: CREATED '400': $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add Fastly account + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create a new incident service tags: - - Fastly Integration + - Incident Services x-codegen-request-body-name: body - /api/v2/integrations/fastly/accounts/{account_id}: - delete: - description: Delete a Fastly account. - operationId: DeleteFastlyAccount - parameters: - - $ref: '#/components/parameters/FastlyAccountID' - responses: - '204': - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete Fastly account - tags: - - Fastly Integration + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/services/definitions: get: - description: Get a Fastly account. - operationId: GetFastlyAccount + description: Get a list of all service definitions from the Datadog Service + Catalog. + operationId: ListServiceDefinitions parameters: - - $ref: '#/components/parameters/FastlyAccountID' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - $ref: '#/components/parameters/SchemaVersion' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/FastlyAccountResponse' + $ref: '#/components/schemas/ServiceDefinitionsListResponse' description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' '403': $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get Fastly account + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_read + summary: Get all service definitions tags: - - Fastly Integration - patch: - description: Update a Fastly account. - operationId: UpdateFastlyAccount - parameters: - - $ref: '#/components/parameters/FastlyAccountID' + - Service Definition + x-pagination: + limitParam: page[size] + pageOffsetParam: page[number] + resultsPath: data + post: + description: Create or update service definition in the Datadog Service Catalog. + operationId: CreateOrUpdateServiceDefinitions requestBody: content: application/json: schema: - $ref: '#/components/schemas/FastlyAccountUpdateRequest' + $ref: '#/components/schemas/ServiceDefinitionsCreateRequest' + description: Service Definition YAML/JSON. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/FastlyAccountResponse' - description: OK + $ref: '#/components/schemas/ServiceDefinitionCreateResponse' + description: CREATED '400': $ref: '#/components/responses/BadRequestResponse' '403': $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update Fastly account + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_write + summary: Create or update service definition tags: - - Fastly Integration + - Service Definition x-codegen-request-body-name: body - /api/v2/integrations/fastly/accounts/{account_id}/services: - get: - description: List Fastly services for an account. - operationId: ListFastlyServices + /api/v2/services/definitions/{service_name}: + delete: + description: Delete a single service definition in the Datadog Service Catalog. + operationId: DeleteServiceDefinition parameters: - - $ref: '#/components/parameters/FastlyAccountID' + - $ref: '#/components/parameters/ServiceName' responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/FastlyServicesResponse' + '204': description: OK '400': $ref: '#/components/responses/BadRequestResponse' @@ -5955,755 +30453,762 @@ paths: $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: List Fastly services + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_write + summary: Delete a single service definition tags: - - Fastly Integration - post: - description: Create a Fastly service for an account. - operationId: CreateFastlyService + - Service Definition + get: + description: Get a single service definition from the Datadog Service Catalog. + operationId: GetServiceDefinition parameters: - - $ref: '#/components/parameters/FastlyAccountID' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FastlyServiceRequest' - required: true + - $ref: '#/components/parameters/ServiceName' + - $ref: '#/components/parameters/SchemaVersion' responses: - '201': + '200': content: application/json: schema: - $ref: '#/components/schemas/FastlyServiceResponse' - description: CREATED + $ref: '#/components/schemas/ServiceDefinitionGetResponse' + description: OK '400': $ref: '#/components/responses/BadRequestResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Add Fastly service + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_read + summary: Get a single service definition tags: - - Fastly Integration - x-codegen-request-body-name: body - /api/v2/integrations/fastly/accounts/{account_id}/services/{service_id}: + - Service Definition + /api/v2/services/{service_id}: delete: - description: Delete a Fastly service for an account. - operationId: DeleteFastlyService + description: Deletes an existing incident service. + operationId: DeleteIncidentService parameters: - - $ref: '#/components/parameters/FastlyAccountID' - - $ref: '#/components/parameters/FastlyServiceID' + - $ref: '#/components/parameters/IncidentServiceIDPathParameter' responses: '204': description: OK '400': $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete Fastly service + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Delete an existing incident service tags: - - Fastly Integration + - Incident Services + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' get: - description: Get a Fastly service for an account. - operationId: GetFastlyService + description: 'Get details of an incident service. If the `include[users]` query + parameter is provided, + + the included attribute will contain the users related to these incident services.' + operationId: GetIncidentService parameters: - - $ref: '#/components/parameters/FastlyAccountID' - - $ref: '#/components/parameters/FastlyServiceID' + - $ref: '#/components/parameters/IncidentServiceIDPathParameter' + - $ref: '#/components/parameters/IncidentServiceIncludeQueryParameter' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/FastlyServiceResponse' + $ref: '#/components/schemas/IncidentServiceResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get Fastly service + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get details of an incident service tags: - - Fastly Integration + - Incident Services + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' patch: - description: Update a Fastly service for an account. - operationId: UpdateFastlyService + description: Updates an existing incident service. Only provide the attributes + which should be updated as this request is a partial update. + operationId: UpdateIncidentService parameters: - - $ref: '#/components/parameters/FastlyAccountID' - - $ref: '#/components/parameters/FastlyServiceID' + - $ref: '#/components/parameters/IncidentServiceIDPathParameter' requestBody: content: application/json: schema: - $ref: '#/components/schemas/FastlyServiceRequest' + $ref: '#/components/schemas/IncidentServiceUpdateRequest' + description: Incident Service Payload. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/FastlyServiceResponse' + $ref: '#/components/schemas/IncidentServiceResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update Fastly service + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an existing incident service tags: - - Fastly Integration + - Incident Services x-codegen-request-body-name: body - /api/v2/ip_allowlist: - get: - description: Returns the IP allowlist and its enabled or disabled state. - operationId: GetIPAllowlist + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/spans/analytics/aggregate: + post: + description: 'The API endpoint to aggregate spans into buckets and compute metrics + and timeseries. + + This endpoint is rate limited to `300` requests per hour.' + operationId: AggregateSpans + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SpansAggregateRequest' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/IPAllowlistResponse' + $ref: '#/components/schemas/SpansAggregateResponse' description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' '403': $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get IP Allowlist + summary: Aggregate spans tags: - - IP Allowlist - patch: - description: Edit the entries in the IP allowlist, and enable or disable it. - operationId: UpdateIPAllowlist - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/IPAllowlistUpdateRequest' - required: true + - Spans + x-codegen-request-body-name: body + /api/v2/spans/events: + get: + description: 'List endpoint returns spans that match a span search query. + + [Results are paginated][1]. + + + Use this endpoint to see your latest spans. + + This endpoint is rate limited to `300` requests per hour. + + + [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api' + operationId: ListSpansGet + parameters: + - description: Search query following spans syntax. + example: '@datacenter:us @role:db' + in: query + name: filter[query] + required: false + schema: + type: string + - description: Minimum timestamp for requested spans. Supports date-time ISO8601, + date math, and regular timestamps (milliseconds). + example: '2023-01-02T09:42:36.320Z' + in: query + name: filter[from] + required: false + schema: + type: string + - description: Maximum timestamp for requested spans. Supports date-time ISO8601, + date math, and regular timestamps (milliseconds). + example: '2023-01-03T09:42:36.320Z' + in: query + name: filter[to] + required: false + schema: + type: string + - description: Order of spans in results. + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/SpansSort' + - description: List following results with a cursor provided in the previous + query. + example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== + in: query + name: page[cursor] + required: false + schema: + type: string + - description: Maximum number of spans in the response. + example: 25 + in: query + name: page[limit] + required: false + schema: + default: 10 + format: int32 + maximum: 1000 + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/IPAllowlistResponse' + $ref: '#/components/schemas/SpansListResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' + $ref: '#/components/responses/SpansBadRequestResponse' '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' + $ref: '#/components/responses/SpansForbiddenResponse' + '422': + $ref: '#/components/responses/SpansUnprocessableEntityResponse' '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update IP Allowlist + $ref: '#/components/responses/SpansTooManyRequestsResponse' + summary: Get a list of spans tags: - - IP Allowlist - x-codegen-request-body-name: body - /api/v2/logs: + - Spans + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.after + limitParam: page[limit] + resultsPath: data + /api/v2/spans/events/search: post: - description: 'Send your logs to your Datadog platform over HTTP. Limits per - HTTP request are: - - - - Maximum content size per payload (uncompressed): 5MB - - - Maximum size for a single log: 1MB - - - Maximum array size if sending multiple logs in an array: 1000 entries + description: 'List endpoint returns spans that match a span search query. + [Results are paginated][1]. - Any log exceeding 1MB is accepted and truncated by Datadog: - - - For a single log request, the API truncates the log at 1MB and returns a - 2xx. - - - For a multi-logs request, the API processes all logs, truncates only logs - larger than 1MB, and returns a 2xx. - - - Datadog recommends sending your logs compressed. - - Add the `Content-Encoding: gzip` header to the request when sending compressed - logs. - - Log events can be submitted with a timestamp that is up to 18 hours in the - past. - - - The status codes answered by the HTTP API are: - - - 202: Accepted: the request has been accepted for processing - - - 400: Bad request (likely an issue in the payload formatting) - - - 401: Unauthorized (likely a missing API Key) - - - 403: Permission issue (likely using an invalid API Key) - - - 408: Request Timeout, request should be retried after some time - - 413: Payload too large (batch is above 5MB uncompressed) + Use this endpoint to build complex spans filtering and search. - - 429: Too Many Requests, request should be retried after some time + This endpoint is rate limited to `300` requests per hour. - - 500: Internal Server Error, the server encountered an unexpected condition - that prevented it from fulfilling the request, request should be retried after - some time - - 503: Service Unavailable, the server is not ready to handle the request - probably because it is overloaded, request should be retried after some time' - operationId: SubmitLog - parameters: - - description: HTTP header used to compress the media-type. - in: header - name: Content-Encoding - required: false - schema: - $ref: '#/components/schemas/ContentEncoding' - - description: Log tags can be passed as query parameters with `text/plain` - content type. - example: env:prod,user:my-user - in: query - name: ddtags - required: false - schema: - type: string + [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api' + operationId: ListSpans requestBody: content: application/json: - examples: - multi-json-messages: - description: Pass multiple log objects at once. - summary: Multi JSON Messages - value: - - ddsource: nginx - ddtags: env:staging,version:5.1 - hostname: i-012345678 - message: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello - service: payment - - ddsource: nginx - ddtags: env:staging,version:5.1 - hostname: i-012345679 - message: 2019-11-19T14:37:58,995 INFO [process.name][20081] World - service: payment - simple-json-message: - description: Log attributes can be passed as `key:value` pairs in - valid JSON messages. - summary: Simple JSON Message - value: - ddsource: nginx - ddtags: env:staging,version:5.1 - hostname: i-012345678 - message: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello - World - service: payment - schema: - $ref: '#/components/schemas/HTTPLog' - application/logplex-1: - examples: - multi-raw-message: - description: Submit log messages. - summary: Multi Logplex Messages - value: '2019-11-19T14:37:58,995 INFO [process.name][20081] Hello - - 2019-11-19T14:37:58,995 INFO [process.name][20081] World' - simple-logplex-message: - description: Submit log string. - summary: Simple Logplex Message - value: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World - schema: - type: string - text/plain: - examples: - multi-raw-message: - description: Submit log string. - summary: Multi Raw Messages - value: '2019-11-19T14:37:58,995 INFO [process.name][20081] Hello - - 2019-11-19T14:37:58,995 INFO [process.name][20081] World - - ' - simple-raw-message: - description: 'Submit log string. Log attributes can be passed as query - parameters in the URL. This enables the addition of tags or the - source by using the `ddtags` and `ddsource` parameters: `?host=my-hostname&service=my-service&ddsource=my-source&ddtags=env:prod,user:my-user`.' - summary: Simple Raw Message - value: 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World schema: - type: string - description: Log to send (JSON format). + $ref: '#/components/schemas/SpansListRequest' required: true responses: - '202': + '200': content: application/json: schema: - type: object - description: Request accepted for processing (always 202 empty JSON). + $ref: '#/components/schemas/SpansListResponse' + description: OK '400': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Unauthorized + $ref: '#/components/responses/SpansBadRequestResponse' '403': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Forbidden - '408': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Request Timeout - '413': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Payload Too Large + $ref: '#/components/responses/SpansForbiddenResponse' + '422': + $ref: '#/components/responses/SpansUnprocessableEntityResponse' '429': + $ref: '#/components/responses/SpansTooManyRequestsResponse' + summary: Search spans + tags: + - Spans + x-codegen-request-body-name: body + x-pagination: + cursorParam: body.data.attributes.page.cursor + cursorPath: meta.page.after + limitParam: body.data.attributes.page.limit + resultsPath: data + /api/v2/synthetics/settings/on_demand_concurrency_cap: + get: + description: Get the on-demand concurrency cap. + operationId: GetOnDemandConcurrencyCap + responses: + '200': content: application/json: schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Too Many Requests - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Internal Server Error - '503': + $ref: '#/components/schemas/OnDemandConcurrencyCapResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get the on-demand concurrency cap + tags: + - Synthetics + post: + description: Save new value for on-demand concurrency cap. + operationId: SetOnDemandConcurrencyCap + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OnDemandConcurrencyCapAttributes' + description: . + required: true + responses: + '200': content: application/json: schema: - $ref: '#/components/schemas/HTTPLogErrors' - description: Service Unavailable - security: - - apiKeyAuth: [] - servers: - - url: https://{subdomain}.{site} - variables: - site: - default: datadoghq.com - description: The regional site for customers. - enum: - - datadoghq.com - - us3.datadoghq.com - - us5.datadoghq.com - - ap1.datadoghq.com - - datadoghq.eu - - ddog-gov.com - subdomain: - default: http-intake.logs - description: The subdomain where the API is deployed. - - url: '{protocol}://{name}' - variables: - name: - default: http-intake.logs.datadoghq.com - description: Full site DNS name. - protocol: - default: https - description: The protocol for accessing the API. - - url: https://{subdomain}.{site} - variables: - site: - default: datadoghq.com - description: Any Datadog deployment. - subdomain: - default: http-intake.logs - description: The subdomain where the API is deployed. - summary: Send logs + $ref: '#/components/schemas/OnDemandConcurrencyCapResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Save new value for on-demand concurrency cap tags: - - Logs + - Synthetics x-codegen-request-body-name: body - /api/v2/logs/config/metrics: + /api/v2/team: get: - description: Get the list of configured log-based metrics with their definitions. - operationId: ListLogsMetrics + description: 'Get all teams. + + Can be used to search for teams using the `filter[keyword]` and `filter[me]` + query parameters.' + operationId: ListTeams + parameters: + - $ref: '#/components/parameters/PageNumber' + - $ref: '#/components/parameters/PageSize' + - description: Specifies the order of the returned teams + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/ListTeamsSort' + - description: 'Included related resources optionally requested. Allowed enum + values: `team_links, user_team_permissions`' + in: query + name: include + required: false + schema: + items: + $ref: '#/components/schemas/ListTeamsInclude' + type: array + - description: Search query. Can be team name, team handle, or email of team + member + in: query + name: filter[keyword] + required: false + schema: + type: string + - description: When true, only returns teams the current user belongs to + in: query + name: filter[me] + required: false + schema: + type: boolean + - description: List of fields that need to be fetched. + explode: false + in: query + name: fields[team] + required: false + schema: + items: + $ref: '#/components/schemas/TeamsField' + type: array responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsMetricsResponse' + $ref: '#/components/schemas/TeamsResponse' description: OK '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Get all log-based metrics + - AuthZ: + - teams_read + summary: Get all teams tags: - - Logs Metrics + - Teams + x-pagination: + limitParam: page[size] + pageParam: page[number] + resultsPath: data post: - description: 'Create a metric based on your ingested logs in your organization. + description: 'Create a new team. - Returns the log-based metric object from the request body when the request - is successful.' - operationId: CreateLogsMetric + User IDs passed through the `users` relationship field are added to the team.' + operationId: CreateTeam requestBody: content: application/json: schema: - $ref: '#/components/schemas/LogsMetricCreateRequest' - description: The definition of the new log-based metric. + $ref: '#/components/schemas/TeamCreateRequest' required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/LogsMetricResponse' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' + $ref: '#/components/schemas/TeamResponse' + description: CREATED '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' '409': - $ref: '#/components/responses/ConflictResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a log-based metric + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - teams_read + - teams_manage + summary: Create a team tags: - - Logs Metrics + - Teams x-codegen-request-body-name: body - /api/v2/logs/config/metrics/{metric_id}: + /api/v2/team/{team_id}: delete: - description: Delete a specific log-based metric from your organization. - operationId: DeleteLogsMetric + description: Remove a team using the team's `id`. + operationId: DeleteTeam parameters: - - $ref: '#/components/parameters/MetricID' + - description: None + in: path + name: team_id + required: true + schema: + type: string responses: '204': - description: OK + description: No Content '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a log-based metric + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - teams_read + - teams_manage + summary: Remove a team tags: - - Logs Metrics + - Teams get: - description: Get a specific log-based metric from your organization. - operationId: GetLogsMetric + description: Get a single team using the team's `id`. + operationId: GetTeam parameters: - - $ref: '#/components/parameters/MetricID' + - description: None + in: path + name: team_id + required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsMetricResponse' + $ref: '#/components/schemas/TeamResponse' description: OK '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': - $ref: '#/components/responses/NotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Get a log-based metric + - AuthZ: + - teams_read + summary: Get a team tags: - - Logs Metrics + - Teams patch: - description: 'Update a specific log-based metric from your organization. + description: 'Update a team using the team''s `id`. - Returns the log-based metric object from the request body when the request - is successful.' - operationId: UpdateLogsMetric + If the `team_links` relationship is present, the associated links are updated + to be in the order they appear in the array, and any existing team links not + present are removed.' + operationId: UpdateTeam parameters: - - $ref: '#/components/parameters/MetricID' + - description: None + in: path + name: team_id + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/LogsMetricUpdateRequest' - description: New definition of the log-based metric. + $ref: '#/components/schemas/TeamUpdateRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/LogsMetricResponse' + $ref: '#/components/schemas/TeamResponse' description: OK '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a log-based metric - tags: - - Logs Metrics - x-codegen-request-body-name: body - /api/v2/permissions: - get: - description: Returns a list of all permissions, including name, description, - and ID. - operationId: ListPermissions - responses: - '200': content: application/json: schema: - $ref: '#/components/schemas/PermissionsResponse' - description: OK - '400': + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: API error response. + '409': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - user_access_read - summary: List permissions + - teams_read + summary: Update a team tags: - - Roles - /api/v2/posture_management/findings: - get: - description: "Get a list of CSPM findings.\n\n### Filtering\n\nFilters can be - applied by appending query parameters to the URL.\n\n - Using a single filter: - `?filter[attribute_key]=attribute_value`\n - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...`\n - \ - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2`\n\nHere, - `attribute_key` can be any of the filter keys described further below.\n\nQuery - parameters of type `integer` support comparison operators (`>`, `>=`, `<`, - `<=`). This is particularly useful when filtering by `evaluation_changed_at` - or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`.\n\nYou - can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` - to filter for any non-AWS resources.\n\nThe operator must come after the equal - sign. For example, to filter with the `>=` operator, add the operator after - the equal sign: `filter[evaluation_changed_at]=>=1678809373257`.\n\nQuery - parameters must be only among the documented ones and with values of correct - types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) - are not allowed.\n\n### Response\n\nThe response includes an array of finding - objects, pagination metadata, and a count of items that match the query.\n\nEach - finding object contains the following:\n\n- The finding ID that can be used - in a `GetFinding` request to retrieve the full finding details.\n- Core attributes, - including status, evaluation, high-level resource details, muted state, and - rule details.\n- `evaluation_changed_at` and `resource_discovery_date` time - stamps.\n- An array of associated tags.\n" - operationId: ListFindings - parameters: - - description: Limit the number of findings returned. Must be <= 1000. - example: 50 - in: query - name: page[limit] - required: false - schema: - default: 100 - format: int64 - maximum: 1000 - minimum: 1 - type: integer - - description: Return findings for a given snapshot of time (Unix ms). - example: 1678721573794 - in: query - name: snapshot_timestamp - required: false - schema: - format: int64 - minimum: 1 - type: integer - - description: Return the next page of findings pointed to by the cursor. - example: eyJhZnRlciI6IkFRQUFBWWJiaEJXQS1OY1dqUUFBQUFCQldXSmlhRUpYUVVGQlJFSktkbTlDTUdaWFRVbDNRVUUiLCJ2YWx1ZXMiOlsiY3JpdGljYWwiXX0= - in: query - name: page[cursor] - required: false - schema: - type: string - - description: Return findings that have these associated tags (repeatable). - example: filter[tags]=cloud_provider:aws&filter[tags]=aws_account:999999999999 - in: query - name: filter[tags] - required: false - schema: - type: string - - description: Return findings that have changed from pass to fail or vice versa - on a specified date (Unix ms) or date range (using comparison operators). - example: '>=1678721573794' - in: query - name: filter[evaluation_changed_at] - required: false - schema: - type: string - - description: Set to `true` to return findings that are muted. Set to `false` - to return unmuted findings. - in: query - name: filter[muted] - required: false - schema: - type: boolean - - description: Return findings for the specified rule ID. - in: query - name: filter[rule_id] - required: false - schema: - type: string - - description: Return findings for the specified rule. - in: query - name: filter[rule_name] - required: false - schema: - type: string - - description: Return only findings for the specified resource type. - in: query - name: filter[resource_type] - required: false - schema: - type: string - - description: Return findings that were found on a specified date (Unix ms) - or date range (using comparison operators). - example: '>=1678721573794' - in: query - name: filter[discovery_timestamp] - required: false + - Teams + x-codegen-request-body-name: body + /api/v2/team/{team_id}/links: + get: + description: Get all links for a given team. + operationId: GetTeamLinks + parameters: + - description: None + in: path + name: team_id + required: true schema: type: string - - description: Return only `pass` or `fail` findings. - example: pass - in: query - name: filter[evaluation] - required: false - schema: - $ref: '#/components/schemas/FindingEvaluation' - - description: Return only findings with the specified status. - example: critical - in: query - name: filter[status] - required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TeamLinksResponse' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - teams_read + summary: Get links for a team + tags: + - Teams + post: + description: Add a new link to a team. + operationId: CreateTeamLink + parameters: + - description: None + in: path + name: team_id + required: true schema: - $ref: '#/components/schemas/FindingStatus' + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TeamLinkCreateRequest' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ListFindingsResponse' + $ref: '#/components/schemas/TeamLinkResponse' description: OK - '400': - $ref: '#/components/responses/FindingsBadRequestResponse' '403': - $ref: '#/components/responses/FindingsForbiddenResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': - $ref: '#/components/responses/FindingsNotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': - $ref: '#/components/responses/FindingsTooManyRequestsResponse' + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - security_monitoring_findings_read - summary: List findings + - teams_read + summary: Create a team link tags: - - Security Monitoring - x-pagination: - cursorParam: page[cursor] - cursorPath: meta.page.cursor - limitParam: page[limit] - resultsPath: data - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' - /api/v2/posture_management/findings/{finding_id}: + - Teams + x-codegen-request-body-name: body + /api/v2/team/{team_id}/links/{link_id}: + delete: + description: Remove a link from a team. + operationId: DeleteTeamLink + parameters: + - description: None + in: path + name: team_id + required: true + schema: + type: string + - description: None + in: path + name: link_id + required: true + schema: + type: string + responses: + '204': + description: No Content + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - teams_read + summary: Remove a team link + tags: + - Teams get: - description: Returns a single finding with message and resource configuration. - operationId: GetFinding + description: Get a single link for a team. + operationId: GetTeamLink parameters: - - description: The ID of the finding. + - description: None in: path - name: finding_id + name: team_id required: true schema: type: string - - description: Return the finding for a given snapshot of time (Unix ms). - example: 1678721573794 - in: query - name: snapshot_timestamp - required: false + - description: None + in: path + name: link_id + required: true schema: - format: int64 - minimum: 1 - type: integer + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/GetFindingResponse' + $ref: '#/components/schemas/TeamLinkResponse' description: OK - '400': - $ref: '#/components/responses/FindingsBadRequestResponse' '403': - $ref: '#/components/responses/FindingsForbiddenResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': - $ref: '#/components/responses/FindingsNotFoundResponse' + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': - $ref: '#/components/responses/FindingsTooManyRequestsResponse' + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - security_monitoring_findings_read - summary: Get a finding + - teams_read + summary: Get a team link tags: - - Security Monitoring - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + - Teams patch: - description: 'Mute or unmute a specific finding. - - The API returns the updated finding object when the request is successful.' - operationId: UpdateFinding + description: Update a team link. + operationId: UpdateTeamLink parameters: - - description: The ID of the finding. + - description: None in: path - name: finding_id + name: team_id + required: true + schema: + type: string + - description: None + in: path + name: link_id required: true schema: type: string @@ -6711,558 +31216,893 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MuteFindingRequest' - description: 'To mute or unmute a finding, the request body should include - at least two attributes: `muted` and `reason`. The allowed reasons depend - on whether the finding is being muted or unmuted: - - - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. - - - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, - `OTHER`. - - ' + $ref: '#/components/schemas/TeamLinkCreateRequest' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/MuteFindingResponse' + $ref: '#/components/schemas/TeamLinkResponse' description: OK - '400': - $ref: '#/components/responses/FindingsBadRequestResponse' '403': - $ref: '#/components/responses/FindingsForbiddenResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': - $ref: '#/components/responses/FindingsNotFoundResponse' - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: 'Resource Conflict: The finding has already been muted or unmuted - within the last 60 seconds.' - '422': content: application/json: schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: 'Invalid Request: The server understands the request syntax - but cannot process it due to invalid data.' + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': - $ref: '#/components/responses/FindingsTooManyRequestsResponse' + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - summary: Mute or unmute a finding + - AuthZ: + - teams_read + summary: Update a team link tags: - - Security Monitoring + - Teams x-codegen-request-body-name: body - x-unstable: '**Note**: This endpoint is in public beta. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' - /api/v2/processes: + /api/v2/team/{team_id}/memberships: get: - description: Get all processes for your organization. - operationId: ListProcesses + description: Get a paginated list of members for a team + operationId: GetTeamMemberships parameters: - - description: String to search processes by. - in: query - name: search - required: false - schema: - type: string - - description: Comma-separated list of tags to filter processes by. - example: account:prod,user:admin - in: query - name: tags - required: false + - description: None + in: path + name: team_id + required: true schema: type: string - - description: 'Unix timestamp (number of seconds since epoch) of the start - of the query window. - - If not provided, the start of the query window will be 15 minutes before - the `to` timestamp. If neither - - `from` nor `to` are provided, the query window will be `[now - 15m, now]`.' - in: query - name: from - required: false - schema: - format: int64 - type: integer - - description: 'Unix timestamp (number of seconds since epoch) of the end of - the query window. - - If not provided, the end of the query window will be 15 minutes after the - `from` timestamp. If neither - - `from` nor `to` are provided, the query window will be `[now - 15m, now]`.' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - description: Specifies the order of returned team memberships in: query - name: to + name: sort required: false schema: - format: int64 - type: integer - - description: Maximum number of results returned. + $ref: '#/components/schemas/GetTeamMembershipsSort' + - description: Search query, can be user email or name in: query - name: page[limit] + name: filter[keyword] required: false schema: - default: 1000 - format: int32 - maximum: 10000 - minimum: 1 - type: integer - - description: 'String to query the next page of results. - - This key is provided with each valid response from the API in `meta.page.after`.' - in: query - name: page[cursor] - required: false + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserTeamsResponse' + description: Represents a user's association to a team + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - teams_read + summary: Get team memberships + tags: + - Teams + post: + description: Add a user to a team. + operationId: CreateTeamMembership + parameters: + - description: None + in: path + name: team_id + required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserTeamRequest' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ProcessSummariesResponse' - description: OK - '400': + $ref: '#/components/schemas/UserTeamResponse' + description: Represents a user's association to a team + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': + description: API error response. + '409': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Authentication Error + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - - AuthZ: [] - summary: Get all processes + - AuthZ: + - teams_read + summary: Add a user to a team tags: - - Processes - x-pagination: - cursorParam: page[cursor] - cursorPath: meta.page.after - limitParam: page[limit] - resultsPath: data - /api/v2/restriction_policy/{resource_id}: + - Teams + x-codegen-request-body-name: body + /api/v2/team/{team_id}/memberships/{user_id}: delete: - description: Deletes the restriction policy associated with a specified resource. - operationId: DeleteRestrictionPolicy + description: Remove a user from a team. + operationId: DeleteTeamMembership parameters: - - $ref: '#/components/parameters/ResourceID' + - description: None + in: path + name: team_id + required: true + schema: + type: string + - description: None + in: path + name: user_id + required: true + schema: + type: string responses: '204': description: No Content - '400': - $ref: '#/components/responses/BadRequestResponse' '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - summary: Delete a restriction policy + - AuthZ: + - teams_read + summary: Remove a user from a team tags: - - Restriction Policies - get: - description: Retrieves the restriction policy associated with a specified resource. - operationId: GetRestrictionPolicy + - Teams + patch: + description: Update a user's membership attributes on a team. + operationId: UpdateTeamMembership parameters: - - $ref: '#/components/parameters/ResourceID' + - description: None + in: path + name: team_id + required: true + schema: + type: string + - description: None + in: path + name: user_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserTeamUpdateRequest' + required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/RestrictionPolicyResponse' - description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' + $ref: '#/components/schemas/UserTeamResponse' + description: Represents a user's association to a team '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a restriction policy + - AuthZ: + - teams_read + summary: Update a user's membership attributes on a team tags: - - Restriction Policies - post: - description: 'Updates the restriction policy associated with a resource. - - - #### Supported resources - - Restriction policies can be applied to the following resources: - - - Connections: `connection` - - - Dashboards: `dashboard` - - - Notebooks: `notebook` - - - Security Rules: `security-rule` - - - Service Level Objectives: `slo` - - - #### Supported relations for resources - - Resource Type | Supported Relations - - -------------------------|-------------------------- - - Connections | `viewer`, `editor`, `resolver` - - Dashboards | `viewer`, `editor` - - Notebooks | `viewer`, `editor` - - Security Rules | `viewer`, `editor` - - Service Level Objectives | `viewer`, `editor`' - operationId: UpdateRestrictionPolicy + - Teams + x-codegen-request-body-name: body + /api/v2/team/{team_id}/permission-settings: + get: + description: Get all permission settings for a given team. + operationId: GetTeamPermissionSettings parameters: - - $ref: '#/components/parameters/ResourceID' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RestrictionPolicyUpdateRequest' - description: Restriction policy payload + - description: None + in: path + name: team_id required: true + schema: + type: string responses: '200': content: application/json: schema: - $ref: '#/components/schemas/RestrictionPolicyResponse' + $ref: '#/components/schemas/TeamPermissionSettingsResponse' description: OK - '400': - $ref: '#/components/responses/BadRequestResponse' '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - summary: Update a restriction policy + - AuthZ: + - teams_read + summary: Get permission settings for a team tags: - - Restriction Policies - x-codegen-request-body-name: body - /api/v2/saml_configurations/idp_metadata: - post: - description: 'Endpoint for uploading IdP metadata for SAML setup. - - - Use this endpoint to upload or replace IdP metadata for SAML login configuration.' - operationId: UploadIdPMetadata + - Teams + /api/v2/team/{team_id}/permission-settings/{action}: + put: + description: Update a team permission setting for a given team. + operationId: UpdateTeamPermissionSetting + parameters: + - description: None + in: path + name: team_id + required: true + schema: + type: string + - description: None + in: path + name: action + required: true + schema: + type: string requestBody: content: - multipart/form-data: + application/json: schema: - $ref: '#/components/schemas/IdPMetadataFormData' + $ref: '#/components/schemas/TeamPermissionSettingUpdateRequest' required: true responses: '200': - description: OK - '400': content: application/json: schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + $ref: '#/components/schemas/TeamPermissionSettingResponse' + description: OK '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden + description: API error response. '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Upload IdP metadata + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - teams_read + summary: Update permission setting for team tags: - - Organizations + - Teams x-codegen-request-body-name: body - /api/v2/security/cloud_workload/policy/download: - get: - description: 'The download endpoint generates a Cloud Workload Security policy - file from your currently active - - Cloud Workload Security rules, and downloads them as a .policy file. This - file can then be deployed to - - your Agents to update the policy running in your environment.' - operationId: DownloadCloudWorkloadPolicyFile - responses: - '200': - content: - application/yaml: - schema: - format: binary - type: string - description: OK - '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get the latest Cloud Workload Security policy - tags: - - Cloud Workload Security - /api/v2/security_monitoring/cloud_workload_security/agent_rules: + /api/v2/teams: get: - description: Get the list of Agent rules. - operationId: ListCloudWorkloadSecurityAgentRules + deprecated: true + description: Get all incident teams for the requesting user's organization. + If the `include[users]` query parameter is provided, the included attribute + will contain the users related to these incident teams. + operationId: ListIncidentTeams + parameters: + - $ref: '#/components/parameters/IncidentTeamIncludeQueryParameter' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageOffset' + - $ref: '#/components/parameters/IncidentTeamSearchQueryParameter' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRulesListResponse' + $ref: '#/components/schemas/IncidentTeamsResponse' description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get all Cloud Workload Security Agent rules + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get a list of all incident teams tags: - - Cloud Workload Security + - Incident Teams + x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).' post: - description: Create a new Agent rule with the given parameters. - operationId: CreateCloudWorkloadSecurityAgentRule + deprecated: true + description: Creates a new incident team. + operationId: CreateIncidentTeam requestBody: content: application/json: schema: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest' - description: The definition of the new Agent rule. + $ref: '#/components/schemas/IncidentTeamCreateRequest' + description: Incident Team Payload. required: true responses: - '200': + '201': content: application/json: schema: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse' - description: OK + $ref: '#/components/schemas/IncidentTeamResponse' + description: CREATED '400': $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': - $ref: '#/components/responses/NotAuthorizedResponse' - '409': - $ref: '#/components/responses/ConflictResponse' + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Create a Cloud Workload Security Agent rule + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create a new incident team tags: - - Cloud Workload Security + - Incident Teams x-codegen-request-body-name: body - /api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}: + x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).' + /api/v2/teams/{team_id}: delete: - description: Delete a specific Agent rule. - operationId: DeleteCloudWorkloadSecurityAgentRule + deprecated: true + description: Deletes an existing incident team. + operationId: DeleteIncidentTeam parameters: - - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID' + - $ref: '#/components/parameters/IncidentTeamIDPathParameter' responses: '204': description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Delete a Cloud Workload Security Agent rule + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Delete an existing incident team tags: - - Cloud Workload Security + - Incident Teams + x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).' get: - description: Get the details of a specific Agent rule. - operationId: GetCloudWorkloadSecurityAgentRule + deprecated: true + description: 'Get details of an incident team. If the `include[users]` query + parameter is provided, + + the included attribute will contain the users related to these incident teams.' + operationId: GetIncidentTeam parameters: - - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID' + - $ref: '#/components/parameters/IncidentTeamIDPathParameter' + - $ref: '#/components/parameters/IncidentTeamIncludeQueryParameter' responses: '200': content: application/json: schema: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse' + $ref: '#/components/schemas/IncidentTeamResponse' description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get a Cloud Workload Security Agent rule + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get details of an incident team tags: - - Cloud Workload Security + - Incident Teams + x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).' patch: - description: 'Update a specific Agent rule. - - Returns the Agent rule object when the request is successful.' - operationId: UpdateCloudWorkloadSecurityAgentRule + deprecated: true + description: Updates an existing incident team. Only provide the attributes + which should be updated as this request is a partial update. + operationId: UpdateIncidentTeam parameters: - - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID' + - $ref: '#/components/parameters/IncidentTeamIDPathParameter' requestBody: content: application/json: schema: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest' - description: New definition of the Agent rule. + $ref: '#/components/schemas/IncidentTeamUpdateRequest' + description: Incident Team Payload. required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse' + $ref: '#/components/schemas/IncidentTeamResponse' description: OK '400': $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' '403': - $ref: '#/components/responses/NotAuthorizedResponse' + $ref: '#/components/responses/ForbiddenResponse' '404': $ref: '#/components/responses/NotFoundResponse' - '409': - $ref: '#/components/responses/ConcurrentModificationResponse' '429': $ref: '#/components/responses/TooManyRequestsResponse' - summary: Update a Cloud Workload Security Agent rule + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an existing incident team tags: - - Cloud Workload Security + - Incident Teams x-codegen-request-body-name: body - /api/v2/series: - post: - description: "The metrics end-point allows you to post time-series data that - can be graphed on Datadog\u2019s dashboards.\nThe maximum payload size is - 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed - size of less than 5 megabytes (5242880 bytes).\n\nIf you\u2019re submitting - metrics directly to the Datadog API without using DogStatsD, expect:\n\n- - 64 bits for the timestamp\n- 64 bits for the value\n- 20 bytes for the metric - names\n- 50 bytes for the timeseries\n- The full payload is approximately - 100 bytes.\n\nHost name is one of the resources in the Resources field." - operationId: SubmitMetrics + x-unstable: '**Note**: This endpoint is deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/).' + /api/v2/usage/application_security: + get: + description: 'Get hourly usage for application security . + + **Note:** hourly usage data for all products is now available in the [Get + hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)' + operationId: GetUsageApplicationSecurityMonitoring parameters: - - description: HTTP header used to compress the media-type. - in: header - name: Content-Encoding + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage beginning at this hour.' + in: query + name: start_hr + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage ending + + **before** this hour.' + in: query + name: end_hr required: false schema: - $ref: '#/components/schemas/MetricContentEncoding' - requestBody: - content: - application/json: - examples: - dynamic-points: - description: "Post time-series data that can be graphed on Datadog\u2019s - dashboards." - externalValue: examples/metrics/dynamic-points.json.sh - summary: Dynamic Points - x-variables: - NOW: $(date +%s) - schema: - $ref: '#/components/schemas/MetricPayload' + format: date-time + type: string + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/UsageApplicationSecurityMonitoringResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + '429': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get hourly usage for application security + tags: + - Usage Metering + /api/v2/usage/cost_by_org: + get: + deprecated: true + description: 'Get cost across multi-org account. + + Cost by org data for a given month becomes available no later than the 16th + of the following month. + + **Note:** This endpoint has been deprecated. Please use the new endpoint + + [`/historical_cost`](https://docs.datadoghq.com/api/latest/usage-metering/#get-historical-cost-across-your-account) + + instead.' + operationId: GetCostByOrg + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost beginning this month.' + in: query + name: start_month required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost ending this month.' + in: query + name: end_month + required: false + schema: + format: date-time + type: string responses: - '202': + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/CostByOrgResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + '429': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get cost across multi-org account + tags: + - Usage Metering + /api/v2/usage/estimated_cost: + get: + description: 'Get estimated cost across multi-org and single root-org accounts. + + Estimated cost data is only available for the current month and previous month + + and is delayed by up to 72 hours from when it was incurred. + + To access historical costs prior to this, use the `/historical_cost` endpoint.' + operationId: GetEstimatedCostByOrg + parameters: + - description: String to specify whether cost is broken down at a parent-org + level or at the sub-org level. Available views are `summary` and `sub-org`. + Defaults to `summary`. + in: query + name: view + required: false + schema: + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost beginning this month. Either start_month or start_date should be + specified, but not both. (start_month cannot go beyond two months in the + past). Provide an `end_month` to view month-over-month cost.' + in: query + name: start_month + required: false + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost ending this month.' + in: query + name: end_month + required: false + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` + for cost beginning this day. Either start_month or start_date should be + specified, but not both. (start_date cannot go beyond two months in the + past). Provide an `end_date` to view day-over-day cumulative cost.' + in: query + name: start_date + required: false + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` + for cost ending this day.' + in: query + name: end_date + required: false + schema: + format: date-time + type: string + responses: + '200': content: - application/json: + application/json;datetime-format=rfc3339: schema: - $ref: '#/components/schemas/IntakePayloadAccepted' - description: Payload accepted + $ref: '#/components/schemas/CostByOrgResponse' + description: OK '400': content: - application/json: + application/json;datetime-format=rfc3339: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Authentication error - '408': - content: - application/json: + application/json;datetime-format=rfc3339: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Request timeout - '413': + description: Forbidden - User is not authorized + '429': content: - application/json: + application/json;datetime-format=rfc3339: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Payload too large - '429': - $ref: '#/components/responses/TooManyRequestsResponse' + description: Too many requests security: - apiKeyAuth: [] - summary: Submit metrics + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get estimated cost across your account tags: - - Metrics - x-codegen-request-body-name: body - /api/v2/synthetics/settings/on_demand_concurrency_cap: + - Usage Metering + /api/v2/usage/historical_cost: get: - description: Get the on-demand concurrency cap. - operationId: GetOnDemandConcurrencyCap + description: 'Get historical cost across multi-org and single root-org accounts. + + Cost data for a given month becomes available no later than the 16th of the + following month.' + operationId: GetHistoricalCostByOrg + parameters: + - description: String to specify whether cost is broken down at a parent-org + level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults + to `summary`. + in: query + name: view + required: false + schema: + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost beginning this month.' + in: query + name: start_month + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` + for cost ending this month.' + in: query + name: end_month + required: false + schema: + format: date-time + type: string responses: '200': content: - application/json: + application/json;datetime-format=rfc3339: schema: - $ref: '#/components/schemas/OnDemandConcurrencyCapResponse' + $ref: '#/components/schemas/CostByOrgResponse' description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Get the on-demand concurrency cap + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get historical cost across your account tags: - - Synthetics - post: - description: Save new value for on-demand concurrency cap. - operationId: SetOnDemandConcurrencyCap - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OnDemandConcurrencyCapAttributes' - description: . + - Usage Metering + /api/v2/usage/hourly_usage: + get: + description: Get hourly usage by product family. + operationId: GetHourlyUsage + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] + for usage beginning at this hour.' + in: query + name: filter[timestamp][start] + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] + for usage ending **before** this hour.' + in: query + name: filter[timestamp][end] + required: false + schema: + format: date-time + type: string + - description: 'Comma separated list of product families to retrieve. Available + families are `all`, `analyzed_logs`, + + `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, + + `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, + `cws`, `dbm`, `fargate`, + + `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, + `iot`, + + `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `netflow_monitoring`, + `observability_pipelines`, + + `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, + `sds`, `snmp`, + + `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, + and `timeseries`. + + The following product family has been **deprecated**: `audit_logs`.' + in: query + name: filter[product_families] required: true + schema: + type: string + - description: Include child org usage in the response. Defaults to false. + in: query + name: filter[include_descendants] + required: false + schema: + default: false + type: boolean + - description: Include breakdown of usage by subcategories where applicable + (for product family logs only). Defaults to false. + in: query + name: filter[include_breakdown] + required: false + schema: + default: false + type: boolean + - description: 'Comma separated list of product family versions to use in the + format `product_family:version`. For example, + + `infra_hosts:1.0.0`. If this parameter is not used, the API will use the + latest version of each requested + + product family. Currently all families have one version `1.0.0`.' + in: query + name: filter[versions] + required: false + schema: + type: string + - description: Maximum number of results to return (between 1 and 500) - defaults + to 500 if limit not specified. + in: query + name: page[limit] + required: false + schema: + default: 500 + format: int32 + maximum: 500 + minimum: 1 + type: integer + - description: List following results with a next_record_id provided in the + previous query. + in: query + name: page[next_record_id] + required: false + schema: + type: string responses: '200': content: - application/json: + application/json;datetime-format=rfc3339: schema: - $ref: '#/components/schemas/OnDemandConcurrencyCapResponse' + $ref: '#/components/schemas/HourlyUsageResponse' description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized '429': - $ref: '#/components/responses/TooManyRequestsResponse' - summary: Save new value for on-demand concurrency cap + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get hourly usage by product family tags: - - Synthetics - x-codegen-request-body-name: body - /api/v2/usage/application_security: + - Usage Metering + /api/v2/usage/lambda_traced_invocations: get: - description: 'Get hourly usage for application security . + description: 'Get hourly usage for lambda traced invocations. **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)' - operationId: GetUsageApplicationSecurityMonitoring + operationId: GetUsageLambdaTracedInvocations parameters: - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.' @@ -7287,7 +32127,7 @@ paths: content: application/json;datetime-format=rfc3339: schema: - $ref: '#/components/schemas/UsageApplicationSecurityMonitoringResponse' + $ref: '#/components/schemas/UsageLambdaTracedInvocationsResponse' description: OK '400': content: @@ -7312,36 +32152,31 @@ paths: appKeyAuth: [] - AuthZ: - usage_read - summary: Get hourly usage for application security + summary: Get hourly usage for lambda traced invocations tags: - Usage Metering - /api/v2/usage/cost_by_org: + /api/v2/usage/observability_pipelines: get: - deprecated: true - description: 'Get cost across multi-org account. - - Cost by org data for a given month becomes available no later than the 16th - of the following month. - - **Note:** This endpoint has been deprecated. Please use the new endpoint - - [`/historical_cost`](https://docs.datadoghq.com/api/latest/usage-metering/#get-historical-cost-across-your-account) + description: 'Get hourly usage for observability pipelines. - instead.' - operationId: GetCostByOrg + **Note:** hourly usage data for all products is now available in the [Get + hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)' + operationId: GetUsageObservabilityPipelines parameters: - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for cost beginning this month.' + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage beginning at this hour.' in: query - name: start_month + name: start_hr required: true schema: format: date-time type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for cost ending this month.' + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage ending + + **before** this hour.' in: query - name: end_month + name: end_hr required: false schema: format: date-time @@ -7351,7 +32186,7 @@ paths: content: application/json;datetime-format=rfc3339: schema: - $ref: '#/components/schemas/CostByOrgResponse' + $ref: '#/components/schemas/UsageObservabilityPipelinesResponse' description: OK '400': content: @@ -7376,19 +32211,18 @@ paths: appKeyAuth: [] - AuthZ: - usage_read - summary: Get cost across multi-org account + summary: Get hourly usage for observability pipelines tags: - Usage Metering - /api/v2/usage/estimated_cost: + /api/v2/usage/projected_cost: get: - description: 'Get estimated cost across multi-org and single root-org accounts. - - Estimated cost data is only available for the current month and previous month + description: 'Get projected cost across multi-org and single root-org accounts. - and is delayed by up to 72 hours from when it was incurred. + Projected cost data is only available for the current month and becomes available + around the 12th of the month. - To access historical costs prior to this, use the `/historical_cost` endpoint.' - operationId: GetEstimatedCostByOrg + This endpoint requires the usage_read authorization scope.' + operationId: GetProjectedCost parameters: - description: String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. @@ -7398,48 +32232,12 @@ paths: required: false schema: type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for cost beginning this month. Either start_month or start_date should be - specified, but not both. (start_month cannot go beyond two months in the - past). Provide an `end_month` to view month-over-month cost.' - in: query - name: start_month - required: false - schema: - format: date-time - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for cost ending this month.' - in: query - name: end_month - required: false - schema: - format: date-time - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` - for cost beginning this day. Either start_month or start_date should be - specified, but not both. (start_date cannot go beyond two months in the - past). Provide an `end_date` to view day-over-day cumulative cost.' - in: query - name: start_date - required: false - schema: - format: date-time - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` - for cost ending this day.' - in: query - name: end_date - required: false - schema: - format: date-time - type: string responses: '200': content: application/json;datetime-format=rfc3339: schema: - $ref: '#/components/schemas/CostByOrgResponse' + $ref: '#/components/schemas/ProjectedCostResponse' description: OK '400': content: @@ -7464,317 +32262,444 @@ paths: appKeyAuth: [] - AuthZ: - usage_read - summary: Get estimated cost across your account + summary: Get projected cost across your account tags: - Usage Metering - /api/v2/usage/historical_cost: - get: - description: 'Get historical cost across multi-org and single root-org accounts. - - Cost data for a given month becomes available no later than the 16th of the - following month.' - operationId: GetHistoricalCostByOrg - parameters: - - description: String to specify whether cost is broken down at a parent-org - level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults - to `summary`. - in: query - name: view - required: false - schema: - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for cost beginning this month.' - in: query - name: start_month + /api/v2/user_invitations: + post: + description: Sends emails to one or more users inviting them to join the organization. + operationId: SendInvitations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserInvitationsRequest' required: true - schema: - format: date-time - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for cost ending this month.' - in: query - name: end_month - required: false - schema: - format: date-time - type: string responses: - '200': + '201': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/CostByOrgResponse' + $ref: '#/components/schemas/UserInvitationsResponse' description: OK '400': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized + description: Authentication error '429': - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - usage_read - summary: Get historical cost across your account + - user_access_invite + summary: Send invitation emails tags: - - Usage Metering - /api/v2/usage/hourly_usage: + - Users + x-codegen-request-body-name: body + /api/v2/user_invitations/{user_invitation_uuid}: get: - description: Get hourly usage by product family. - operationId: GetHourlyUsage + description: Returns a single user invitation by its UUID. + operationId: GetInvitation parameters: - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - for usage beginning at this hour.' - in: query - name: filter[timestamp][start] + - description: The UUID of the user invitation. + in: path + name: user_invitation_uuid required: true schema: - format: date-time - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] - for usage ending **before** this hour.' - in: query - name: filter[timestamp][end] - required: false - schema: - format: date-time + example: 00000000-0000-0000-3456-000000000000 type: string - - description: 'Comma separated list of product families to retrieve. Available - families are `all`, `analyzed_logs`, - - `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, - - `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, - `cws`, `dbm`, `fargate`, - - `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, - `iot`, + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserInvitationResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_invite + summary: Get a user invitation + tags: + - Users + x-codegen-request-body-name: body + /api/v2/users: + get: + description: 'Get the list of all users in the organization. This list includes - `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `netflow_monitoring`, - `observability_pipelines`, + all users even if they are deactivated or unverified.' + operationId: ListUsers + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - description: 'User attribute to order results by. Sort order is ascending + by default. - `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, - `sds`, `snmp`, + Sort order is descending if the field - `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, - and `timeseries`. + is prefixed by a negative sign, for example `sort=-name`. Options: `name`, - The following product family has been **deprecated**: `audit_logs`.' + `modified_at`, `user_count`.' in: query - name: filter[product_families] - required: true + name: sort + required: false schema: + default: name + example: name type: string - - description: Include child org usage in the response. Defaults to false. + - description: 'Direction of sort. Options: `asc`, `desc`.' in: query - name: filter[include_descendants] + name: sort_dir required: false schema: - default: false - type: boolean - - description: Include breakdown of usage by subcategories where applicable - (for product family logs only). Defaults to false. + $ref: '#/components/schemas/QuerySortOrder' + - description: Filter all users by the given string. Defaults to no filtering. in: query - name: filter[include_breakdown] + name: filter required: false schema: - default: false - type: boolean - - description: 'Comma separated list of product family versions to use in the - format `product_family:version`. For example, + type: string + - description: 'Filter on status attribute. - `infra_hosts:1.0.0`. If this parameter is not used, the API will use the - latest version of each requested + Comma separated list, with possible values `Active`, `Pending`, and `Disabled`. - product family. Currently all families have one version `1.0.0`.' - in: query - name: filter[versions] - required: false - schema: - type: string - - description: Maximum number of results to return (between 1 and 500) - defaults - to 500 if limit not specified. - in: query - name: page[limit] - required: false - schema: - default: 500 - format: int32 - maximum: 500 - minimum: 1 - type: integer - - description: List following results with a next_record_id provided in the - previous query. + Defaults to no filtering.' in: query - name: page[next_record_id] + name: filter[status] required: false schema: + example: Active type: string responses: - '200': + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UsersResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: List all users + tags: + - Users + x-codegen-request-body-name: body + x-pagination: + limitParam: page[size] + pageParam: page[number] + resultsPath: data + post: + description: Create a user for your organization. + operationId: CreateUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserCreateRequest' + required: true + responses: + '201': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/HourlyUsageResponse' + $ref: '#/components/schemas/UserResponse' description: OK '400': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized + description: Authentication error '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_invite + summary: Create a user + tags: + - Users + x-codegen-request-body-name: body + /api/v2/users/{user_id}: + delete: + description: 'Disable a user. Can only be used with an application key belonging + + to an administrator user.' + operationId: DisableUser + parameters: + - $ref: '#/components/parameters/UserID' + responses: + '204': + description: OK + '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - usage_read - summary: Get hourly usage by product family + - user_access_manage + summary: Disable a user tags: - - Usage Metering - /api/v2/usage/lambda_traced_invocations: + - Users + x-codegen-request-body-name: body get: - description: 'Get hourly usage for lambda traced invocations. + description: "Get a user in the organization specified by the user\u2019s `user_id`." + operationId: GetUser + parameters: + - $ref: '#/components/parameters/UserID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/UserResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: Get user details + tags: + - Users + x-codegen-request-body-name: body + patch: + description: 'Edit a user. Can only be used with an application key belonging - **Note:** hourly usage data for all products is now available in the [Get - hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)' - operationId: GetUsageLambdaTracedInvocations + to an administrator user.' + operationId: UpdateUser parameters: - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` - for usage beginning at this hour.' - in: query - name: start_hr + - $ref: '#/components/parameters/UserID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserUpdateRequest' required: true - schema: - format: date-time - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` - for usage ending - - **before** this hour.' - in: query - name: end_hr - required: false - schema: - format: date-time - type: string responses: '200': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/UsageLambdaTracedInvocationsResponse' + $ref: '#/components/schemas/UserResponse' description: OK '400': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' description: Bad Request '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized - '429': + description: Authentication error + '404': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests + description: Not found + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - usage_read - summary: Get hourly usage for lambda traced invocations + - user_access_manage + summary: Update a user tags: - - Usage Metering - /api/v2/usage/observability_pipelines: + - Users + x-codegen-request-body-name: body + /api/v2/users/{user_id}/orgs: get: - description: 'Get hourly usage for observability pipelines. + description: 'Get a user organization. Returns the user information and all + organizations - **Note:** hourly usage data for all products is now available in the [Get - hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family)' - operationId: GetUsageObservabilityPipelines + joined by this user.' + operationId: ListUserOrganizations parameters: - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` - for usage beginning at this hour.' - in: query - name: start_hr - required: true - schema: - format: date-time - type: string - - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` - for usage ending - - **before** this hour.' - in: query - name: end_hr - required: false - schema: - format: date-time - type: string + - $ref: '#/components/parameters/UserID' responses: '200': content: - application/json;datetime-format=rfc3339: + application/json: schema: - $ref: '#/components/schemas/UsageObservabilityPipelinesResponse' + $ref: '#/components/schemas/UserResponse' description: OK - '400': + '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get a user organization + tags: + - Users + x-codegen-request-body-name: body + /api/v2/users/{user_id}/permissions: + get: + description: "Get a user permission set. Returns a list of the user\u2019s permissions\ngranted + by the associated user's roles." + operationId: ListUserPermissions + parameters: + - $ref: '#/components/parameters/UserID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionsResponse' + description: OK '403': content: - application/json;datetime-format=rfc3339: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized + description: Authentication error + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not found '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: Get a user permissions + tags: + - Users + x-codegen-request-body-name: body + /api/v2/users/{user_uuid}/memberships: + get: + description: Get a list of memberships for a user + operationId: GetUserMemberships + parameters: + - description: None + in: path + name: user_uuid + required: true + schema: + type: string + responses: + '200': content: - application/json;datetime-format=rfc3339: + application/json: + schema: + $ref: '#/components/schemas/UserTeamsResponse' + description: Represents a user's association to a team + '404': + content: + application/json: schema: $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - - usage_read - summary: Get hourly usage for observability pipelines + - teams_read + summary: Get user memberships tags: - - Usage Metering + - Teams security: - apiKeyAuth: [] appKeyAuth: [] @@ -7820,6 +32745,20 @@ tags: name: APM Retention Filters - description: Search your Audit Logs events over HTTP. name: Audit +- description: '[AuthN Mappings API](https://docs.datadoghq.com/account_management/authn_mapping/?tab=example) + + is used to automatically map group of users to roles in Datadog using attributes + + sent from Identity Providers.' + name: AuthN Mappings +- description: Search or aggregate your CI Visibility pipeline events and send them + to your Datadog site over HTTP. + name: CI Visibility Pipelines +- description: Search or aggregate your CI Visibility test events over HTTP. + name: CI Visibility Tests +- description: The Cloud Cost Management API allows you to setup, edit and delete + cloud cost management accounts for AWS & Azure. + name: Cloud Cost Management - description: Workload activity security rules for generating events using the Datadog security Agent. name: Cloud Workload Security @@ -7829,12 +32768,31 @@ tags: - description: Configure your Datadog Confluent Cloud integration directly through the Datadog API. name: Confluent Cloud +- description: The Container Images API allows you to query Container Image data for + your organization. + name: Container Images +- description: The Containers API allows you to query container data for your organization. + name: Containers +- description: Send events for DORA Metrics to measure and improve software delivery. + name: DORA Metrics - description: 'Interact with your dashboard lists through the API to organize, find, and share all of your dashboards with your team and organization.' name: Dashboard Lists +- description: '**Note**: Downtime V2 is currently in private beta. To request access, + contact [Datadog support](https://docs.datadoghq.com/help/). + + + [Downtiming](https://docs.datadoghq.com/monitors/notify/downtimes) gives + + you greater control over monitor notifications by allowing you to globally exclude + + scopes from alerting. Downtime settings, which can be scheduled with start and + + end times, prevent all alerting related to specified Datadog tags.' + name: Downtimes - description: 'The events service allows you to programmatically post events to the event stream @@ -7865,12 +32823,70 @@ tags: contacting Datadog support.' name: IP Allowlist +- description: Create, update, delete, and retrieve services which can be associated + with incidents. + name: Incident Services +- description: The Incident Teams endpoints are deprecated. See the [Teams API endpoints](https://docs.datadoghq.com/api/latest/teams/) + to create, update, delete, and retrieve teams which can be associated with incidents. + name: Incident Teams +- description: Manage incident response. + name: Incidents +- description: 'Manage your Datadog API and application keys. You need an API key + and + + an application key for a user with the required permissions to interact + + with these endpoints. The full list of API and application keys can be + + seen on your [Datadog API page](https://app.datadoghq.com/account/settings#api).' + externalDocs: + description: Find out more at + url: https://docs.datadoghq.com/account_management/api-app-keys/ + name: Key Management +- description: Search your logs and send them to your Datadog platform over HTTP. + name: Logs +- description: 'Archives forward all the logs ingested to a cloud storage system. + + + See the [Archives Page](https://app.datadoghq.com/logs/pipelines/archives) + + for a list of the archives currently configured in web UI.' + externalDocs: + description: Find out more at + url: https://docs.datadoghq.com/logs/archives/ + name: Logs Archives - description: Manage configuration of [log-based metrics](https://app.datadoghq.com/logs/pipelines/generate-metrics) for your organization. externalDocs: description: Find out more at url: https://docs.datadoghq.com/logs/logs_to_metrics/ name: Logs Metrics +- description: "The metrics endpoint allows you to:\n\n- Post metrics data so it can + be graphed on Datadog\u2019s dashboards\n- Query metrics from any time period + (timeseries and scalar)\n- Modify tag configurations for metrics\n- View tags + and volumes for metrics\n\n**Note**: A graph can only contain a set number of + points\nand as the timeframe over which a metric is viewed increases,\naggregation + between points occurs to stay below that set number.\n\nThe Post, Patch, and Delete + `manage_tags` API methods can only be performed by\na user who has the `Manage + Tags for Metrics` permission." + name: Metrics +- description: '[Monitors](https://docs.datadoghq.com/monitors) allow you to watch + a metric or check that you care about and + + notifies your team when a defined threshold has exceeded. + + + For more information, see [Creating Monitors](https://docs.datadoghq.com/monitors/create/types/) + and + + [Tag Policies](https://docs.datadoghq.com/monitors/settings/).' + externalDocs: + description: Find out more at + url: https://docs.datadoghq.com/monitors/create/types/ + name: Monitors +- description: Configure your Datadog Okta integration directly through the Datadog + API. + name: Okta Integration - description: 'Configure your [Datadog Opsgenie integration](https://docs.datadoghq.com/integrations/opsgenie/) directly through the Datadog API.' @@ -7883,8 +32899,26 @@ tags: description: Find out more at url: https://docs.datadoghq.com/account_management/multi_organization name: Organizations +- description: 'The powerpack endpoints allow you to: + + + - Get a powerpack + + - Create a powerpack + + - Delete a powerpack + + - Get a list of all powerpacks + + + The Patch and Delete API methods can only be performed on a powerpack by + + a user who has the powerpack create permission for that specific powerpack.' + name: Powerpack - description: The processes API allows you to query processes data for your organization. name: Processes +- description: Search or aggregate your RUM events over HTTP. + name: RUM - description: 'A restriction policy defines the access control rules for a resource, mapping a set of relations @@ -7894,6 +32928,42 @@ tags: The restriction policy determines who is authorized to perform what actions on the resource.' name: Restriction Policies +- description: 'The Roles API is used to create and manage Datadog roles, what + + [global permissions](https://docs.datadoghq.com/account_management/rbac/) + + they grant, and which users belong to them. + + + Permissions related to specific account assets can be granted to roles + + in the Datadog application without using this API. For example, granting + + read access on a specific log index to a role can be done in Datadog from the + + [Pipelines page](https://app.datadoghq.com/logs/pipelines).' + name: Roles +- description: 'Detection rules for generating signals and listing of generated + + signals.' + name: Security Monitoring +- description: Create, update, delete, and retrieve sensitive data scanner groups + and rules. + name: Sensitive Data Scanner +- description: Create, edit, and disable service accounts. + name: Service Accounts +- description: API to create, update, retrieve and delete service definitions. + externalDocs: + url: https://docs.datadoghq.com/tracing/service_catalog/ + name: Service Definition +- description: 'API to create, update scorecard rules and outcomes. + + + This feature is currently in BETA. If you have any feedback, contact [Datadog + support](https://docs.datadoghq.com/help/).' + name: Service Scorecards +- description: Search and aggregate your spans from your Datadog platform over HTTP. + name: Spans - description: Manage configuration of [span-based metrics](https://app.datadoghq.com/apm/traces/generate-metrics) for your organization. externalDocs: @@ -7907,6 +32977,8 @@ tags: use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)." name: Synthetics +- description: View and manage teams within Datadog. + name: Teams - description: 'The usage metering API allows you to get hourly, daily, and monthly usage across multiple facets of Datadog. @@ -7928,4 +33000,8 @@ tags: description: Find out more at url: https://docs.datadoghq.com/account_management/billing/usage_details/ name: Usage Metering -x-group-parameters: true +- description: Create, edit, and disable users. + externalDocs: + url: https://docs.datadoghq.com/account_management/users + name: Users +x-group-parameters: true \ No newline at end of file diff --git a/.generator/src/generator/templates/api.j2 b/.generator/src/generator/templates/api.j2 index 3477185e2..9067ed9e1 100644 --- a/.generator/src/generator/templates/api.j2 +++ b/.generator/src/generator/templates/api.j2 @@ -13,7 +13,7 @@ use crate::datadog::*; {%- for name, parameter in operation|parameters %} {%- if loop.first %} /// {{ operation.operationId }}Params is a struct for passing parameters to the method [`{{operation.operationId}}`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct {{operation.operationId}}Params { {%- endif %} {%- if parameter.description is defined %} diff --git a/.generator/src/generator/templates/model_enum.j2 b/.generator/src/generator/templates/model_enum.j2 index c4e7cf4f7..ca34b635f 100644 --- a/.generator/src/generator/templates/model_enum.j2 +++ b/.generator/src/generator/templates/model_enum.j2 @@ -33,9 +33,3 @@ impl ToString for {{name}} { } } } - -impl Default for {{name}} { - fn default() -> {{name}} { - Self::{{ model["x-enum-varnames"].0 }} - } -} diff --git a/.generator/src/generator/templates/model_oneof.j2 b/.generator/src/generator/templates/model_oneof.j2 index e69de29bb..dcf92d792 100644 --- a/.generator/src/generator/templates/model_oneof.j2 +++ b/.generator/src/generator/templates/model_oneof.j2 @@ -0,0 +1,12 @@ +use serde::{Deserialize, Serialize}; + +{{ model.description | block_comment }} +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum {{name}} { + {%- for oneOf in model.oneOf %} + {%- set dataType = get_type(oneOf, render_nullable=False, render_option=False, version=version) %} + {%- set attributeName = (get_name(oneOf) or dataType)|upperfirst %} + {{attributeName}}(Box<{{dataType}}>), + {%- endfor%} +} diff --git a/.generator/src/generator/templates/model_simple.j2 b/.generator/src/generator/templates/model_simple.j2 index 97ba46f02..03fe9a898 100644 --- a/.generator/src/generator/templates/model_simple.j2 +++ b/.generator/src/generator/templates/model_simple.j2 @@ -3,7 +3,7 @@ use serde_with::skip_serializing_none; {{ model.description | block_comment }} #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct {{ name }} { {%- for attr, schema in model.get("properties", {}).items() %} {%- set propertyName = attr|variable_name %} @@ -25,7 +25,7 @@ pub struct {{ name }} { } impl {{ name }} { - pub fn new({% for attr, schema in model.get("properties", {}).items() if attr in model.required %}{%- set nullable = schema.get("nullable", False)%}{%- set propertyName = attr|variable_name %}{%- set dataType = get_type(schema, alternative_name=name + propertyName, render_nullable=nullable, render_option=False, version=version) %}{{propertyName}}: {{ dataType }}{%- if not loop.last %}, {% endif %}{% endfor %}) -> {{ name }} { + pub fn new({% for attr, schema in model.get("properties", {}).items() if attr in model.required %}{%- set nullable = schema.get("nullable", False)%}{%- set propertyName = attr|variable_name %}{%- set dataType = get_type(schema, alternative_name=name + propertyName, render_nullable=nullable, render_option=False, render_box=True, version=version) %}{{propertyName}}: {{ dataType }}{%- if not loop.last %}, {% endif %}{% endfor %}) -> {{ name }} { {%- if get_deprecated(model) %} #[allow(deprecated)] {%- endif %} @@ -36,11 +36,7 @@ impl {{ name }} { {%- set nullable = schema.get("nullable", False)%} {%- set dataType = get_type(schema, alternative_name=name + propertyName, render_nullable=nullable, render_option=not required, render_box=True, version=version) %} {%- if attr in model.get("required", []) %} - {%- if "Box<" in dataType %} - {{ attr|variable_name }}: Box::new({{ attr|variable_name }}), - {%- else %} {{ attr|variable_name }}, - {%- endif %} {%- else %} {{ attr|variable_name }}: None, {%- endif %} diff --git a/src/datadogV1/api/api_aws_integration.rs b/src/datadogV1/api/api_aws_integration.rs index 29f56fa65..826678be0 100644 --- a/src/datadogV1/api/api_aws_integration.rs +++ b/src/datadogV1/api/api_aws_integration.rs @@ -7,21 +7,21 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateAWSAccountParams is a struct for passing parameters to the method [`CreateAWSAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateAWSAccountParams { /// AWS Request Object pub body: crate::datadogV1::model::AWSAccount, } /// CreateAWSEventBridgeSourceParams is a struct for passing parameters to the method [`CreateAWSEventBridgeSource`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateAWSEventBridgeSourceParams { /// Create an Amazon EventBridge source for an AWS account with a given name and region. pub body: crate::datadogV1::model::AWSEventBridgeCreateRequest, } /// CreateAWSTagFilterParams is a struct for passing parameters to the method [`CreateAWSTagFilter`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateAWSTagFilterParams { /// Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. /// Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`. @@ -29,7 +29,7 @@ pub struct CreateAWSTagFilterParams { } /// CreateNewAWSExternalIDParams is a struct for passing parameters to the method [`CreateNewAWSExternalID`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateNewAWSExternalIDParams { /// Your Datadog role delegation name. /// For more information about your AWS account Role name, @@ -38,28 +38,28 @@ pub struct CreateNewAWSExternalIDParams { } /// DeleteAWSAccountParams is a struct for passing parameters to the method [`DeleteAWSAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteAWSAccountParams { /// AWS request object pub body: crate::datadogV1::model::AWSAccountDeleteRequest, } /// DeleteAWSEventBridgeSourceParams is a struct for passing parameters to the method [`DeleteAWSEventBridgeSource`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteAWSEventBridgeSourceParams { /// Delete the Amazon EventBridge source with the given name, region, and associated AWS account. pub body: crate::datadogV1::model::AWSEventBridgeDeleteRequest, } /// DeleteAWSTagFilterParams is a struct for passing parameters to the method [`DeleteAWSTagFilter`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteAWSTagFilterParams { /// Delete a tag filtering entry for a given AWS account and `dd-aws` namespace. pub body: crate::datadogV1::model::AWSTagFilterDeleteRequest, } /// ListAWSAccountsParams is a struct for passing parameters to the method [`ListAWSAccounts`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListAWSAccountsParams { /// Only return AWS accounts that matches this `account_id`. pub account_id: Option, @@ -70,14 +70,14 @@ pub struct ListAWSAccountsParams { } /// ListAWSTagFiltersParams is a struct for passing parameters to the method [`ListAWSTagFilters`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListAWSTagFiltersParams { /// Only return AWS filters that matches this `account_id`. pub account_id: String, } /// UpdateAWSAccountParams is a struct for passing parameters to the method [`UpdateAWSAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateAWSAccountParams { /// AWS request object pub body: crate::datadogV1::model::AWSAccount, diff --git a/src/datadogV1/api/api_aws_logs_integration.rs b/src/datadogV1/api/api_aws_logs_integration.rs index 8ec5050a5..f9d819edb 100644 --- a/src/datadogV1/api/api_aws_logs_integration.rs +++ b/src/datadogV1/api/api_aws_logs_integration.rs @@ -7,35 +7,35 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CheckAWSLogsLambdaAsyncParams is a struct for passing parameters to the method [`CheckAWSLogsLambdaAsync`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CheckAWSLogsLambdaAsyncParams { /// Check AWS Log Lambda Async request body. pub body: crate::datadogV1::model::AWSAccountAndLambdaRequest, } /// CheckAWSLogsServicesAsyncParams is a struct for passing parameters to the method [`CheckAWSLogsServicesAsync`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CheckAWSLogsServicesAsyncParams { /// Check AWS Logs Async Services request body. pub body: crate::datadogV1::model::AWSLogsServicesRequest, } /// CreateAWSLambdaARNParams is a struct for passing parameters to the method [`CreateAWSLambdaARN`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateAWSLambdaARNParams { /// AWS Log Lambda Async request body. pub body: crate::datadogV1::model::AWSAccountAndLambdaRequest, } /// DeleteAWSLambdaARNParams is a struct for passing parameters to the method [`DeleteAWSLambdaARN`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteAWSLambdaARNParams { /// Delete AWS Lambda ARN request body. pub body: crate::datadogV1::model::AWSAccountAndLambdaRequest, } /// EnableAWSLogServicesParams is a struct for passing parameters to the method [`EnableAWSLogServices`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct EnableAWSLogServicesParams { /// Enable AWS Log Services request body. pub body: crate::datadogV1::model::AWSLogsServicesRequest, diff --git a/src/datadogV1/api/api_azure_integration.rs b/src/datadogV1/api/api_azure_integration.rs index 1040b57b1..3a300a361 100644 --- a/src/datadogV1/api/api_azure_integration.rs +++ b/src/datadogV1/api/api_azure_integration.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateAzureIntegrationParams is a struct for passing parameters to the method [`CreateAzureIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateAzureIntegrationParams { /// Create a Datadog-Azure integration for your Datadog account request body. pub body: crate::datadogV1::model::AzureAccount, } /// DeleteAzureIntegrationParams is a struct for passing parameters to the method [`DeleteAzureIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteAzureIntegrationParams { /// Delete a given Datadog-Azure integration request body. pub body: crate::datadogV1::model::AzureAccount, } /// UpdateAzureHostFiltersParams is a struct for passing parameters to the method [`UpdateAzureHostFilters`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateAzureHostFiltersParams { /// Update a Datadog-Azure integration's host filters request body. pub body: crate::datadogV1::model::AzureAccount, } /// UpdateAzureIntegrationParams is a struct for passing parameters to the method [`UpdateAzureIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateAzureIntegrationParams { /// Update a Datadog-Azure integration request body. pub body: crate::datadogV1::model::AzureAccount, diff --git a/src/datadogV1/api/api_dashboard_lists.rs b/src/datadogV1/api/api_dashboard_lists.rs index f676e5b6a..76718f3e0 100644 --- a/src/datadogV1/api/api_dashboard_lists.rs +++ b/src/datadogV1/api/api_dashboard_lists.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateDashboardListParams is a struct for passing parameters to the method [`CreateDashboardList`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateDashboardListParams { /// Create a dashboard list request body. pub body: crate::datadogV1::model::DashboardList, } /// DeleteDashboardListParams is a struct for passing parameters to the method [`DeleteDashboardList`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteDashboardListParams { /// ID of the dashboard list to delete. pub list_id: i64, } /// GetDashboardListParams is a struct for passing parameters to the method [`GetDashboardList`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetDashboardListParams { /// ID of the dashboard list to fetch. pub list_id: i64, } /// UpdateDashboardListParams is a struct for passing parameters to the method [`UpdateDashboardList`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateDashboardListParams { /// ID of the dashboard list to update. pub list_id: i64, diff --git a/src/datadogV1/api/api_dashboards.rs b/src/datadogV1/api/api_dashboards.rs new file mode 100644 index 000000000..cb6ac4206 --- /dev/null +++ b/src/datadogV1/api/api_dashboards.rs @@ -0,0 +1,1402 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateDashboardParams is a struct for passing parameters to the method [`CreateDashboard`] +#[derive(Clone, Debug)] +pub struct CreateDashboardParams { + /// Create a dashboard request body. + pub body: crate::datadogV1::model::Dashboard, +} + +/// CreatePublicDashboardParams is a struct for passing parameters to the method [`CreatePublicDashboard`] +#[derive(Clone, Debug)] +pub struct CreatePublicDashboardParams { + /// Create a shared dashboard request body. + pub body: crate::datadogV1::model::SharedDashboard, +} + +/// DeleteDashboardParams is a struct for passing parameters to the method [`DeleteDashboard`] +#[derive(Clone, Debug)] +pub struct DeleteDashboardParams { + /// The ID of the dashboard. + pub dashboard_id: String, +} + +/// DeleteDashboardsParams is a struct for passing parameters to the method [`DeleteDashboards`] +#[derive(Clone, Debug)] +pub struct DeleteDashboardsParams { + /// Delete dashboards request body. + pub body: crate::datadogV1::model::DashboardBulkDeleteRequest, +} + +/// DeletePublicDashboardParams is a struct for passing parameters to the method [`DeletePublicDashboard`] +#[derive(Clone, Debug)] +pub struct DeletePublicDashboardParams { + /// The token of the shared dashboard. + pub token: String, +} + +/// DeletePublicDashboardInvitationParams is a struct for passing parameters to the method [`DeletePublicDashboardInvitation`] +#[derive(Clone, Debug)] +pub struct DeletePublicDashboardInvitationParams { + /// The token of the shared dashboard. + pub token: String, + /// Shared Dashboard Invitation deletion request body. + pub body: crate::datadogV1::model::SharedDashboardInvites, +} + +/// GetDashboardParams is a struct for passing parameters to the method [`GetDashboard`] +#[derive(Clone, Debug)] +pub struct GetDashboardParams { + /// The ID of the dashboard. + pub dashboard_id: String, +} + +/// GetPublicDashboardParams is a struct for passing parameters to the method [`GetPublicDashboard`] +#[derive(Clone, Debug)] +pub struct GetPublicDashboardParams { + /// The token of the shared dashboard. Generated when a dashboard is shared. + pub token: String, +} + +/// GetPublicDashboardInvitationsParams is a struct for passing parameters to the method [`GetPublicDashboardInvitations`] +#[derive(Clone, Debug)] +pub struct GetPublicDashboardInvitationsParams { + /// Token of the shared dashboard for which to fetch invitations. + pub token: String, + /// The number of records to return in a single request. + pub page_size: Option, + /// The page to access (base 0). + pub page_number: Option, +} + +/// ListDashboardsParams is a struct for passing parameters to the method [`ListDashboards`] +#[derive(Clone, Debug)] +pub struct ListDashboardsParams { + /// When `true`, this query only returns shared custom created + /// or cloned dashboards. + pub filter_shared: Option, + /// When `true`, this query returns only deleted custom-created + /// or cloned dashboards. This parameter is incompatible with `filter[shared]`. + pub filter_deleted: Option, + /// The maximum number of dashboards returned in the list. + pub count: Option, + /// The specific offset to use as the beginning of the returned response. + pub start: Option, +} + +/// RestoreDashboardsParams is a struct for passing parameters to the method [`RestoreDashboards`] +#[derive(Clone, Debug)] +pub struct RestoreDashboardsParams { + /// Restore dashboards request body. + pub body: crate::datadogV1::model::DashboardRestoreRequest, +} + +/// SendPublicDashboardInvitationParams is a struct for passing parameters to the method [`SendPublicDashboardInvitation`] +#[derive(Clone, Debug)] +pub struct SendPublicDashboardInvitationParams { + /// The token of the shared dashboard. + pub token: String, + /// Shared Dashboard Invitation request body. + pub body: crate::datadogV1::model::SharedDashboardInvites, +} + +/// UpdateDashboardParams is a struct for passing parameters to the method [`UpdateDashboard`] +#[derive(Clone, Debug)] +pub struct UpdateDashboardParams { + /// The ID of the dashboard. + pub dashboard_id: String, + /// Update Dashboard request body. + pub body: crate::datadogV1::model::Dashboard, +} + +/// UpdatePublicDashboardParams is a struct for passing parameters to the method [`UpdatePublicDashboard`] +#[derive(Clone, Debug)] +pub struct UpdatePublicDashboardParams { + /// The token of the shared dashboard. + pub token: String, + /// Update Dashboard request body. + pub body: crate::datadogV1::model::SharedDashboardUpdateRequest, +} + +/// CreateDashboardError is a struct for typed errors of method [`CreateDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateDashboardError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreatePublicDashboardError is a struct for typed errors of method [`CreatePublicDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreatePublicDashboardError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteDashboardError is a struct for typed errors of method [`DeleteDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteDashboardError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteDashboardsError is a struct for typed errors of method [`DeleteDashboards`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteDashboardsError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeletePublicDashboardError is a struct for typed errors of method [`DeletePublicDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePublicDashboardError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeletePublicDashboardInvitationError is a struct for typed errors of method [`DeletePublicDashboardInvitation`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePublicDashboardInvitationError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetDashboardError is a struct for typed errors of method [`GetDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetDashboardError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetPublicDashboardError is a struct for typed errors of method [`GetPublicDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPublicDashboardError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetPublicDashboardInvitationsError is a struct for typed errors of method [`GetPublicDashboardInvitations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPublicDashboardInvitationsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListDashboardsError is a struct for typed errors of method [`ListDashboards`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListDashboardsError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// RestoreDashboardsError is a struct for typed errors of method [`RestoreDashboards`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RestoreDashboardsError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SendPublicDashboardInvitationError is a struct for typed errors of method [`SendPublicDashboardInvitation`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SendPublicDashboardInvitationError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateDashboardError is a struct for typed errors of method [`UpdateDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateDashboardError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdatePublicDashboardError is a struct for typed errors of method [`UpdatePublicDashboard`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePublicDashboardError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct DashboardsAPI { + config: configuration::Configuration, +} + +impl Default for DashboardsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl DashboardsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a dashboard using the specified options. When defining queries in your widgets, take note of which queries should have the `as_count()` or `as_rate()` modifiers appended. + /// Refer to the following [documentation](https://docs.datadoghq.com/developers/metrics/type_modifiers/?tab=count#in-application-modifiers) for more information on these modifiers. + pub async fn create_dashboard( + &self, + params: CreateDashboardParams, + ) -> Result, Error> { + match self.create_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a dashboard using the specified options. When defining queries in your widgets, take note of which queries should have the `as_count()` or `as_rate()` modifiers appended. + /// Refer to the following [documentation](https://docs.datadoghq.com/developers/metrics/type_modifiers/?tab=count#in-application-modifiers) for more information on these modifiers. + pub async fn create_dashboard_with_http_info( + &self, + params: CreateDashboardParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/dashboard", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Share a specified private dashboard, generating a URL at which it can be publicly viewed. + pub async fn create_public_dashboard( + &self, + params: CreatePublicDashboardParams, + ) -> Result, Error> + { + match self.create_public_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Share a specified private dashboard, generating a URL at which it can be publicly viewed. + pub async fn create_public_dashboard_with_http_info( + &self, + params: CreatePublicDashboardParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/dashboard/public", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a dashboard using the specified ID. + pub async fn delete_dashboard( + &self, + params: DeleteDashboardParams, + ) -> Result, Error> + { + match self.delete_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a dashboard using the specified ID. + pub async fn delete_dashboard_with_http_info( + &self, + params: DeleteDashboardParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let dashboard_id = params.dashboard_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/{dashboard_id}", + local_configuration.base_path, + dashboard_id = urlencode(dashboard_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete dashboards using the specified IDs. If there are any failures, no dashboards will be deleted (partial success is not allowed). + pub async fn delete_dashboards( + &self, + params: DeleteDashboardsParams, + ) -> Result, Error> { + match self.delete_dashboards_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete dashboards using the specified IDs. If there are any failures, no dashboards will be deleted (partial success is not allowed). + pub async fn delete_dashboards_with_http_info( + &self, + params: DeleteDashboardsParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/dashboard", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Revoke the public URL for a dashboard (rendering it private) associated with the specified token. + pub async fn delete_public_dashboard( + &self, + params: DeletePublicDashboardParams, + ) -> Result< + Option, + Error, + > { + match self.delete_public_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Revoke the public URL for a dashboard (rendering it private) associated with the specified token. + pub async fn delete_public_dashboard_with_http_info( + &self, + params: DeletePublicDashboardParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let token = params.token; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/public/{token}", + local_configuration.base_path, + token = urlencode(token) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Revoke previously sent invitation emails and active sessions used to access a given shared dashboard for specific email addresses. + pub async fn delete_public_dashboard_invitation( + &self, + params: DeletePublicDashboardInvitationParams, + ) -> Result, Error> { + match self + .delete_public_dashboard_invitation_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Revoke previously sent invitation emails and active sessions used to access a given shared dashboard for specific email addresses. + pub async fn delete_public_dashboard_invitation_with_http_info( + &self, + params: DeletePublicDashboardInvitationParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let token = params.token; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/public/{token}/invitation", + local_configuration.base_path, + token = urlencode(token) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a dashboard using the specified ID. + pub async fn get_dashboard( + &self, + params: GetDashboardParams, + ) -> Result, Error> { + match self.get_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a dashboard using the specified ID. + pub async fn get_dashboard_with_http_info( + &self, + params: GetDashboardParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let dashboard_id = params.dashboard_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/{dashboard_id}", + local_configuration.base_path, + dashboard_id = urlencode(dashboard_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Fetch an existing shared dashboard's sharing metadata associated with the specified token. + pub async fn get_public_dashboard( + &self, + params: GetPublicDashboardParams, + ) -> Result, Error> + { + match self.get_public_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Fetch an existing shared dashboard's sharing metadata associated with the specified token. + pub async fn get_public_dashboard_with_http_info( + &self, + params: GetPublicDashboardParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let token = params.token; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/public/{token}", + local_configuration.base_path, + token = urlencode(token) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Describe the invitations that exist for the given shared dashboard (paginated). + pub async fn get_public_dashboard_invitations( + &self, + params: GetPublicDashboardInvitationsParams, + ) -> Result< + Option, + Error, + > { + match self + .get_public_dashboard_invitations_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Describe the invitations that exist for the given shared dashboard (paginated). + pub async fn get_public_dashboard_invitations_with_http_info( + &self, + params: GetPublicDashboardInvitationsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let token = params.token; + let page_size = params.page_size; + let page_number = params.page_number; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/public/{token}/invitation", + local_configuration.base_path, + token = urlencode(token) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page_size", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = local_req_builder.query(&[("page_number", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all dashboards. + /// + /// **Note**: This query will only return custom created or cloned dashboards. + /// This query will not return preset dashboards. + pub async fn list_dashboards( + &self, + params: ListDashboardsParams, + ) -> Result, Error> { + match self.list_dashboards_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all dashboards. + /// + /// **Note**: This query will only return custom created or cloned dashboards. + /// This query will not return preset dashboards. + pub async fn list_dashboards_with_http_info( + &self, + params: ListDashboardsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_shared = params.filter_shared; + let filter_deleted = params.filter_deleted; + let count = params.count; + let start = params.start; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/dashboard", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_shared { + local_req_builder = + local_req_builder.query(&[("filter[shared]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_deleted { + local_req_builder = + local_req_builder.query(&[("filter[deleted]", &local_str.to_string())]); + }; + if let Some(ref local_str) = count { + local_req_builder = local_req_builder.query(&[("count", &local_str.to_string())]); + }; + if let Some(ref local_str) = start { + local_req_builder = local_req_builder.query(&[("start", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Restore dashboards using the specified IDs. If there are any failures, no dashboards will be restored (partial success is not allowed). + pub async fn restore_dashboards( + &self, + params: RestoreDashboardsParams, + ) -> Result, Error> { + match self.restore_dashboards_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Restore dashboards using the specified IDs. If there are any failures, no dashboards will be restored (partial success is not allowed). + pub async fn restore_dashboards_with_http_info( + &self, + params: RestoreDashboardsParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/dashboard", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Send emails to specified email addresses containing links to access a given authenticated shared dashboard. Email addresses must already belong to the authenticated shared dashboard's share_list. + pub async fn send_public_dashboard_invitation( + &self, + params: SendPublicDashboardInvitationParams, + ) -> Result< + Option, + Error, + > { + match self + .send_public_dashboard_invitation_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Send emails to specified email addresses containing links to access a given authenticated shared dashboard. Email addresses must already belong to the authenticated shared dashboard's share_list. + pub async fn send_public_dashboard_invitation_with_http_info( + &self, + params: SendPublicDashboardInvitationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let token = params.token; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/public/{token}/invitation", + local_configuration.base_path, + token = urlencode(token) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a dashboard using the specified ID. + pub async fn update_dashboard( + &self, + params: UpdateDashboardParams, + ) -> Result, Error> { + match self.update_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a dashboard using the specified ID. + pub async fn update_dashboard_with_http_info( + &self, + params: UpdateDashboardParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let dashboard_id = params.dashboard_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/{dashboard_id}", + local_configuration.base_path, + dashboard_id = urlencode(dashboard_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a shared dashboard associated with the specified token. + pub async fn update_public_dashboard( + &self, + params: UpdatePublicDashboardParams, + ) -> Result, Error> + { + match self.update_public_dashboard_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a shared dashboard associated with the specified token. + pub async fn update_public_dashboard_with_http_info( + &self, + params: UpdatePublicDashboardParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let token = params.token; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/dashboard/public/{token}", + local_configuration.base_path, + token = urlencode(token) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV1/api/api_downtimes.rs b/src/datadogV1/api/api_downtimes.rs index 3c9501d10..add1f6792 100644 --- a/src/datadogV1/api/api_downtimes.rs +++ b/src/datadogV1/api/api_downtimes.rs @@ -7,35 +7,35 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CancelDowntimeParams is a struct for passing parameters to the method [`CancelDowntime`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CancelDowntimeParams { /// ID of the downtime to cancel. pub downtime_id: i64, } /// CancelDowntimesByScopeParams is a struct for passing parameters to the method [`CancelDowntimesByScope`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CancelDowntimesByScopeParams { /// Scope to cancel downtimes for. pub body: crate::datadogV1::model::CancelDowntimesByScopeRequest, } /// CreateDowntimeParams is a struct for passing parameters to the method [`CreateDowntime`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateDowntimeParams { /// Schedule a downtime request body. pub body: crate::datadogV1::model::Downtime, } /// GetDowntimeParams is a struct for passing parameters to the method [`GetDowntime`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetDowntimeParams { /// ID of the downtime to fetch. pub downtime_id: i64, } /// ListDowntimesParams is a struct for passing parameters to the method [`ListDowntimes`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListDowntimesParams { /// Only return downtimes that are active when the request is made. pub current_only: Option, @@ -44,14 +44,14 @@ pub struct ListDowntimesParams { } /// ListMonitorDowntimesParams is a struct for passing parameters to the method [`ListMonitorDowntimes`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListMonitorDowntimesParams { /// The id of the monitor pub monitor_id: i64, } /// UpdateDowntimeParams is a struct for passing parameters to the method [`UpdateDowntime`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateDowntimeParams { /// ID of the downtime to update. pub downtime_id: i64, @@ -151,7 +151,7 @@ impl DowntimesAPI { Self { config } } - /// Cancel a downtime. + /// Cancel a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn cancel_downtime( &self, params: CancelDowntimeParams, @@ -162,7 +162,7 @@ impl DowntimesAPI { } } - /// Cancel a downtime. + /// Cancel a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn cancel_downtime_with_http_info( &self, params: CancelDowntimeParams, @@ -220,7 +220,7 @@ impl DowntimesAPI { } } - /// Delete all downtimes that match the scope of `X`. + /// Delete all downtimes that match the scope of `X`. **Note:** This only interacts with Downtimes created using v1 endpoints. This endpoint has been deprecated and will not be replaced. Please use v2 endpoints to find and cancel downtimes. pub async fn cancel_downtimes_by_scope( &self, params: CancelDowntimesByScopeParams, @@ -234,7 +234,7 @@ impl DowntimesAPI { } } - /// Delete all downtimes that match the scope of `X`. + /// Delete all downtimes that match the scope of `X`. **Note:** This only interacts with Downtimes created using v1 endpoints. This endpoint has been deprecated and will not be replaced. Please use v2 endpoints to find and cancel downtimes. pub async fn cancel_downtimes_by_scope_with_http_info( &self, params: CancelDowntimesByScopeParams, @@ -303,7 +303,7 @@ impl DowntimesAPI { } } - /// Schedule a downtime. + /// Schedule a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn create_downtime( &self, params: CreateDowntimeParams, @@ -314,7 +314,7 @@ impl DowntimesAPI { } } - /// Schedule a downtime. + /// Schedule a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn create_downtime_with_http_info( &self, params: CreateDowntimeParams, @@ -378,7 +378,7 @@ impl DowntimesAPI { } } - /// Get downtime detail by `downtime_id`. + /// Get downtime detail by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn get_downtime( &self, params: GetDowntimeParams, @@ -389,7 +389,7 @@ impl DowntimesAPI { } } - /// Get downtime detail by `downtime_id`. + /// Get downtime detail by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn get_downtime_with_http_info( &self, params: GetDowntimeParams, @@ -448,7 +448,7 @@ impl DowntimesAPI { } } - /// Get all scheduled downtimes. + /// Get all scheduled downtimes. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_downtimes( &self, params: ListDowntimesParams, @@ -459,7 +459,7 @@ impl DowntimesAPI { } } - /// Get all scheduled downtimes. + /// Get all scheduled downtimes. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_downtimes_with_http_info( &self, params: ListDowntimesParams, @@ -526,7 +526,7 @@ impl DowntimesAPI { } } - /// Get all active downtimes for the specified monitor. + /// Get all active v1 downtimes for the specified monitor. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_monitor_downtimes( &self, params: ListMonitorDowntimesParams, @@ -538,7 +538,7 @@ impl DowntimesAPI { } } - /// Get all active downtimes for the specified monitor. + /// Get all active v1 downtimes for the specified monitor. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn list_monitor_downtimes_with_http_info( &self, params: ListMonitorDowntimesParams, @@ -601,7 +601,7 @@ impl DowntimesAPI { } } - /// Update a single downtime by `downtime_id`. + /// Update a single downtime by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn update_downtime( &self, params: UpdateDowntimeParams, @@ -612,7 +612,7 @@ impl DowntimesAPI { } } - /// Update a single downtime by `downtime_id`. + /// Update a single downtime by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. pub async fn update_downtime_with_http_info( &self, params: UpdateDowntimeParams, diff --git a/src/datadogV1/api/api_events.rs b/src/datadogV1/api/api_events.rs index f8755d284..6ac99abd9 100644 --- a/src/datadogV1/api/api_events.rs +++ b/src/datadogV1/api/api_events.rs @@ -7,21 +7,21 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateEventParams is a struct for passing parameters to the method [`CreateEvent`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateEventParams { /// Event request object pub body: crate::datadogV1::model::EventCreateRequest, } /// GetEventParams is a struct for passing parameters to the method [`GetEvent`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetEventParams { /// The ID of the event. pub event_id: i64, } /// ListEventsParams is a struct for passing parameters to the method [`ListEvents`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListEventsParams { /// POSIX timestamp. pub start: i64, diff --git a/src/datadogV1/api/api_gcp_integration.rs b/src/datadogV1/api/api_gcp_integration.rs index 68d6837fa..8e579bc7f 100644 --- a/src/datadogV1/api/api_gcp_integration.rs +++ b/src/datadogV1/api/api_gcp_integration.rs @@ -7,21 +7,21 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateGCPIntegrationParams is a struct for passing parameters to the method [`CreateGCPIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateGCPIntegrationParams { /// Create a Datadog-GCP integration. pub body: crate::datadogV1::model::GCPAccount, } /// DeleteGCPIntegrationParams is a struct for passing parameters to the method [`DeleteGCPIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteGCPIntegrationParams { /// Delete a given Datadog-GCP integration. pub body: crate::datadogV1::model::GCPAccount, } /// UpdateGCPIntegrationParams is a struct for passing parameters to the method [`UpdateGCPIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateGCPIntegrationParams { /// Update a Datadog-GCP integration. pub body: crate::datadogV1::model::GCPAccount, diff --git a/src/datadogV1/api/api_hosts.rs b/src/datadogV1/api/api_hosts.rs index 13e1d85dc..7f3df53ec 100644 --- a/src/datadogV1/api/api_hosts.rs +++ b/src/datadogV1/api/api_hosts.rs @@ -7,14 +7,14 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetHostTotalsParams is a struct for passing parameters to the method [`GetHostTotals`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetHostTotalsParams { /// Number of seconds from which you want to get total number of active hosts. pub from: Option, } /// ListHostsParams is a struct for passing parameters to the method [`ListHosts`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListHostsParams { /// String to filter search results. pub filter: Option, @@ -35,7 +35,7 @@ pub struct ListHostsParams { } /// MuteHostParams is a struct for passing parameters to the method [`MuteHost`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct MuteHostParams { /// Name of the host to mute. pub host_name: String, @@ -44,7 +44,7 @@ pub struct MuteHostParams { } /// UnmuteHostParams is a struct for passing parameters to the method [`UnmuteHost`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UnmuteHostParams { /// Name of the host to unmute. pub host_name: String, @@ -292,7 +292,7 @@ impl HostsAPI { } } - /// Mute a host. + /// Mute a host. **Note:** This creates a [Downtime V2](https://docs.datadoghq.com/api/latest/downtimes/#schedule-a-downtime) for the host. pub async fn mute_host( &self, params: MuteHostParams, @@ -303,7 +303,7 @@ impl HostsAPI { } } - /// Mute a host. + /// Mute a host. **Note:** This creates a [Downtime V2](https://docs.datadoghq.com/api/latest/downtimes/#schedule-a-downtime) for the host. pub async fn mute_host_with_http_info( &self, params: MuteHostParams, diff --git a/src/datadogV1/api/api_key_management.rs b/src/datadogV1/api/api_key_management.rs index 34e4bffe2..a94316f2b 100644 --- a/src/datadogV1/api/api_key_management.rs +++ b/src/datadogV1/api/api_key_management.rs @@ -7,47 +7,47 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateAPIKeyParams is a struct for passing parameters to the method [`CreateAPIKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateAPIKeyParams { pub body: crate::datadogV1::model::ApiKey, } /// CreateApplicationKeyParams is a struct for passing parameters to the method [`CreateApplicationKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateApplicationKeyParams { pub body: crate::datadogV1::model::ApplicationKey, } /// DeleteAPIKeyParams is a struct for passing parameters to the method [`DeleteAPIKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteAPIKeyParams { /// The specific API key you are working with. pub key: String, } /// DeleteApplicationKeyParams is a struct for passing parameters to the method [`DeleteApplicationKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteApplicationKeyParams { /// The specific APP key you are working with. pub key: String, } /// GetAPIKeyParams is a struct for passing parameters to the method [`GetAPIKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetAPIKeyParams { /// The specific API key you are working with. pub key: String, } /// GetApplicationKeyParams is a struct for passing parameters to the method [`GetApplicationKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetApplicationKeyParams { /// The specific APP key you are working with. pub key: String, } /// UpdateAPIKeyParams is a struct for passing parameters to the method [`UpdateAPIKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateAPIKeyParams { /// The specific API key you are working with. pub key: String, @@ -55,7 +55,7 @@ pub struct UpdateAPIKeyParams { } /// UpdateApplicationKeyParams is a struct for passing parameters to the method [`UpdateApplicationKey`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateApplicationKeyParams { /// The specific APP key you are working with. pub key: String, diff --git a/src/datadogV1/api/api_logs.rs b/src/datadogV1/api/api_logs.rs index c87a91854..1abcf24c1 100644 --- a/src/datadogV1/api/api_logs.rs +++ b/src/datadogV1/api/api_logs.rs @@ -7,14 +7,14 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListLogsParams is a struct for passing parameters to the method [`ListLogs`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListLogsParams { /// Logs filter pub body: crate::datadogV1::model::LogsListRequest, } /// SubmitLogParams is a struct for passing parameters to the method [`SubmitLog`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SubmitLogParams { /// Log to send (JSON format). pub body: Vec, diff --git a/src/datadogV1/api/api_logs_indexes.rs b/src/datadogV1/api/api_logs_indexes.rs index 82ab4a046..c1276637c 100644 --- a/src/datadogV1/api/api_logs_indexes.rs +++ b/src/datadogV1/api/api_logs_indexes.rs @@ -7,21 +7,21 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateLogsIndexParams is a struct for passing parameters to the method [`CreateLogsIndex`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateLogsIndexParams { /// Object containing the new index. pub body: crate::datadogV1::model::LogsIndex, } /// GetLogsIndexParams is a struct for passing parameters to the method [`GetLogsIndex`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetLogsIndexParams { /// Name of the log index. pub name: String, } /// UpdateLogsIndexParams is a struct for passing parameters to the method [`UpdateLogsIndex`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateLogsIndexParams { /// Name of the log index. pub name: String, @@ -30,7 +30,7 @@ pub struct UpdateLogsIndexParams { } /// UpdateLogsIndexOrderParams is a struct for passing parameters to the method [`UpdateLogsIndexOrder`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateLogsIndexOrderParams { /// Object containing the new ordered list of index names pub body: crate::datadogV1::model::LogsIndexesOrder, diff --git a/src/datadogV1/api/api_logs_pipelines.rs b/src/datadogV1/api/api_logs_pipelines.rs new file mode 100644 index 000000000..b975215db --- /dev/null +++ b/src/datadogV1/api/api_logs_pipelines.rs @@ -0,0 +1,685 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateLogsPipelineParams is a struct for passing parameters to the method [`CreateLogsPipeline`] +#[derive(Clone, Debug)] +pub struct CreateLogsPipelineParams { + /// Definition of the new pipeline. + pub body: crate::datadogV1::model::LogsPipeline, +} + +/// DeleteLogsPipelineParams is a struct for passing parameters to the method [`DeleteLogsPipeline`] +#[derive(Clone, Debug)] +pub struct DeleteLogsPipelineParams { + /// ID of the pipeline to delete. + pub pipeline_id: String, +} + +/// GetLogsPipelineParams is a struct for passing parameters to the method [`GetLogsPipeline`] +#[derive(Clone, Debug)] +pub struct GetLogsPipelineParams { + /// ID of the pipeline to get. + pub pipeline_id: String, +} + +/// UpdateLogsPipelineParams is a struct for passing parameters to the method [`UpdateLogsPipeline`] +#[derive(Clone, Debug)] +pub struct UpdateLogsPipelineParams { + /// ID of the pipeline to delete. + pub pipeline_id: String, + /// New definition of the pipeline. + pub body: crate::datadogV1::model::LogsPipeline, +} + +/// UpdateLogsPipelineOrderParams is a struct for passing parameters to the method [`UpdateLogsPipelineOrder`] +#[derive(Clone, Debug)] +pub struct UpdateLogsPipelineOrderParams { + /// Object containing the new ordered list of pipeline IDs. + pub body: crate::datadogV1::model::LogsPipelinesOrder, +} + +/// CreateLogsPipelineError is a struct for typed errors of method [`CreateLogsPipeline`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLogsPipelineError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteLogsPipelineError is a struct for typed errors of method [`DeleteLogsPipeline`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteLogsPipelineError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetLogsPipelineError is a struct for typed errors of method [`GetLogsPipeline`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLogsPipelineError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetLogsPipelineOrderError is a struct for typed errors of method [`GetLogsPipelineOrder`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLogsPipelineOrderError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListLogsPipelinesError is a struct for typed errors of method [`ListLogsPipelines`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListLogsPipelinesError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateLogsPipelineError is a struct for typed errors of method [`UpdateLogsPipeline`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateLogsPipelineError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateLogsPipelineOrderError is a struct for typed errors of method [`UpdateLogsPipelineOrder`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateLogsPipelineOrderError { + Status400(Option), + Status422(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct LogsPipelinesAPI { + config: configuration::Configuration, +} + +impl Default for LogsPipelinesAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl LogsPipelinesAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a pipeline in your organization. + pub async fn create_logs_pipeline( + &self, + params: CreateLogsPipelineParams, + ) -> Result, Error> { + match self.create_logs_pipeline_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a pipeline in your organization. + pub async fn create_logs_pipeline_with_http_info( + &self, + params: CreateLogsPipelineParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/logs/config/pipelines", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a given pipeline from your organization. + /// This endpoint takes no JSON arguments. + pub async fn delete_logs_pipeline( + &self, + params: DeleteLogsPipelineParams, + ) -> Result, Error> { + match self.delete_logs_pipeline_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a given pipeline from your organization. + /// This endpoint takes no JSON arguments. + pub async fn delete_logs_pipeline_with_http_info( + &self, + params: DeleteLogsPipelineParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let pipeline_id = params.pipeline_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/logs/config/pipelines/{pipeline_id}", + local_configuration.base_path, + pipeline_id = urlencode(pipeline_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a specific pipeline from your organization. + /// This endpoint takes no JSON arguments. + pub async fn get_logs_pipeline( + &self, + params: GetLogsPipelineParams, + ) -> Result, Error> { + match self.get_logs_pipeline_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a specific pipeline from your organization. + /// This endpoint takes no JSON arguments. + pub async fn get_logs_pipeline_with_http_info( + &self, + params: GetLogsPipelineParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let pipeline_id = params.pipeline_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/logs/config/pipelines/{pipeline_id}", + local_configuration.base_path, + pipeline_id = urlencode(pipeline_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the current order of your pipelines. + /// This endpoint takes no JSON arguments. + pub async fn get_logs_pipeline_order( + &self, + ) -> Result, Error> + { + match self.get_logs_pipeline_order_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the current order of your pipelines. + /// This endpoint takes no JSON arguments. + pub async fn get_logs_pipeline_order_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/logs/config/pipeline-order", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all pipelines from your organization. + /// This endpoint takes no JSON arguments. + pub async fn list_logs_pipelines( + &self, + ) -> Result>, Error> + { + match self.list_logs_pipelines_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all pipelines from your organization. + /// This endpoint takes no JSON arguments. + pub async fn list_logs_pipelines_with_http_info( + &self, + ) -> Result< + ResponseContent>, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/logs/config/pipelines", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option> = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a given pipeline configuration to change it’s processors or their order. + /// + /// **Note**: Using this method updates your pipeline configuration by **replacing** + /// your current configuration with the new one sent to your Datadog organization. + pub async fn update_logs_pipeline( + &self, + params: UpdateLogsPipelineParams, + ) -> Result, Error> { + match self.update_logs_pipeline_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a given pipeline configuration to change it’s processors or their order. + /// + /// **Note**: Using this method updates your pipeline configuration by **replacing** + /// your current configuration with the new one sent to your Datadog organization. + pub async fn update_logs_pipeline_with_http_info( + &self, + params: UpdateLogsPipelineParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let pipeline_id = params.pipeline_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/logs/config/pipelines/{pipeline_id}", + local_configuration.base_path, + pipeline_id = urlencode(pipeline_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update the order of your pipelines. Since logs are processed sequentially, reordering a pipeline may change + /// the structure and content of the data processed by other pipelines and their processors. + /// + /// **Note**: Using the `PUT` method updates your pipeline order by replacing your current order + /// with the new one sent to your Datadog organization. + pub async fn update_logs_pipeline_order( + &self, + params: UpdateLogsPipelineOrderParams, + ) -> Result< + Option, + Error, + > { + match self.update_logs_pipeline_order_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update the order of your pipelines. Since logs are processed sequentially, reordering a pipeline may change + /// the structure and content of the data processed by other pipelines and their processors. + /// + /// **Note**: Using the `PUT` method updates your pipeline order by replacing your current order + /// with the new one sent to your Datadog organization. + pub async fn update_logs_pipeline_order_with_http_info( + &self, + params: UpdateLogsPipelineOrderParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/logs/config/pipeline-order", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV1/api/api_metrics.rs b/src/datadogV1/api/api_metrics.rs index 9db84e12a..e246cfe12 100644 --- a/src/datadogV1/api/api_metrics.rs +++ b/src/datadogV1/api/api_metrics.rs @@ -7,14 +7,14 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetMetricMetadataParams is a struct for passing parameters to the method [`GetMetricMetadata`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetMetricMetadataParams { /// Name of the metric for which to get metadata. pub metric_name: String, } /// ListActiveMetricsParams is a struct for passing parameters to the method [`ListActiveMetrics`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListActiveMetricsParams { /// Seconds since the Unix epoch. pub from: i64, @@ -27,14 +27,14 @@ pub struct ListActiveMetricsParams { } /// ListMetricsParams is a struct for passing parameters to the method [`ListMetrics`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListMetricsParams { /// Query string to search metrics upon. Can optionally be prefixed with `metrics:`. pub q: String, } /// QueryMetricsParams is a struct for passing parameters to the method [`QueryMetrics`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct QueryMetricsParams { /// Start of the queried time period, seconds since the Unix epoch. pub from: i64, @@ -44,8 +44,16 @@ pub struct QueryMetricsParams { pub query: String, } +/// SubmitDistributionPointsParams is a struct for passing parameters to the method [`SubmitDistributionPoints`] +#[derive(Clone, Debug)] +pub struct SubmitDistributionPointsParams { + pub body: crate::datadogV1::model::DistributionPointsPayload, + /// HTTP header used to compress the media-type. + pub content_encoding: Option, +} + /// SubmitMetricsParams is a struct for passing parameters to the method [`SubmitMetrics`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SubmitMetricsParams { pub body: crate::datadogV1::model::MetricsPayload, /// HTTP header used to compress the media-type. @@ -53,7 +61,7 @@ pub struct SubmitMetricsParams { } /// UpdateMetricMetadataParams is a struct for passing parameters to the method [`UpdateMetricMetadata`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateMetricMetadataParams { /// Name of the metric for which to edit metadata. pub metric_name: String, @@ -101,6 +109,18 @@ pub enum QueryMetricsError { UnknownValue(serde_json::Value), } +/// SubmitDistributionPointsError is a struct for typed errors of method [`SubmitDistributionPoints`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SubmitDistributionPointsError { + Status400(Option), + Status403(Option), + Status408(Option), + Status413(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + /// SubmitMetricsError is a struct for typed errors of method [`SubmitMetrics`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -449,6 +469,91 @@ impl MetricsAPI { } } + /// The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards. + pub async fn submit_distribution_points( + &self, + params: SubmitDistributionPointsParams, + ) -> Result< + Option, + Error, + > { + match self.submit_distribution_points_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards. + pub async fn submit_distribution_points_with_http_info( + &self, + params: SubmitDistributionPointsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + let content_encoding = params.content_encoding; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/distribution_points", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + if let Some(ref local) = content_encoding { + local_req_builder = local_req_builder.header("Content-Encoding", &local.to_string()); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + /// The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. /// The maximum payload size is 3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed size of less than 62 megabytes (62914560 bytes). /// diff --git a/src/datadogV1/api/api_monitors.rs b/src/datadogV1/api/api_monitors.rs new file mode 100644 index 000000000..db19ace73 --- /dev/null +++ b/src/datadogV1/api/api_monitors.rs @@ -0,0 +1,1475 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CheckCanDeleteMonitorParams is a struct for passing parameters to the method [`CheckCanDeleteMonitor`] +#[derive(Clone, Debug)] +pub struct CheckCanDeleteMonitorParams { + /// The IDs of the monitor to check. + pub monitor_ids: Vec, +} + +/// CreateMonitorParams is a struct for passing parameters to the method [`CreateMonitor`] +#[derive(Clone, Debug)] +pub struct CreateMonitorParams { + /// Create a monitor request body. + pub body: crate::datadogV1::model::Monitor, +} + +/// DeleteMonitorParams is a struct for passing parameters to the method [`DeleteMonitor`] +#[derive(Clone, Debug)] +pub struct DeleteMonitorParams { + /// The ID of the monitor. + pub monitor_id: i64, + /// Delete the monitor even if it's referenced by other resources (for example SLO, composite monitor). + pub force: Option, +} + +/// GetMonitorParams is a struct for passing parameters to the method [`GetMonitor`] +#[derive(Clone, Debug)] +pub struct GetMonitorParams { + /// The ID of the monitor + pub monitor_id: i64, + /// When specified, shows additional information about the group states. Choose one or more from `all`, `alert`, `warn`, and `no data`. + pub group_states: Option, + /// If this argument is set to true, then the returned data includes all current active downtimes for the monitor. + pub with_downtimes: Option, +} + +/// ListMonitorsParams is a struct for passing parameters to the method [`ListMonitors`] +#[derive(Clone, Debug)] +pub struct ListMonitorsParams { + /// When specified, shows additional information about the group states. + /// Choose one or more from `all`, `alert`, `warn`, and `no data`. + pub group_states: Option, + /// A string to filter monitors by name. + pub name: Option, + /// A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. + /// For example, `host:host0`. + pub tags: Option, + /// A comma separated list indicating what service and/or custom tags, if any, should be used to filter the list of monitors. + /// Tags created in the Datadog UI automatically have the service key prepended. For example, `service:my-app`. + pub monitor_tags: Option, + /// If this argument is set to true, then the returned data includes all current active downtimes for each monitor. + pub with_downtimes: Option, + /// Use this parameter for paginating through large sets of monitors. Start with a value of zero, make a request, set the value to the last ID of result set, and then repeat until the response is empty. + pub id_offset: Option, + /// The page to start paginating from. If this argument is not specified, the request returns all monitors without pagination. + pub page: Option, + /// The number of monitors to return per page. If the page argument is not specified, the default behavior returns all monitors without a `page_size` limit. However, if page is specified and `page_size` is not, the argument defaults to 100. + pub page_size: Option, +} + +/// SearchMonitorGroupsParams is a struct for passing parameters to the method [`SearchMonitorGroups`] +#[derive(Clone, Debug)] +pub struct SearchMonitorGroupsParams { + /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the + /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] + /// page to learn more. + /// + /// The query can contain any number of space-separated monitor attributes, for instance `query="type:metric status:alert"`. + /// + /// [1]: https://app.datadoghq.com/monitors/manage + /// [2]: /monitors/manage/#find-the-monitors + pub query: Option, + /// Page to start paginating from. + pub page: Option, + /// Number of monitors to return per page. + pub per_page: Option, + /// String for sort order, composed of field and sort order separate by a comma, for example `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: + /// + /// * `name` + /// * `status` + /// * `tags` + pub sort: Option, +} + +/// SearchMonitorsParams is a struct for passing parameters to the method [`SearchMonitors`] +#[derive(Clone, Debug)] +pub struct SearchMonitorsParams { + /// After entering a search query in your [Manage Monitor page][1] use the query parameter value in the + /// URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] + /// page to learn more. + /// + /// The query can contain any number of space-separated monitor attributes, for instance `query="type:metric status:alert"`. + /// + /// [1]: https://app.datadoghq.com/monitors/manage + /// [2]: /monitors/manage/#find-the-monitors + pub query: Option, + /// Page to start paginating from. + pub page: Option, + /// Number of monitors to return per page. + pub per_page: Option, + /// String for sort order, composed of field and sort order separate by a comma, for example `name,asc`. Supported sort directions: `asc`, `desc`. Supported fields: + /// + /// * `name` + /// * `status` + /// * `tags` + pub sort: Option, +} + +/// UpdateMonitorParams is a struct for passing parameters to the method [`UpdateMonitor`] +#[derive(Clone, Debug)] +pub struct UpdateMonitorParams { + /// The ID of the monitor. + pub monitor_id: i64, + /// Edit a monitor request body. + pub body: crate::datadogV1::model::MonitorUpdateRequest, +} + +/// ValidateExistingMonitorParams is a struct for passing parameters to the method [`ValidateExistingMonitor`] +#[derive(Clone, Debug)] +pub struct ValidateExistingMonitorParams { + /// The ID of the monitor + pub monitor_id: i64, + /// Monitor request object + pub body: crate::datadogV1::model::Monitor, +} + +/// ValidateMonitorParams is a struct for passing parameters to the method [`ValidateMonitor`] +#[derive(Clone, Debug)] +pub struct ValidateMonitorParams { + /// Monitor request object + pub body: crate::datadogV1::model::Monitor, +} + +/// CheckCanDeleteMonitorError is a struct for typed errors of method [`CheckCanDeleteMonitor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CheckCanDeleteMonitorError { + Status400(Option), + Status403(Option), + Status429(Option), + Status409(Option), + UnknownValue(serde_json::Value), +} + +/// CreateMonitorError is a struct for typed errors of method [`CreateMonitor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateMonitorError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteMonitorError is a struct for typed errors of method [`DeleteMonitor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteMonitorError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetMonitorError is a struct for typed errors of method [`GetMonitor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMonitorError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListMonitorsError is a struct for typed errors of method [`ListMonitors`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMonitorsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SearchMonitorGroupsError is a struct for typed errors of method [`SearchMonitorGroups`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchMonitorGroupsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SearchMonitorsError is a struct for typed errors of method [`SearchMonitors`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchMonitorsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateMonitorError is a struct for typed errors of method [`UpdateMonitor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMonitorError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ValidateExistingMonitorError is a struct for typed errors of method [`ValidateExistingMonitor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ValidateExistingMonitorError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ValidateMonitorError is a struct for typed errors of method [`ValidateMonitor`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ValidateMonitorError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct MonitorsAPI { + config: configuration::Configuration, +} + +impl Default for MonitorsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl MonitorsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Check if the given monitors can be deleted. + pub async fn check_can_delete_monitor( + &self, + params: CheckCanDeleteMonitorParams, + ) -> Result< + Option, + Error, + > { + match self.check_can_delete_monitor_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Check if the given monitors can be deleted. + pub async fn check_can_delete_monitor_with_http_info( + &self, + params: CheckCanDeleteMonitorParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let monitor_ids = params.monitor_ids; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/monitor/can_delete", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + local_req_builder = local_req_builder.query(&[( + "monitor_ids", + &monitor_ids + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a monitor using the specified options. + /// + /// #### Monitor Types + /// + /// The type of monitor chosen from: + /// + /// - anomaly: `query alert` + /// - APM: `query alert` or `trace-analytics alert` + /// - composite: `composite` + /// - custom: `service check` + /// - event: `event alert` + /// - forecast: `query alert` + /// - host: `service check` + /// - integration: `query alert` or `service check` + /// - live process: `process alert` + /// - logs: `log alert` + /// - metric: `query alert` + /// - network: `service check` + /// - outlier: `query alert` + /// - process: `service check` + /// - rum: `rum alert` + /// - SLO: `slo alert` + /// - watchdog: `event-v2 alert` + /// - event-v2: `event-v2 alert` + /// - audit: `audit alert` + /// - error-tracking: `error-tracking alert` + /// - database-monitoring: `database-monitoring alert` + /// + /// **Notes**: + /// - Synthetic monitors are created through the Synthetics API. See the [Synthetics API] (https://docs.datadoghq.com/api/latest/synthetics/) documentation for more information. + /// - Log monitors require an unscoped App Key. + /// + /// #### Query Types + /// + /// ##### Metric Alert Query + /// + /// Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` + /// + /// - `time_aggr`: avg, sum, max, min, change, or pct_change + /// - `time_window`: `last_#m` (with `#` between 1 and 10080 depending on the monitor type) or `last_#h`(with `#` between 1 and 168 depending on the monitor type) or `last_1d`, or `last_1w` + /// - `space_aggr`: avg, sum, min, or max + /// - `tags`: one or more tags (comma-separated), or * + /// - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) + /// - `operator`: <, <=, >, >=, ==, or != + /// - `#`: an integer or decimal number used to set the threshold + /// + /// If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), + /// timeshift):space_aggr:metric{tags} [by {key}] operator #` with: + /// + /// - `change_aggr` change, pct_change + /// - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/create/types/#define-the-conditions) + /// - `time_window` last\_#m (between 1 and 2880 depending on the monitor type), last\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) + /// - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago + /// + /// Use this to create an outlier monitor using the following query: + /// `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` + /// + /// ##### Service Check Query + /// + /// Example: `"check".over(tags).last(count).by(group).count_by_status()` + /// + /// - `check` name of the check, for example `datadog.agent.up` + /// - `tags` one or more quoted tags (comma-separated), or "*". for example: `.over("env:prod", "role:db")`; `over` cannot be blank. + /// - `count` must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. + /// For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be at least 3. + /// - `group` must be specified for check monitors. Per-check grouping is already explicitly known for some service checks. + /// For example, Postgres integration monitors are tagged by `db`, `host`, and `port`, and Network monitors by `host`, `instance`, and `url`. See [Service Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation for more information. + /// + /// ##### Event Alert Query + /// + /// **Note:** The Event Alert Query has been replaced by the Event V2 Alert Query. For more information, see the [Event Migration guide](https://docs.datadoghq.com/service_management/events/guides/migrating_to_new_events_features/). + /// + /// ##### Event V2 Alert Query + /// + /// Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### Process Alert Query + /// + /// Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` + /// + /// - `search` free text search string for querying processes. + /// Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. + /// - `tags` one or more tags (comma-separated) + /// - `timeframe` the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d + /// - `operator` <, <=, >, >=, ==, or != + /// - `#` an integer or decimal number used to set the threshold + /// + /// ##### Logs Alert Query + /// + /// Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `index_name` For multi-index organizations, the log index in which the request is performed. + /// - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### Composite Query + /// + /// Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors + /// + /// * `name` [*required*, *default* = **dynamic, based on query**]: The name of the alert. + /// * `message` [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. + /// Email notifications can be sent to specific users by using the same '@username' notation as events. + /// * `tags` [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. + /// When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. + /// It is only available via the API and isn't visible or editable in the Datadog UI. + /// + /// ##### SLO Alert Query + /// + /// Example: `error_budget("slo_id").over("time_window") operator #` + /// + /// - `slo_id`: The alphanumeric SLO ID of the SLO you are configuring the alert for. + /// - `time_window`: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. + /// - `operator`: `>=` or `>` + /// + /// ##### Audit Alert Query + /// + /// Example: `audits(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### CI Pipelines Alert Query + /// + /// Example: `ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### CI Tests Alert Query + /// + /// Example: `ci-tests(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### Error Tracking Alert Query + /// + /// Example(RUM): `error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// Example(APM Traces): `error-tracking-traces(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// **Database Monitoring Alert Query** + /// + /// Example: `database-monitoring(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// **NOTE** Database Monitoring monitors are in alpha on US1. + pub async fn create_monitor( + &self, + params: CreateMonitorParams, + ) -> Result, Error> { + match self.create_monitor_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a monitor using the specified options. + /// + /// #### Monitor Types + /// + /// The type of monitor chosen from: + /// + /// - anomaly: `query alert` + /// - APM: `query alert` or `trace-analytics alert` + /// - composite: `composite` + /// - custom: `service check` + /// - event: `event alert` + /// - forecast: `query alert` + /// - host: `service check` + /// - integration: `query alert` or `service check` + /// - live process: `process alert` + /// - logs: `log alert` + /// - metric: `query alert` + /// - network: `service check` + /// - outlier: `query alert` + /// - process: `service check` + /// - rum: `rum alert` + /// - SLO: `slo alert` + /// - watchdog: `event-v2 alert` + /// - event-v2: `event-v2 alert` + /// - audit: `audit alert` + /// - error-tracking: `error-tracking alert` + /// - database-monitoring: `database-monitoring alert` + /// + /// **Notes**: + /// - Synthetic monitors are created through the Synthetics API. See the [Synthetics API] (https://docs.datadoghq.com/api/latest/synthetics/) documentation for more information. + /// - Log monitors require an unscoped App Key. + /// + /// #### Query Types + /// + /// ##### Metric Alert Query + /// + /// Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` + /// + /// - `time_aggr`: avg, sum, max, min, change, or pct_change + /// - `time_window`: `last_#m` (with `#` between 1 and 10080 depending on the monitor type) or `last_#h`(with `#` between 1 and 168 depending on the monitor type) or `last_1d`, or `last_1w` + /// - `space_aggr`: avg, sum, min, or max + /// - `tags`: one or more tags (comma-separated), or * + /// - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) + /// - `operator`: <, <=, >, >=, ==, or != + /// - `#`: an integer or decimal number used to set the threshold + /// + /// If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), + /// timeshift):space_aggr:metric{tags} [by {key}] operator #` with: + /// + /// - `change_aggr` change, pct_change + /// - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/create/types/#define-the-conditions) + /// - `time_window` last\_#m (between 1 and 2880 depending on the monitor type), last\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) + /// - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago + /// + /// Use this to create an outlier monitor using the following query: + /// `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` + /// + /// ##### Service Check Query + /// + /// Example: `"check".over(tags).last(count).by(group).count_by_status()` + /// + /// - `check` name of the check, for example `datadog.agent.up` + /// - `tags` one or more quoted tags (comma-separated), or "*". for example: `.over("env:prod", "role:db")`; `over` cannot be blank. + /// - `count` must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. + /// For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be at least 3. + /// - `group` must be specified for check monitors. Per-check grouping is already explicitly known for some service checks. + /// For example, Postgres integration monitors are tagged by `db`, `host`, and `port`, and Network monitors by `host`, `instance`, and `url`. See [Service Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation for more information. + /// + /// ##### Event Alert Query + /// + /// **Note:** The Event Alert Query has been replaced by the Event V2 Alert Query. For more information, see the [Event Migration guide](https://docs.datadoghq.com/service_management/events/guides/migrating_to_new_events_features/). + /// + /// ##### Event V2 Alert Query + /// + /// Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### Process Alert Query + /// + /// Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` + /// + /// - `search` free text search string for querying processes. + /// Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. + /// - `tags` one or more tags (comma-separated) + /// - `timeframe` the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d + /// - `operator` <, <=, >, >=, ==, or != + /// - `#` an integer or decimal number used to set the threshold + /// + /// ##### Logs Alert Query + /// + /// Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `index_name` For multi-index organizations, the log index in which the request is performed. + /// - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### Composite Query + /// + /// Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors + /// + /// * `name` [*required*, *default* = **dynamic, based on query**]: The name of the alert. + /// * `message` [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. + /// Email notifications can be sent to specific users by using the same '@username' notation as events. + /// * `tags` [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. + /// When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. + /// It is only available via the API and isn't visible or editable in the Datadog UI. + /// + /// ##### SLO Alert Query + /// + /// Example: `error_budget("slo_id").over("time_window") operator #` + /// + /// - `slo_id`: The alphanumeric SLO ID of the SLO you are configuring the alert for. + /// - `time_window`: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. + /// - `operator`: `>=` or `>` + /// + /// ##### Audit Alert Query + /// + /// Example: `audits(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### CI Pipelines Alert Query + /// + /// Example: `ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### CI Tests Alert Query + /// + /// Example: `ci-tests(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// ##### Error Tracking Alert Query + /// + /// Example(RUM): `error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// Example(APM Traces): `error-tracking-traces(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// **Database Monitoring Alert Query** + /// + /// Example: `database-monitoring(query).rollup(rollup_method[, measure]).last(time_window) operator #` + /// + /// - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + /// - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + /// - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + /// - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + /// - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + /// - `#` an integer or decimal number used to set the threshold. + /// + /// **NOTE** Database Monitoring monitors are in alpha on US1. + pub async fn create_monitor_with_http_info( + &self, + params: CreateMonitorParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/monitor", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete the specified monitor + pub async fn delete_monitor( + &self, + params: DeleteMonitorParams, + ) -> Result, Error> { + match self.delete_monitor_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete the specified monitor + pub async fn delete_monitor_with_http_info( + &self, + params: DeleteMonitorParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let monitor_id = params.monitor_id; + let force = params.force; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/monitor/{monitor_id}", + local_configuration.base_path, + monitor_id = monitor_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + if let Some(ref local_str) = force { + local_req_builder = local_req_builder.query(&[("force", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get details about the specified monitor from your organization. + pub async fn get_monitor( + &self, + params: GetMonitorParams, + ) -> Result, Error> { + match self.get_monitor_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get details about the specified monitor from your organization. + pub async fn get_monitor_with_http_info( + &self, + params: GetMonitorParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let monitor_id = params.monitor_id; + let group_states = params.group_states; + let with_downtimes = params.with_downtimes; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/monitor/{monitor_id}", + local_configuration.base_path, + monitor_id = monitor_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = group_states { + local_req_builder = + local_req_builder.query(&[("group_states", &local_str.to_string())]); + }; + if let Some(ref local_str) = with_downtimes { + local_req_builder = + local_req_builder.query(&[("with_downtimes", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get details about the specified monitor from your organization. + pub async fn list_monitors( + &self, + params: ListMonitorsParams, + ) -> Result>, Error> { + match self.list_monitors_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get details about the specified monitor from your organization. + pub async fn list_monitors_with_http_info( + &self, + params: ListMonitorsParams, + ) -> Result>, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let group_states = params.group_states; + let name = params.name; + let tags = params.tags; + let monitor_tags = params.monitor_tags; + let with_downtimes = params.with_downtimes; + let id_offset = params.id_offset; + let page = params.page; + let page_size = params.page_size; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/monitor", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = group_states { + local_req_builder = + local_req_builder.query(&[("group_states", &local_str.to_string())]); + }; + if let Some(ref local_str) = name { + local_req_builder = local_req_builder.query(&[("name", &local_str.to_string())]); + }; + if let Some(ref local_str) = tags { + local_req_builder = local_req_builder.query(&[("tags", &local_str.to_string())]); + }; + if let Some(ref local_str) = monitor_tags { + local_req_builder = + local_req_builder.query(&[("monitor_tags", &local_str.to_string())]); + }; + if let Some(ref local_str) = with_downtimes { + local_req_builder = + local_req_builder.query(&[("with_downtimes", &local_str.to_string())]); + }; + if let Some(ref local_str) = id_offset { + local_req_builder = local_req_builder.query(&[("id_offset", &local_str.to_string())]); + }; + if let Some(ref local_str) = page { + local_req_builder = local_req_builder.query(&[("page", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page_size", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option> = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Search and filter your monitor groups details. + pub async fn search_monitor_groups( + &self, + params: SearchMonitorGroupsParams, + ) -> Result< + Option, + Error, + > { + match self.search_monitor_groups_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Search and filter your monitor groups details. + pub async fn search_monitor_groups_with_http_info( + &self, + params: SearchMonitorGroupsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let query = params.query; + let page = params.page; + let per_page = params.per_page; + let sort = params.sort; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/monitor/groups/search", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = query { + local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + }; + if let Some(ref local_str) = page { + local_req_builder = local_req_builder.query(&[("page", &local_str.to_string())]); + }; + if let Some(ref local_str) = per_page { + local_req_builder = local_req_builder.query(&[("per_page", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Search and filter your monitors details. + pub async fn search_monitors( + &self, + params: SearchMonitorsParams, + ) -> Result, Error> + { + match self.search_monitors_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Search and filter your monitors details. + pub async fn search_monitors_with_http_info( + &self, + params: SearchMonitorsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let query = params.query; + let page = params.page; + let per_page = params.per_page; + let sort = params.sort; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/monitor/search", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = query { + local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + }; + if let Some(ref local_str) = page { + local_req_builder = local_req_builder.query(&[("page", &local_str.to_string())]); + }; + if let Some(ref local_str) = per_page { + local_req_builder = local_req_builder.query(&[("per_page", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit the specified monitor. + pub async fn update_monitor( + &self, + params: UpdateMonitorParams, + ) -> Result, Error> { + match self.update_monitor_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit the specified monitor. + pub async fn update_monitor_with_http_info( + &self, + params: UpdateMonitorParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let monitor_id = params.monitor_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/monitor/{monitor_id}", + local_configuration.base_path, + monitor_id = monitor_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Validate the monitor provided in the request. + pub async fn validate_existing_monitor( + &self, + params: ValidateExistingMonitorParams, + ) -> Result< + Option>, + Error, + > { + match self.validate_existing_monitor_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Validate the monitor provided in the request. + pub async fn validate_existing_monitor_with_http_info( + &self, + params: ValidateExistingMonitorParams, + ) -> Result< + ResponseContent>, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let monitor_id = params.monitor_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/monitor/{monitor_id}/validate", + local_configuration.base_path, + monitor_id = monitor_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option> = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Validate the monitor provided in the request. + /// + /// **Note**: Log monitors require an unscoped App Key. + pub async fn validate_monitor( + &self, + params: ValidateMonitorParams, + ) -> Result< + Option>, + Error, + > { + match self.validate_monitor_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Validate the monitor provided in the request. + /// + /// **Note**: Log monitors require an unscoped App Key. + pub async fn validate_monitor_with_http_info( + &self, + params: ValidateMonitorParams, + ) -> Result< + ResponseContent>, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/monitor/validate", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option> = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV1/api/api_notebooks.rs b/src/datadogV1/api/api_notebooks.rs new file mode 100644 index 000000000..dc6146762 --- /dev/null +++ b/src/datadogV1/api/api_notebooks.rs @@ -0,0 +1,552 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateNotebookParams is a struct for passing parameters to the method [`CreateNotebook`] +#[derive(Clone, Debug)] +pub struct CreateNotebookParams { + /// The JSON description of the notebook you want to create. + pub body: crate::datadogV1::model::NotebookCreateRequest, +} + +/// DeleteNotebookParams is a struct for passing parameters to the method [`DeleteNotebook`] +#[derive(Clone, Debug)] +pub struct DeleteNotebookParams { + /// Unique ID, assigned when you create the notebook. + pub notebook_id: i64, +} + +/// GetNotebookParams is a struct for passing parameters to the method [`GetNotebook`] +#[derive(Clone, Debug)] +pub struct GetNotebookParams { + /// Unique ID, assigned when you create the notebook. + pub notebook_id: i64, +} + +/// ListNotebooksParams is a struct for passing parameters to the method [`ListNotebooks`] +#[derive(Clone, Debug)] +pub struct ListNotebooksParams { + /// Return notebooks created by the given `author_handle`. + pub author_handle: Option, + /// Return notebooks not created by the given `author_handle`. + pub exclude_author_handle: Option, + /// The index of the first notebook you want returned. + pub start: Option, + /// The number of notebooks to be returned. + pub count: Option, + /// Sort by field `modified`, `name`, or `created`. + pub sort_field: Option, + /// Sort by direction `asc` or `desc`. + pub sort_dir: Option, + /// Return only notebooks with `query` string in notebook name or author handle. + pub query: Option, + /// Value of `false` excludes the `cells` and global `time` for each notebook. + pub include_cells: Option, + /// True value returns only template notebooks. Default is false (returns only non-template notebooks). + pub is_template: Option, + /// If type is provided, returns only notebooks with that metadata type. Default does not have type filtering. + pub type_: Option, +} + +/// UpdateNotebookParams is a struct for passing parameters to the method [`UpdateNotebook`] +#[derive(Clone, Debug)] +pub struct UpdateNotebookParams { + /// Unique ID, assigned when you create the notebook. + pub notebook_id: i64, + /// Update notebook request body. + pub body: crate::datadogV1::model::NotebookUpdateRequest, +} + +/// CreateNotebookError is a struct for typed errors of method [`CreateNotebook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateNotebookError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteNotebookError is a struct for typed errors of method [`DeleteNotebook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteNotebookError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetNotebookError is a struct for typed errors of method [`GetNotebook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetNotebookError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListNotebooksError is a struct for typed errors of method [`ListNotebooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListNotebooksError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateNotebookError is a struct for typed errors of method [`UpdateNotebook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateNotebookError { + Status400(Option), + Status403(Option), + Status404(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct NotebooksAPI { + config: configuration::Configuration, +} + +impl Default for NotebooksAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl NotebooksAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a notebook using the specified options. + pub async fn create_notebook( + &self, + params: CreateNotebookParams, + ) -> Result, Error> { + match self.create_notebook_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a notebook using the specified options. + pub async fn create_notebook_with_http_info( + &self, + params: CreateNotebookParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/notebooks", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a notebook using the specified ID. + pub async fn delete_notebook( + &self, + params: DeleteNotebookParams, + ) -> Result, Error> { + match self.delete_notebook_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a notebook using the specified ID. + pub async fn delete_notebook_with_http_info( + &self, + params: DeleteNotebookParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let notebook_id = params.notebook_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/notebooks/{notebook_id}", + local_configuration.base_path, + notebook_id = notebook_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a notebook using the specified notebook ID. + pub async fn get_notebook( + &self, + params: GetNotebookParams, + ) -> Result, Error> { + match self.get_notebook_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a notebook using the specified notebook ID. + pub async fn get_notebook_with_http_info( + &self, + params: GetNotebookParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let notebook_id = params.notebook_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/notebooks/{notebook_id}", + local_configuration.base_path, + notebook_id = notebook_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all notebooks. This can also be used to search for notebooks with a particular `query` in the notebook + /// `name` or author `handle`. + pub async fn list_notebooks( + &self, + params: ListNotebooksParams, + ) -> Result, Error> { + match self.list_notebooks_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all notebooks. This can also be used to search for notebooks with a particular `query` in the notebook + /// `name` or author `handle`. + pub async fn list_notebooks_with_http_info( + &self, + params: ListNotebooksParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let author_handle = params.author_handle; + let exclude_author_handle = params.exclude_author_handle; + let start = params.start; + let count = params.count; + let sort_field = params.sort_field; + let sort_dir = params.sort_dir; + let query = params.query; + let include_cells = params.include_cells; + let is_template = params.is_template; + let type_ = params.type_; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/notebooks", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = author_handle { + local_req_builder = + local_req_builder.query(&[("author_handle", &local_str.to_string())]); + }; + if let Some(ref local_str) = exclude_author_handle { + local_req_builder = + local_req_builder.query(&[("exclude_author_handle", &local_str.to_string())]); + }; + if let Some(ref local_str) = start { + local_req_builder = local_req_builder.query(&[("start", &local_str.to_string())]); + }; + if let Some(ref local_str) = count { + local_req_builder = local_req_builder.query(&[("count", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort_field { + local_req_builder = local_req_builder.query(&[("sort_field", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort_dir { + local_req_builder = local_req_builder.query(&[("sort_dir", &local_str.to_string())]); + }; + if let Some(ref local_str) = query { + local_req_builder = local_req_builder.query(&[("query", &local_str.to_string())]); + }; + if let Some(ref local_str) = include_cells { + local_req_builder = + local_req_builder.query(&[("include_cells", &local_str.to_string())]); + }; + if let Some(ref local_str) = is_template { + local_req_builder = local_req_builder.query(&[("is_template", &local_str.to_string())]); + }; + if let Some(ref local_str) = type_ { + local_req_builder = local_req_builder.query(&[("type", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a notebook using the specified ID. + pub async fn update_notebook( + &self, + params: UpdateNotebookParams, + ) -> Result, Error> { + match self.update_notebook_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a notebook using the specified ID. + pub async fn update_notebook_with_http_info( + &self, + params: UpdateNotebookParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let notebook_id = params.notebook_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/notebooks/{notebook_id}", + local_configuration.base_path, + notebook_id = notebook_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV1/api/api_organizations.rs b/src/datadogV1/api/api_organizations.rs index c6d77f0ce..558d1f659 100644 --- a/src/datadogV1/api/api_organizations.rs +++ b/src/datadogV1/api/api_organizations.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateChildOrgParams is a struct for passing parameters to the method [`CreateChildOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateChildOrgParams { /// Organization object that needs to be created pub body: crate::datadogV1::model::OrganizationCreateBody, } /// DowngradeOrgParams is a struct for passing parameters to the method [`DowngradeOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DowngradeOrgParams { /// The `public_id` of the organization you are operating within. pub public_id: String, } /// GetOrgParams is a struct for passing parameters to the method [`GetOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetOrgParams { /// The `public_id` of the organization you are operating within. pub public_id: String, } /// UpdateOrgParams is a struct for passing parameters to the method [`UpdateOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateOrgParams { /// The `public_id` of the organization you are operating within. pub public_id: String, @@ -36,7 +36,7 @@ pub struct UpdateOrgParams { } /// UploadIdPForOrgParams is a struct for passing parameters to the method [`UploadIdPForOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UploadIdPForOrgParams { /// The `public_id` of the organization you are operating with pub public_id: String, diff --git a/src/datadogV1/api/api_pager_duty_integration.rs b/src/datadogV1/api/api_pager_duty_integration.rs index b3e868b92..e436fc480 100644 --- a/src/datadogV1/api/api_pager_duty_integration.rs +++ b/src/datadogV1/api/api_pager_duty_integration.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreatePagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`CreatePagerDutyIntegrationService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreatePagerDutyIntegrationServiceParams { /// Create a new service object request body. pub body: crate::datadogV1::model::PagerDutyService, } /// DeletePagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`DeletePagerDutyIntegrationService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeletePagerDutyIntegrationServiceParams { /// The service name pub service_name: String, } /// GetPagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`GetPagerDutyIntegrationService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetPagerDutyIntegrationServiceParams { /// The service name. pub service_name: String, } /// UpdatePagerDutyIntegrationServiceParams is a struct for passing parameters to the method [`UpdatePagerDutyIntegrationService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdatePagerDutyIntegrationServiceParams { /// The service name pub service_name: String, diff --git a/src/datadogV1/api/api_security_monitoring.rs b/src/datadogV1/api/api_security_monitoring.rs index 0dad81c20..de1600ba3 100644 --- a/src/datadogV1/api/api_security_monitoring.rs +++ b/src/datadogV1/api/api_security_monitoring.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// AddSecurityMonitoringSignalToIncidentParams is a struct for passing parameters to the method [`AddSecurityMonitoringSignalToIncident`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct AddSecurityMonitoringSignalToIncidentParams { /// The ID of the signal. pub signal_id: String, @@ -16,7 +16,7 @@ pub struct AddSecurityMonitoringSignalToIncidentParams { } /// EditSecurityMonitoringSignalAssigneeParams is a struct for passing parameters to the method [`EditSecurityMonitoringSignalAssignee`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct EditSecurityMonitoringSignalAssigneeParams { /// The ID of the signal. pub signal_id: String, @@ -25,7 +25,7 @@ pub struct EditSecurityMonitoringSignalAssigneeParams { } /// EditSecurityMonitoringSignalStateParams is a struct for passing parameters to the method [`EditSecurityMonitoringSignalState`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct EditSecurityMonitoringSignalStateParams { /// The ID of the signal. pub signal_id: String, diff --git a/src/datadogV1/api/api_service_checks.rs b/src/datadogV1/api/api_service_checks.rs index 46be6f167..2c7b48530 100644 --- a/src/datadogV1/api/api_service_checks.rs +++ b/src/datadogV1/api/api_service_checks.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// SubmitServiceCheckParams is a struct for passing parameters to the method [`SubmitServiceCheck`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SubmitServiceCheckParams { /// Service Check request body. pub body: Vec, diff --git a/src/datadogV1/api/api_service_level_objective_corrections.rs b/src/datadogV1/api/api_service_level_objective_corrections.rs index f90420024..fdb13120f 100644 --- a/src/datadogV1/api/api_service_level_objective_corrections.rs +++ b/src/datadogV1/api/api_service_level_objective_corrections.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateSLOCorrectionParams is a struct for passing parameters to the method [`CreateSLOCorrection`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateSLOCorrectionParams { /// Create an SLO Correction pub body: crate::datadogV1::model::SLOCorrectionCreateRequest, } /// DeleteSLOCorrectionParams is a struct for passing parameters to the method [`DeleteSLOCorrection`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteSLOCorrectionParams { /// The ID of the SLO correction object. pub slo_correction_id: String, } /// GetSLOCorrectionParams is a struct for passing parameters to the method [`GetSLOCorrection`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSLOCorrectionParams { /// The ID of the SLO correction object. pub slo_correction_id: String, } /// ListSLOCorrectionParams is a struct for passing parameters to the method [`ListSLOCorrection`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListSLOCorrectionParams { /// The specific offset to use as the beginning of the returned response. pub offset: Option, @@ -37,7 +37,7 @@ pub struct ListSLOCorrectionParams { } /// UpdateSLOCorrectionParams is a struct for passing parameters to the method [`UpdateSLOCorrection`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateSLOCorrectionParams { /// The ID of the SLO correction object. pub slo_correction_id: String, diff --git a/src/datadogV1/api/api_service_level_objectives.rs b/src/datadogV1/api/api_service_level_objectives.rs index ce340b7c3..a257dc7ca 100644 --- a/src/datadogV1/api/api_service_level_objectives.rs +++ b/src/datadogV1/api/api_service_level_objectives.rs @@ -7,21 +7,21 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CheckCanDeleteSLOParams is a struct for passing parameters to the method [`CheckCanDeleteSLO`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CheckCanDeleteSLOParams { /// A comma separated list of the IDs of the service level objectives objects. pub ids: String, } /// CreateSLOParams is a struct for passing parameters to the method [`CreateSLO`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateSLOParams { /// Service level objective request object. pub body: crate::datadogV1::model::ServiceLevelObjectiveRequest, } /// DeleteSLOParams is a struct for passing parameters to the method [`DeleteSLO`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteSLOParams { /// The ID of the service level objective. pub slo_id: String, @@ -30,14 +30,14 @@ pub struct DeleteSLOParams { } /// DeleteSLOTimeframeInBulkParams is a struct for passing parameters to the method [`DeleteSLOTimeframeInBulk`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteSLOTimeframeInBulkParams { /// Delete multiple service level objective objects request body. pub body: std::collections::HashMap>, } /// GetSLOParams is a struct for passing parameters to the method [`GetSLO`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSLOParams { /// The ID of the service level objective object. pub slo_id: String, @@ -46,14 +46,14 @@ pub struct GetSLOParams { } /// GetSLOCorrectionsParams is a struct for passing parameters to the method [`GetSLOCorrections`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSLOCorrectionsParams { /// The ID of the service level objective object. pub slo_id: String, } /// GetSLOHistoryParams is a struct for passing parameters to the method [`GetSLOHistory`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSLOHistoryParams { /// The ID of the service level objective object. pub slo_id: String, @@ -69,7 +69,7 @@ pub struct GetSLOHistoryParams { } /// ListSLOsParams is a struct for passing parameters to the method [`ListSLOs`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListSLOsParams { /// A comma separated list of the IDs of the service level objectives objects. pub ids: Option, @@ -86,7 +86,7 @@ pub struct ListSLOsParams { } /// SearchSLOParams is a struct for passing parameters to the method [`SearchSLO`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SearchSLOParams { /// The query string to filter results based on SLO names. /// Some examples of queries include `service:` @@ -101,7 +101,7 @@ pub struct SearchSLOParams { } /// UpdateSLOParams is a struct for passing parameters to the method [`UpdateSLO`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateSLOParams { /// The ID of the service level objective object. pub slo_id: String, diff --git a/src/datadogV1/api/api_slack_integration.rs b/src/datadogV1/api/api_slack_integration.rs index 0f445d5ac..08a227ae2 100644 --- a/src/datadogV1/api/api_slack_integration.rs +++ b/src/datadogV1/api/api_slack_integration.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateSlackIntegrationChannelParams is a struct for passing parameters to the method [`CreateSlackIntegrationChannel`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateSlackIntegrationChannelParams { /// Your Slack account name. pub account_name: String, @@ -16,7 +16,7 @@ pub struct CreateSlackIntegrationChannelParams { } /// GetSlackIntegrationChannelParams is a struct for passing parameters to the method [`GetSlackIntegrationChannel`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSlackIntegrationChannelParams { /// Your Slack account name. pub account_name: String, @@ -25,14 +25,14 @@ pub struct GetSlackIntegrationChannelParams { } /// GetSlackIntegrationChannelsParams is a struct for passing parameters to the method [`GetSlackIntegrationChannels`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSlackIntegrationChannelsParams { /// Your Slack account name. pub account_name: String, } /// RemoveSlackIntegrationChannelParams is a struct for passing parameters to the method [`RemoveSlackIntegrationChannel`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct RemoveSlackIntegrationChannelParams { /// Your Slack account name. pub account_name: String, @@ -41,7 +41,7 @@ pub struct RemoveSlackIntegrationChannelParams { } /// UpdateSlackIntegrationChannelParams is a struct for passing parameters to the method [`UpdateSlackIntegrationChannel`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateSlackIntegrationChannelParams { /// Your Slack account name. pub account_name: String, diff --git a/src/datadogV1/api/api_snapshots.rs b/src/datadogV1/api/api_snapshots.rs index 103c6b873..605485008 100644 --- a/src/datadogV1/api/api_snapshots.rs +++ b/src/datadogV1/api/api_snapshots.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetGraphSnapshotParams is a struct for passing parameters to the method [`GetGraphSnapshot`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetGraphSnapshotParams { /// The POSIX timestamp of the start of the query in seconds. pub start: i64, diff --git a/src/datadogV1/api/api_synthetics.rs b/src/datadogV1/api/api_synthetics.rs new file mode 100644 index 000000000..9a8e86091 --- /dev/null +++ b/src/datadogV1/api/api_synthetics.rs @@ -0,0 +1,2850 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateGlobalVariableParams is a struct for passing parameters to the method [`CreateGlobalVariable`] +#[derive(Clone, Debug)] +pub struct CreateGlobalVariableParams { + /// Details of the global variable to create. + pub body: crate::datadogV1::model::SyntheticsGlobalVariable, +} + +/// CreatePrivateLocationParams is a struct for passing parameters to the method [`CreatePrivateLocation`] +#[derive(Clone, Debug)] +pub struct CreatePrivateLocationParams { + /// Details of the private location to create. + pub body: crate::datadogV1::model::SyntheticsPrivateLocation, +} + +/// CreateSyntheticsAPITestParams is a struct for passing parameters to the method [`CreateSyntheticsAPITest`] +#[derive(Clone, Debug)] +pub struct CreateSyntheticsAPITestParams { + /// Details of the test to create. + pub body: crate::datadogV1::model::SyntheticsAPITest, +} + +/// CreateSyntheticsBrowserTestParams is a struct for passing parameters to the method [`CreateSyntheticsBrowserTest`] +#[derive(Clone, Debug)] +pub struct CreateSyntheticsBrowserTestParams { + /// Details of the test to create. + pub body: crate::datadogV1::model::SyntheticsBrowserTest, +} + +/// DeleteGlobalVariableParams is a struct for passing parameters to the method [`DeleteGlobalVariable`] +#[derive(Clone, Debug)] +pub struct DeleteGlobalVariableParams { + /// The ID of the global variable. + pub variable_id: String, +} + +/// DeletePrivateLocationParams is a struct for passing parameters to the method [`DeletePrivateLocation`] +#[derive(Clone, Debug)] +pub struct DeletePrivateLocationParams { + /// The ID of the private location. + pub location_id: String, +} + +/// DeleteTestsParams is a struct for passing parameters to the method [`DeleteTests`] +#[derive(Clone, Debug)] +pub struct DeleteTestsParams { + /// Public ID list of the Synthetic tests to be deleted. + pub body: crate::datadogV1::model::SyntheticsDeleteTestsPayload, +} + +/// EditGlobalVariableParams is a struct for passing parameters to the method [`EditGlobalVariable`] +#[derive(Clone, Debug)] +pub struct EditGlobalVariableParams { + /// The ID of the global variable. + pub variable_id: String, + /// Details of the global variable to update. + pub body: crate::datadogV1::model::SyntheticsGlobalVariable, +} + +/// GetAPITestParams is a struct for passing parameters to the method [`GetAPITest`] +#[derive(Clone, Debug)] +pub struct GetAPITestParams { + /// The public ID of the test to get details from. + pub public_id: String, +} + +/// GetAPITestLatestResultsParams is a struct for passing parameters to the method [`GetAPITestLatestResults`] +#[derive(Clone, Debug)] +pub struct GetAPITestLatestResultsParams { + /// The public ID of the test for which to search results for. + pub public_id: String, + /// Timestamp in milliseconds from which to start querying results. + pub from_ts: Option, + /// Timestamp in milliseconds up to which to query results. + pub to_ts: Option, + /// Locations for which to query results. + pub probe_dc: Option>, +} + +/// GetAPITestResultParams is a struct for passing parameters to the method [`GetAPITestResult`] +#[derive(Clone, Debug)] +pub struct GetAPITestResultParams { + /// The public ID of the API test to which the target result belongs. + pub public_id: String, + /// The ID of the result to get. + pub result_id: String, +} + +/// GetBrowserTestParams is a struct for passing parameters to the method [`GetBrowserTest`] +#[derive(Clone, Debug)] +pub struct GetBrowserTestParams { + /// The public ID of the test to get details from. + pub public_id: String, +} + +/// GetBrowserTestLatestResultsParams is a struct for passing parameters to the method [`GetBrowserTestLatestResults`] +#[derive(Clone, Debug)] +pub struct GetBrowserTestLatestResultsParams { + /// The public ID of the browser test for which to search results + /// for. + pub public_id: String, + /// Timestamp in milliseconds from which to start querying results. + pub from_ts: Option, + /// Timestamp in milliseconds up to which to query results. + pub to_ts: Option, + /// Locations for which to query results. + pub probe_dc: Option>, +} + +/// GetBrowserTestResultParams is a struct for passing parameters to the method [`GetBrowserTestResult`] +#[derive(Clone, Debug)] +pub struct GetBrowserTestResultParams { + /// The public ID of the browser test to which the target result + /// belongs. + pub public_id: String, + /// The ID of the result to get. + pub result_id: String, +} + +/// GetGlobalVariableParams is a struct for passing parameters to the method [`GetGlobalVariable`] +#[derive(Clone, Debug)] +pub struct GetGlobalVariableParams { + /// The ID of the global variable. + pub variable_id: String, +} + +/// GetPrivateLocationParams is a struct for passing parameters to the method [`GetPrivateLocation`] +#[derive(Clone, Debug)] +pub struct GetPrivateLocationParams { + /// The ID of the private location. + pub location_id: String, +} + +/// GetSyntheticsCIBatchParams is a struct for passing parameters to the method [`GetSyntheticsCIBatch`] +#[derive(Clone, Debug)] +pub struct GetSyntheticsCIBatchParams { + /// The ID of the batch. + pub batch_id: String, +} + +/// GetTestParams is a struct for passing parameters to the method [`GetTest`] +#[derive(Clone, Debug)] +pub struct GetTestParams { + /// The public ID of the test to get details from. + pub public_id: String, +} + +/// ListTestsParams is a struct for passing parameters to the method [`ListTests`] +#[derive(Clone, Debug)] +pub struct ListTestsParams { + /// Used for pagination. The number of tests returned in the page. + pub page_size: Option, + /// Used for pagination. Which page you want to retrieve. Starts at zero. + pub page_number: Option, +} + +/// PatchTestParams is a struct for passing parameters to the method [`PatchTest`] +#[derive(Clone, Debug)] +pub struct PatchTestParams { + /// The public ID of the test to patch. + pub public_id: String, + /// [JSON Patch](https://jsonpatch.com/) compliant list of operations + pub body: crate::datadogV1::model::SyntheticsPatchTestBody, +} + +/// TriggerCITestsParams is a struct for passing parameters to the method [`TriggerCITests`] +#[derive(Clone, Debug)] +pub struct TriggerCITestsParams { + /// Details of the test to trigger. + pub body: crate::datadogV1::model::SyntheticsCITestBody, +} + +/// TriggerTestsParams is a struct for passing parameters to the method [`TriggerTests`] +#[derive(Clone, Debug)] +pub struct TriggerTestsParams { + /// The identifiers of the tests to trigger. + pub body: crate::datadogV1::model::SyntheticsTriggerBody, +} + +/// UpdateAPITestParams is a struct for passing parameters to the method [`UpdateAPITest`] +#[derive(Clone, Debug)] +pub struct UpdateAPITestParams { + /// The public ID of the test to get details from. + pub public_id: String, + /// New test details to be saved. + pub body: crate::datadogV1::model::SyntheticsAPITest, +} + +/// UpdateBrowserTestParams is a struct for passing parameters to the method [`UpdateBrowserTest`] +#[derive(Clone, Debug)] +pub struct UpdateBrowserTestParams { + /// The public ID of the test to edit. + pub public_id: String, + /// New test details to be saved. + pub body: crate::datadogV1::model::SyntheticsBrowserTest, +} + +/// UpdatePrivateLocationParams is a struct for passing parameters to the method [`UpdatePrivateLocation`] +#[derive(Clone, Debug)] +pub struct UpdatePrivateLocationParams { + /// The ID of the private location. + pub location_id: String, + /// Details of the private location to be updated. + pub body: crate::datadogV1::model::SyntheticsPrivateLocation, +} + +/// UpdateTestPauseStatusParams is a struct for passing parameters to the method [`UpdateTestPauseStatus`] +#[derive(Clone, Debug)] +pub struct UpdateTestPauseStatusParams { + /// The public ID of the Synthetic test to update. + pub public_id: String, + /// Status to set the given Synthetic test to. + pub body: crate::datadogV1::model::SyntheticsUpdateTestPauseStatusPayload, +} + +/// CreateGlobalVariableError is a struct for typed errors of method [`CreateGlobalVariable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGlobalVariableError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreatePrivateLocationError is a struct for typed errors of method [`CreatePrivateLocation`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreatePrivateLocationError { + Status402(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateSyntheticsAPITestError is a struct for typed errors of method [`CreateSyntheticsAPITest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateSyntheticsAPITestError { + Status400(Option), + Status402(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateSyntheticsBrowserTestError is a struct for typed errors of method [`CreateSyntheticsBrowserTest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateSyntheticsBrowserTestError { + Status400(Option), + Status402(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteGlobalVariableError is a struct for typed errors of method [`DeleteGlobalVariable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGlobalVariableError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeletePrivateLocationError is a struct for typed errors of method [`DeletePrivateLocation`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePrivateLocationError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteTestsError is a struct for typed errors of method [`DeleteTests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteTestsError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// EditGlobalVariableError is a struct for typed errors of method [`EditGlobalVariable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditGlobalVariableError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetAPITestError is a struct for typed errors of method [`GetAPITest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAPITestError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetAPITestLatestResultsError is a struct for typed errors of method [`GetAPITestLatestResults`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAPITestLatestResultsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetAPITestResultError is a struct for typed errors of method [`GetAPITestResult`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAPITestResultError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetBrowserTestError is a struct for typed errors of method [`GetBrowserTest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetBrowserTestError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetBrowserTestLatestResultsError is a struct for typed errors of method [`GetBrowserTestLatestResults`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetBrowserTestLatestResultsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetBrowserTestResultError is a struct for typed errors of method [`GetBrowserTestResult`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetBrowserTestResultError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetGlobalVariableError is a struct for typed errors of method [`GetGlobalVariable`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGlobalVariableError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetPrivateLocationError is a struct for typed errors of method [`GetPrivateLocation`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPrivateLocationError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetSyntheticsCIBatchError is a struct for typed errors of method [`GetSyntheticsCIBatch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSyntheticsCIBatchError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetSyntheticsDefaultLocationsError is a struct for typed errors of method [`GetSyntheticsDefaultLocations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSyntheticsDefaultLocationsError { + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetTestError is a struct for typed errors of method [`GetTest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTestError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListGlobalVariablesError is a struct for typed errors of method [`ListGlobalVariables`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGlobalVariablesError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListLocationsError is a struct for typed errors of method [`ListLocations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListLocationsError { + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListTestsError is a struct for typed errors of method [`ListTests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListTestsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// PatchTestError is a struct for typed errors of method [`PatchTest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PatchTestError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// TriggerCITestsError is a struct for typed errors of method [`TriggerCITests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TriggerCITestsError { + Status400(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// TriggerTestsError is a struct for typed errors of method [`TriggerTests`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TriggerTestsError { + Status400(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateAPITestError is a struct for typed errors of method [`UpdateAPITest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateAPITestError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateBrowserTestError is a struct for typed errors of method [`UpdateBrowserTest`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateBrowserTestError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdatePrivateLocationError is a struct for typed errors of method [`UpdatePrivateLocation`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePrivateLocationError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateTestPauseStatusError is a struct for typed errors of method [`UpdateTestPauseStatus`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateTestPauseStatusError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct SyntheticsAPI { + config: configuration::Configuration, +} + +impl Default for SyntheticsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl SyntheticsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a Synthetic global variable. + pub async fn create_global_variable( + &self, + params: CreateGlobalVariableParams, + ) -> Result< + Option, + Error, + > { + match self.create_global_variable_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a Synthetic global variable. + pub async fn create_global_variable_with_http_info( + &self, + params: CreateGlobalVariableParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/variables", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a new Synthetic private location. + pub async fn create_private_location( + &self, + params: CreatePrivateLocationParams, + ) -> Result< + Option, + Error, + > { + match self.create_private_location_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a new Synthetic private location. + pub async fn create_private_location_with_http_info( + &self, + params: CreatePrivateLocationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/private-locations", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV1::model::SyntheticsPrivateLocationCreationResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a Synthetic API test. + pub async fn create_synthetics_api_test( + &self, + params: CreateSyntheticsAPITestParams, + ) -> Result< + Option, + Error, + > { + match self.create_synthetics_api_test_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a Synthetic API test. + pub async fn create_synthetics_api_test_with_http_info( + &self, + params: CreateSyntheticsAPITestParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/api", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a Synthetic browser test. + pub async fn create_synthetics_browser_test( + &self, + params: CreateSyntheticsBrowserTestParams, + ) -> Result< + Option, + Error, + > { + match self + .create_synthetics_browser_test_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a Synthetic browser test. + pub async fn create_synthetics_browser_test_with_http_info( + &self, + params: CreateSyntheticsBrowserTestParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/browser", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a Synthetic global variable. + pub async fn delete_global_variable( + &self, + params: DeleteGlobalVariableParams, + ) -> Result, Error> { + match self.delete_global_variable_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a Synthetic global variable. + pub async fn delete_global_variable_with_http_info( + &self, + params: DeleteGlobalVariableParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let variable_id = params.variable_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/variables/{variable_id}", + local_configuration.base_path, + variable_id = urlencode(variable_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a Synthetic private location. + pub async fn delete_private_location( + &self, + params: DeletePrivateLocationParams, + ) -> Result, Error> { + match self.delete_private_location_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a Synthetic private location. + pub async fn delete_private_location_with_http_info( + &self, + params: DeletePrivateLocationParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let location_id = params.location_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/private-locations/{location_id}", + local_configuration.base_path, + location_id = urlencode(location_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete multiple Synthetic tests by ID. + pub async fn delete_tests( + &self, + params: DeleteTestsParams, + ) -> Result< + Option, + Error, + > { + match self.delete_tests_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete multiple Synthetic tests by ID. + pub async fn delete_tests_with_http_info( + &self, + params: DeleteTestsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/delete", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit a Synthetic global variable. + pub async fn edit_global_variable( + &self, + params: EditGlobalVariableParams, + ) -> Result< + Option, + Error, + > { + match self.edit_global_variable_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit a Synthetic global variable. + pub async fn edit_global_variable_with_http_info( + &self, + params: EditGlobalVariableParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let variable_id = params.variable_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/variables/{variable_id}", + local_configuration.base_path, + variable_id = urlencode(variable_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the detailed configuration associated with + /// a Synthetic API test. + pub async fn get_api_test( + &self, + params: GetAPITestParams, + ) -> Result, Error> { + match self.get_api_test_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the detailed configuration associated with + /// a Synthetic API test. + pub async fn get_api_test_with_http_info( + &self, + params: GetAPITestParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/api/{public_id}", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the last 150 test results summaries for a given Synthetic API test. + pub async fn get_api_test_latest_results( + &self, + params: GetAPITestLatestResultsParams, + ) -> Result< + Option, + Error, + > { + match self + .get_api_test_latest_results_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the last 150 test results summaries for a given Synthetic API test. + pub async fn get_api_test_latest_results_with_http_info( + &self, + params: GetAPITestLatestResultsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let from_ts = params.from_ts; + let to_ts = params.to_ts; + let probe_dc = params.probe_dc; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/{public_id}/results", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = from_ts { + local_req_builder = local_req_builder.query(&[("from_ts", &local_str.to_string())]); + }; + if let Some(ref local_str) = to_ts { + local_req_builder = local_req_builder.query(&[("to_ts", &local_str.to_string())]); + }; + if let Some(ref local) = probe_dc { + local_req_builder = local_req_builder.query(&[( + "probe_dc", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV1::model::SyntheticsGetAPITestLatestResultsResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a specific full result from a given Synthetic API test. + pub async fn get_api_test_result( + &self, + params: GetAPITestResultParams, + ) -> Result< + Option, + Error, + > { + match self.get_api_test_result_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a specific full result from a given Synthetic API test. + pub async fn get_api_test_result_with_http_info( + &self, + params: GetAPITestResultParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let result_id = params.result_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/{public_id}/results/{result_id}", + local_configuration.base_path, + public_id = urlencode(public_id), + result_id = urlencode(result_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the detailed configuration (including steps) associated with + /// a Synthetic browser test. + pub async fn get_browser_test( + &self, + params: GetBrowserTestParams, + ) -> Result, Error> + { + match self.get_browser_test_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the detailed configuration (including steps) associated with + /// a Synthetic browser test. + pub async fn get_browser_test_with_http_info( + &self, + params: GetBrowserTestParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/browser/{public_id}", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the last 150 test results summaries for a given Synthetic browser test. + pub async fn get_browser_test_latest_results( + &self, + params: GetBrowserTestLatestResultsParams, + ) -> Result< + Option, + Error, + > { + match self + .get_browser_test_latest_results_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the last 150 test results summaries for a given Synthetic browser test. + pub async fn get_browser_test_latest_results_with_http_info( + &self, + params: GetBrowserTestLatestResultsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let from_ts = params.from_ts; + let to_ts = params.to_ts; + let probe_dc = params.probe_dc; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/browser/{public_id}/results", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = from_ts { + local_req_builder = local_req_builder.query(&[("from_ts", &local_str.to_string())]); + }; + if let Some(ref local_str) = to_ts { + local_req_builder = local_req_builder.query(&[("to_ts", &local_str.to_string())]); + }; + if let Some(ref local) = probe_dc { + local_req_builder = local_req_builder.query(&[( + "probe_dc", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV1::model::SyntheticsGetBrowserTestLatestResultsResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a specific full result from a given Synthetic browser test. + pub async fn get_browser_test_result( + &self, + params: GetBrowserTestResultParams, + ) -> Result< + Option, + Error, + > { + match self.get_browser_test_result_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a specific full result from a given Synthetic browser test. + pub async fn get_browser_test_result_with_http_info( + &self, + params: GetBrowserTestResultParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let result_id = params.result_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}", + local_configuration.base_path, + public_id = urlencode(public_id), + result_id = urlencode(result_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the detailed configuration of a global variable. + pub async fn get_global_variable( + &self, + params: GetGlobalVariableParams, + ) -> Result< + Option, + Error, + > { + match self.get_global_variable_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the detailed configuration of a global variable. + pub async fn get_global_variable_with_http_info( + &self, + params: GetGlobalVariableParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let variable_id = params.variable_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/variables/{variable_id}", + local_configuration.base_path, + variable_id = urlencode(variable_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a Synthetic private location. + pub async fn get_private_location( + &self, + params: GetPrivateLocationParams, + ) -> Result< + Option, + Error, + > { + match self.get_private_location_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a Synthetic private location. + pub async fn get_private_location_with_http_info( + &self, + params: GetPrivateLocationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let location_id = params.location_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/private-locations/{location_id}", + local_configuration.base_path, + location_id = urlencode(location_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a batch's updated details. + pub async fn get_synthetics_ci_batch( + &self, + params: GetSyntheticsCIBatchParams, + ) -> Result< + Option, + Error, + > { + match self.get_synthetics_ci_batch_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a batch's updated details. + pub async fn get_synthetics_ci_batch_with_http_info( + &self, + params: GetSyntheticsCIBatchParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let batch_id = params.batch_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/ci/batch/{batch_id}", + local_configuration.base_path, + batch_id = urlencode(batch_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the default locations settings. + pub async fn get_synthetics_default_locations( + &self, + ) -> Result>, Error> { + match self.get_synthetics_default_locations_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the default locations settings. + pub async fn get_synthetics_default_locations_with_http_info( + &self, + ) -> Result>, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/settings/default_locations", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option> = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the detailed configuration associated with a Synthetic test. + pub async fn get_test( + &self, + params: GetTestParams, + ) -> Result, Error> { + match self.get_test_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the detailed configuration associated with a Synthetic test. + pub async fn get_test_with_http_info( + &self, + params: GetTestParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/{public_id}", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the list of all Synthetic global variables. + pub async fn list_global_variables( + &self, + ) -> Result< + Option, + Error, + > { + match self.list_global_variables_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the list of all Synthetic global variables. + pub async fn list_global_variables_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/variables", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV1::model::SyntheticsListGlobalVariablesResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the list of public and private locations available for Synthetic + /// tests. No arguments required. + pub async fn list_locations( + &self, + ) -> Result, Error> + { + match self.list_locations_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the list of public and private locations available for Synthetic + /// tests. No arguments required. + pub async fn list_locations_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/locations", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the list of all Synthetic tests. + pub async fn list_tests( + &self, + params: ListTestsParams, + ) -> Result, Error> + { + match self.list_tests_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the list of all Synthetic tests. + pub async fn list_tests_with_http_info( + &self, + params: ListTestsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v1/synthetics/tests", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page_size", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = local_req_builder.query(&[("page_number", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Patch the configuration of a Synthetic test with partial data. + pub async fn patch_test( + &self, + params: PatchTestParams, + ) -> Result, Error> { + match self.patch_test_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Patch the configuration of a Synthetic test with partial data. + pub async fn patch_test_with_http_info( + &self, + params: PatchTestParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/{public_id}", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Trigger a set of Synthetic tests for continuous integration. + pub async fn trigger_ci_tests( + &self, + params: TriggerCITestsParams, + ) -> Result< + Option, + Error, + > { + match self.trigger_ci_tests_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Trigger a set of Synthetic tests for continuous integration. + pub async fn trigger_ci_tests_with_http_info( + &self, + params: TriggerCITestsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/trigger/ci", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Trigger a set of Synthetic tests. + pub async fn trigger_tests( + &self, + params: TriggerTestsParams, + ) -> Result< + Option, + Error, + > { + match self.trigger_tests_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Trigger a set of Synthetic tests. + pub async fn trigger_tests_with_http_info( + &self, + params: TriggerTestsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/trigger", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit the configuration of a Synthetic API test. + pub async fn update_api_test( + &self, + params: UpdateAPITestParams, + ) -> Result, Error> { + match self.update_api_test_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit the configuration of a Synthetic API test. + pub async fn update_api_test_with_http_info( + &self, + params: UpdateAPITestParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/api/{public_id}", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit the configuration of a Synthetic browser test. + pub async fn update_browser_test( + &self, + params: UpdateBrowserTestParams, + ) -> Result, Error> + { + match self.update_browser_test_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit the configuration of a Synthetic browser test. + pub async fn update_browser_test_with_http_info( + &self, + params: UpdateBrowserTestParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/browser/{public_id}", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit a Synthetic private location. + pub async fn update_private_location( + &self, + params: UpdatePrivateLocationParams, + ) -> Result< + Option, + Error, + > { + match self.update_private_location_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit a Synthetic private location. + pub async fn update_private_location_with_http_info( + &self, + params: UpdatePrivateLocationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let location_id = params.location_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/private-locations/{location_id}", + local_configuration.base_path, + location_id = urlencode(location_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Pause or start a Synthetic test by changing the status. + pub async fn update_test_pause_status( + &self, + params: UpdateTestPauseStatusParams, + ) -> Result, Error> { + match self.update_test_pause_status_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Pause or start a Synthetic test by changing the status. + pub async fn update_test_pause_status_with_http_info( + &self, + params: UpdateTestPauseStatusParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let public_id = params.public_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v1/synthetics/tests/{public_id}/status", + local_configuration.base_path, + public_id = urlencode(public_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV1/api/api_tags.rs b/src/datadogV1/api/api_tags.rs index 45ba03e94..796fbc1ee 100644 --- a/src/datadogV1/api/api_tags.rs +++ b/src/datadogV1/api/api_tags.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateHostTagsParams is a struct for passing parameters to the method [`CreateHostTags`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateHostTagsParams { /// This endpoint allows you to add new tags to a host, optionally specifying where the tags came from. pub host_name: String, @@ -19,7 +19,7 @@ pub struct CreateHostTagsParams { } /// DeleteHostTagsParams is a struct for passing parameters to the method [`DeleteHostTags`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteHostTagsParams { /// This endpoint allows you to remove all user-assigned tags for a single host. pub host_name: String, @@ -29,7 +29,7 @@ pub struct DeleteHostTagsParams { } /// GetHostTagsParams is a struct for passing parameters to the method [`GetHostTags`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetHostTagsParams { /// When specified, filters list of tags to those tags with the specified source. pub host_name: String, @@ -38,14 +38,14 @@ pub struct GetHostTagsParams { } /// ListHostTagsParams is a struct for passing parameters to the method [`ListHostTags`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListHostTagsParams { /// When specified, filters host list to those tags with the specified source. pub source: Option, } /// UpdateHostTagsParams is a struct for passing parameters to the method [`UpdateHostTags`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateHostTagsParams { /// This endpoint allows you to update/replace all in an integration source with those supplied in the request. pub host_name: String, diff --git a/src/datadogV1/api/api_usage_metering.rs b/src/datadogV1/api/api_usage_metering.rs index 3ca7bab98..276c52e40 100644 --- a/src/datadogV1/api/api_usage_metering.rs +++ b/src/datadogV1/api/api_usage_metering.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetDailyCustomReportsParams is a struct for passing parameters to the method [`GetDailyCustomReports`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetDailyCustomReportsParams { /// The number of files to return in the response. `[default=60]`. pub page_size: Option, @@ -20,7 +20,7 @@ pub struct GetDailyCustomReportsParams { } /// GetHourlyUsageAttributionParams is a struct for passing parameters to the method [`GetHourlyUsageAttribution`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetHourlyUsageAttributionParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -40,7 +40,7 @@ pub struct GetHourlyUsageAttributionParams { } /// GetIncidentManagementParams is a struct for passing parameters to the method [`GetIncidentManagement`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetIncidentManagementParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -50,7 +50,7 @@ pub struct GetIncidentManagementParams { } /// GetIngestedSpansParams is a struct for passing parameters to the method [`GetIngestedSpans`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetIngestedSpansParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -60,7 +60,7 @@ pub struct GetIngestedSpansParams { } /// GetMonthlyCustomReportsParams is a struct for passing parameters to the method [`GetMonthlyCustomReports`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetMonthlyCustomReportsParams { /// The number of files to return in the response `[default=60].` pub page_size: Option, @@ -73,7 +73,7 @@ pub struct GetMonthlyCustomReportsParams { } /// GetMonthlyUsageAttributionParams is a struct for passing parameters to the method [`GetMonthlyUsageAttribution`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetMonthlyUsageAttributionParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. /// Maximum of 15 months ago. @@ -97,21 +97,21 @@ pub struct GetMonthlyUsageAttributionParams { } /// GetSpecifiedDailyCustomReportsParams is a struct for passing parameters to the method [`GetSpecifiedDailyCustomReports`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSpecifiedDailyCustomReportsParams { /// Date of the report in the format `YYYY-MM-DD`. pub report_id: String, } /// GetSpecifiedMonthlyCustomReportsParams is a struct for passing parameters to the method [`GetSpecifiedMonthlyCustomReports`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSpecifiedMonthlyCustomReportsParams { /// Date of the report in the format `YYYY-MM-DD`. pub report_id: String, } /// GetUsageAnalyzedLogsParams is a struct for passing parameters to the method [`GetUsageAnalyzedLogs`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageAnalyzedLogsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -121,7 +121,7 @@ pub struct GetUsageAnalyzedLogsParams { } /// GetUsageAttributionParams is a struct for passing parameters to the method [`GetUsageAttribution`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageAttributionParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. /// Maximum of 15 months ago. @@ -143,7 +143,7 @@ pub struct GetUsageAttributionParams { } /// GetUsageAuditLogsParams is a struct for passing parameters to the method [`GetUsageAuditLogs`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageAuditLogsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -153,14 +153,14 @@ pub struct GetUsageAuditLogsParams { } /// GetUsageBillableSummaryParams is a struct for passing parameters to the method [`GetUsageBillableSummary`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageBillableSummaryParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage starting this month. pub month: Option, } /// GetUsageCIAppParams is a struct for passing parameters to the method [`GetUsageCIApp`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageCIAppParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -170,7 +170,7 @@ pub struct GetUsageCIAppParams { } /// GetUsageCWSParams is a struct for passing parameters to the method [`GetUsageCWS`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageCWSParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -180,7 +180,7 @@ pub struct GetUsageCWSParams { } /// GetUsageCloudSecurityPostureManagementParams is a struct for passing parameters to the method [`GetUsageCloudSecurityPostureManagement`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageCloudSecurityPostureManagementParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -190,7 +190,7 @@ pub struct GetUsageCloudSecurityPostureManagementParams { } /// GetUsageDBMParams is a struct for passing parameters to the method [`GetUsageDBM`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageDBMParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -200,7 +200,7 @@ pub struct GetUsageDBMParams { } /// GetUsageFargateParams is a struct for passing parameters to the method [`GetUsageFargate`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageFargateParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -209,7 +209,7 @@ pub struct GetUsageFargateParams { } /// GetUsageHostsParams is a struct for passing parameters to the method [`GetUsageHosts`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageHostsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -218,7 +218,7 @@ pub struct GetUsageHostsParams { } /// GetUsageIndexedSpansParams is a struct for passing parameters to the method [`GetUsageIndexedSpans`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageIndexedSpansParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -227,7 +227,7 @@ pub struct GetUsageIndexedSpansParams { } /// GetUsageInternetOfThingsParams is a struct for passing parameters to the method [`GetUsageInternetOfThings`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageInternetOfThingsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -237,7 +237,7 @@ pub struct GetUsageInternetOfThingsParams { } /// GetUsageLambdaParams is a struct for passing parameters to the method [`GetUsageLambda`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageLambdaParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -246,7 +246,7 @@ pub struct GetUsageLambdaParams { } /// GetUsageLogsParams is a struct for passing parameters to the method [`GetUsageLogs`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageLogsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -255,7 +255,7 @@ pub struct GetUsageLogsParams { } /// GetUsageLogsByIndexParams is a struct for passing parameters to the method [`GetUsageLogsByIndex`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageLogsByIndexParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -266,7 +266,7 @@ pub struct GetUsageLogsByIndexParams { } /// GetUsageLogsByRetentionParams is a struct for passing parameters to the method [`GetUsageLogsByRetention`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageLogsByRetentionParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -276,7 +276,7 @@ pub struct GetUsageLogsByRetentionParams { } /// GetUsageNetworkFlowsParams is a struct for passing parameters to the method [`GetUsageNetworkFlows`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageNetworkFlowsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -286,7 +286,7 @@ pub struct GetUsageNetworkFlowsParams { } /// GetUsageNetworkHostsParams is a struct for passing parameters to the method [`GetUsageNetworkHosts`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageNetworkHostsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -295,7 +295,7 @@ pub struct GetUsageNetworkHostsParams { } /// GetUsageOnlineArchiveParams is a struct for passing parameters to the method [`GetUsageOnlineArchive`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageOnlineArchiveParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -305,7 +305,7 @@ pub struct GetUsageOnlineArchiveParams { } /// GetUsageProfilingParams is a struct for passing parameters to the method [`GetUsageProfiling`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageProfilingParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -315,7 +315,7 @@ pub struct GetUsageProfilingParams { } /// GetUsageRumSessionsParams is a struct for passing parameters to the method [`GetUsageRumSessions`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageRumSessionsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -326,7 +326,7 @@ pub struct GetUsageRumSessionsParams { } /// GetUsageRumUnitsParams is a struct for passing parameters to the method [`GetUsageRumUnits`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageRumUnitsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -335,7 +335,7 @@ pub struct GetUsageRumUnitsParams { } /// GetUsageSDSParams is a struct for passing parameters to the method [`GetUsageSDS`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageSDSParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -345,7 +345,7 @@ pub struct GetUsageSDSParams { } /// GetUsageSNMPParams is a struct for passing parameters to the method [`GetUsageSNMP`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageSNMPParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -355,7 +355,7 @@ pub struct GetUsageSNMPParams { } /// GetUsageSummaryParams is a struct for passing parameters to the method [`GetUsageSummary`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageSummaryParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. /// Maximum of 15 months ago. @@ -367,7 +367,7 @@ pub struct GetUsageSummaryParams { } /// GetUsageSyntheticsParams is a struct for passing parameters to the method [`GetUsageSynthetics`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageSyntheticsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -376,7 +376,7 @@ pub struct GetUsageSyntheticsParams { } /// GetUsageSyntheticsAPIParams is a struct for passing parameters to the method [`GetUsageSyntheticsAPI`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageSyntheticsAPIParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -385,7 +385,7 @@ pub struct GetUsageSyntheticsAPIParams { } /// GetUsageSyntheticsBrowserParams is a struct for passing parameters to the method [`GetUsageSyntheticsBrowser`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageSyntheticsBrowserParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -394,7 +394,7 @@ pub struct GetUsageSyntheticsBrowserParams { } /// GetUsageTimeseriesParams is a struct for passing parameters to the method [`GetUsageTimeseries`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageTimeseriesParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub start_hr: String, @@ -403,7 +403,7 @@ pub struct GetUsageTimeseriesParams { } /// GetUsageTopAvgMetricsParams is a struct for passing parameters to the method [`GetUsageTopAvgMetrics`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageTopAvgMetricsParams { /// Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both) pub month: Option, diff --git a/src/datadogV1/api/api_users.rs b/src/datadogV1/api/api_users.rs index be89f5bb4..017dd926e 100644 --- a/src/datadogV1/api/api_users.rs +++ b/src/datadogV1/api/api_users.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateUserParams is a struct for passing parameters to the method [`CreateUser`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateUserParams { /// User object that needs to be created. pub body: crate::datadogV1::model::User, } /// DisableUserParams is a struct for passing parameters to the method [`DisableUser`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DisableUserParams { /// The handle of the user. pub user_handle: String, } /// GetUserParams is a struct for passing parameters to the method [`GetUser`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUserParams { /// The ID of the user. pub user_handle: String, } /// UpdateUserParams is a struct for passing parameters to the method [`UpdateUser`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateUserParams { /// The ID of the user. pub user_handle: String, diff --git a/src/datadogV1/api/api_webhooks_integration.rs b/src/datadogV1/api/api_webhooks_integration.rs index 2909d6e81..2dc2ea94f 100644 --- a/src/datadogV1/api/api_webhooks_integration.rs +++ b/src/datadogV1/api/api_webhooks_integration.rs @@ -7,49 +7,49 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateWebhooksIntegrationParams is a struct for passing parameters to the method [`CreateWebhooksIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateWebhooksIntegrationParams { /// Create a webhooks integration request body. pub body: crate::datadogV1::model::WebhooksIntegration, } /// CreateWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`CreateWebhooksIntegrationCustomVariable`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateWebhooksIntegrationCustomVariableParams { /// Define a custom variable request body. pub body: crate::datadogV1::model::WebhooksIntegrationCustomVariable, } /// DeleteWebhooksIntegrationParams is a struct for passing parameters to the method [`DeleteWebhooksIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteWebhooksIntegrationParams { /// The name of the webhook. pub webhook_name: String, } /// DeleteWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`DeleteWebhooksIntegrationCustomVariable`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteWebhooksIntegrationCustomVariableParams { /// The name of the custom variable. pub custom_variable_name: String, } /// GetWebhooksIntegrationParams is a struct for passing parameters to the method [`GetWebhooksIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetWebhooksIntegrationParams { /// The name of the webhook. pub webhook_name: String, } /// GetWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`GetWebhooksIntegrationCustomVariable`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetWebhooksIntegrationCustomVariableParams { /// The name of the custom variable. pub custom_variable_name: String, } /// UpdateWebhooksIntegrationParams is a struct for passing parameters to the method [`UpdateWebhooksIntegration`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateWebhooksIntegrationParams { /// The name of the webhook. pub webhook_name: String, @@ -58,7 +58,7 @@ pub struct UpdateWebhooksIntegrationParams { } /// UpdateWebhooksIntegrationCustomVariableParams is a struct for passing parameters to the method [`UpdateWebhooksIntegrationCustomVariable`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateWebhooksIntegrationCustomVariableParams { /// The name of the custom variable. pub custom_variable_name: String, diff --git a/src/datadogV1/api/mod.rs b/src/datadogV1/api/mod.rs index 412002204..903ad55c4 100644 --- a/src/datadogV1/api/mod.rs +++ b/src/datadogV1/api/mod.rs @@ -7,6 +7,7 @@ pub mod api_aws_integration; pub mod api_aws_logs_integration; pub mod api_azure_integration; pub mod api_dashboard_lists; +pub mod api_dashboards; pub mod api_downtimes; pub mod api_events; pub mod api_gcp_integration; @@ -15,7 +16,10 @@ pub mod api_ip_ranges; pub mod api_key_management; pub mod api_logs; pub mod api_logs_indexes; +pub mod api_logs_pipelines; pub mod api_metrics; +pub mod api_monitors; +pub mod api_notebooks; pub mod api_organizations; pub mod api_pager_duty_integration; pub mod api_security_monitoring; @@ -24,6 +28,7 @@ pub mod api_service_level_objective_corrections; pub mod api_service_level_objectives; pub mod api_slack_integration; pub mod api_snapshots; +pub mod api_synthetics; pub mod api_tags; pub mod api_usage_metering; pub mod api_users; diff --git a/src/datadogV1/model/mod.rs b/src/datadogV1/model/mod.rs index 8a0a7aeca..a39e0bc72 100644 --- a/src/datadogV1/model/mod.rs +++ b/src/datadogV1/model/mod.rs @@ -72,6 +72,492 @@ pub mod model_usage_specified_custom_reports_meta; pub use self::model_usage_specified_custom_reports_meta::UsageSpecifiedCustomReportsMeta; pub mod model_usage_specified_custom_reports_page; pub use self::model_usage_specified_custom_reports_page::UsageSpecifiedCustomReportsPage; +pub mod model_dashboard_bulk_delete_request; +pub use self::model_dashboard_bulk_delete_request::DashboardBulkDeleteRequest; +pub mod model_dashboard_bulk_action_data; +pub use self::model_dashboard_bulk_action_data::DashboardBulkActionData; +pub mod model_dashboard_resource_type; +pub use self::model_dashboard_resource_type::DashboardResourceType; +pub mod model_dashboard_summary; +pub use self::model_dashboard_summary::DashboardSummary; +pub mod model_dashboard_summary_definition; +pub use self::model_dashboard_summary_definition::DashboardSummaryDefinition; +pub mod model_dashboard_layout_type; +pub use self::model_dashboard_layout_type::DashboardLayoutType; +pub mod model_dashboard_restore_request; +pub use self::model_dashboard_restore_request::DashboardRestoreRequest; +pub mod model_dashboard; +pub use self::model_dashboard::Dashboard; +pub mod model_dashboard_reflow_type; +pub use self::model_dashboard_reflow_type::DashboardReflowType; +pub mod model_dashboard_template_variable_preset; +pub use self::model_dashboard_template_variable_preset::DashboardTemplateVariablePreset; +pub mod model_dashboard_template_variable_preset_value; +pub use self::model_dashboard_template_variable_preset_value::DashboardTemplateVariablePresetValue; +pub mod model_dashboard_template_variable; +pub use self::model_dashboard_template_variable::DashboardTemplateVariable; +pub mod model_widget; +pub use self::model_widget::Widget; +pub mod model_alert_graph_widget_definition; +pub use self::model_alert_graph_widget_definition::AlertGraphWidgetDefinition; +pub mod model_widget_time; +pub use self::model_widget_time::WidgetTime; +pub mod model_widget_live_span; +pub use self::model_widget_live_span::WidgetLiveSpan; +pub mod model_widget_text_align; +pub use self::model_widget_text_align::WidgetTextAlign; +pub mod model_alert_graph_widget_definition_type; +pub use self::model_alert_graph_widget_definition_type::AlertGraphWidgetDefinitionType; +pub mod model_widget_viz_type; +pub use self::model_widget_viz_type::WidgetVizType; +pub mod model_alert_value_widget_definition; +pub use self::model_alert_value_widget_definition::AlertValueWidgetDefinition; +pub mod model_alert_value_widget_definition_type; +pub use self::model_alert_value_widget_definition_type::AlertValueWidgetDefinitionType; +pub mod model_change_widget_definition; +pub use self::model_change_widget_definition::ChangeWidgetDefinition; +pub mod model_widget_custom_link; +pub use self::model_widget_custom_link::WidgetCustomLink; +pub mod model_change_widget_request; +pub use self::model_change_widget_request::ChangeWidgetRequest; +pub mod model_log_query_definition; +pub use self::model_log_query_definition::LogQueryDefinition; +pub mod model_logs_query_compute; +pub use self::model_logs_query_compute::LogsQueryCompute; +pub mod model_log_query_definition_group_by; +pub use self::model_log_query_definition_group_by::LogQueryDefinitionGroupBy; +pub mod model_log_query_definition_group_by_sort; +pub use self::model_log_query_definition_group_by_sort::LogQueryDefinitionGroupBySort; +pub mod model_widget_sort; +pub use self::model_widget_sort::WidgetSort; +pub mod model_log_query_definition_search; +pub use self::model_log_query_definition_search::LogQueryDefinitionSearch; +pub mod model_widget_change_type; +pub use self::model_widget_change_type::WidgetChangeType; +pub mod model_widget_compare_to; +pub use self::model_widget_compare_to::WidgetCompareTo; +pub mod model_widget_formula; +pub use self::model_widget_formula::WidgetFormula; +pub mod model_table_widget_cell_display_mode; +pub use self::model_table_widget_cell_display_mode::TableWidgetCellDisplayMode; +pub mod model_widget_conditional_format; +pub use self::model_widget_conditional_format::WidgetConditionalFormat; +pub mod model_widget_comparator; +pub use self::model_widget_comparator::WidgetComparator; +pub mod model_widget_palette; +pub use self::model_widget_palette::WidgetPalette; +pub mod model_widget_formula_limit; +pub use self::model_widget_formula_limit::WidgetFormulaLimit; +pub mod model_query_sort_order; +pub use self::model_query_sort_order::QuerySortOrder; +pub mod model_widget_formula_style; +pub use self::model_widget_formula_style::WidgetFormulaStyle; +pub mod model_widget_order_by; +pub use self::model_widget_order_by::WidgetOrderBy; +pub mod model_process_query_definition; +pub use self::model_process_query_definition::ProcessQueryDefinition; +pub mod model_formula_and_function_metric_query_definition; +pub use self::model_formula_and_function_metric_query_definition::FormulaAndFunctionMetricQueryDefinition; +pub mod model_formula_and_function_metric_aggregation; +pub use self::model_formula_and_function_metric_aggregation::FormulaAndFunctionMetricAggregation; +pub mod model_formula_and_function_metric_data_source; +pub use self::model_formula_and_function_metric_data_source::FormulaAndFunctionMetricDataSource; +pub mod model_formula_and_function_event_query_definition; +pub use self::model_formula_and_function_event_query_definition::FormulaAndFunctionEventQueryDefinition; +pub mod model_formula_and_function_event_query_definition_compute; +pub use self::model_formula_and_function_event_query_definition_compute::FormulaAndFunctionEventQueryDefinitionCompute; +pub mod model_formula_and_function_event_aggregation; +pub use self::model_formula_and_function_event_aggregation::FormulaAndFunctionEventAggregation; +pub mod model_formula_and_function_events_data_source; +pub use self::model_formula_and_function_events_data_source::FormulaAndFunctionEventsDataSource; +pub mod model_formula_and_function_event_query_group_by; +pub use self::model_formula_and_function_event_query_group_by::FormulaAndFunctionEventQueryGroupBy; +pub mod model_formula_and_function_event_query_group_by_sort; +pub use self::model_formula_and_function_event_query_group_by_sort::FormulaAndFunctionEventQueryGroupBySort; +pub mod model_formula_and_function_event_query_definition_search; +pub use self::model_formula_and_function_event_query_definition_search::FormulaAndFunctionEventQueryDefinitionSearch; +pub mod model_formula_and_function_process_query_definition; +pub use self::model_formula_and_function_process_query_definition::FormulaAndFunctionProcessQueryDefinition; +pub mod model_formula_and_function_process_query_data_source; +pub use self::model_formula_and_function_process_query_data_source::FormulaAndFunctionProcessQueryDataSource; +pub mod model_formula_and_function_apm_dependency_stats_query_definition; +pub use self::model_formula_and_function_apm_dependency_stats_query_definition::FormulaAndFunctionApmDependencyStatsQueryDefinition; +pub mod model_formula_and_function_apm_dependency_stats_data_source; +pub use self::model_formula_and_function_apm_dependency_stats_data_source::FormulaAndFunctionApmDependencyStatsDataSource; +pub mod model_formula_and_function_apm_dependency_stat_name; +pub use self::model_formula_and_function_apm_dependency_stat_name::FormulaAndFunctionApmDependencyStatName; +pub mod model_formula_and_function_apm_resource_stats_query_definition; +pub use self::model_formula_and_function_apm_resource_stats_query_definition::FormulaAndFunctionApmResourceStatsQueryDefinition; +pub mod model_formula_and_function_apm_resource_stats_data_source; +pub use self::model_formula_and_function_apm_resource_stats_data_source::FormulaAndFunctionApmResourceStatsDataSource; +pub mod model_formula_and_function_apm_resource_stat_name; +pub use self::model_formula_and_function_apm_resource_stat_name::FormulaAndFunctionApmResourceStatName; +pub mod model_formula_and_function_slo_query_definition; +pub use self::model_formula_and_function_slo_query_definition::FormulaAndFunctionSLOQueryDefinition; +pub mod model_formula_and_function_slo_data_source; +pub use self::model_formula_and_function_slo_data_source::FormulaAndFunctionSLODataSource; +pub mod model_formula_and_function_slo_group_mode; +pub use self::model_formula_and_function_slo_group_mode::FormulaAndFunctionSLOGroupMode; +pub mod model_formula_and_function_slo_measure; +pub use self::model_formula_and_function_slo_measure::FormulaAndFunctionSLOMeasure; +pub mod model_formula_and_function_slo_query_type; +pub use self::model_formula_and_function_slo_query_type::FormulaAndFunctionSLOQueryType; +pub mod model_formula_and_function_cloud_cost_query_definition; +pub use self::model_formula_and_function_cloud_cost_query_definition::FormulaAndFunctionCloudCostQueryDefinition; +pub mod model_widget_aggregator; +pub use self::model_widget_aggregator::WidgetAggregator; +pub mod model_formula_and_function_cloud_cost_data_source; +pub use self::model_formula_and_function_cloud_cost_data_source::FormulaAndFunctionCloudCostDataSource; +pub mod model_formula_and_function_query_definition; +pub use self::model_formula_and_function_query_definition::FormulaAndFunctionQueryDefinition; +pub mod model_formula_and_function_response_format; +pub use self::model_formula_and_function_response_format::FormulaAndFunctionResponseFormat; +pub mod model_change_widget_definition_type; +pub use self::model_change_widget_definition_type::ChangeWidgetDefinitionType; +pub mod model_check_status_widget_definition; +pub use self::model_check_status_widget_definition::CheckStatusWidgetDefinition; +pub mod model_widget_grouping; +pub use self::model_widget_grouping::WidgetGrouping; +pub mod model_check_status_widget_definition_type; +pub use self::model_check_status_widget_definition_type::CheckStatusWidgetDefinitionType; +pub mod model_distribution_widget_definition; +pub use self::model_distribution_widget_definition::DistributionWidgetDefinition; +pub mod model_widget_marker; +pub use self::model_widget_marker::WidgetMarker; +pub mod model_distribution_widget_request; +pub use self::model_distribution_widget_request::DistributionWidgetRequest; +pub mod model_apm_stats_query_definition; +pub use self::model_apm_stats_query_definition::ApmStatsQueryDefinition; +pub mod model_apm_stats_query_column_type; +pub use self::model_apm_stats_query_column_type::ApmStatsQueryColumnType; +pub mod model_apm_stats_query_row_type; +pub use self::model_apm_stats_query_row_type::ApmStatsQueryRowType; +pub mod model_distribution_widget_histogram_request_query; +pub use self::model_distribution_widget_histogram_request_query::DistributionWidgetHistogramRequestQuery; +pub mod model_distribution_widget_histogram_request_type; +pub use self::model_distribution_widget_histogram_request_type::DistributionWidgetHistogramRequestType; +pub mod model_widget_style; +pub use self::model_widget_style::WidgetStyle; +pub mod model_distribution_widget_definition_type; +pub use self::model_distribution_widget_definition_type::DistributionWidgetDefinitionType; +pub mod model_distribution_widget_x_axis; +pub use self::model_distribution_widget_x_axis::DistributionWidgetXAxis; +pub mod model_distribution_widget_y_axis; +pub use self::model_distribution_widget_y_axis::DistributionWidgetYAxis; +pub mod model_event_stream_widget_definition; +pub use self::model_event_stream_widget_definition::EventStreamWidgetDefinition; +pub mod model_widget_event_size; +pub use self::model_widget_event_size::WidgetEventSize; +pub mod model_event_stream_widget_definition_type; +pub use self::model_event_stream_widget_definition_type::EventStreamWidgetDefinitionType; +pub mod model_event_timeline_widget_definition; +pub use self::model_event_timeline_widget_definition::EventTimelineWidgetDefinition; +pub mod model_event_timeline_widget_definition_type; +pub use self::model_event_timeline_widget_definition_type::EventTimelineWidgetDefinitionType; +pub mod model_free_text_widget_definition; +pub use self::model_free_text_widget_definition::FreeTextWidgetDefinition; +pub mod model_free_text_widget_definition_type; +pub use self::model_free_text_widget_definition_type::FreeTextWidgetDefinitionType; +pub mod model_funnel_widget_definition; +pub use self::model_funnel_widget_definition::FunnelWidgetDefinition; +pub mod model_funnel_widget_request; +pub use self::model_funnel_widget_request::FunnelWidgetRequest; +pub mod model_funnel_query; +pub use self::model_funnel_query::FunnelQuery; +pub mod model_funnel_source; +pub use self::model_funnel_source::FunnelSource; +pub mod model_funnel_step; +pub use self::model_funnel_step::FunnelStep; +pub mod model_funnel_request_type; +pub use self::model_funnel_request_type::FunnelRequestType; +pub mod model_funnel_widget_definition_type; +pub use self::model_funnel_widget_definition_type::FunnelWidgetDefinitionType; +pub mod model_geomap_widget_definition; +pub use self::model_geomap_widget_definition::GeomapWidgetDefinition; +pub mod model_geomap_widget_request; +pub use self::model_geomap_widget_request::GeomapWidgetRequest; +pub mod model_list_stream_column; +pub use self::model_list_stream_column::ListStreamColumn; +pub mod model_list_stream_column_width; +pub use self::model_list_stream_column_width::ListStreamColumnWidth; +pub mod model_list_stream_query; +pub use self::model_list_stream_query::ListStreamQuery; +pub mod model_list_stream_compute_items; +pub use self::model_list_stream_compute_items::ListStreamComputeItems; +pub mod model_list_stream_compute_aggregation; +pub use self::model_list_stream_compute_aggregation::ListStreamComputeAggregation; +pub mod model_list_stream_source; +pub use self::model_list_stream_source::ListStreamSource; +pub mod model_list_stream_group_by_items; +pub use self::model_list_stream_group_by_items::ListStreamGroupByItems; +pub mod model_widget_field_sort; +pub use self::model_widget_field_sort::WidgetFieldSort; +pub mod model_geomap_widget_definition_style; +pub use self::model_geomap_widget_definition_style::GeomapWidgetDefinitionStyle; +pub mod model_geomap_widget_definition_type; +pub use self::model_geomap_widget_definition_type::GeomapWidgetDefinitionType; +pub mod model_geomap_widget_definition_view; +pub use self::model_geomap_widget_definition_view::GeomapWidgetDefinitionView; +pub mod model_group_widget_definition; +pub use self::model_group_widget_definition::GroupWidgetDefinition; +pub mod model_widget_layout_type; +pub use self::model_widget_layout_type::WidgetLayoutType; +pub mod model_group_widget_definition_type; +pub use self::model_group_widget_definition_type::GroupWidgetDefinitionType; +pub mod model_heat_map_widget_definition; +pub use self::model_heat_map_widget_definition::HeatMapWidgetDefinition; +pub mod model_widget_event; +pub use self::model_widget_event::WidgetEvent; +pub mod model_heat_map_widget_request; +pub use self::model_heat_map_widget_request::HeatMapWidgetRequest; +pub mod model_event_query_definition; +pub use self::model_event_query_definition::EventQueryDefinition; +pub mod model_heat_map_widget_definition_type; +pub use self::model_heat_map_widget_definition_type::HeatMapWidgetDefinitionType; +pub mod model_widget_axis; +pub use self::model_widget_axis::WidgetAxis; +pub mod model_host_map_widget_definition; +pub use self::model_host_map_widget_definition::HostMapWidgetDefinition; +pub mod model_widget_node_type; +pub use self::model_widget_node_type::WidgetNodeType; +pub mod model_host_map_widget_definition_requests; +pub use self::model_host_map_widget_definition_requests::HostMapWidgetDefinitionRequests; +pub mod model_host_map_request; +pub use self::model_host_map_request::HostMapRequest; +pub mod model_host_map_widget_definition_style; +pub use self::model_host_map_widget_definition_style::HostMapWidgetDefinitionStyle; +pub mod model_host_map_widget_definition_type; +pub use self::model_host_map_widget_definition_type::HostMapWidgetDefinitionType; +pub mod model_i_frame_widget_definition; +pub use self::model_i_frame_widget_definition::IFrameWidgetDefinition; +pub mod model_i_frame_widget_definition_type; +pub use self::model_i_frame_widget_definition_type::IFrameWidgetDefinitionType; +pub mod model_image_widget_definition; +pub use self::model_image_widget_definition::ImageWidgetDefinition; +pub mod model_widget_horizontal_align; +pub use self::model_widget_horizontal_align::WidgetHorizontalAlign; +pub mod model_widget_margin; +pub use self::model_widget_margin::WidgetMargin; +pub mod model_widget_image_sizing; +pub use self::model_widget_image_sizing::WidgetImageSizing; +pub mod model_image_widget_definition_type; +pub use self::model_image_widget_definition_type::ImageWidgetDefinitionType; +pub mod model_widget_vertical_align; +pub use self::model_widget_vertical_align::WidgetVerticalAlign; +pub mod model_list_stream_widget_definition; +pub use self::model_list_stream_widget_definition::ListStreamWidgetDefinition; +pub mod model_list_stream_widget_request; +pub use self::model_list_stream_widget_request::ListStreamWidgetRequest; +pub mod model_list_stream_response_format; +pub use self::model_list_stream_response_format::ListStreamResponseFormat; +pub mod model_list_stream_widget_definition_type; +pub use self::model_list_stream_widget_definition_type::ListStreamWidgetDefinitionType; +pub mod model_log_stream_widget_definition; +pub use self::model_log_stream_widget_definition::LogStreamWidgetDefinition; +pub mod model_widget_message_display; +pub use self::model_widget_message_display::WidgetMessageDisplay; +pub mod model_log_stream_widget_definition_type; +pub use self::model_log_stream_widget_definition_type::LogStreamWidgetDefinitionType; +pub mod model_monitor_summary_widget_definition; +pub use self::model_monitor_summary_widget_definition::MonitorSummaryWidgetDefinition; +pub mod model_widget_color_preference; +pub use self::model_widget_color_preference::WidgetColorPreference; +pub mod model_widget_monitor_summary_display_format; +pub use self::model_widget_monitor_summary_display_format::WidgetMonitorSummaryDisplayFormat; +pub mod model_widget_monitor_summary_sort; +pub use self::model_widget_monitor_summary_sort::WidgetMonitorSummarySort; +pub mod model_widget_summary_type; +pub use self::model_widget_summary_type::WidgetSummaryType; +pub mod model_monitor_summary_widget_definition_type; +pub use self::model_monitor_summary_widget_definition_type::MonitorSummaryWidgetDefinitionType; +pub mod model_note_widget_definition; +pub use self::model_note_widget_definition::NoteWidgetDefinition; +pub mod model_widget_tick_edge; +pub use self::model_widget_tick_edge::WidgetTickEdge; +pub mod model_note_widget_definition_type; +pub use self::model_note_widget_definition_type::NoteWidgetDefinitionType; +pub mod model_powerpack_widget_definition; +pub use self::model_powerpack_widget_definition::PowerpackWidgetDefinition; +pub mod model_powerpack_template_variables; +pub use self::model_powerpack_template_variables::PowerpackTemplateVariables; +pub mod model_powerpack_template_variable_contents; +pub use self::model_powerpack_template_variable_contents::PowerpackTemplateVariableContents; +pub mod model_powerpack_widget_definition_type; +pub use self::model_powerpack_widget_definition_type::PowerpackWidgetDefinitionType; +pub mod model_query_value_widget_definition; +pub use self::model_query_value_widget_definition::QueryValueWidgetDefinition; +pub mod model_query_value_widget_request; +pub use self::model_query_value_widget_request::QueryValueWidgetRequest; +pub mod model_timeseries_background; +pub use self::model_timeseries_background::TimeseriesBackground; +pub mod model_timeseries_background_type; +pub use self::model_timeseries_background_type::TimeseriesBackgroundType; +pub mod model_query_value_widget_definition_type; +pub use self::model_query_value_widget_definition_type::QueryValueWidgetDefinitionType; +pub mod model_run_workflow_widget_definition; +pub use self::model_run_workflow_widget_definition::RunWorkflowWidgetDefinition; +pub mod model_run_workflow_widget_input; +pub use self::model_run_workflow_widget_input::RunWorkflowWidgetInput; +pub mod model_run_workflow_widget_definition_type; +pub use self::model_run_workflow_widget_definition_type::RunWorkflowWidgetDefinitionType; +pub mod model_slo_list_widget_definition; +pub use self::model_slo_list_widget_definition::SLOListWidgetDefinition; +pub mod model_slo_list_widget_request; +pub use self::model_slo_list_widget_request::SLOListWidgetRequest; +pub mod model_slo_list_widget_query; +pub use self::model_slo_list_widget_query::SLOListWidgetQuery; +pub mod model_slo_list_widget_request_type; +pub use self::model_slo_list_widget_request_type::SLOListWidgetRequestType; +pub mod model_slo_list_widget_definition_type; +pub use self::model_slo_list_widget_definition_type::SLOListWidgetDefinitionType; +pub mod model_slo_widget_definition; +pub use self::model_slo_widget_definition::SLOWidgetDefinition; +pub mod model_widget_time_windows; +pub use self::model_widget_time_windows::WidgetTimeWindows; +pub mod model_slo_widget_definition_type; +pub use self::model_slo_widget_definition_type::SLOWidgetDefinitionType; +pub mod model_widget_view_mode; +pub use self::model_widget_view_mode::WidgetViewMode; +pub mod model_scatter_plot_widget_definition; +pub use self::model_scatter_plot_widget_definition::ScatterPlotWidgetDefinition; +pub mod model_scatter_plot_widget_definition_requests; +pub use self::model_scatter_plot_widget_definition_requests::ScatterPlotWidgetDefinitionRequests; +pub mod model_scatterplot_table_request; +pub use self::model_scatterplot_table_request::ScatterplotTableRequest; +pub mod model_scatterplot_widget_formula; +pub use self::model_scatterplot_widget_formula::ScatterplotWidgetFormula; +pub mod model_scatterplot_dimension; +pub use self::model_scatterplot_dimension::ScatterplotDimension; +pub mod model_scatter_plot_request; +pub use self::model_scatter_plot_request::ScatterPlotRequest; +pub mod model_scatterplot_widget_aggregator; +pub use self::model_scatterplot_widget_aggregator::ScatterplotWidgetAggregator; +pub mod model_scatter_plot_widget_definition_type; +pub use self::model_scatter_plot_widget_definition_type::ScatterPlotWidgetDefinitionType; +pub mod model_service_map_widget_definition; +pub use self::model_service_map_widget_definition::ServiceMapWidgetDefinition; +pub mod model_service_map_widget_definition_type; +pub use self::model_service_map_widget_definition_type::ServiceMapWidgetDefinitionType; +pub mod model_service_summary_widget_definition; +pub use self::model_service_summary_widget_definition::ServiceSummaryWidgetDefinition; +pub mod model_widget_service_summary_display_format; +pub use self::model_widget_service_summary_display_format::WidgetServiceSummaryDisplayFormat; +pub mod model_widget_size_format; +pub use self::model_widget_size_format::WidgetSizeFormat; +pub mod model_service_summary_widget_definition_type; +pub use self::model_service_summary_widget_definition_type::ServiceSummaryWidgetDefinitionType; +pub mod model_split_graph_widget_definition; +pub use self::model_split_graph_widget_definition::SplitGraphWidgetDefinition; +pub mod model_split_graph_viz_size; +pub use self::model_split_graph_viz_size::SplitGraphVizSize; +pub mod model_sunburst_widget_definition; +pub use self::model_sunburst_widget_definition::SunburstWidgetDefinition; +pub mod model_sunburst_widget_legend_table; +pub use self::model_sunburst_widget_legend_table::SunburstWidgetLegendTable; +pub mod model_sunburst_widget_legend_table_type; +pub use self::model_sunburst_widget_legend_table_type::SunburstWidgetLegendTableType; +pub mod model_sunburst_widget_legend_inline_automatic; +pub use self::model_sunburst_widget_legend_inline_automatic::SunburstWidgetLegendInlineAutomatic; +pub mod model_sunburst_widget_legend_inline_automatic_type; +pub use self::model_sunburst_widget_legend_inline_automatic_type::SunburstWidgetLegendInlineAutomaticType; +pub mod model_sunburst_widget_legend; +pub use self::model_sunburst_widget_legend::SunburstWidgetLegend; +pub mod model_sunburst_widget_request; +pub use self::model_sunburst_widget_request::SunburstWidgetRequest; +pub mod model_sunburst_widget_definition_type; +pub use self::model_sunburst_widget_definition_type::SunburstWidgetDefinitionType; +pub mod model_table_widget_definition; +pub use self::model_table_widget_definition::TableWidgetDefinition; +pub mod model_table_widget_has_search_bar; +pub use self::model_table_widget_has_search_bar::TableWidgetHasSearchBar; +pub mod model_table_widget_request; +pub use self::model_table_widget_request::TableWidgetRequest; +pub mod model_table_widget_definition_type; +pub use self::model_table_widget_definition_type::TableWidgetDefinitionType; +pub mod model_timeseries_widget_definition; +pub use self::model_timeseries_widget_definition::TimeseriesWidgetDefinition; +pub mod model_timeseries_widget_legend_column; +pub use self::model_timeseries_widget_legend_column::TimeseriesWidgetLegendColumn; +pub mod model_timeseries_widget_legend_layout; +pub use self::model_timeseries_widget_legend_layout::TimeseriesWidgetLegendLayout; +pub mod model_timeseries_widget_request; +pub use self::model_timeseries_widget_request::TimeseriesWidgetRequest; +pub mod model_widget_display_type; +pub use self::model_widget_display_type::WidgetDisplayType; +pub mod model_timeseries_widget_expression_alias; +pub use self::model_timeseries_widget_expression_alias::TimeseriesWidgetExpressionAlias; +pub mod model_widget_request_style; +pub use self::model_widget_request_style::WidgetRequestStyle; +pub mod model_widget_line_type; +pub use self::model_widget_line_type::WidgetLineType; +pub mod model_widget_line_width; +pub use self::model_widget_line_width::WidgetLineWidth; +pub mod model_timeseries_widget_definition_type; +pub use self::model_timeseries_widget_definition_type::TimeseriesWidgetDefinitionType; +pub mod model_toplist_widget_definition; +pub use self::model_toplist_widget_definition::ToplistWidgetDefinition; +pub mod model_toplist_widget_request; +pub use self::model_toplist_widget_request::ToplistWidgetRequest; +pub mod model_toplist_widget_style; +pub use self::model_toplist_widget_style::ToplistWidgetStyle; +pub mod model_toplist_widget_stacked; +pub use self::model_toplist_widget_stacked::ToplistWidgetStacked; +pub mod model_toplist_widget_legend; +pub use self::model_toplist_widget_legend::ToplistWidgetLegend; +pub mod model_toplist_widget_stacked_type; +pub use self::model_toplist_widget_stacked_type::ToplistWidgetStackedType; +pub mod model_toplist_widget_flat; +pub use self::model_toplist_widget_flat::ToplistWidgetFlat; +pub mod model_toplist_widget_flat_type; +pub use self::model_toplist_widget_flat_type::ToplistWidgetFlatType; +pub mod model_toplist_widget_display; +pub use self::model_toplist_widget_display::ToplistWidgetDisplay; +pub mod model_toplist_widget_scaling; +pub use self::model_toplist_widget_scaling::ToplistWidgetScaling; +pub mod model_toplist_widget_definition_type; +pub use self::model_toplist_widget_definition_type::ToplistWidgetDefinitionType; +pub mod model_tree_map_widget_definition; +pub use self::model_tree_map_widget_definition::TreeMapWidgetDefinition; +pub mod model_tree_map_color_by; +pub use self::model_tree_map_color_by::TreeMapColorBy; +pub mod model_tree_map_group_by; +pub use self::model_tree_map_group_by::TreeMapGroupBy; +pub mod model_tree_map_widget_request; +pub use self::model_tree_map_widget_request::TreeMapWidgetRequest; +pub mod model_tree_map_size_by; +pub use self::model_tree_map_size_by::TreeMapSizeBy; +pub mod model_tree_map_widget_definition_type; +pub use self::model_tree_map_widget_definition_type::TreeMapWidgetDefinitionType; +pub mod model_split_graph_source_widget_definition; +pub use self::model_split_graph_source_widget_definition::SplitGraphSourceWidgetDefinition; +pub mod model_split_config; +pub use self::model_split_config::SplitConfig; +pub mod model_split_sort; +pub use self::model_split_sort::SplitSort; +pub mod model_split_config_sort_compute; +pub use self::model_split_config_sort_compute::SplitConfigSortCompute; +pub mod model_split_dimension; +pub use self::model_split_dimension::SplitDimension; +pub mod model_split_vector_entry_item; +pub use self::model_split_vector_entry_item::SplitVectorEntryItem; +pub mod model_split_graph_widget_definition_type; +pub use self::model_split_graph_widget_definition_type::SplitGraphWidgetDefinitionType; +pub mod model_topology_map_widget_definition; +pub use self::model_topology_map_widget_definition::TopologyMapWidgetDefinition; +pub mod model_topology_request; +pub use self::model_topology_request::TopologyRequest; +pub mod model_topology_query; +pub use self::model_topology_query::TopologyQuery; +pub mod model_topology_query_data_source; +pub use self::model_topology_query_data_source::TopologyQueryDataSource; +pub mod model_topology_request_type; +pub use self::model_topology_request_type::TopologyRequestType; +pub mod model_topology_map_widget_definition_type; +pub use self::model_topology_map_widget_definition_type::TopologyMapWidgetDefinitionType; +pub mod model_widget_definition; +pub use self::model_widget_definition::WidgetDefinition; +pub mod model_widget_layout; +pub use self::model_widget_layout::WidgetLayout; pub mod model_dashboard_list_list_response; pub use self::model_dashboard_list_list_response::DashboardListListResponse; pub mod model_dashboard_list; @@ -80,6 +566,52 @@ pub mod model_creator; pub use self::model_creator::Creator; pub mod model_dashboard_list_delete_response; pub use self::model_dashboard_list_delete_response::DashboardListDeleteResponse; +pub mod model_shared_dashboard; +pub use self::model_shared_dashboard::SharedDashboard; +pub mod model_shared_dashboard_author; +pub use self::model_shared_dashboard_author::SharedDashboardAuthor; +pub mod model_dashboard_type; +pub use self::model_dashboard_type::DashboardType; +pub mod model_dashboard_global_time; +pub use self::model_dashboard_global_time::DashboardGlobalTime; +pub mod model_dashboard_global_time_live_span; +pub use self::model_dashboard_global_time_live_span::DashboardGlobalTimeLiveSpan; +pub mod model_selectable_template_variable_items; +pub use self::model_selectable_template_variable_items::SelectableTemplateVariableItems; +pub mod model_dashboard_share_type; +pub use self::model_dashboard_share_type::DashboardShareType; +pub mod model_delete_shared_dashboard_response; +pub use self::model_delete_shared_dashboard_response::DeleteSharedDashboardResponse; +pub mod model_shared_dashboard_update_request; +pub use self::model_shared_dashboard_update_request::SharedDashboardUpdateRequest; +pub mod model_shared_dashboard_update_request_global_time; +pub use self::model_shared_dashboard_update_request_global_time::SharedDashboardUpdateRequestGlobalTime; +pub mod model_shared_dashboard_invites; +pub use self::model_shared_dashboard_invites::SharedDashboardInvites; +pub mod model_shared_dashboard_invites_data_object; +pub use self::model_shared_dashboard_invites_data_object::SharedDashboardInvitesDataObject; +pub mod model_shared_dashboard_invites_data_object_attributes; +pub use self::model_shared_dashboard_invites_data_object_attributes::SharedDashboardInvitesDataObjectAttributes; +pub mod model_dashboard_invite_type; +pub use self::model_dashboard_invite_type::DashboardInviteType; +pub mod model_shared_dashboard_invites_data; +pub use self::model_shared_dashboard_invites_data::SharedDashboardInvitesData; +pub mod model_shared_dashboard_invites_meta; +pub use self::model_shared_dashboard_invites_meta::SharedDashboardInvitesMeta; +pub mod model_shared_dashboard_invites_meta_page; +pub use self::model_shared_dashboard_invites_meta_page::SharedDashboardInvitesMetaPage; +pub mod model_dashboard_delete_response; +pub use self::model_dashboard_delete_response::DashboardDeleteResponse; +pub mod model_distribution_points_content_encoding; +pub use self::model_distribution_points_content_encoding::DistributionPointsContentEncoding; +pub mod model_distribution_points_payload; +pub use self::model_distribution_points_payload::DistributionPointsPayload; +pub mod model_distribution_points_series; +pub use self::model_distribution_points_series::DistributionPointsSeries; +pub mod model_distribution_point_item; +pub use self::model_distribution_point_item::DistributionPointItem; +pub mod model_distribution_points_type; +pub use self::model_distribution_points_type::DistributionPointsType; pub mod model_downtime; pub use self::model_downtime::Downtime; pub mod model_downtime_child; @@ -232,10 +764,244 @@ pub mod model_logs_filter; pub use self::model_logs_filter::LogsFilter; pub mod model_logs_index_update_request; pub use self::model_logs_index_update_request::LogsIndexUpdateRequest; +pub mod model_logs_pipelines_order; +pub use self::model_logs_pipelines_order::LogsPipelinesOrder; +pub mod model_logs_pipeline; +pub use self::model_logs_pipeline::LogsPipeline; +pub mod model_logs_grok_parser; +pub use self::model_logs_grok_parser::LogsGrokParser; +pub mod model_logs_grok_parser_rules; +pub use self::model_logs_grok_parser_rules::LogsGrokParserRules; +pub mod model_logs_grok_parser_type; +pub use self::model_logs_grok_parser_type::LogsGrokParserType; +pub mod model_logs_date_remapper; +pub use self::model_logs_date_remapper::LogsDateRemapper; +pub mod model_logs_date_remapper_type; +pub use self::model_logs_date_remapper_type::LogsDateRemapperType; +pub mod model_logs_status_remapper; +pub use self::model_logs_status_remapper::LogsStatusRemapper; +pub mod model_logs_status_remapper_type; +pub use self::model_logs_status_remapper_type::LogsStatusRemapperType; +pub mod model_logs_service_remapper; +pub use self::model_logs_service_remapper::LogsServiceRemapper; +pub mod model_logs_service_remapper_type; +pub use self::model_logs_service_remapper_type::LogsServiceRemapperType; +pub mod model_logs_message_remapper; +pub use self::model_logs_message_remapper::LogsMessageRemapper; +pub mod model_logs_message_remapper_type; +pub use self::model_logs_message_remapper_type::LogsMessageRemapperType; +pub mod model_logs_attribute_remapper; +pub use self::model_logs_attribute_remapper::LogsAttributeRemapper; +pub mod model_target_format_type; +pub use self::model_target_format_type::TargetFormatType; +pub mod model_logs_attribute_remapper_type; +pub use self::model_logs_attribute_remapper_type::LogsAttributeRemapperType; +pub mod model_logs_url_parser; +pub use self::model_logs_url_parser::LogsURLParser; +pub mod model_logs_url_parser_type; +pub use self::model_logs_url_parser_type::LogsURLParserType; +pub mod model_logs_user_agent_parser; +pub use self::model_logs_user_agent_parser::LogsUserAgentParser; +pub mod model_logs_user_agent_parser_type; +pub use self::model_logs_user_agent_parser_type::LogsUserAgentParserType; +pub mod model_logs_category_processor; +pub use self::model_logs_category_processor::LogsCategoryProcessor; +pub mod model_logs_category_processor_category; +pub use self::model_logs_category_processor_category::LogsCategoryProcessorCategory; +pub mod model_logs_category_processor_type; +pub use self::model_logs_category_processor_type::LogsCategoryProcessorType; +pub mod model_logs_arithmetic_processor; +pub use self::model_logs_arithmetic_processor::LogsArithmeticProcessor; +pub mod model_logs_arithmetic_processor_type; +pub use self::model_logs_arithmetic_processor_type::LogsArithmeticProcessorType; +pub mod model_logs_string_builder_processor; +pub use self::model_logs_string_builder_processor::LogsStringBuilderProcessor; +pub mod model_logs_string_builder_processor_type; +pub use self::model_logs_string_builder_processor_type::LogsStringBuilderProcessorType; +pub mod model_logs_pipeline_processor; +pub use self::model_logs_pipeline_processor::LogsPipelineProcessor; +pub mod model_logs_geo_ip_parser; +pub use self::model_logs_geo_ip_parser::LogsGeoIPParser; +pub mod model_logs_geo_ip_parser_type; +pub use self::model_logs_geo_ip_parser_type::LogsGeoIPParserType; +pub mod model_logs_lookup_processor; +pub use self::model_logs_lookup_processor::LogsLookupProcessor; +pub mod model_logs_lookup_processor_type; +pub use self::model_logs_lookup_processor_type::LogsLookupProcessorType; +pub mod model_reference_table_logs_lookup_processor; +pub use self::model_reference_table_logs_lookup_processor::ReferenceTableLogsLookupProcessor; +pub mod model_logs_trace_remapper; +pub use self::model_logs_trace_remapper::LogsTraceRemapper; +pub mod model_logs_trace_remapper_type; +pub use self::model_logs_trace_remapper_type::LogsTraceRemapperType; +pub mod model_logs_processor; +pub use self::model_logs_processor::LogsProcessor; +pub mod model_logs_pipeline_processor_type; +pub use self::model_logs_pipeline_processor_type::LogsPipelineProcessorType; pub mod model_metrics_list_response; pub use self::model_metrics_list_response::MetricsListResponse; pub mod model_metric_metadata; pub use self::model_metric_metadata::MetricMetadata; +pub mod model_monitor; +pub use self::model_monitor::Monitor; +pub mod model_matching_downtime; +pub use self::model_matching_downtime::MatchingDowntime; +pub mod model_monitor_options; +pub use self::model_monitor_options::MonitorOptions; +pub mod model_monitor_options_aggregation; +pub use self::model_monitor_options_aggregation::MonitorOptionsAggregation; +pub mod model_monitor_device_id; +pub use self::model_monitor_device_id::MonitorDeviceID; +pub mod model_monitor_options_notification_presets; +pub use self::model_monitor_options_notification_presets::MonitorOptionsNotificationPresets; +pub mod model_on_missing_data_option; +pub use self::model_on_missing_data_option::OnMissingDataOption; +pub mod model_monitor_renotify_status_type; +pub use self::model_monitor_renotify_status_type::MonitorRenotifyStatusType; +pub mod model_monitor_options_scheduling_options; +pub use self::model_monitor_options_scheduling_options::MonitorOptionsSchedulingOptions; +pub mod model_monitor_options_custom_schedule; +pub use self::model_monitor_options_custom_schedule::MonitorOptionsCustomSchedule; +pub mod model_monitor_options_custom_schedule_recurrence; +pub use self::model_monitor_options_custom_schedule_recurrence::MonitorOptionsCustomScheduleRecurrence; +pub mod model_monitor_options_scheduling_options_evaluation_window; +pub use self::model_monitor_options_scheduling_options_evaluation_window::MonitorOptionsSchedulingOptionsEvaluationWindow; +pub mod model_monitor_threshold_window_options; +pub use self::model_monitor_threshold_window_options::MonitorThresholdWindowOptions; +pub mod model_monitor_thresholds; +pub use self::model_monitor_thresholds::MonitorThresholds; +pub mod model_monitor_formula_and_function_event_query_definition; +pub use self::model_monitor_formula_and_function_event_query_definition::MonitorFormulaAndFunctionEventQueryDefinition; +pub mod model_monitor_formula_and_function_event_query_definition_compute; +pub use self::model_monitor_formula_and_function_event_query_definition_compute::MonitorFormulaAndFunctionEventQueryDefinitionCompute; +pub mod model_monitor_formula_and_function_event_aggregation; +pub use self::model_monitor_formula_and_function_event_aggregation::MonitorFormulaAndFunctionEventAggregation; +pub mod model_monitor_formula_and_function_events_data_source; +pub use self::model_monitor_formula_and_function_events_data_source::MonitorFormulaAndFunctionEventsDataSource; +pub mod model_monitor_formula_and_function_event_query_group_by; +pub use self::model_monitor_formula_and_function_event_query_group_by::MonitorFormulaAndFunctionEventQueryGroupBy; +pub mod model_monitor_formula_and_function_event_query_group_by_sort; +pub use self::model_monitor_formula_and_function_event_query_group_by_sort::MonitorFormulaAndFunctionEventQueryGroupBySort; +pub mod model_monitor_formula_and_function_event_query_definition_search; +pub use self::model_monitor_formula_and_function_event_query_definition_search::MonitorFormulaAndFunctionEventQueryDefinitionSearch; +pub mod model_monitor_formula_and_function_query_definition; +pub use self::model_monitor_formula_and_function_query_definition::MonitorFormulaAndFunctionQueryDefinition; +pub mod model_monitor_overall_states; +pub use self::model_monitor_overall_states::MonitorOverallStates; +pub mod model_monitor_state; +pub use self::model_monitor_state::MonitorState; +pub mod model_monitor_state_group; +pub use self::model_monitor_state_group::MonitorStateGroup; +pub mod model_monitor_type; +pub use self::model_monitor_type::MonitorType; +pub mod model_check_can_delete_monitor_response; +pub use self::model_check_can_delete_monitor_response::CheckCanDeleteMonitorResponse; +pub mod model_check_can_delete_monitor_response_data; +pub use self::model_check_can_delete_monitor_response_data::CheckCanDeleteMonitorResponseData; +pub mod model_monitor_group_search_response; +pub use self::model_monitor_group_search_response::MonitorGroupSearchResponse; +pub mod model_monitor_group_search_response_counts; +pub use self::model_monitor_group_search_response_counts::MonitorGroupSearchResponseCounts; +pub mod model_monitor_search_count_item; +pub use self::model_monitor_search_count_item::MonitorSearchCountItem; +pub mod model_monitor_group_search_result; +pub use self::model_monitor_group_search_result::MonitorGroupSearchResult; +pub mod model_monitor_search_response_metadata; +pub use self::model_monitor_search_response_metadata::MonitorSearchResponseMetadata; +pub mod model_monitor_search_response; +pub use self::model_monitor_search_response::MonitorSearchResponse; +pub mod model_monitor_search_response_counts; +pub use self::model_monitor_search_response_counts::MonitorSearchResponseCounts; +pub mod model_monitor_search_result; +pub use self::model_monitor_search_result::MonitorSearchResult; +pub mod model_monitor_search_result_notification; +pub use self::model_monitor_search_result_notification::MonitorSearchResultNotification; +pub mod model_deleted_monitor; +pub use self::model_deleted_monitor::DeletedMonitor; +pub mod model_monitor_update_request; +pub use self::model_monitor_update_request::MonitorUpdateRequest; +pub mod model_notebooks_response; +pub use self::model_notebooks_response::NotebooksResponse; +pub mod model_notebooks_response_data; +pub use self::model_notebooks_response_data::NotebooksResponseData; +pub mod model_notebooks_response_data_attributes; +pub use self::model_notebooks_response_data_attributes::NotebooksResponseDataAttributes; +pub mod model_notebook_author; +pub use self::model_notebook_author::NotebookAuthor; +pub mod model_notebook_cell_response; +pub use self::model_notebook_cell_response::NotebookCellResponse; +pub mod model_notebook_markdown_cell_attributes; +pub use self::model_notebook_markdown_cell_attributes::NotebookMarkdownCellAttributes; +pub mod model_notebook_markdown_cell_definition; +pub use self::model_notebook_markdown_cell_definition::NotebookMarkdownCellDefinition; +pub mod model_notebook_markdown_cell_definition_type; +pub use self::model_notebook_markdown_cell_definition_type::NotebookMarkdownCellDefinitionType; +pub mod model_notebook_timeseries_cell_attributes; +pub use self::model_notebook_timeseries_cell_attributes::NotebookTimeseriesCellAttributes; +pub mod model_notebook_graph_size; +pub use self::model_notebook_graph_size::NotebookGraphSize; +pub mod model_notebook_split_by; +pub use self::model_notebook_split_by::NotebookSplitBy; +pub mod model_notebook_relative_time; +pub use self::model_notebook_relative_time::NotebookRelativeTime; +pub mod model_notebook_absolute_time; +pub use self::model_notebook_absolute_time::NotebookAbsoluteTime; +pub mod model_notebook_cell_time; +pub use self::model_notebook_cell_time::NotebookCellTime; +pub mod model_notebook_toplist_cell_attributes; +pub use self::model_notebook_toplist_cell_attributes::NotebookToplistCellAttributes; +pub mod model_notebook_heat_map_cell_attributes; +pub use self::model_notebook_heat_map_cell_attributes::NotebookHeatMapCellAttributes; +pub mod model_notebook_distribution_cell_attributes; +pub use self::model_notebook_distribution_cell_attributes::NotebookDistributionCellAttributes; +pub mod model_notebook_log_stream_cell_attributes; +pub use self::model_notebook_log_stream_cell_attributes::NotebookLogStreamCellAttributes; +pub mod model_notebook_cell_response_attributes; +pub use self::model_notebook_cell_response_attributes::NotebookCellResponseAttributes; +pub mod model_notebook_cell_resource_type; +pub use self::model_notebook_cell_resource_type::NotebookCellResourceType; +pub mod model_notebook_metadata; +pub use self::model_notebook_metadata::NotebookMetadata; +pub mod model_notebook_metadata_type; +pub use self::model_notebook_metadata_type::NotebookMetadataType; +pub mod model_notebook_status; +pub use self::model_notebook_status::NotebookStatus; +pub mod model_notebook_global_time; +pub use self::model_notebook_global_time::NotebookGlobalTime; +pub mod model_notebook_resource_type; +pub use self::model_notebook_resource_type::NotebookResourceType; +pub mod model_notebooks_response_meta; +pub use self::model_notebooks_response_meta::NotebooksResponseMeta; +pub mod model_notebooks_response_page; +pub use self::model_notebooks_response_page::NotebooksResponsePage; +pub mod model_notebook_create_request; +pub use self::model_notebook_create_request::NotebookCreateRequest; +pub mod model_notebook_create_data; +pub use self::model_notebook_create_data::NotebookCreateData; +pub mod model_notebook_create_data_attributes; +pub use self::model_notebook_create_data_attributes::NotebookCreateDataAttributes; +pub mod model_notebook_cell_create_request; +pub use self::model_notebook_cell_create_request::NotebookCellCreateRequest; +pub mod model_notebook_cell_create_request_attributes; +pub use self::model_notebook_cell_create_request_attributes::NotebookCellCreateRequestAttributes; +pub mod model_notebook_response; +pub use self::model_notebook_response::NotebookResponse; +pub mod model_notebook_response_data; +pub use self::model_notebook_response_data::NotebookResponseData; +pub mod model_notebook_response_data_attributes; +pub use self::model_notebook_response_data_attributes::NotebookResponseDataAttributes; +pub mod model_notebook_update_request; +pub use self::model_notebook_update_request::NotebookUpdateRequest; +pub mod model_notebook_update_data; +pub use self::model_notebook_update_data::NotebookUpdateData; +pub mod model_notebook_update_data_attributes; +pub use self::model_notebook_update_data_attributes::NotebookUpdateDataAttributes; +pub mod model_notebook_cell_update_request; +pub use self::model_notebook_cell_update_request::NotebookCellUpdateRequest; +pub mod model_notebook_cell_update_request_attributes; +pub use self::model_notebook_cell_update_request_attributes::NotebookCellUpdateRequestAttributes; +pub mod model_notebook_update_cell; +pub use self::model_notebook_update_cell::NotebookUpdateCell; pub mod model_organization_list_response; pub use self::model_organization_list_response::OrganizationListResponse; pub mod model_organization; @@ -426,6 +1192,276 @@ pub mod model_slo_type_numeric; pub use self::model_slo_type_numeric::SLOTypeNumeric; pub mod model_slo_history_response_error; pub use self::model_slo_history_response_error::SLOHistoryResponseError; +pub mod model_synthetics_batch_details; +pub use self::model_synthetics_batch_details::SyntheticsBatchDetails; +pub mod model_synthetics_batch_details_data; +pub use self::model_synthetics_batch_details_data::SyntheticsBatchDetailsData; +pub mod model_synthetics_ci_batch_metadata; +pub use self::model_synthetics_ci_batch_metadata::SyntheticsCIBatchMetadata; +pub mod model_synthetics_ci_batch_metadata_ci; +pub use self::model_synthetics_ci_batch_metadata_ci::SyntheticsCIBatchMetadataCI; +pub mod model_synthetics_ci_batch_metadata_pipeline; +pub use self::model_synthetics_ci_batch_metadata_pipeline::SyntheticsCIBatchMetadataPipeline; +pub mod model_synthetics_ci_batch_metadata_provider; +pub use self::model_synthetics_ci_batch_metadata_provider::SyntheticsCIBatchMetadataProvider; +pub mod model_synthetics_ci_batch_metadata_git; +pub use self::model_synthetics_ci_batch_metadata_git::SyntheticsCIBatchMetadataGit; +pub mod model_synthetics_batch_result; +pub use self::model_synthetics_batch_result::SyntheticsBatchResult; +pub mod model_synthetics_device_id; +pub use self::model_synthetics_device_id::SyntheticsDeviceID; +pub mod model_synthetics_test_execution_rule; +pub use self::model_synthetics_test_execution_rule::SyntheticsTestExecutionRule; +pub mod model_synthetics_status; +pub use self::model_synthetics_status::SyntheticsStatus; +pub mod model_synthetics_test_details_type; +pub use self::model_synthetics_test_details_type::SyntheticsTestDetailsType; +pub mod model_synthetics_locations; +pub use self::model_synthetics_locations::SyntheticsLocations; +pub mod model_synthetics_location; +pub use self::model_synthetics_location::SyntheticsLocation; +pub mod model_synthetics_private_location; +pub use self::model_synthetics_private_location::SyntheticsPrivateLocation; +pub mod model_synthetics_private_location_metadata; +pub use self::model_synthetics_private_location_metadata::SyntheticsPrivateLocationMetadata; +pub mod model_synthetics_private_location_secrets; +pub use self::model_synthetics_private_location_secrets::SyntheticsPrivateLocationSecrets; +pub mod model_synthetics_private_location_secrets_authentication; +pub use self::model_synthetics_private_location_secrets_authentication::SyntheticsPrivateLocationSecretsAuthentication; +pub mod model_synthetics_private_location_secrets_config_decryption; +pub use self::model_synthetics_private_location_secrets_config_decryption::SyntheticsPrivateLocationSecretsConfigDecryption; +pub mod model_synthetics_private_location_creation_response; +pub use self::model_synthetics_private_location_creation_response::SyntheticsPrivateLocationCreationResponse; +pub mod model_synthetics_private_location_creation_response_result_encryption; +pub use self::model_synthetics_private_location_creation_response_result_encryption::SyntheticsPrivateLocationCreationResponseResultEncryption; +pub mod model_synthetics_list_tests_response; +pub use self::model_synthetics_list_tests_response::SyntheticsListTestsResponse; +pub mod model_synthetics_test_details; +pub use self::model_synthetics_test_details::SyntheticsTestDetails; +pub mod model_synthetics_test_config; +pub use self::model_synthetics_test_config::SyntheticsTestConfig; +pub mod model_synthetics_assertion_target; +pub use self::model_synthetics_assertion_target::SyntheticsAssertionTarget; +pub mod model_synthetics_assertion_operator; +pub use self::model_synthetics_assertion_operator::SyntheticsAssertionOperator; +pub mod model_synthetics_assertion_timings_scope; +pub use self::model_synthetics_assertion_timings_scope::SyntheticsAssertionTimingsScope; +pub mod model_synthetics_assertion_type; +pub use self::model_synthetics_assertion_type::SyntheticsAssertionType; +pub mod model_synthetics_assertion_json_path_target; +pub use self::model_synthetics_assertion_json_path_target::SyntheticsAssertionJSONPathTarget; +pub mod model_synthetics_assertion_json_path_operator; +pub use self::model_synthetics_assertion_json_path_operator::SyntheticsAssertionJSONPathOperator; +pub mod model_synthetics_assertion_json_path_target_target; +pub use self::model_synthetics_assertion_json_path_target_target::SyntheticsAssertionJSONPathTargetTarget; +pub mod model_synthetics_assertion_x_path_target; +pub use self::model_synthetics_assertion_x_path_target::SyntheticsAssertionXPathTarget; +pub mod model_synthetics_assertion_x_path_operator; +pub use self::model_synthetics_assertion_x_path_operator::SyntheticsAssertionXPathOperator; +pub mod model_synthetics_assertion_x_path_target_target; +pub use self::model_synthetics_assertion_x_path_target_target::SyntheticsAssertionXPathTargetTarget; +pub mod model_synthetics_assertion; +pub use self::model_synthetics_assertion::SyntheticsAssertion; +pub mod model_synthetics_config_variable; +pub use self::model_synthetics_config_variable::SyntheticsConfigVariable; +pub mod model_synthetics_config_variable_type; +pub use self::model_synthetics_config_variable_type::SyntheticsConfigVariableType; +pub mod model_synthetics_test_request; +pub use self::model_synthetics_test_request::SyntheticsTestRequest; +pub mod model_synthetics_basic_auth_web; +pub use self::model_synthetics_basic_auth_web::SyntheticsBasicAuthWeb; +pub mod model_synthetics_basic_auth_web_type; +pub use self::model_synthetics_basic_auth_web_type::SyntheticsBasicAuthWebType; +pub mod model_synthetics_basic_auth_sigv4; +pub use self::model_synthetics_basic_auth_sigv4::SyntheticsBasicAuthSigv4; +pub mod model_synthetics_basic_auth_sigv4_type; +pub use self::model_synthetics_basic_auth_sigv4_type::SyntheticsBasicAuthSigv4Type; +pub mod model_synthetics_basic_auth_ntlm; +pub use self::model_synthetics_basic_auth_ntlm::SyntheticsBasicAuthNTLM; +pub mod model_synthetics_basic_auth_ntlm_type; +pub use self::model_synthetics_basic_auth_ntlm_type::SyntheticsBasicAuthNTLMType; +pub mod model_synthetics_basic_auth_digest; +pub use self::model_synthetics_basic_auth_digest::SyntheticsBasicAuthDigest; +pub mod model_synthetics_basic_auth_digest_type; +pub use self::model_synthetics_basic_auth_digest_type::SyntheticsBasicAuthDigestType; +pub mod model_synthetics_basic_auth_oauth_client; +pub use self::model_synthetics_basic_auth_oauth_client::SyntheticsBasicAuthOauthClient; +pub mod model_synthetics_basic_auth_oauth_token_api_authentication; +pub use self::model_synthetics_basic_auth_oauth_token_api_authentication::SyntheticsBasicAuthOauthTokenApiAuthentication; +pub mod model_synthetics_basic_auth_oauth_client_type; +pub use self::model_synthetics_basic_auth_oauth_client_type::SyntheticsBasicAuthOauthClientType; +pub mod model_synthetics_basic_auth_oauth_rop; +pub use self::model_synthetics_basic_auth_oauth_rop::SyntheticsBasicAuthOauthROP; +pub mod model_synthetics_basic_auth_oauth_rop_type; +pub use self::model_synthetics_basic_auth_oauth_rop_type::SyntheticsBasicAuthOauthROPType; +pub mod model_synthetics_basic_auth; +pub use self::model_synthetics_basic_auth::SyntheticsBasicAuth; +pub mod model_synthetics_test_request_body_type; +pub use self::model_synthetics_test_request_body_type::SyntheticsTestRequestBodyType; +pub mod model_synthetics_test_call_type; +pub use self::model_synthetics_test_call_type::SyntheticsTestCallType; +pub mod model_synthetics_test_request_certificate; +pub use self::model_synthetics_test_request_certificate::SyntheticsTestRequestCertificate; +pub mod model_synthetics_test_request_certificate_item; +pub use self::model_synthetics_test_request_certificate_item::SyntheticsTestRequestCertificateItem; +pub mod model_synthetics_test_request_proxy; +pub use self::model_synthetics_test_request_proxy::SyntheticsTestRequestProxy; +pub mod model_synthetics_browser_variable; +pub use self::model_synthetics_browser_variable::SyntheticsBrowserVariable; +pub mod model_synthetics_browser_variable_type; +pub use self::model_synthetics_browser_variable_type::SyntheticsBrowserVariableType; +pub mod model_synthetics_test_options; +pub use self::model_synthetics_test_options::SyntheticsTestOptions; +pub mod model_synthetics_test_ci_options; +pub use self::model_synthetics_test_ci_options::SyntheticsTestCiOptions; +pub mod model_synthetics_test_options_http_version; +pub use self::model_synthetics_test_options_http_version::SyntheticsTestOptionsHTTPVersion; +pub mod model_synthetics_test_options_monitor_options; +pub use self::model_synthetics_test_options_monitor_options::SyntheticsTestOptionsMonitorOptions; +pub mod model_synthetics_test_options_retry; +pub use self::model_synthetics_test_options_retry::SyntheticsTestOptionsRetry; +pub mod model_synthetics_browser_test_rum_settings; +pub use self::model_synthetics_browser_test_rum_settings::SyntheticsBrowserTestRumSettings; +pub mod model_synthetics_test_options_scheduling; +pub use self::model_synthetics_test_options_scheduling::SyntheticsTestOptionsScheduling; +pub mod model_synthetics_test_options_scheduling_timeframe; +pub use self::model_synthetics_test_options_scheduling_timeframe::SyntheticsTestOptionsSchedulingTimeframe; +pub mod model_synthetics_test_pause_status; +pub use self::model_synthetics_test_pause_status::SyntheticsTestPauseStatus; +pub mod model_synthetics_step; +pub use self::model_synthetics_step::SyntheticsStep; +pub mod model_synthetics_step_type; +pub use self::model_synthetics_step_type::SyntheticsStepType; +pub mod model_synthetics_test_details_sub_type; +pub use self::model_synthetics_test_details_sub_type::SyntheticsTestDetailsSubType; +pub mod model_synthetics_api_test; +pub use self::model_synthetics_api_test::SyntheticsAPITest; +pub mod model_synthetics_api_test_config; +pub use self::model_synthetics_api_test_config::SyntheticsAPITestConfig; +pub mod model_synthetics_api_step; +pub use self::model_synthetics_api_step::SyntheticsAPIStep; +pub mod model_synthetics_parsing_options; +pub use self::model_synthetics_parsing_options::SyntheticsParsingOptions; +pub mod model_synthetics_variable_parser; +pub use self::model_synthetics_variable_parser::SyntheticsVariableParser; +pub mod model_synthetics_global_variable_parser_type; +pub use self::model_synthetics_global_variable_parser_type::SyntheticsGlobalVariableParserType; +pub mod model_synthetics_global_variable_parse_test_options_type; +pub use self::model_synthetics_global_variable_parse_test_options_type::SyntheticsGlobalVariableParseTestOptionsType; +pub mod model_synthetics_api_step_subtype; +pub use self::model_synthetics_api_step_subtype::SyntheticsAPIStepSubtype; +pub mod model_synthetics_api_test_type; +pub use self::model_synthetics_api_test_type::SyntheticsAPITestType; +pub mod model_synthetics_browser_test; +pub use self::model_synthetics_browser_test::SyntheticsBrowserTest; +pub mod model_synthetics_browser_test_config; +pub use self::model_synthetics_browser_test_config::SyntheticsBrowserTestConfig; +pub mod model_synthetics_browser_test_type; +pub use self::model_synthetics_browser_test_type::SyntheticsBrowserTestType; +pub mod model_synthetics_get_browser_test_latest_results_response; +pub use self::model_synthetics_get_browser_test_latest_results_response::SyntheticsGetBrowserTestLatestResultsResponse; +pub mod model_synthetics_browser_test_result_short; +pub use self::model_synthetics_browser_test_result_short::SyntheticsBrowserTestResultShort; +pub mod model_synthetics_browser_test_result_short_result; +pub use self::model_synthetics_browser_test_result_short_result::SyntheticsBrowserTestResultShortResult; +pub mod model_synthetics_device; +pub use self::model_synthetics_device::SyntheticsDevice; +pub mod model_synthetics_test_monitor_status; +pub use self::model_synthetics_test_monitor_status::SyntheticsTestMonitorStatus; +pub mod model_synthetics_browser_test_result_full; +pub use self::model_synthetics_browser_test_result_full::SyntheticsBrowserTestResultFull; +pub mod model_synthetics_browser_test_result_full_check; +pub use self::model_synthetics_browser_test_result_full_check::SyntheticsBrowserTestResultFullCheck; +pub mod model_synthetics_browser_test_result_data; +pub use self::model_synthetics_browser_test_result_data::SyntheticsBrowserTestResultData; +pub mod model_synthetics_browser_test_result_failure; +pub use self::model_synthetics_browser_test_result_failure::SyntheticsBrowserTestResultFailure; +pub mod model_synthetics_browser_test_failure_code; +pub use self::model_synthetics_browser_test_failure_code::SyntheticsBrowserTestFailureCode; +pub mod model_synthetics_step_detail; +pub use self::model_synthetics_step_detail::SyntheticsStepDetail; +pub mod model_synthetics_browser_error; +pub use self::model_synthetics_browser_error::SyntheticsBrowserError; +pub mod model_synthetics_browser_error_type; +pub use self::model_synthetics_browser_error_type::SyntheticsBrowserErrorType; +pub mod model_synthetics_check_type; +pub use self::model_synthetics_check_type::SyntheticsCheckType; +pub mod model_synthetics_playing_tab; +pub use self::model_synthetics_playing_tab::SyntheticsPlayingTab; +pub mod model_synthetics_core_web_vitals; +pub use self::model_synthetics_core_web_vitals::SyntheticsCoreWebVitals; +pub mod model_synthetics_step_detail_warning; +pub use self::model_synthetics_step_detail_warning::SyntheticsStepDetailWarning; +pub mod model_synthetics_warning_type; +pub use self::model_synthetics_warning_type::SyntheticsWarningType; +pub mod model_synthetics_delete_tests_payload; +pub use self::model_synthetics_delete_tests_payload::SyntheticsDeleteTestsPayload; +pub mod model_synthetics_delete_tests_response; +pub use self::model_synthetics_delete_tests_response::SyntheticsDeleteTestsResponse; +pub mod model_synthetics_deleted_test; +pub use self::model_synthetics_deleted_test::SyntheticsDeletedTest; +pub mod model_synthetics_trigger_body; +pub use self::model_synthetics_trigger_body::SyntheticsTriggerBody; +pub mod model_synthetics_trigger_test; +pub use self::model_synthetics_trigger_test::SyntheticsTriggerTest; +pub mod model_synthetics_trigger_ci_tests_response; +pub use self::model_synthetics_trigger_ci_tests_response::SyntheticsTriggerCITestsResponse; +pub mod model_synthetics_trigger_ci_test_location; +pub use self::model_synthetics_trigger_ci_test_location::SyntheticsTriggerCITestLocation; +pub mod model_synthetics_trigger_ci_test_run_result; +pub use self::model_synthetics_trigger_ci_test_run_result::SyntheticsTriggerCITestRunResult; +pub mod model_synthetics_ci_test_body; +pub use self::model_synthetics_ci_test_body::SyntheticsCITestBody; +pub mod model_synthetics_ci_test; +pub use self::model_synthetics_ci_test::SyntheticsCITest; +pub mod model_synthetics_patch_test_body; +pub use self::model_synthetics_patch_test_body::SyntheticsPatchTestBody; +pub mod model_synthetics_patch_test_operation; +pub use self::model_synthetics_patch_test_operation::SyntheticsPatchTestOperation; +pub mod model_synthetics_patch_test_operation_name; +pub use self::model_synthetics_patch_test_operation_name::SyntheticsPatchTestOperationName; +pub mod model_synthetics_get_api_test_latest_results_response; +pub use self::model_synthetics_get_api_test_latest_results_response::SyntheticsGetAPITestLatestResultsResponse; +pub mod model_synthetics_api_test_result_short; +pub use self::model_synthetics_api_test_result_short::SyntheticsAPITestResultShort; +pub mod model_synthetics_api_test_result_short_result; +pub use self::model_synthetics_api_test_result_short_result::SyntheticsAPITestResultShortResult; +pub mod model_synthetics_timing; +pub use self::model_synthetics_timing::SyntheticsTiming; +pub mod model_synthetics_api_test_result_full; +pub use self::model_synthetics_api_test_result_full::SyntheticsAPITestResultFull; +pub mod model_synthetics_api_test_result_full_check; +pub use self::model_synthetics_api_test_result_full_check::SyntheticsAPITestResultFullCheck; +pub mod model_synthetics_api_test_result_data; +pub use self::model_synthetics_api_test_result_data::SyntheticsAPITestResultData; +pub mod model_synthetics_ssl_certificate; +pub use self::model_synthetics_ssl_certificate::SyntheticsSSLCertificate; +pub mod model_synthetics_ssl_certificate_issuer; +pub use self::model_synthetics_ssl_certificate_issuer::SyntheticsSSLCertificateIssuer; +pub mod model_synthetics_ssl_certificate_subject; +pub use self::model_synthetics_ssl_certificate_subject::SyntheticsSSLCertificateSubject; +pub mod model_synthetics_test_process_status; +pub use self::model_synthetics_test_process_status::SyntheticsTestProcessStatus; +pub mod model_synthetics_api_test_result_failure; +pub use self::model_synthetics_api_test_result_failure::SyntheticsApiTestResultFailure; +pub mod model_synthetics_api_test_failure_code; +pub use self::model_synthetics_api_test_failure_code::SyntheticsApiTestFailureCode; +pub mod model_synthetics_update_test_pause_status_payload; +pub use self::model_synthetics_update_test_pause_status_payload::SyntheticsUpdateTestPauseStatusPayload; +pub mod model_synthetics_list_global_variables_response; +pub use self::model_synthetics_list_global_variables_response::SyntheticsListGlobalVariablesResponse; +pub mod model_synthetics_global_variable; +pub use self::model_synthetics_global_variable::SyntheticsGlobalVariable; +pub mod model_synthetics_global_variable_attributes; +pub use self::model_synthetics_global_variable_attributes::SyntheticsGlobalVariableAttributes; +pub mod model_synthetics_global_variable_parse_test_options; +pub use self::model_synthetics_global_variable_parse_test_options::SyntheticsGlobalVariableParseTestOptions; +pub mod model_synthetics_global_variable_value; +pub use self::model_synthetics_global_variable_value::SyntheticsGlobalVariableValue; +pub mod model_synthetics_global_variable_options; +pub use self::model_synthetics_global_variable_options::SyntheticsGlobalVariableOptions; +pub mod model_synthetics_global_variable_totp_parameters; +pub use self::model_synthetics_global_variable_totp_parameters::SyntheticsGlobalVariableTOTPParameters; pub mod model_tag_to_hosts; pub use self::model_tag_to_hosts::TagToHosts; pub mod model_host_tags; diff --git a/src/datadogV1/model/model_access_role.rs b/src/datadogV1/model/model_access_role.rs index cf5c12d31..25bfaf72c 100644 --- a/src/datadogV1/model/model_access_role.rs +++ b/src/datadogV1/model/model_access_role.rs @@ -26,9 +26,3 @@ impl ToString for AccessRole { } } } - -impl Default for AccessRole { - fn default() -> AccessRole { - Self::STANDARD - } -} diff --git a/src/datadogV1/model/model_add_signal_to_incident_request.rs b/src/datadogV1/model/model_add_signal_to_incident_request.rs index 6050e47f9..dd2368fcf 100644 --- a/src/datadogV1/model/model_add_signal_to_incident_request.rs +++ b/src/datadogV1/model/model_add_signal_to_incident_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes describing which incident to add the signal to. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AddSignalToIncidentRequest { /// Whether to post the signal on the incident timeline. #[serde(rename = "add_to_signal_timeline")] diff --git a/src/datadogV1/model/model_alert_graph_widget_definition.rs b/src/datadogV1/model/model_alert_graph_widget_definition.rs new file mode 100644 index 000000000..ab7fd5bc0 --- /dev/null +++ b/src/datadogV1/model/model_alert_graph_widget_definition.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Alert graphs are timeseries graphs showing the current status of any monitor defined on your system. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AlertGraphWidgetDefinition { + /// ID of the alert to use in the widget. + #[serde(rename = "alert_id")] + pub alert_id: String, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// The title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the alert graph widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::AlertGraphWidgetDefinitionType, + /// Whether to display the Alert Graph as a timeseries or a top list. + #[serde(rename = "viz_type")] + pub viz_type: crate::datadogV1::model::WidgetVizType, +} + +impl AlertGraphWidgetDefinition { + pub fn new( + alert_id: String, + type_: crate::datadogV1::model::AlertGraphWidgetDefinitionType, + viz_type: crate::datadogV1::model::WidgetVizType, + ) -> AlertGraphWidgetDefinition { + AlertGraphWidgetDefinition { + alert_id, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + viz_type, + } + } +} diff --git a/src/datadogV1/model/model_alert_graph_widget_definition_type.rs b/src/datadogV1/model/model_alert_graph_widget_definition_type.rs new file mode 100644 index 000000000..5b4b124a5 --- /dev/null +++ b/src/datadogV1/model/model_alert_graph_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AlertGraphWidgetDefinitionType { + #[serde(rename = "alert_graph")] + ALERT_GRAPH, +} + +impl ToString for AlertGraphWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::ALERT_GRAPH => String::from("alert_graph"), + } + } +} diff --git a/src/datadogV1/model/model_alert_value_widget_definition.rs b/src/datadogV1/model/model_alert_value_widget_definition.rs new file mode 100644 index 000000000..ddd4c46fd --- /dev/null +++ b/src/datadogV1/model/model_alert_value_widget_definition.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Alert values are query values showing the current value of the metric in any monitor defined on your system. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AlertValueWidgetDefinition { + /// ID of the alert to use in the widget. + #[serde(rename = "alert_id")] + pub alert_id: String, + /// Number of decimal to show. If not defined, will use the raw value. + #[serde(rename = "precision")] + pub precision: Option, + /// How to align the text on the widget. + #[serde(rename = "text_align")] + pub text_align: Option, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of value in the widget. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the alert value widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::AlertValueWidgetDefinitionType, + /// Unit to display with the value. + #[serde(rename = "unit")] + pub unit: Option, +} + +impl AlertValueWidgetDefinition { + pub fn new( + alert_id: String, + type_: crate::datadogV1::model::AlertValueWidgetDefinitionType, + ) -> AlertValueWidgetDefinition { + AlertValueWidgetDefinition { + alert_id, + precision: None, + text_align: None, + title: None, + title_align: None, + title_size: None, + type_, + unit: None, + } + } +} diff --git a/src/datadogV1/model/model_alert_value_widget_definition_type.rs b/src/datadogV1/model/model_alert_value_widget_definition_type.rs new file mode 100644 index 000000000..617a1e9f4 --- /dev/null +++ b/src/datadogV1/model/model_alert_value_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AlertValueWidgetDefinitionType { + #[serde(rename = "alert_value")] + ALERT_VALUE, +} + +impl ToString for AlertValueWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::ALERT_VALUE => String::from("alert_value"), + } + } +} diff --git a/src/datadogV1/model/model_api_error_response.rs b/src/datadogV1/model/model_api_error_response.rs index 36213b6ce..65e5c0734 100644 --- a/src/datadogV1/model/model_api_error_response.rs +++ b/src/datadogV1/model/model_api_error_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Error response object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct APIErrorResponse { /// Array of errors returned by the API. #[serde(rename = "errors")] diff --git a/src/datadogV1/model/model_api_key.rs b/src/datadogV1/model/model_api_key.rs index 738bb59c8..1d4dbbf67 100644 --- a/src/datadogV1/model/model_api_key.rs +++ b/src/datadogV1/model/model_api_key.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Datadog API key. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ApiKey { /// Date of creation of the API key. #[serde(rename = "created")] diff --git a/src/datadogV1/model/model_api_key_list_response.rs b/src/datadogV1/model/model_api_key_list_response.rs index d0e526843..b21fe82a4 100644 --- a/src/datadogV1/model/model_api_key_list_response.rs +++ b/src/datadogV1/model/model_api_key_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// List of API and application keys available for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ApiKeyListResponse { /// Array of API keys. #[serde(rename = "api_keys")] diff --git a/src/datadogV1/model/model_api_key_response.rs b/src/datadogV1/model/model_api_key_response.rs index 7eb7b7307..614628271 100644 --- a/src/datadogV1/model/model_api_key_response.rs +++ b/src/datadogV1/model/model_api_key_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An API key with its associated metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ApiKeyResponse { /// Datadog API key. #[serde(rename = "api_key")] diff --git a/src/datadogV1/model/model_apm_stats_query_column_type.rs b/src/datadogV1/model/model_apm_stats_query_column_type.rs new file mode 100644 index 000000000..ac66ec4b8 --- /dev/null +++ b/src/datadogV1/model/model_apm_stats_query_column_type.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Column properties. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApmStatsQueryColumnType { + /// A user-assigned alias for the column. + #[serde(rename = "alias")] + pub alias: Option, + /// Define a display mode for the table cell. + #[serde(rename = "cell_display_mode")] + pub cell_display_mode: Option, + /// Column name. + #[serde(rename = "name")] + pub name: String, + /// Widget sorting methods. + #[serde(rename = "order")] + pub order: Option, +} + +impl ApmStatsQueryColumnType { + pub fn new(name: String) -> ApmStatsQueryColumnType { + ApmStatsQueryColumnType { + alias: None, + cell_display_mode: None, + name, + order: None, + } + } +} diff --git a/src/datadogV1/model/model_apm_stats_query_definition.rs b/src/datadogV1/model/model_apm_stats_query_definition.rs new file mode 100644 index 000000000..849c401a2 --- /dev/null +++ b/src/datadogV1/model/model_apm_stats_query_definition.rs @@ -0,0 +1,52 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The APM stats query for table and distributions widgets. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApmStatsQueryDefinition { + /// Column properties used by the front end for display. + #[serde(rename = "columns")] + pub columns: Option>, + /// Environment name. + #[serde(rename = "env")] + pub env: String, + /// Operation name associated with service. + #[serde(rename = "name")] + pub name: String, + /// The organization's host group name and value. + #[serde(rename = "primary_tag")] + pub primary_tag: String, + /// Resource name. + #[serde(rename = "resource")] + pub resource: Option, + /// The level of detail for the request. + #[serde(rename = "row_type")] + pub row_type: crate::datadogV1::model::ApmStatsQueryRowType, + /// Service name. + #[serde(rename = "service")] + pub service: String, +} + +impl ApmStatsQueryDefinition { + pub fn new( + env: String, + name: String, + primary_tag: String, + row_type: crate::datadogV1::model::ApmStatsQueryRowType, + service: String, + ) -> ApmStatsQueryDefinition { + ApmStatsQueryDefinition { + columns: None, + env, + name, + primary_tag, + resource: None, + row_type, + service, + } + } +} diff --git a/src/datadogV1/model/model_apm_stats_query_row_type.rs b/src/datadogV1/model/model_apm_stats_query_row_type.rs new file mode 100644 index 000000000..4b93b89dd --- /dev/null +++ b/src/datadogV1/model/model_apm_stats_query_row_type.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ApmStatsQueryRowType { + #[serde(rename = "service")] + SERVICE, + #[serde(rename = "resource")] + RESOURCE, + #[serde(rename = "span")] + SPAN, +} + +impl ToString for ApmStatsQueryRowType { + fn to_string(&self) -> String { + match self { + Self::SERVICE => String::from("service"), + Self::RESOURCE => String::from("resource"), + Self::SPAN => String::from("span"), + } + } +} diff --git a/src/datadogV1/model/model_application_key.rs b/src/datadogV1/model/model_application_key.rs index 689b0a08a..3fa3fe9a5 100644 --- a/src/datadogV1/model/model_application_key.rs +++ b/src/datadogV1/model/model_application_key.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An application key with its associated metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ApplicationKey { /// Hash of an application key. #[serde(rename = "hash")] diff --git a/src/datadogV1/model/model_application_key_list_response.rs b/src/datadogV1/model/model_application_key_list_response.rs index dbe223451..da55f2f0d 100644 --- a/src/datadogV1/model/model_application_key_list_response.rs +++ b/src/datadogV1/model/model_application_key_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An application key response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ApplicationKeyListResponse { /// Array of application keys. #[serde(rename = "application_keys")] diff --git a/src/datadogV1/model/model_application_key_response.rs b/src/datadogV1/model/model_application_key_response.rs index 550156be0..f99e371c8 100644 --- a/src/datadogV1/model/model_application_key_response.rs +++ b/src/datadogV1/model/model_application_key_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An application key response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ApplicationKeyResponse { /// An application key with its associated metadata. #[serde(rename = "application_key")] diff --git a/src/datadogV1/model/model_authentication_validation_response.rs b/src/datadogV1/model/model_authentication_validation_response.rs index fe32e43b3..aaddc9a91 100644 --- a/src/datadogV1/model/model_authentication_validation_response.rs +++ b/src/datadogV1/model/model_authentication_validation_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Represent validation endpoint responses. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuthenticationValidationResponse { /// Return `true` if the authentication response is valid. #[serde(rename = "valid")] diff --git a/src/datadogV1/model/model_aws_account.rs b/src/datadogV1/model/model_aws_account.rs index a4f14c32f..d28a1993c 100644 --- a/src/datadogV1/model/model_aws_account.rs +++ b/src/datadogV1/model/model_aws_account.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Returns the AWS account associated with this integration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSAccount { /// Your AWS access key ID. Only required if your AWS account is a GovCloud or China account. #[serde(rename = "access_key_id")] diff --git a/src/datadogV1/model/model_aws_account_and_lambda_request.rs b/src/datadogV1/model/model_aws_account_and_lambda_request.rs index 82a30e315..334b04300 100644 --- a/src/datadogV1/model/model_aws_account_and_lambda_request.rs +++ b/src/datadogV1/model/model_aws_account_and_lambda_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// AWS account ID and Lambda ARN. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSAccountAndLambdaRequest { /// Your AWS Account ID without dashes. #[serde(rename = "account_id")] diff --git a/src/datadogV1/model/model_aws_account_create_response.rs b/src/datadogV1/model/model_aws_account_create_response.rs index 5323f2203..0aea7e2f9 100644 --- a/src/datadogV1/model/model_aws_account_create_response.rs +++ b/src/datadogV1/model/model_aws_account_create_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The Response returned by the AWS Create Account call. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSAccountCreateResponse { /// AWS external_id. #[serde(rename = "external_id")] diff --git a/src/datadogV1/model/model_aws_account_delete_request.rs b/src/datadogV1/model/model_aws_account_delete_request.rs index 937709efb..27896fed5 100644 --- a/src/datadogV1/model/model_aws_account_delete_request.rs +++ b/src/datadogV1/model/model_aws_account_delete_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// List of AWS accounts to delete. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSAccountDeleteRequest { /// Your AWS access key ID. Only required if your AWS account is a GovCloud or China account. #[serde(rename = "access_key_id")] diff --git a/src/datadogV1/model/model_aws_account_list_response.rs b/src/datadogV1/model/model_aws_account_list_response.rs index 353bb1a99..e2cbfffa7 100644 --- a/src/datadogV1/model/model_aws_account_list_response.rs +++ b/src/datadogV1/model/model_aws_account_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// List of enabled AWS accounts. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSAccountListResponse { /// List of enabled AWS accounts. #[serde(rename = "accounts")] diff --git a/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs b/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs index 3c87f51c9..f87979d50 100644 --- a/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs +++ b/src/datadogV1/model/model_aws_event_bridge_account_configuration.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The EventBridge configuration for one AWS account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSEventBridgeAccountConfiguration { /// Your AWS Account ID without dashes. #[serde(rename = "accountId")] diff --git a/src/datadogV1/model/model_aws_event_bridge_create_request.rs b/src/datadogV1/model/model_aws_event_bridge_create_request.rs index e09f0dede..bdd828da8 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object used to create an EventBridge source. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSEventBridgeCreateRequest { /// Your AWS Account ID without dashes. #[serde(rename = "account_id")] diff --git a/src/datadogV1/model/model_aws_event_bridge_create_response.rs b/src/datadogV1/model/model_aws_event_bridge_create_response.rs index 7eaefaae7..45adab28b 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A created EventBridge source. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSEventBridgeCreateResponse { /// The event source name. #[serde(rename = "event_source_name")] diff --git a/src/datadogV1/model/model_aws_event_bridge_create_status.rs b/src/datadogV1/model/model_aws_event_bridge_create_status.rs index 0bcc1a66a..c1b3c52a6 100644 --- a/src/datadogV1/model/model_aws_event_bridge_create_status.rs +++ b/src/datadogV1/model/model_aws_event_bridge_create_status.rs @@ -17,9 +17,3 @@ impl ToString for AWSEventBridgeCreateStatus { } } } - -impl Default for AWSEventBridgeCreateStatus { - fn default() -> AWSEventBridgeCreateStatus { - Self::CREATED - } -} diff --git a/src/datadogV1/model/model_aws_event_bridge_delete_request.rs b/src/datadogV1/model/model_aws_event_bridge_delete_request.rs index f76264420..9a65795cd 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_request.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object used to delete an EventBridge source. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSEventBridgeDeleteRequest { /// Your AWS Account ID without dashes. #[serde(rename = "account_id")] diff --git a/src/datadogV1/model/model_aws_event_bridge_delete_response.rs b/src/datadogV1/model/model_aws_event_bridge_delete_response.rs index bb1db1803..9cbbe1a9c 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An indicator of the successful deletion of an EventBridge source. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSEventBridgeDeleteResponse { /// The event source status "empty". #[serde(rename = "status")] diff --git a/src/datadogV1/model/model_aws_event_bridge_delete_status.rs b/src/datadogV1/model/model_aws_event_bridge_delete_status.rs index 856a6ef9c..1f599a090 100644 --- a/src/datadogV1/model/model_aws_event_bridge_delete_status.rs +++ b/src/datadogV1/model/model_aws_event_bridge_delete_status.rs @@ -17,9 +17,3 @@ impl ToString for AWSEventBridgeDeleteStatus { } } } - -impl Default for AWSEventBridgeDeleteStatus { - fn default() -> AWSEventBridgeDeleteStatus { - Self::EMPTY - } -} diff --git a/src/datadogV1/model/model_aws_event_bridge_list_response.rs b/src/datadogV1/model/model_aws_event_bridge_list_response.rs index 889862049..f08c6b8ec 100644 --- a/src/datadogV1/model/model_aws_event_bridge_list_response.rs +++ b/src/datadogV1/model/model_aws_event_bridge_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object describing the EventBridge configuration for multiple accounts. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSEventBridgeListResponse { /// List of accounts with their event sources. #[serde(rename = "accounts")] diff --git a/src/datadogV1/model/model_aws_event_bridge_source.rs b/src/datadogV1/model/model_aws_event_bridge_source.rs index 18c7bbc13..d71a2d17d 100644 --- a/src/datadogV1/model/model_aws_event_bridge_source.rs +++ b/src/datadogV1/model/model_aws_event_bridge_source.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An EventBridge source. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSEventBridgeSource { /// The event source name. #[serde(rename = "name")] diff --git a/src/datadogV1/model/model_aws_logs_async_error.rs b/src/datadogV1/model/model_aws_logs_async_error.rs index 7e4073f12..3cc4f88f0 100644 --- a/src/datadogV1/model/model_aws_logs_async_error.rs +++ b/src/datadogV1/model/model_aws_logs_async_error.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Description of errors. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSLogsAsyncError { /// Code properties #[serde(rename = "code")] diff --git a/src/datadogV1/model/model_aws_logs_async_response.rs b/src/datadogV1/model/model_aws_logs_async_response.rs index 391c4860f..0de96a9e1 100644 --- a/src/datadogV1/model/model_aws_logs_async_response.rs +++ b/src/datadogV1/model/model_aws_logs_async_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A list of all Datadog-AWS logs integrations available in your Datadog organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSLogsAsyncResponse { /// List of errors. #[serde(rename = "errors")] diff --git a/src/datadogV1/model/model_aws_logs_lambda.rs b/src/datadogV1/model/model_aws_logs_lambda.rs index b35643175..cc3724158 100644 --- a/src/datadogV1/model/model_aws_logs_lambda.rs +++ b/src/datadogV1/model/model_aws_logs_lambda.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Description of the Lambdas. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSLogsLambda { /// Available ARN IDs. #[serde(rename = "arn")] diff --git a/src/datadogV1/model/model_aws_logs_list_response.rs b/src/datadogV1/model/model_aws_logs_list_response.rs index 071742480..687831ce5 100644 --- a/src/datadogV1/model/model_aws_logs_list_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A list of all Datadog-AWS logs integrations available in your Datadog organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSLogsListResponse { /// Your AWS Account ID without dashes. #[serde(rename = "account_id")] diff --git a/src/datadogV1/model/model_aws_logs_list_services_response.rs b/src/datadogV1/model/model_aws_logs_list_services_response.rs index e59a56a4c..adfef8277 100644 --- a/src/datadogV1/model/model_aws_logs_list_services_response.rs +++ b/src/datadogV1/model/model_aws_logs_list_services_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The list of current AWS services for which Datadog offers automatic log collection. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSLogsListServicesResponse { /// Key value in returned object. #[serde(rename = "id")] diff --git a/src/datadogV1/model/model_aws_logs_services_request.rs b/src/datadogV1/model/model_aws_logs_services_request.rs index a198c6dcb..3f5e6adcf 100644 --- a/src/datadogV1/model/model_aws_logs_services_request.rs +++ b/src/datadogV1/model/model_aws_logs_services_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A list of current AWS services for which Datadog offers automatic log collection. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSLogsServicesRequest { /// Your AWS Account ID without dashes. #[serde(rename = "account_id")] diff --git a/src/datadogV1/model/model_aws_namespace.rs b/src/datadogV1/model/model_aws_namespace.rs index 7dae91e26..8731ecb94 100644 --- a/src/datadogV1/model/model_aws_namespace.rs +++ b/src/datadogV1/model/model_aws_namespace.rs @@ -35,9 +35,3 @@ impl ToString for AWSNamespace { } } } - -impl Default for AWSNamespace { - fn default() -> AWSNamespace { - Self::ELB - } -} diff --git a/src/datadogV1/model/model_aws_tag_filter.rs b/src/datadogV1/model/model_aws_tag_filter.rs index a2e8ad5b3..94193069f 100644 --- a/src/datadogV1/model/model_aws_tag_filter.rs +++ b/src/datadogV1/model/model_aws_tag_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A tag filter. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSTagFilter { /// The namespace associated with the tag filter entry. #[serde(rename = "namespace")] diff --git a/src/datadogV1/model/model_aws_tag_filter_create_request.rs b/src/datadogV1/model/model_aws_tag_filter_create_request.rs index 4622691b0..7af849c5c 100644 --- a/src/datadogV1/model/model_aws_tag_filter_create_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The objects used to set an AWS tag filter. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSTagFilterCreateRequest { /// Your AWS Account ID without dashes. #[serde(rename = "account_id")] diff --git a/src/datadogV1/model/model_aws_tag_filter_delete_request.rs b/src/datadogV1/model/model_aws_tag_filter_delete_request.rs index 346ccca2f..ce9cdd8c1 100644 --- a/src/datadogV1/model/model_aws_tag_filter_delete_request.rs +++ b/src/datadogV1/model/model_aws_tag_filter_delete_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The objects used to delete an AWS tag filter entry. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSTagFilterDeleteRequest { /// The unique identifier of your AWS account. #[serde(rename = "account_id")] diff --git a/src/datadogV1/model/model_aws_tag_filter_list_response.rs b/src/datadogV1/model/model_aws_tag_filter_list_response.rs index c68c0a423..ed2715910 100644 --- a/src/datadogV1/model/model_aws_tag_filter_list_response.rs +++ b/src/datadogV1/model/model_aws_tag_filter_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An array of tag filter rules by `namespace` and tag filter string. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AWSTagFilterListResponse { /// An array of tag filters. #[serde(rename = "filters")] diff --git a/src/datadogV1/model/model_azure_account.rs b/src/datadogV1/model/model_azure_account.rs index 40adfcbb6..3e3ad6adf 100644 --- a/src/datadogV1/model/model_azure_account.rs +++ b/src/datadogV1/model/model_azure_account.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Datadog-Azure integrations configured for your organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AzureAccount { /// Limit the Azure app service plans that are pulled into Datadog using tags. /// Only app service plans that match one of the defined tags are imported into Datadog. @@ -25,7 +25,8 @@ pub struct AzureAccount { /// Only container apps that match one of the defined tags are imported into Datadog. #[serde(rename = "container_app_filters")] pub container_app_filters: Option, - /// Enable Cloud Security Management Misconfigurations for your organization. + /// When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration. + /// Note: This requires resource_collection_enabled to be set to true. #[serde(rename = "cspm_enabled")] pub cspm_enabled: Option, /// Enable custom metrics for your organization. @@ -44,6 +45,9 @@ pub struct AzureAccount { /// Your New Azure Active Directory ID. #[serde(rename = "new_tenant_name")] pub new_tenant_name: Option, + /// When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration. + #[serde(rename = "resource_collection_enabled")] + pub resource_collection_enabled: Option, /// Your Azure Active Directory ID. #[serde(rename = "tenant_name")] pub tenant_name: Option, @@ -63,6 +67,7 @@ impl AzureAccount { host_filters: None, new_client_id: None, new_tenant_name: None, + resource_collection_enabled: None, tenant_name: None, } } diff --git a/src/datadogV1/model/model_cancel_downtimes_by_scope_request.rs b/src/datadogV1/model/model_cancel_downtimes_by_scope_request.rs index c2c01aae4..0293b388e 100644 --- a/src/datadogV1/model/model_cancel_downtimes_by_scope_request.rs +++ b/src/datadogV1/model/model_cancel_downtimes_by_scope_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Cancel downtimes according to scope. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CancelDowntimesByScopeRequest { /// The scope(s) to which the downtime applies and must be in `key:value` format. For example, `host:app2`. /// Provide multiple scopes as a comma-separated list like `env:dev,env:prod`. diff --git a/src/datadogV1/model/model_canceled_downtimes_ids.rs b/src/datadogV1/model/model_canceled_downtimes_ids.rs index b44ab5c07..66d81a38b 100644 --- a/src/datadogV1/model/model_canceled_downtimes_ids.rs +++ b/src/datadogV1/model/model_canceled_downtimes_ids.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing array of IDs of canceled downtimes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CanceledDowntimesIds { /// ID of downtimes that were canceled. #[serde(rename = "cancelled_ids")] diff --git a/src/datadogV1/model/model_change_widget_definition.rs b/src/datadogV1/model/model_change_widget_definition.rs new file mode 100644 index 000000000..92cffbe14 --- /dev/null +++ b/src/datadogV1/model/model_change_widget_definition.rs @@ -0,0 +1,52 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The Change graph shows you the change in a value over the time period chosen. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChangeWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Array of one request object to display in the widget. + /// + /// See the dedicated [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) + /// to learn how to build the `REQUEST_SCHEMA`. + #[serde(rename = "requests")] + pub requests: Vec, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the change widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ChangeWidgetDefinitionType, +} + +impl ChangeWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::ChangeWidgetDefinitionType, + ) -> ChangeWidgetDefinition { + ChangeWidgetDefinition { + custom_links: None, + requests, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_change_widget_definition_type.rs b/src/datadogV1/model/model_change_widget_definition_type.rs new file mode 100644 index 000000000..b85e6d471 --- /dev/null +++ b/src/datadogV1/model/model_change_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ChangeWidgetDefinitionType { + #[serde(rename = "change")] + CHANGE, +} + +impl ToString for ChangeWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::CHANGE => String::from("change"), + } + } +} diff --git a/src/datadogV1/model/model_change_widget_request.rs b/src/datadogV1/model/model_change_widget_request.rs new file mode 100644 index 000000000..f4a751570 --- /dev/null +++ b/src/datadogV1/model/model_change_widget_request.rs @@ -0,0 +1,90 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated change widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChangeWidgetRequest { + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// Show the absolute or the relative change. + #[serde(rename = "change_type")] + pub change_type: Option, + /// Timeframe used for the change comparison. + #[serde(rename = "compare_to")] + pub compare_to: Option, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// Whether to show increase as good. + #[serde(rename = "increase_good")] + pub increase_good: Option, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// What to order by. + #[serde(rename = "order_by")] + pub order_by: Option, + /// Widget sorting methods. + #[serde(rename = "order_dir")] + pub order_dir: Option, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Query definition. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, + /// Whether to show the present value. + #[serde(rename = "show_present")] + pub show_present: Option, +} + +impl ChangeWidgetRequest { + pub fn new() -> ChangeWidgetRequest { + ChangeWidgetRequest { + apm_query: None, + change_type: None, + compare_to: None, + event_query: None, + formulas: None, + increase_good: None, + log_query: None, + network_query: None, + order_by: None, + order_dir: None, + process_query: None, + profile_metrics_query: None, + q: None, + queries: None, + response_format: None, + rum_query: None, + security_query: None, + show_present: None, + } + } +} diff --git a/src/datadogV1/model/model_check_can_delete_monitor_response.rs b/src/datadogV1/model/model_check_can_delete_monitor_response.rs new file mode 100644 index 000000000..ecd576f9b --- /dev/null +++ b/src/datadogV1/model/model_check_can_delete_monitor_response.rs @@ -0,0 +1,25 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response of monitor IDs that can or can't be safely deleted. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CheckCanDeleteMonitorResponse { + /// Wrapper object with the list of monitor IDs. + #[serde(rename = "data")] + pub data: Box, + /// A mapping of Monitor ID to strings denoting where it's used. + #[serde(rename = "errors", default, with = "::serde_with::rust::double_option")] + pub errors: Option>>>>, +} + +impl CheckCanDeleteMonitorResponse { + pub fn new( + data: Box, + ) -> CheckCanDeleteMonitorResponse { + CheckCanDeleteMonitorResponse { data, errors: None } + } +} diff --git a/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs b/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs new file mode 100644 index 000000000..c1c26a5c9 --- /dev/null +++ b/src/datadogV1/model/model_check_can_delete_monitor_response_data.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Wrapper object with the list of monitor IDs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CheckCanDeleteMonitorResponseData { + /// An array of of Monitor IDs that can be safely deleted. + #[serde(rename = "ok")] + pub ok: Option>, +} + +impl CheckCanDeleteMonitorResponseData { + pub fn new() -> CheckCanDeleteMonitorResponseData { + CheckCanDeleteMonitorResponseData { ok: None } + } +} diff --git a/src/datadogV1/model/model_check_can_delete_slo_response.rs b/src/datadogV1/model/model_check_can_delete_slo_response.rs index 7fd2a563f..160080f1a 100644 --- a/src/datadogV1/model/model_check_can_delete_slo_response.rs +++ b/src/datadogV1/model/model_check_can_delete_slo_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A service level objective response containing the requested object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckCanDeleteSLOResponse { /// An array of service level objective objects. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_check_can_delete_slo_response_data.rs b/src/datadogV1/model/model_check_can_delete_slo_response_data.rs index d23020223..75d30200d 100644 --- a/src/datadogV1/model/model_check_can_delete_slo_response_data.rs +++ b/src/datadogV1/model/model_check_can_delete_slo_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An array of service level objective objects. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CheckCanDeleteSLOResponseData { /// An array of of SLO IDs that can be safely deleted. #[serde(rename = "ok")] diff --git a/src/datadogV1/model/model_check_status_widget_definition.rs b/src/datadogV1/model/model_check_status_widget_definition.rs new file mode 100644 index 000000000..f21e2f667 --- /dev/null +++ b/src/datadogV1/model/model_check_status_widget_definition.rs @@ -0,0 +1,62 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Check status shows the current status or number of results for any check performed. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CheckStatusWidgetDefinition { + /// Name of the check to use in the widget. + #[serde(rename = "check")] + pub check: String, + /// Group reporting a single check. + #[serde(rename = "group")] + pub group: Option, + /// List of tag prefixes to group by in the case of a cluster check. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// The kind of grouping to use. + #[serde(rename = "grouping")] + pub grouping: crate::datadogV1::model::WidgetGrouping, + /// List of tags used to filter the groups reporting a cluster check. + #[serde(rename = "tags")] + pub tags: Option>, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the check status widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::CheckStatusWidgetDefinitionType, +} + +impl CheckStatusWidgetDefinition { + pub fn new( + check: String, + grouping: crate::datadogV1::model::WidgetGrouping, + type_: crate::datadogV1::model::CheckStatusWidgetDefinitionType, + ) -> CheckStatusWidgetDefinition { + CheckStatusWidgetDefinition { + check, + group: None, + group_by: None, + grouping, + tags: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_check_status_widget_definition_type.rs b/src/datadogV1/model/model_check_status_widget_definition_type.rs new file mode 100644 index 000000000..45a80e000 --- /dev/null +++ b/src/datadogV1/model/model_check_status_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CheckStatusWidgetDefinitionType { + #[serde(rename = "check_status")] + CHECK_STATUS, +} + +impl ToString for CheckStatusWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::CHECK_STATUS => String::from("check_status"), + } + } +} diff --git a/src/datadogV1/model/model_content_encoding.rs b/src/datadogV1/model/model_content_encoding.rs index b02d60db0..11f5161b9 100644 --- a/src/datadogV1/model/model_content_encoding.rs +++ b/src/datadogV1/model/model_content_encoding.rs @@ -20,9 +20,3 @@ impl ToString for ContentEncoding { } } } - -impl Default for ContentEncoding { - fn default() -> ContentEncoding { - Self::GZIP - } -} diff --git a/src/datadogV1/model/model_creator.rs b/src/datadogV1/model/model_creator.rs index 314d2c386..aa008b23c 100644 --- a/src/datadogV1/model/model_creator.rs +++ b/src/datadogV1/model/model_creator.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object describing the creator of the shared element. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Creator { /// Email of the creator. #[serde(rename = "email")] diff --git a/src/datadogV1/model/model_dashboard.rs b/src/datadogV1/model/model_dashboard.rs new file mode 100644 index 000000000..0f0863219 --- /dev/null +++ b/src/datadogV1/model/model_dashboard.rs @@ -0,0 +1,117 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A dashboard is Datadog’s tool for visually tracking, analyzing, and displaying +/// key performance metrics, which enable you to monitor the health of your infrastructure. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Dashboard { + /// Identifier of the dashboard author. + #[serde(rename = "author_handle")] + pub author_handle: Option, + /// Name of the dashboard author. + #[serde( + rename = "author_name", + default, + with = "::serde_with::rust::double_option" + )] + pub author_name: Option>, + /// Creation date of the dashboard. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Description of the dashboard. + #[serde( + rename = "description", + default, + with = "::serde_with::rust::double_option" + )] + pub description: Option>, + /// ID of the dashboard. + #[serde(rename = "id")] + pub id: Option, + /// Whether this dashboard is read-only. If True, only the author and admins can make changes to it. Prefer using `restricted_roles` to manage write authorization. + #[deprecated] + #[serde(rename = "is_read_only")] + pub is_read_only: Option, + /// Layout type of the dashboard. + #[serde(rename = "layout_type")] + pub layout_type: crate::datadogV1::model::DashboardLayoutType, + /// Modification date of the dashboard. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// List of handles of users to notify when changes are made to this dashboard. + #[serde( + rename = "notify_list", + default, + with = "::serde_with::rust::double_option" + )] + pub notify_list: Option>>, + /// Reflow type for a **new dashboard layout** dashboard. Set this only when layout type is 'ordered'. + /// If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's set to 'auto', + /// widgets should not have layouts. + #[serde(rename = "reflow_type")] + pub reflow_type: Option, + /// A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard. + #[serde(rename = "restricted_roles")] + pub restricted_roles: Option>, + /// List of team names representing ownership of a dashboard. + #[serde(rename = "tags", default, with = "::serde_with::rust::double_option")] + pub tags: Option>>, + /// Array of template variables saved views. + #[serde( + rename = "template_variable_presets", + default, + with = "::serde_with::rust::double_option" + )] + pub template_variable_presets: + Option>>>, + /// List of template variables for this dashboard. + #[serde( + rename = "template_variables", + default, + with = "::serde_with::rust::double_option" + )] + pub template_variables: + Option>>>, + /// Title of the dashboard. + #[serde(rename = "title")] + pub title: String, + /// The URL of the dashboard. + #[serde(rename = "url")] + pub url: Option, + /// List of widgets to display on the dashboard. + #[serde(rename = "widgets")] + pub widgets: Vec, +} + +impl Dashboard { + pub fn new( + layout_type: crate::datadogV1::model::DashboardLayoutType, + title: String, + widgets: Vec, + ) -> Dashboard { + #[allow(deprecated)] + Dashboard { + author_handle: None, + author_name: None, + created_at: None, + description: None, + id: None, + is_read_only: None, + layout_type, + modified_at: None, + notify_list: None, + reflow_type: None, + restricted_roles: None, + tags: None, + template_variable_presets: None, + template_variables: None, + title, + url: None, + widgets, + } + } +} diff --git a/src/datadogV1/model/model_dashboard_bulk_action_data.rs b/src/datadogV1/model/model_dashboard_bulk_action_data.rs new file mode 100644 index 000000000..c3cc14c7c --- /dev/null +++ b/src/datadogV1/model/model_dashboard_bulk_action_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Dashboard bulk action request data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardBulkActionData { + /// Dashboard resource ID. + #[serde(rename = "id")] + pub id: String, + /// Dashboard resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::DashboardResourceType, +} + +impl DashboardBulkActionData { + pub fn new( + id: String, + type_: crate::datadogV1::model::DashboardResourceType, + ) -> DashboardBulkActionData { + DashboardBulkActionData { id, type_ } + } +} diff --git a/src/datadogV1/model/model_dashboard_bulk_delete_request.rs b/src/datadogV1/model/model_dashboard_bulk_delete_request.rs new file mode 100644 index 000000000..76e98e691 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_bulk_delete_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Dashboard bulk delete request body. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardBulkDeleteRequest { + /// List of dashboard bulk action request data objects. + #[serde(rename = "data")] + pub data: Vec, +} + +impl DashboardBulkDeleteRequest { + pub fn new( + data: Vec, + ) -> DashboardBulkDeleteRequest { + DashboardBulkDeleteRequest { data } + } +} diff --git a/src/datadogV1/model/model_dashboard_delete_response.rs b/src/datadogV1/model/model_dashboard_delete_response.rs new file mode 100644 index 000000000..46548f4ef --- /dev/null +++ b/src/datadogV1/model/model_dashboard_delete_response.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response from the delete dashboard call. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardDeleteResponse { + /// ID of the deleted dashboard. + #[serde(rename = "deleted_dashboard_id")] + pub deleted_dashboard_id: Option, +} + +impl DashboardDeleteResponse { + pub fn new() -> DashboardDeleteResponse { + DashboardDeleteResponse { + deleted_dashboard_id: None, + } + } +} diff --git a/src/datadogV1/model/model_dashboard_global_time.rs b/src/datadogV1/model/model_dashboard_global_time.rs new file mode 100644 index 000000000..e554e8d3b --- /dev/null +++ b/src/datadogV1/model/model_dashboard_global_time.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the live span selection for the dashboard. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardGlobalTime { + /// Dashboard global time live_span selection + #[serde(rename = "live_span")] + pub live_span: Option, +} + +impl DashboardGlobalTime { + pub fn new() -> DashboardGlobalTime { + DashboardGlobalTime { live_span: None } + } +} diff --git a/src/datadogV1/model/model_dashboard_global_time_live_span.rs b/src/datadogV1/model/model_dashboard_global_time_live_span.rs new file mode 100644 index 000000000..932cfea1d --- /dev/null +++ b/src/datadogV1/model/model_dashboard_global_time_live_span.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DashboardGlobalTimeLiveSpan { + #[serde(rename = "15m")] + PAST_FIFTEEN_MINUTES, + #[serde(rename = "1h")] + PAST_ONE_HOUR, + #[serde(rename = "4h")] + PAST_FOUR_HOURS, + #[serde(rename = "1d")] + PAST_ONE_DAY, + #[serde(rename = "2d")] + PAST_TWO_DAYS, + #[serde(rename = "1w")] + PAST_ONE_WEEK, + #[serde(rename = "1mo")] + PAST_ONE_MONTH, + #[serde(rename = "3mo")] + PAST_THREE_MONTHS, +} + +impl ToString for DashboardGlobalTimeLiveSpan { + fn to_string(&self) -> String { + match self { + Self::PAST_FIFTEEN_MINUTES => String::from("15m"), + Self::PAST_ONE_HOUR => String::from("1h"), + Self::PAST_FOUR_HOURS => String::from("4h"), + Self::PAST_ONE_DAY => String::from("1d"), + Self::PAST_TWO_DAYS => String::from("2d"), + Self::PAST_ONE_WEEK => String::from("1w"), + Self::PAST_ONE_MONTH => String::from("1mo"), + Self::PAST_THREE_MONTHS => String::from("3mo"), + } + } +} diff --git a/src/datadogV1/model/model_dashboard_invite_type.rs b/src/datadogV1/model/model_dashboard_invite_type.rs new file mode 100644 index 000000000..a71a1adcd --- /dev/null +++ b/src/datadogV1/model/model_dashboard_invite_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DashboardInviteType { + #[serde(rename = "public_dashboard_invitation")] + PUBLIC_DASHBOARD_INVITATION, +} + +impl ToString for DashboardInviteType { + fn to_string(&self) -> String { + match self { + Self::PUBLIC_DASHBOARD_INVITATION => String::from("public_dashboard_invitation"), + } + } +} diff --git a/src/datadogV1/model/model_dashboard_layout_type.rs b/src/datadogV1/model/model_dashboard_layout_type.rs new file mode 100644 index 000000000..4c6cb9f98 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_layout_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DashboardLayoutType { + #[serde(rename = "ordered")] + ORDERED, + #[serde(rename = "free")] + FREE, +} + +impl ToString for DashboardLayoutType { + fn to_string(&self) -> String { + match self { + Self::ORDERED => String::from("ordered"), + Self::FREE => String::from("free"), + } + } +} diff --git a/src/datadogV1/model/model_dashboard_list.rs b/src/datadogV1/model/model_dashboard_list.rs index 03123fc60..3743e2a44 100644 --- a/src/datadogV1/model/model_dashboard_list.rs +++ b/src/datadogV1/model/model_dashboard_list.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Your Datadog Dashboards. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardList { /// Object describing the creator of the shared element. #[serde(rename = "author")] diff --git a/src/datadogV1/model/model_dashboard_list_delete_response.rs b/src/datadogV1/model/model_dashboard_list_delete_response.rs index e3d9eb3f1..1379bb8e7 100644 --- a/src/datadogV1/model/model_dashboard_list_delete_response.rs +++ b/src/datadogV1/model/model_dashboard_list_delete_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Deleted dashboard details. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListDeleteResponse { /// ID of the deleted dashboard list. #[serde(rename = "deleted_dashboard_list_id")] diff --git a/src/datadogV1/model/model_dashboard_list_list_response.rs b/src/datadogV1/model/model_dashboard_list_list_response.rs index a80c2a962..306d2bae3 100644 --- a/src/datadogV1/model/model_dashboard_list_list_response.rs +++ b/src/datadogV1/model/model_dashboard_list_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Information on your dashboard lists. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListListResponse { /// List of all your dashboard lists. #[serde(rename = "dashboard_lists")] diff --git a/src/datadogV1/model/model_dashboard_reflow_type.rs b/src/datadogV1/model/model_dashboard_reflow_type.rs new file mode 100644 index 000000000..b8e0324a7 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_reflow_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DashboardReflowType { + #[serde(rename = "auto")] + AUTO, + #[serde(rename = "fixed")] + FIXED, +} + +impl ToString for DashboardReflowType { + fn to_string(&self) -> String { + match self { + Self::AUTO => String::from("auto"), + Self::FIXED => String::from("fixed"), + } + } +} diff --git a/src/datadogV1/model/model_dashboard_resource_type.rs b/src/datadogV1/model/model_dashboard_resource_type.rs new file mode 100644 index 000000000..f9594a9b7 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_resource_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DashboardResourceType { + #[serde(rename = "dashboard")] + DASHBOARD, +} + +impl ToString for DashboardResourceType { + fn to_string(&self) -> String { + match self { + Self::DASHBOARD => String::from("dashboard"), + } + } +} diff --git a/src/datadogV1/model/model_dashboard_restore_request.rs b/src/datadogV1/model/model_dashboard_restore_request.rs new file mode 100644 index 000000000..cd38ff65b --- /dev/null +++ b/src/datadogV1/model/model_dashboard_restore_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Dashboard restore request body. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardRestoreRequest { + /// List of dashboard bulk action request data objects. + #[serde(rename = "data")] + pub data: Vec, +} + +impl DashboardRestoreRequest { + pub fn new( + data: Vec, + ) -> DashboardRestoreRequest { + DashboardRestoreRequest { data } + } +} diff --git a/src/datadogV1/model/model_dashboard_share_type.rs b/src/datadogV1/model/model_dashboard_share_type.rs new file mode 100644 index 000000000..6f4f7ca10 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_share_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DashboardShareType { + #[serde(rename = "open")] + OPEN, + #[serde(rename = "invite")] + INVITE, +} + +impl ToString for DashboardShareType { + fn to_string(&self) -> String { + match self { + Self::OPEN => String::from("open"), + Self::INVITE => String::from("invite"), + } + } +} diff --git a/src/datadogV1/model/model_dashboard_summary.rs b/src/datadogV1/model/model_dashboard_summary.rs new file mode 100644 index 000000000..9f3fbf983 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_summary.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Dashboard summary response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardSummary { + /// List of dashboard definitions. + #[serde(rename = "dashboards")] + pub dashboards: Option>, +} + +impl DashboardSummary { + pub fn new() -> DashboardSummary { + DashboardSummary { dashboards: None } + } +} diff --git a/src/datadogV1/model/model_dashboard_summary_definition.rs b/src/datadogV1/model/model_dashboard_summary_definition.rs new file mode 100644 index 000000000..6a37747a2 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_summary_definition.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Dashboard definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardSummaryDefinition { + /// Identifier of the dashboard author. + #[serde(rename = "author_handle")] + pub author_handle: Option, + /// Creation date of the dashboard. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Description of the dashboard. + #[serde( + rename = "description", + default, + with = "::serde_with::rust::double_option" + )] + pub description: Option>, + /// Dashboard identifier. + #[serde(rename = "id")] + pub id: Option, + /// Whether this dashboard is read-only. If True, only the author and admins can make changes to it. + #[serde(rename = "is_read_only")] + pub is_read_only: Option, + /// Layout type of the dashboard. + #[serde(rename = "layout_type")] + pub layout_type: Option, + /// Modification date of the dashboard. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Title of the dashboard. + #[serde(rename = "title")] + pub title: Option, + /// URL of the dashboard. + #[serde(rename = "url")] + pub url: Option, +} + +impl DashboardSummaryDefinition { + pub fn new() -> DashboardSummaryDefinition { + DashboardSummaryDefinition { + author_handle: None, + created_at: None, + description: None, + id: None, + is_read_only: None, + layout_type: None, + modified_at: None, + title: None, + url: None, + } + } +} diff --git a/src/datadogV1/model/model_dashboard_template_variable.rs b/src/datadogV1/model/model_dashboard_template_variable.rs new file mode 100644 index 000000000..eb961e796 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_template_variable.rs @@ -0,0 +1,48 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Template variable. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardTemplateVariable { + /// The list of values that the template variable drop-down is limited to. + #[serde( + rename = "available_values", + default, + with = "::serde_with::rust::double_option" + )] + pub available_values: Option>>, + /// (deprecated) The default value for the template variable on dashboard load. Cannot be used in conjunction with `defaults`. + #[deprecated] + #[serde( + rename = "default", + default, + with = "::serde_with::rust::double_option" + )] + pub default: Option>, + /// One or many default values for template variables on load. If more than one default is specified, they will be unioned together with `OR`. Cannot be used in conjunction with `default`. + #[serde(rename = "defaults")] + pub defaults: Option>, + /// The name of the variable. + #[serde(rename = "name")] + pub name: String, + /// The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down. + #[serde(rename = "prefix", default, with = "::serde_with::rust::double_option")] + pub prefix: Option>, +} + +impl DashboardTemplateVariable { + pub fn new(name: String) -> DashboardTemplateVariable { + #[allow(deprecated)] + DashboardTemplateVariable { + available_values: None, + default: None, + defaults: None, + name, + prefix: None, + } + } +} diff --git a/src/datadogV1/model/model_dashboard_template_variable_preset.rs b/src/datadogV1/model/model_dashboard_template_variable_preset.rs new file mode 100644 index 000000000..1f14603c0 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_template_variable_preset.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Template variables saved views. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardTemplateVariablePreset { + /// The name of the variable. + #[serde(rename = "name")] + pub name: Option, + /// List of variables. + #[serde(rename = "template_variables")] + pub template_variables: + Option>, +} + +impl DashboardTemplateVariablePreset { + pub fn new() -> DashboardTemplateVariablePreset { + DashboardTemplateVariablePreset { + name: None, + template_variables: None, + } + } +} diff --git a/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs b/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs new file mode 100644 index 000000000..53230bfe8 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_template_variable_preset_value.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Template variables saved views. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DashboardTemplateVariablePresetValue { + /// The name of the variable. + #[serde(rename = "name")] + pub name: Option, + /// (deprecated) The value of the template variable within the saved view. Cannot be used in conjunction with `values`. + #[deprecated] + #[serde(rename = "value")] + pub value: Option, + /// One or many template variable values within the saved view, which will be unioned together using `OR` if more than one is specified. Cannot be used in conjunction with `value`. + #[serde(rename = "values")] + pub values: Option>, +} + +impl DashboardTemplateVariablePresetValue { + pub fn new() -> DashboardTemplateVariablePresetValue { + #[allow(deprecated)] + DashboardTemplateVariablePresetValue { + name: None, + value: None, + values: None, + } + } +} diff --git a/src/datadogV1/model/model_dashboard_type.rs b/src/datadogV1/model/model_dashboard_type.rs new file mode 100644 index 000000000..f2867f502 --- /dev/null +++ b/src/datadogV1/model/model_dashboard_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DashboardType { + #[serde(rename = "custom_timeboard")] + CUSTOM_TIMEBOARD, + #[serde(rename = "custom_screenboard")] + CUSTOM_SCREENBOARD, +} + +impl ToString for DashboardType { + fn to_string(&self) -> String { + match self { + Self::CUSTOM_TIMEBOARD => String::from("custom_timeboard"), + Self::CUSTOM_SCREENBOARD => String::from("custom_screenboard"), + } + } +} diff --git a/src/datadogV1/model/model_delete_shared_dashboard_response.rs b/src/datadogV1/model/model_delete_shared_dashboard_response.rs new file mode 100644 index 000000000..3bc378a6e --- /dev/null +++ b/src/datadogV1/model/model_delete_shared_dashboard_response.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing token of deleted shared dashboard. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DeleteSharedDashboardResponse { + /// Token associated with the shared dashboard that was revoked. + #[serde(rename = "deleted_public_dashboard_token")] + pub deleted_public_dashboard_token: Option, +} + +impl DeleteSharedDashboardResponse { + pub fn new() -> DeleteSharedDashboardResponse { + DeleteSharedDashboardResponse { + deleted_public_dashboard_token: None, + } + } +} diff --git a/src/datadogV1/model/model_deleted_monitor.rs b/src/datadogV1/model/model_deleted_monitor.rs new file mode 100644 index 000000000..f12a2a185 --- /dev/null +++ b/src/datadogV1/model/model_deleted_monitor.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response from the delete monitor call. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DeletedMonitor { + /// ID of the deleted monitor. + #[serde(rename = "deleted_monitor_id")] + pub deleted_monitor_id: Option, +} + +impl DeletedMonitor { + pub fn new() -> DeletedMonitor { + DeletedMonitor { + deleted_monitor_id: None, + } + } +} diff --git a/src/datadogV1/model/model_distribution_point_item.rs b/src/datadogV1/model/model_distribution_point_item.rs new file mode 100644 index 000000000..964b3be3d --- /dev/null +++ b/src/datadogV1/model/model_distribution_point_item.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// List of distribution point. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DistributionPointItem { + DistributionPointTimestamp(Box), + DistributionPointData(Box>), +} diff --git a/src/datadogV1/model/model_distribution_points_content_encoding.rs b/src/datadogV1/model/model_distribution_points_content_encoding.rs new file mode 100644 index 000000000..758f47d8e --- /dev/null +++ b/src/datadogV1/model/model_distribution_points_content_encoding.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DistributionPointsContentEncoding { + #[serde(rename = "deflate")] + DEFLATE, +} + +impl ToString for DistributionPointsContentEncoding { + fn to_string(&self) -> String { + match self { + Self::DEFLATE => String::from("deflate"), + } + } +} diff --git a/src/datadogV1/model/model_distribution_points_payload.rs b/src/datadogV1/model/model_distribution_points_payload.rs new file mode 100644 index 000000000..f0f2964b3 --- /dev/null +++ b/src/datadogV1/model/model_distribution_points_payload.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The distribution points payload. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DistributionPointsPayload { + /// A list of distribution points series to submit to Datadog. + #[serde(rename = "series")] + pub series: Vec, +} + +impl DistributionPointsPayload { + pub fn new( + series: Vec, + ) -> DistributionPointsPayload { + DistributionPointsPayload { series } + } +} diff --git a/src/datadogV1/model/model_distribution_points_series.rs b/src/datadogV1/model/model_distribution_points_series.rs new file mode 100644 index 000000000..2ef2607f5 --- /dev/null +++ b/src/datadogV1/model/model_distribution_points_series.rs @@ -0,0 +1,41 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A distribution points metric to submit to Datadog. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DistributionPointsSeries { + /// The name of the host that produced the distribution point metric. + #[serde(rename = "host")] + pub host: Option, + /// The name of the distribution points metric. + #[serde(rename = "metric")] + pub metric: String, + /// Points relating to the distribution point metric. All points must be tuples with timestamp and a list of values (cannot be a string). Timestamps should be in POSIX time in seconds. + #[serde(rename = "points")] + pub points: Vec>>, + /// A list of tags associated with the distribution point metric. + #[serde(rename = "tags")] + pub tags: Option>, + /// The type of the distribution point. + #[serde(rename = "type")] + pub type_: Option, +} + +impl DistributionPointsSeries { + pub fn new( + metric: String, + points: Vec>>, + ) -> DistributionPointsSeries { + DistributionPointsSeries { + host: None, + metric, + points, + tags: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_distribution_points_type.rs b/src/datadogV1/model/model_distribution_points_type.rs new file mode 100644 index 000000000..ed6d85762 --- /dev/null +++ b/src/datadogV1/model/model_distribution_points_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DistributionPointsType { + #[serde(rename = "distribution")] + DISTRIBUTION, +} + +impl ToString for DistributionPointsType { + fn to_string(&self) -> String { + match self { + Self::DISTRIBUTION => String::from("distribution"), + } + } +} diff --git a/src/datadogV1/model/model_distribution_widget_definition.rs b/src/datadogV1/model/model_distribution_widget_definition.rs new file mode 100644 index 000000000..7d1628579 --- /dev/null +++ b/src/datadogV1/model/model_distribution_widget_definition.rs @@ -0,0 +1,77 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The Distribution visualization is another way of showing metrics +/// aggregated across one or several tags, such as hosts. +/// Unlike the heat map, a distribution graph’s x-axis is quantity rather than time. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DistributionWidgetDefinition { + /// A list of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// (Deprecated) The widget legend was replaced by a tooltip and sidebar. + #[deprecated] + #[serde(rename = "legend_size")] + pub legend_size: Option, + /// List of markers. + #[serde(rename = "markers")] + pub markers: Option>, + /// Array of one request object to display in the widget. + /// + /// See the dedicated [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) + /// to learn how to build the `REQUEST_SCHEMA`. + #[serde(rename = "requests")] + pub requests: Vec, + /// (Deprecated) The widget legend was replaced by a tooltip and sidebar. + #[deprecated] + #[serde(rename = "show_legend")] + pub show_legend: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the distribution widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::DistributionWidgetDefinitionType, + /// X Axis controls for the distribution widget. + #[serde(rename = "xaxis")] + pub xaxis: Option>, + /// Y Axis controls for the distribution widget. + #[serde(rename = "yaxis")] + pub yaxis: Option>, +} + +impl DistributionWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::DistributionWidgetDefinitionType, + ) -> DistributionWidgetDefinition { + #[allow(deprecated)] + DistributionWidgetDefinition { + custom_links: None, + legend_size: None, + markers: None, + requests, + show_legend: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + xaxis: None, + yaxis: None, + } + } +} diff --git a/src/datadogV1/model/model_distribution_widget_definition_type.rs b/src/datadogV1/model/model_distribution_widget_definition_type.rs new file mode 100644 index 000000000..3b3755b87 --- /dev/null +++ b/src/datadogV1/model/model_distribution_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DistributionWidgetDefinitionType { + #[serde(rename = "distribution")] + DISTRIBUTION, +} + +impl ToString for DistributionWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::DISTRIBUTION => String::from("distribution"), + } + } +} diff --git a/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs b/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs new file mode 100644 index 000000000..04ef7e8ee --- /dev/null +++ b/src/datadogV1/model/model_distribution_widget_histogram_request_query.rs @@ -0,0 +1,19 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Query definition for Distribution Widget Histogram Request +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DistributionWidgetHistogramRequestQuery { + FormulaAndFunctionMetricQueryDefinition( + Box, + ), + FormulaAndFunctionEventQueryDefinition( + Box, + ), + FormulaAndFunctionApmResourceStatsQueryDefinition( + Box, + ), +} diff --git a/src/datadogV1/model/model_distribution_widget_histogram_request_type.rs b/src/datadogV1/model/model_distribution_widget_histogram_request_type.rs new file mode 100644 index 000000000..9ca9bc67d --- /dev/null +++ b/src/datadogV1/model/model_distribution_widget_histogram_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DistributionWidgetHistogramRequestType { + #[serde(rename = "histogram")] + HISTOGRAM, +} + +impl ToString for DistributionWidgetHistogramRequestType { + fn to_string(&self) -> String { + match self { + Self::HISTOGRAM => String::from("histogram"), + } + } +} diff --git a/src/datadogV1/model/model_distribution_widget_request.rs b/src/datadogV1/model/model_distribution_widget_request.rs new file mode 100644 index 000000000..9f4759d8a --- /dev/null +++ b/src/datadogV1/model/model_distribution_widget_request.rs @@ -0,0 +1,70 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated distribution widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DistributionWidgetRequest { + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The APM stats query for table and distributions widgets. + #[serde(rename = "apm_stats_query")] + pub apm_stats_query: Option>, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Widget query. + #[serde(rename = "q")] + pub q: Option, + /// Query definition for Distribution Widget Histogram Request + #[serde(rename = "query")] + pub query: Option>, + /// Request type for the histogram request. + #[serde(rename = "request_type")] + pub request_type: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, + /// Widget style definition. + #[serde(rename = "style")] + pub style: Option>, +} + +impl DistributionWidgetRequest { + pub fn new() -> DistributionWidgetRequest { + DistributionWidgetRequest { + apm_query: None, + apm_stats_query: None, + event_query: None, + log_query: None, + network_query: None, + process_query: None, + profile_metrics_query: None, + q: None, + query: None, + request_type: None, + rum_query: None, + security_query: None, + style: None, + } + } +} diff --git a/src/datadogV1/model/model_distribution_widget_x_axis.rs b/src/datadogV1/model/model_distribution_widget_x_axis.rs new file mode 100644 index 000000000..5cdcbce6f --- /dev/null +++ b/src/datadogV1/model/model_distribution_widget_x_axis.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// X Axis controls for the distribution widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DistributionWidgetXAxis { + /// True includes zero. + #[serde(rename = "include_zero")] + pub include_zero: Option, + /// Specifies maximum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior. + #[serde(rename = "max")] + pub max: Option, + /// Specifies minimum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior. + #[serde(rename = "min")] + pub min: Option, + /// Specifies the scale type. Possible values are `linear`. + #[serde(rename = "scale")] + pub scale: Option, +} + +impl DistributionWidgetXAxis { + pub fn new() -> DistributionWidgetXAxis { + DistributionWidgetXAxis { + include_zero: None, + max: None, + min: None, + scale: None, + } + } +} diff --git a/src/datadogV1/model/model_distribution_widget_y_axis.rs b/src/datadogV1/model/model_distribution_widget_y_axis.rs new file mode 100644 index 000000000..a46c2c274 --- /dev/null +++ b/src/datadogV1/model/model_distribution_widget_y_axis.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Y Axis controls for the distribution widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DistributionWidgetYAxis { + /// True includes zero. + #[serde(rename = "include_zero")] + pub include_zero: Option, + /// The label of the axis to display on the graph. + #[serde(rename = "label")] + pub label: Option, + /// Specifies the maximum value to show on the y-axis. It takes a number, or auto for default behavior. + #[serde(rename = "max")] + pub max: Option, + /// Specifies minimum value to show on the y-axis. It takes a number, or auto for default behavior. + #[serde(rename = "min")] + pub min: Option, + /// Specifies the scale type. Possible values are `linear` or `log`. + #[serde(rename = "scale")] + pub scale: Option, +} + +impl DistributionWidgetYAxis { + pub fn new() -> DistributionWidgetYAxis { + DistributionWidgetYAxis { + include_zero: None, + label: None, + max: None, + min: None, + scale: None, + } + } +} diff --git a/src/datadogV1/model/model_downtime.rs b/src/datadogV1/model/model_downtime.rs index 94f24b628..696600361 100644 --- a/src/datadogV1/model/model_downtime.rs +++ b/src/datadogV1/model/model_downtime.rs @@ -9,7 +9,7 @@ use serde_with::skip_serializing_none; /// Downtime settings, which can be scheduled with start and end times, /// prevent all alerting related to specified Datadog tags. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Downtime { /// If a scheduled downtime currently exists. #[serde(rename = "active")] diff --git a/src/datadogV1/model/model_downtime_child.rs b/src/datadogV1/model/model_downtime_child.rs index b13a7ae16..522fb4104 100644 --- a/src/datadogV1/model/model_downtime_child.rs +++ b/src/datadogV1/model/model_downtime_child.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// The downtime object definition of the active child for the original parent recurring downtime. This /// field will only exist on recurring downtimes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DowntimeChild { /// If a scheduled downtime currently exists. #[serde(rename = "active")] diff --git a/src/datadogV1/model/model_downtime_recurrence.rs b/src/datadogV1/model/model_downtime_recurrence.rs index d60c9f8ac..4d296a4f5 100644 --- a/src/datadogV1/model/model_downtime_recurrence.rs +++ b/src/datadogV1/model/model_downtime_recurrence.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object defining the recurrence of the downtime. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DowntimeRecurrence { /// How often to repeat as an integer. /// For example, to repeat every 3 days, select a type of `days` and a period of `3`. diff --git a/src/datadogV1/model/model_event.rs b/src/datadogV1/model/model_event.rs index 987703210..8df7830cf 100644 --- a/src/datadogV1/model/model_event.rs +++ b/src/datadogV1/model/model_event.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object representing an event. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Event { /// If an alert event is enabled, set its type. /// For example, `error`, `warning`, `info`, `success`, `user_update`, diff --git a/src/datadogV1/model/model_event_alert_type.rs b/src/datadogV1/model/model_event_alert_type.rs index d110685e3..738bd6a95 100644 --- a/src/datadogV1/model/model_event_alert_type.rs +++ b/src/datadogV1/model/model_event_alert_type.rs @@ -35,9 +35,3 @@ impl ToString for EventAlertType { } } } - -impl Default for EventAlertType { - fn default() -> EventAlertType { - Self::ERROR - } -} diff --git a/src/datadogV1/model/model_event_create_request.rs b/src/datadogV1/model/model_event_create_request.rs index 9947b85d9..791f86e42 100644 --- a/src/datadogV1/model/model_event_create_request.rs +++ b/src/datadogV1/model/model_event_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object representing an event. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventCreateRequest { /// An arbitrary string to use for aggregation. Limited to 100 characters. /// If you specify a key, all events using that key are grouped together in the Event Stream. diff --git a/src/datadogV1/model/model_event_create_response.rs b/src/datadogV1/model/model_event_create_response.rs index 213d5b28e..abf894a4b 100644 --- a/src/datadogV1/model/model_event_create_response.rs +++ b/src/datadogV1/model/model_event_create_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing an event response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventCreateResponse { /// Object representing an event. #[serde(rename = "event")] diff --git a/src/datadogV1/model/model_event_list_response.rs b/src/datadogV1/model/model_event_list_response.rs index 2e39ee9c3..10b34a7af 100644 --- a/src/datadogV1/model/model_event_list_response.rs +++ b/src/datadogV1/model/model_event_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An event list response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventListResponse { /// An array of events. #[serde(rename = "events")] diff --git a/src/datadogV1/model/model_event_priority.rs b/src/datadogV1/model/model_event_priority.rs index f6c339c74..38fef7152 100644 --- a/src/datadogV1/model/model_event_priority.rs +++ b/src/datadogV1/model/model_event_priority.rs @@ -20,9 +20,3 @@ impl ToString for EventPriority { } } } - -impl Default for EventPriority { - fn default() -> EventPriority { - Self::NORMAL - } -} diff --git a/src/datadogV1/model/model_event_query_definition.rs b/src/datadogV1/model/model_event_query_definition.rs new file mode 100644 index 000000000..9b83df239 --- /dev/null +++ b/src/datadogV1/model/model_event_query_definition.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The event query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventQueryDefinition { + /// The query being made on the event. + #[serde(rename = "search")] + pub search: String, + /// The execution method for multi-value filters. Can be either and or or. + #[serde(rename = "tags_execution")] + pub tags_execution: String, +} + +impl EventQueryDefinition { + pub fn new(search: String, tags_execution: String) -> EventQueryDefinition { + EventQueryDefinition { + search, + tags_execution, + } + } +} diff --git a/src/datadogV1/model/model_event_response.rs b/src/datadogV1/model/model_event_response.rs index c7b6b9d69..f42fa8e58 100644 --- a/src/datadogV1/model/model_event_response.rs +++ b/src/datadogV1/model/model_event_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing an event response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventResponse { /// Object representing an event. #[serde(rename = "event")] diff --git a/src/datadogV1/model/model_event_stream_widget_definition.rs b/src/datadogV1/model/model_event_stream_widget_definition.rs new file mode 100644 index 000000000..3fbab8588 --- /dev/null +++ b/src/datadogV1/model/model_event_stream_widget_definition.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The event stream is a widget version of the stream of events +/// on the Event Stream view. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventStreamWidgetDefinition { + /// Size to use to display an event. + #[serde(rename = "event_size")] + pub event_size: Option, + /// Query to filter the event stream with. + #[serde(rename = "query")] + pub query: String, + /// The execution method for multi-value filters. Can be either and or or. + #[serde(rename = "tags_execution")] + pub tags_execution: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the event stream widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::EventStreamWidgetDefinitionType, +} + +impl EventStreamWidgetDefinition { + pub fn new( + query: String, + type_: crate::datadogV1::model::EventStreamWidgetDefinitionType, + ) -> EventStreamWidgetDefinition { + EventStreamWidgetDefinition { + event_size: None, + query, + tags_execution: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_event_stream_widget_definition_type.rs b/src/datadogV1/model/model_event_stream_widget_definition_type.rs new file mode 100644 index 000000000..2b10520a8 --- /dev/null +++ b/src/datadogV1/model/model_event_stream_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EventStreamWidgetDefinitionType { + #[serde(rename = "event_stream")] + EVENT_STREAM, +} + +impl ToString for EventStreamWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::EVENT_STREAM => String::from("event_stream"), + } + } +} diff --git a/src/datadogV1/model/model_event_timeline_widget_definition.rs b/src/datadogV1/model/model_event_timeline_widget_definition.rs new file mode 100644 index 000000000..57a927087 --- /dev/null +++ b/src/datadogV1/model/model_event_timeline_widget_definition.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The event timeline is a widget version of the timeline that appears at the top of the Event Stream view. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventTimelineWidgetDefinition { + /// Query to filter the event timeline with. + #[serde(rename = "query")] + pub query: String, + /// The execution method for multi-value filters. Can be either and or or. + #[serde(rename = "tags_execution")] + pub tags_execution: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the event timeline widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::EventTimelineWidgetDefinitionType, +} + +impl EventTimelineWidgetDefinition { + pub fn new( + query: String, + type_: crate::datadogV1::model::EventTimelineWidgetDefinitionType, + ) -> EventTimelineWidgetDefinition { + EventTimelineWidgetDefinition { + query, + tags_execution: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_event_timeline_widget_definition_type.rs b/src/datadogV1/model/model_event_timeline_widget_definition_type.rs new file mode 100644 index 000000000..5d14b67b4 --- /dev/null +++ b/src/datadogV1/model/model_event_timeline_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EventTimelineWidgetDefinitionType { + #[serde(rename = "event_timeline")] + EVENT_TIMELINE, +} + +impl ToString for EventTimelineWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::EVENT_TIMELINE => String::from("event_timeline"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_apm_dependency_stat_name.rs b/src/datadogV1/model/model_formula_and_function_apm_dependency_stat_name.rs new file mode 100644 index 000000000..e463747d6 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_apm_dependency_stat_name.rs @@ -0,0 +1,37 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionApmDependencyStatName { + #[serde(rename = "avg_duration")] + AVG_DURATION, + #[serde(rename = "avg_root_duration")] + AVG_ROOT_DURATION, + #[serde(rename = "avg_spans_per_trace")] + AVG_SPANS_PER_TRACE, + #[serde(rename = "error_rate")] + ERROR_RATE, + #[serde(rename = "pct_exec_time")] + PCT_EXEC_TIME, + #[serde(rename = "pct_of_traces")] + PCT_OF_TRACES, + #[serde(rename = "total_traces_count")] + TOTAL_TRACES_COUNT, +} + +impl ToString for FormulaAndFunctionApmDependencyStatName { + fn to_string(&self) -> String { + match self { + Self::AVG_DURATION => String::from("avg_duration"), + Self::AVG_ROOT_DURATION => String::from("avg_root_duration"), + Self::AVG_SPANS_PER_TRACE => String::from("avg_spans_per_trace"), + Self::ERROR_RATE => String::from("error_rate"), + Self::PCT_EXEC_TIME => String::from("pct_exec_time"), + Self::PCT_OF_TRACES => String::from("pct_of_traces"), + Self::TOTAL_TRACES_COUNT => String::from("total_traces_count"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_data_source.rs b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_data_source.rs new file mode 100644 index 000000000..516c78269 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_data_source.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionApmDependencyStatsDataSource { + #[serde(rename = "apm_dependency_stats")] + APM_DEPENDENCY_STATS, +} + +impl ToString for FormulaAndFunctionApmDependencyStatsDataSource { + fn to_string(&self) -> String { + match self { + Self::APM_DEPENDENCY_STATS => String::from("apm_dependency_stats"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs new file mode 100644 index 000000000..9955780f0 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_apm_dependency_stats_query_definition.rs @@ -0,0 +1,66 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A formula and functions APM dependency stats query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionApmDependencyStatsQueryDefinition { + /// Data source for APM dependency stats queries. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FormulaAndFunctionApmDependencyStatsDataSource, + /// APM environment. + #[serde(rename = "env")] + pub env: String, + /// Determines whether stats for upstream or downstream dependencies should be queried. + #[serde(rename = "is_upstream")] + pub is_upstream: Option, + /// Name of query to use in formulas. + #[serde(rename = "name")] + pub name: String, + /// Name of operation on service. + #[serde(rename = "operation_name")] + pub operation_name: String, + /// The name of the second primary tag used within APM; required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog. + #[serde(rename = "primary_tag_name")] + pub primary_tag_name: Option, + /// Filter APM data by the second primary tag. `primary_tag_name` must also be specified. + #[serde(rename = "primary_tag_value")] + pub primary_tag_value: Option, + /// APM resource. + #[serde(rename = "resource_name")] + pub resource_name: String, + /// APM service. + #[serde(rename = "service")] + pub service: String, + /// APM statistic. + #[serde(rename = "stat")] + pub stat: crate::datadogV1::model::FormulaAndFunctionApmDependencyStatName, +} + +impl FormulaAndFunctionApmDependencyStatsQueryDefinition { + pub fn new( + data_source: crate::datadogV1::model::FormulaAndFunctionApmDependencyStatsDataSource, + env: String, + name: String, + operation_name: String, + resource_name: String, + service: String, + stat: crate::datadogV1::model::FormulaAndFunctionApmDependencyStatName, + ) -> FormulaAndFunctionApmDependencyStatsQueryDefinition { + FormulaAndFunctionApmDependencyStatsQueryDefinition { + data_source, + env, + is_upstream: None, + name, + operation_name, + primary_tag_name: None, + primary_tag_value: None, + resource_name, + service, + stat, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_apm_resource_stat_name.rs b/src/datadogV1/model/model_formula_and_function_apm_resource_stat_name.rs new file mode 100644 index 000000000..26b72eef8 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_apm_resource_stat_name.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionApmResourceStatName { + #[serde(rename = "errors")] + ERRORS, + #[serde(rename = "error_rate")] + ERROR_RATE, + #[serde(rename = "hits")] + HITS, + #[serde(rename = "latency_avg")] + LATENCY_AVG, + #[serde(rename = "latency_distribution")] + LATENCY_DISTRIBUTION, + #[serde(rename = "latency_max")] + LATENCY_MAX, + #[serde(rename = "latency_p50")] + LATENCY_P50, + #[serde(rename = "latency_p75")] + LATENCY_P75, + #[serde(rename = "latency_p90")] + LATENCY_P90, + #[serde(rename = "latency_p95")] + LATENCY_P95, + #[serde(rename = "latency_p99")] + LATENCY_P99, +} + +impl ToString for FormulaAndFunctionApmResourceStatName { + fn to_string(&self) -> String { + match self { + Self::ERRORS => String::from("errors"), + Self::ERROR_RATE => String::from("error_rate"), + Self::HITS => String::from("hits"), + Self::LATENCY_AVG => String::from("latency_avg"), + Self::LATENCY_DISTRIBUTION => String::from("latency_distribution"), + Self::LATENCY_MAX => String::from("latency_max"), + Self::LATENCY_P50 => String::from("latency_p50"), + Self::LATENCY_P75 => String::from("latency_p75"), + Self::LATENCY_P90 => String::from("latency_p90"), + Self::LATENCY_P95 => String::from("latency_p95"), + Self::LATENCY_P99 => String::from("latency_p99"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_apm_resource_stats_data_source.rs b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_data_source.rs new file mode 100644 index 000000000..8cd146092 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_data_source.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionApmResourceStatsDataSource { + #[serde(rename = "apm_resource_stats")] + APM_RESOURCE_STATS, +} + +impl ToString for FormulaAndFunctionApmResourceStatsDataSource { + fn to_string(&self) -> String { + match self { + Self::APM_RESOURCE_STATS => String::from("apm_resource_stats"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs new file mode 100644 index 000000000..ef4faa874 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_apm_resource_stats_query_definition.rs @@ -0,0 +1,64 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// APM resource stats query using formulas and functions. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionApmResourceStatsQueryDefinition { + /// Data source for APM resource stats queries. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FormulaAndFunctionApmResourceStatsDataSource, + /// APM environment. + #[serde(rename = "env")] + pub env: String, + /// Array of fields to group results by. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// Name of this query to use in formulas. + #[serde(rename = "name")] + pub name: String, + /// Name of operation on service. + #[serde(rename = "operation_name")] + pub operation_name: Option, + /// Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog + #[serde(rename = "primary_tag_name")] + pub primary_tag_name: Option, + /// Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified. + #[serde(rename = "primary_tag_value")] + pub primary_tag_value: Option, + /// APM resource name. + #[serde(rename = "resource_name")] + pub resource_name: Option, + /// APM service name. + #[serde(rename = "service")] + pub service: String, + /// APM resource stat name. + #[serde(rename = "stat")] + pub stat: crate::datadogV1::model::FormulaAndFunctionApmResourceStatName, +} + +impl FormulaAndFunctionApmResourceStatsQueryDefinition { + pub fn new( + data_source: crate::datadogV1::model::FormulaAndFunctionApmResourceStatsDataSource, + env: String, + name: String, + service: String, + stat: crate::datadogV1::model::FormulaAndFunctionApmResourceStatName, + ) -> FormulaAndFunctionApmResourceStatsQueryDefinition { + FormulaAndFunctionApmResourceStatsQueryDefinition { + data_source, + env, + group_by: None, + name, + operation_name: None, + primary_tag_name: None, + primary_tag_value: None, + resource_name: None, + service, + stat, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_cloud_cost_data_source.rs b/src/datadogV1/model/model_formula_and_function_cloud_cost_data_source.rs new file mode 100644 index 000000000..4b01ae5bf --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_cloud_cost_data_source.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionCloudCostDataSource { + #[serde(rename = "cloud_cost")] + CLOUD_COST, +} + +impl ToString for FormulaAndFunctionCloudCostDataSource { + fn to_string(&self) -> String { + match self { + Self::CLOUD_COST => String::from("cloud_cost"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs b/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs new file mode 100644 index 000000000..b4ed6928f --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_cloud_cost_query_definition.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A formula and functions Cloud Cost query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionCloudCostQueryDefinition { + /// Aggregator used for the request. + #[serde(rename = "aggregator")] + pub aggregator: Option, + /// Data source for Cloud Cost queries. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FormulaAndFunctionCloudCostDataSource, + /// Name of the query for use in formulas. + #[serde(rename = "name")] + pub name: String, + /// Query for Cloud Cost data. + #[serde(rename = "query")] + pub query: String, +} + +impl FormulaAndFunctionCloudCostQueryDefinition { + pub fn new( + data_source: crate::datadogV1::model::FormulaAndFunctionCloudCostDataSource, + name: String, + query: String, + ) -> FormulaAndFunctionCloudCostQueryDefinition { + FormulaAndFunctionCloudCostQueryDefinition { + aggregator: None, + data_source, + name, + query, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_event_aggregation.rs b/src/datadogV1/model/model_formula_and_function_event_aggregation.rs new file mode 100644 index 000000000..f6f65dfc3 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_aggregation.rs @@ -0,0 +1,52 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionEventAggregation { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "median")] + MEDIAN, + #[serde(rename = "pc75")] + PC75, + #[serde(rename = "pc90")] + PC90, + #[serde(rename = "pc95")] + PC95, + #[serde(rename = "pc98")] + PC98, + #[serde(rename = "pc99")] + PC99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, +} + +impl ToString for FormulaAndFunctionEventAggregation { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::MEDIAN => String::from("median"), + Self::PC75 => String::from("pc75"), + Self::PC90 => String::from("pc90"), + Self::PC95 => String::from("pc95"), + Self::PC98 => String::from("pc98"), + Self::PC99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs new file mode 100644 index 000000000..3d986f0ed --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A formula and functions events query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionEventQueryDefinition { + /// Compute options. + #[serde(rename = "compute")] + pub compute: Box, + /// Data source for event platform-based queries. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FormulaAndFunctionEventsDataSource, + /// Group by options. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. + #[serde(rename = "indexes")] + pub indexes: Option>, + /// Name of the query for use in formulas. + #[serde(rename = "name")] + pub name: String, + /// Search options. + #[serde(rename = "search")] + pub search: Option>, + /// Option for storage location. Feature in Private Beta. + #[serde(rename = "storage")] + pub storage: Option, +} + +impl FormulaAndFunctionEventQueryDefinition { + pub fn new( + compute: Box, + data_source: crate::datadogV1::model::FormulaAndFunctionEventsDataSource, + name: String, + ) -> FormulaAndFunctionEventQueryDefinition { + FormulaAndFunctionEventQueryDefinition { + compute, + data_source, + group_by: None, + indexes: None, + name, + search: None, + storage: None, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs new file mode 100644 index 000000000..29efe3fb4 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition_compute.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Compute options. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionEventQueryDefinitionCompute { + /// Aggregation methods for event platform queries. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV1::model::FormulaAndFunctionEventAggregation, + /// A time interval in milliseconds. + #[serde(rename = "interval")] + pub interval: Option, + /// Measurable attribute to compute. + #[serde(rename = "metric")] + pub metric: Option, +} + +impl FormulaAndFunctionEventQueryDefinitionCompute { + pub fn new( + aggregation: crate::datadogV1::model::FormulaAndFunctionEventAggregation, + ) -> FormulaAndFunctionEventQueryDefinitionCompute { + FormulaAndFunctionEventQueryDefinitionCompute { + aggregation, + interval: None, + metric: None, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_event_query_definition_search.rs b/src/datadogV1/model/model_formula_and_function_event_query_definition_search.rs new file mode 100644 index 000000000..95022b2c2 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_query_definition_search.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Search options. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionEventQueryDefinitionSearch { + /// Events search string. + #[serde(rename = "query")] + pub query: String, +} + +impl FormulaAndFunctionEventQueryDefinitionSearch { + pub fn new(query: String) -> FormulaAndFunctionEventQueryDefinitionSearch { + FormulaAndFunctionEventQueryDefinitionSearch { query } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs new file mode 100644 index 000000000..17c4af0ee --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of objects used to group by. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionEventQueryGroupBy { + /// Event facet. + #[serde(rename = "facet")] + pub facet: String, + /// Number of groups to return. + #[serde(rename = "limit")] + pub limit: Option, + /// Options for sorting group by results. + #[serde(rename = "sort")] + pub sort: Option>, +} + +impl FormulaAndFunctionEventQueryGroupBy { + pub fn new(facet: String) -> FormulaAndFunctionEventQueryGroupBy { + FormulaAndFunctionEventQueryGroupBy { + facet, + limit: None, + sort: None, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs b/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs new file mode 100644 index 000000000..d05b1520b --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_event_query_group_by_sort.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options for sorting group by results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionEventQueryGroupBySort { + /// Aggregation methods for event platform queries. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV1::model::FormulaAndFunctionEventAggregation, + /// Metric used for sorting group by results. + #[serde(rename = "metric")] + pub metric: Option, + /// Direction of sort. + #[serde(rename = "order")] + pub order: Option, +} + +impl FormulaAndFunctionEventQueryGroupBySort { + pub fn new( + aggregation: crate::datadogV1::model::FormulaAndFunctionEventAggregation, + ) -> FormulaAndFunctionEventQueryGroupBySort { + FormulaAndFunctionEventQueryGroupBySort { + aggregation, + metric: None, + order: None, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_events_data_source.rs b/src/datadogV1/model/model_formula_and_function_events_data_source.rs new file mode 100644 index 000000000..cc43b940d --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_events_data_source.rs @@ -0,0 +1,46 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionEventsDataSource { + #[serde(rename = "logs")] + LOGS, + #[serde(rename = "spans")] + SPANS, + #[serde(rename = "network")] + NETWORK, + #[serde(rename = "rum")] + RUM, + #[serde(rename = "security_signals")] + SECURITY_SIGNALS, + #[serde(rename = "profiles")] + PROFILES, + #[serde(rename = "audit")] + AUDIT, + #[serde(rename = "events")] + EVENTS, + #[serde(rename = "ci_tests")] + CI_TESTS, + #[serde(rename = "ci_pipelines")] + CI_PIPELINES, +} + +impl ToString for FormulaAndFunctionEventsDataSource { + fn to_string(&self) -> String { + match self { + Self::LOGS => String::from("logs"), + Self::SPANS => String::from("spans"), + Self::NETWORK => String::from("network"), + Self::RUM => String::from("rum"), + Self::SECURITY_SIGNALS => String::from("security_signals"), + Self::PROFILES => String::from("profiles"), + Self::AUDIT => String::from("audit"), + Self::EVENTS => String::from("events"), + Self::CI_TESTS => String::from("ci_tests"), + Self::CI_PIPELINES => String::from("ci_pipelines"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_metric_aggregation.rs b/src/datadogV1/model/model_formula_and_function_metric_aggregation.rs new file mode 100644 index 000000000..e86098076 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_metric_aggregation.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionMetricAggregation { + #[serde(rename = "avg")] + AVG, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "last")] + LAST, + #[serde(rename = "area")] + AREA, + #[serde(rename = "l2norm")] + L2NORM, + #[serde(rename = "percentile")] + PERCENTILE, +} + +impl ToString for FormulaAndFunctionMetricAggregation { + fn to_string(&self) -> String { + match self { + Self::AVG => String::from("avg"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::SUM => String::from("sum"), + Self::LAST => String::from("last"), + Self::AREA => String::from("area"), + Self::L2NORM => String::from("l2norm"), + Self::PERCENTILE => String::from("percentile"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_metric_data_source.rs b/src/datadogV1/model/model_formula_and_function_metric_data_source.rs new file mode 100644 index 000000000..266b8910a --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_metric_data_source.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionMetricDataSource { + #[serde(rename = "metrics")] + METRICS, +} + +impl ToString for FormulaAndFunctionMetricDataSource { + fn to_string(&self) -> String { + match self { + Self::METRICS => String::from("metrics"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs b/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs new file mode 100644 index 000000000..5404e3ffa --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_metric_query_definition.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A formula and functions metrics query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionMetricQueryDefinition { + /// The aggregation methods available for metrics queries. + #[serde(rename = "aggregator")] + pub aggregator: Option, + /// Data source for metrics queries. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FormulaAndFunctionMetricDataSource, + /// Name of the query for use in formulas. + #[serde(rename = "name")] + pub name: String, + /// Metrics query definition. + #[serde(rename = "query")] + pub query: String, +} + +impl FormulaAndFunctionMetricQueryDefinition { + pub fn new( + data_source: crate::datadogV1::model::FormulaAndFunctionMetricDataSource, + name: String, + query: String, + ) -> FormulaAndFunctionMetricQueryDefinition { + FormulaAndFunctionMetricQueryDefinition { + aggregator: None, + data_source, + name, + query, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_process_query_data_source.rs b/src/datadogV1/model/model_formula_and_function_process_query_data_source.rs new file mode 100644 index 000000000..d79438b02 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_process_query_data_source.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionProcessQueryDataSource { + #[serde(rename = "process")] + PROCESS, + #[serde(rename = "container")] + CONTAINER, +} + +impl ToString for FormulaAndFunctionProcessQueryDataSource { + fn to_string(&self) -> String { + match self { + Self::PROCESS => String::from("process"), + Self::CONTAINER => String::from("container"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_process_query_definition.rs b/src/datadogV1/model/model_formula_and_function_process_query_definition.rs new file mode 100644 index 000000000..7b7f53649 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_process_query_definition.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Process query using formulas and functions. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionProcessQueryDefinition { + /// The aggregation methods available for metrics queries. + #[serde(rename = "aggregator")] + pub aggregator: Option, + /// Data sources that rely on the process backend. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FormulaAndFunctionProcessQueryDataSource, + /// Whether to normalize the CPU percentages. + #[serde(rename = "is_normalized_cpu")] + pub is_normalized_cpu: Option, + /// Number of hits to return. + #[serde(rename = "limit")] + pub limit: Option, + /// Process metric name. + #[serde(rename = "metric")] + pub metric: String, + /// Name of query for use in formulas. + #[serde(rename = "name")] + pub name: String, + /// Direction of sort. + #[serde(rename = "sort")] + pub sort: Option, + /// An array of tags to filter by. + #[serde(rename = "tag_filters")] + pub tag_filters: Option>, + /// Text to use as filter. + #[serde(rename = "text_filter")] + pub text_filter: Option, +} + +impl FormulaAndFunctionProcessQueryDefinition { + pub fn new( + data_source: crate::datadogV1::model::FormulaAndFunctionProcessQueryDataSource, + metric: String, + name: String, + ) -> FormulaAndFunctionProcessQueryDefinition { + FormulaAndFunctionProcessQueryDefinition { + aggregator: None, + data_source, + is_normalized_cpu: None, + limit: None, + metric, + name, + sort: None, + tag_filters: None, + text_filter: None, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_query_definition.rs b/src/datadogV1/model/model_formula_and_function_query_definition.rs new file mode 100644 index 000000000..9a921427d --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_query_definition.rs @@ -0,0 +1,31 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A formula and function query. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum FormulaAndFunctionQueryDefinition { + FormulaAndFunctionMetricQueryDefinition( + Box, + ), + FormulaAndFunctionEventQueryDefinition( + Box, + ), + FormulaAndFunctionProcessQueryDefinition( + Box, + ), + FormulaAndFunctionApmDependencyStatsQueryDefinition( + Box, + ), + FormulaAndFunctionApmResourceStatsQueryDefinition( + Box, + ), + FormulaAndFunctionSLOQueryDefinition( + Box, + ), + FormulaAndFunctionCloudCostQueryDefinition( + Box, + ), +} diff --git a/src/datadogV1/model/model_formula_and_function_response_format.rs b/src/datadogV1/model/model_formula_and_function_response_format.rs new file mode 100644 index 000000000..289f94345 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_response_format.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionResponseFormat { + #[serde(rename = "timeseries")] + TIMESERIES, + #[serde(rename = "scalar")] + SCALAR, + #[serde(rename = "event_list")] + EVENT_LIST, +} + +impl ToString for FormulaAndFunctionResponseFormat { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES => String::from("timeseries"), + Self::SCALAR => String::from("scalar"), + Self::EVENT_LIST => String::from("event_list"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_slo_data_source.rs b/src/datadogV1/model/model_formula_and_function_slo_data_source.rs new file mode 100644 index 000000000..2f7372df5 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_slo_data_source.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionSLODataSource { + #[serde(rename = "slo")] + SLO, +} + +impl ToString for FormulaAndFunctionSLODataSource { + fn to_string(&self) -> String { + match self { + Self::SLO => String::from("slo"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_slo_group_mode.rs b/src/datadogV1/model/model_formula_and_function_slo_group_mode.rs new file mode 100644 index 000000000..470bfaa41 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_slo_group_mode.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionSLOGroupMode { + #[serde(rename = "overall")] + OVERALL, + #[serde(rename = "components")] + COMPONENTS, +} + +impl ToString for FormulaAndFunctionSLOGroupMode { + fn to_string(&self) -> String { + match self { + Self::OVERALL => String::from("overall"), + Self::COMPONENTS => String::from("components"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_slo_measure.rs b/src/datadogV1/model/model_formula_and_function_slo_measure.rs new file mode 100644 index 000000000..91642f0b7 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_slo_measure.rs @@ -0,0 +1,34 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionSLOMeasure { + #[serde(rename = "good_events")] + GOOD_EVENTS, + #[serde(rename = "bad_events")] + BAD_EVENTS, + #[serde(rename = "slo_status")] + SLO_STATUS, + #[serde(rename = "error_budget_remaining")] + ERROR_BUDGET_REMAINING, + #[serde(rename = "burn_rate")] + BURN_RATE, + #[serde(rename = "error_budget_burndown")] + ERROR_BUDGET_BURNDOWN, +} + +impl ToString for FormulaAndFunctionSLOMeasure { + fn to_string(&self) -> String { + match self { + Self::GOOD_EVENTS => String::from("good_events"), + Self::BAD_EVENTS => String::from("bad_events"), + Self::SLO_STATUS => String::from("slo_status"), + Self::ERROR_BUDGET_REMAINING => String::from("error_budget_remaining"), + Self::BURN_RATE => String::from("burn_rate"), + Self::ERROR_BUDGET_BURNDOWN => String::from("error_budget_burndown"), + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs b/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs new file mode 100644 index 000000000..f9d3144d2 --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_slo_query_definition.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A formula and functions metrics query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaAndFunctionSLOQueryDefinition { + /// Additional filters applied to the SLO query. + #[serde(rename = "additional_query_filters")] + pub additional_query_filters: Option, + /// Data source for SLO measures queries. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FormulaAndFunctionSLODataSource, + /// Group mode to query measures. + #[serde(rename = "group_mode")] + pub group_mode: Option, + /// SLO measures queries. + #[serde(rename = "measure")] + pub measure: crate::datadogV1::model::FormulaAndFunctionSLOMeasure, + /// Name of the query for use in formulas. + #[serde(rename = "name")] + pub name: Option, + /// ID of an SLO to query measures. + #[serde(rename = "slo_id")] + pub slo_id: String, + /// Name of the query for use in formulas. + #[serde(rename = "slo_query_type")] + pub slo_query_type: Option, +} + +impl FormulaAndFunctionSLOQueryDefinition { + pub fn new( + data_source: crate::datadogV1::model::FormulaAndFunctionSLODataSource, + measure: crate::datadogV1::model::FormulaAndFunctionSLOMeasure, + slo_id: String, + ) -> FormulaAndFunctionSLOQueryDefinition { + FormulaAndFunctionSLOQueryDefinition { + additional_query_filters: None, + data_source, + group_mode: None, + measure, + name: None, + slo_id, + slo_query_type: None, + } + } +} diff --git a/src/datadogV1/model/model_formula_and_function_slo_query_type.rs b/src/datadogV1/model/model_formula_and_function_slo_query_type.rs new file mode 100644 index 000000000..04cf09aeb --- /dev/null +++ b/src/datadogV1/model/model_formula_and_function_slo_query_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FormulaAndFunctionSLOQueryType { + #[serde(rename = "metric")] + METRIC, +} + +impl ToString for FormulaAndFunctionSLOQueryType { + fn to_string(&self) -> String { + match self { + Self::METRIC => String::from("metric"), + } + } +} diff --git a/src/datadogV1/model/model_free_text_widget_definition.rs b/src/datadogV1/model/model_free_text_widget_definition.rs new file mode 100644 index 000000000..b1ce50f82 --- /dev/null +++ b/src/datadogV1/model/model_free_text_widget_definition.rs @@ -0,0 +1,41 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Free text is a widget that allows you to add headings to your screenboard. Commonly used to state the overall purpose of the dashboard. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FreeTextWidgetDefinition { + /// Color of the text. + #[serde(rename = "color")] + pub color: Option, + /// Size of the text. + #[serde(rename = "font_size")] + pub font_size: Option, + /// Text to display. + #[serde(rename = "text")] + pub text: String, + /// How to align the text on the widget. + #[serde(rename = "text_align")] + pub text_align: Option, + /// Type of the free text widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::FreeTextWidgetDefinitionType, +} + +impl FreeTextWidgetDefinition { + pub fn new( + text: String, + type_: crate::datadogV1::model::FreeTextWidgetDefinitionType, + ) -> FreeTextWidgetDefinition { + FreeTextWidgetDefinition { + color: None, + font_size: None, + text, + text_align: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_free_text_widget_definition_type.rs b/src/datadogV1/model/model_free_text_widget_definition_type.rs new file mode 100644 index 000000000..e528dcea8 --- /dev/null +++ b/src/datadogV1/model/model_free_text_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FreeTextWidgetDefinitionType { + #[serde(rename = "free_text")] + FREE_TEXT, +} + +impl ToString for FreeTextWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::FREE_TEXT => String::from("free_text"), + } + } +} diff --git a/src/datadogV1/model/model_funnel_query.rs b/src/datadogV1/model/model_funnel_query.rs new file mode 100644 index 000000000..9e6c8faa9 --- /dev/null +++ b/src/datadogV1/model/model_funnel_query.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated funnel widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FunnelQuery { + /// Source from which to query items to display in the funnel. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::FunnelSource, + /// The widget query. + #[serde(rename = "query_string")] + pub query_string: String, + /// List of funnel steps. + #[serde(rename = "steps")] + pub steps: Vec, +} + +impl FunnelQuery { + pub fn new( + data_source: crate::datadogV1::model::FunnelSource, + query_string: String, + steps: Vec, + ) -> FunnelQuery { + FunnelQuery { + data_source, + query_string, + steps, + } + } +} diff --git a/src/datadogV1/model/model_funnel_request_type.rs b/src/datadogV1/model/model_funnel_request_type.rs new file mode 100644 index 000000000..2a0db1b4b --- /dev/null +++ b/src/datadogV1/model/model_funnel_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FunnelRequestType { + #[serde(rename = "funnel")] + FUNNEL, +} + +impl ToString for FunnelRequestType { + fn to_string(&self) -> String { + match self { + Self::FUNNEL => String::from("funnel"), + } + } +} diff --git a/src/datadogV1/model/model_funnel_source.rs b/src/datadogV1/model/model_funnel_source.rs new file mode 100644 index 000000000..11d295004 --- /dev/null +++ b/src/datadogV1/model/model_funnel_source.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FunnelSource { + #[serde(rename = "rum")] + RUM, +} + +impl ToString for FunnelSource { + fn to_string(&self) -> String { + match self { + Self::RUM => String::from("rum"), + } + } +} diff --git a/src/datadogV1/model/model_funnel_step.rs b/src/datadogV1/model/model_funnel_step.rs new file mode 100644 index 000000000..69a08eb03 --- /dev/null +++ b/src/datadogV1/model/model_funnel_step.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The funnel step. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FunnelStep { + /// The facet of the step. + #[serde(rename = "facet")] + pub facet: String, + /// The value of the step. + #[serde(rename = "value")] + pub value: String, +} + +impl FunnelStep { + pub fn new(facet: String, value: String) -> FunnelStep { + FunnelStep { facet, value } + } +} diff --git a/src/datadogV1/model/model_funnel_widget_definition.rs b/src/datadogV1/model/model_funnel_widget_definition.rs new file mode 100644 index 000000000..3b6d60f09 --- /dev/null +++ b/src/datadogV1/model/model_funnel_widget_definition.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The funnel visualization displays a funnel of user sessions that maps a sequence of view navigation and user interaction in your application. +/// +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FunnelWidgetDefinition { + /// Request payload used to query items. + #[serde(rename = "requests")] + pub requests: Vec, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// The title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// The size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of funnel widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::FunnelWidgetDefinitionType, +} + +impl FunnelWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::FunnelWidgetDefinitionType, + ) -> FunnelWidgetDefinition { + FunnelWidgetDefinition { + requests, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_funnel_widget_definition_type.rs b/src/datadogV1/model/model_funnel_widget_definition_type.rs new file mode 100644 index 000000000..48b93a192 --- /dev/null +++ b/src/datadogV1/model/model_funnel_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FunnelWidgetDefinitionType { + #[serde(rename = "funnel")] + FUNNEL, +} + +impl ToString for FunnelWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::FUNNEL => String::from("funnel"), + } + } +} diff --git a/src/datadogV1/model/model_funnel_widget_request.rs b/src/datadogV1/model/model_funnel_widget_request.rs new file mode 100644 index 000000000..080b3a8df --- /dev/null +++ b/src/datadogV1/model/model_funnel_widget_request.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated funnel widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FunnelWidgetRequest { + /// Updated funnel widget. + #[serde(rename = "query")] + pub query: Box, + /// Widget request type. + #[serde(rename = "request_type")] + pub request_type: crate::datadogV1::model::FunnelRequestType, +} + +impl FunnelWidgetRequest { + pub fn new( + query: Box, + request_type: crate::datadogV1::model::FunnelRequestType, + ) -> FunnelWidgetRequest { + FunnelWidgetRequest { + query, + request_type, + } + } +} diff --git a/src/datadogV1/model/model_gcp_account.rs b/src/datadogV1/model/model_gcp_account.rs index 5caa90a34..c1c5314ee 100644 --- a/src/datadogV1/model/model_gcp_account.rs +++ b/src/datadogV1/model/model_gcp_account.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Your Google Cloud Platform Account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPAccount { /// Should be `https://www.googleapis.com/oauth2/v1/certs`. #[serde(rename = "auth_provider_x509_cert_url")] @@ -34,9 +34,12 @@ pub struct GCPAccount { /// Only hosts that match one of the defined tags are imported into Datadog. #[serde(rename = "host_filters")] pub host_filters: Option, - /// When enabled, Datadog performs configuration checks across your Google Cloud environment by continuously scanning every resource. + /// When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true. #[serde(rename = "is_cspm_enabled")] pub is_cspm_enabled: Option, + /// When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account. + #[serde(rename = "is_security_command_center_enabled")] + pub is_security_command_center_enabled: Option, /// Your private key name found in your JSON service account key. #[serde(rename = "private_key")] pub private_key: Option, @@ -46,6 +49,9 @@ pub struct GCPAccount { /// Your Google Cloud project ID found in your JSON service account key. #[serde(rename = "project_id")] pub project_id: Option, + /// When enabled, Datadog scans for all resources in your GCP environment. + #[serde(rename = "resource_collection_enabled")] + pub resource_collection_enabled: Option, /// Should be `https://accounts.google.com/o/oauth2/token`. #[serde(rename = "token_uri")] pub token_uri: Option, @@ -66,9 +72,11 @@ impl GCPAccount { errors: None, host_filters: None, is_cspm_enabled: None, + is_security_command_center_enabled: None, private_key: None, private_key_id: None, project_id: None, + resource_collection_enabled: None, token_uri: None, type_: None, } diff --git a/src/datadogV1/model/model_geomap_widget_definition.rs b/src/datadogV1/model/model_geomap_widget_definition.rs new file mode 100644 index 000000000..a85bb2a08 --- /dev/null +++ b/src/datadogV1/model/model_geomap_widget_definition.rs @@ -0,0 +1,62 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// This visualization displays a series of values by country on a world map. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeomapWidgetDefinition { + /// A list of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Array of one request object to display in the widget. The request must contain a `group-by` tag whose value is a country ISO code. + /// + /// See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) + /// for information about building the `REQUEST_SCHEMA`. + #[serde(rename = "requests")] + pub requests: Vec, + /// The style to apply to the widget. + #[serde(rename = "style")] + pub style: Box, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// The title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// The size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the geomap widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::GeomapWidgetDefinitionType, + /// The view of the world that the map should render. + #[serde(rename = "view")] + pub view: Box, +} + +impl GeomapWidgetDefinition { + pub fn new( + requests: Vec, + style: Box, + type_: crate::datadogV1::model::GeomapWidgetDefinitionType, + view: Box, + ) -> GeomapWidgetDefinition { + GeomapWidgetDefinition { + custom_links: None, + requests, + style, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + view, + } + } +} diff --git a/src/datadogV1/model/model_geomap_widget_definition_style.rs b/src/datadogV1/model/model_geomap_widget_definition_style.rs new file mode 100644 index 000000000..b04d0973b --- /dev/null +++ b/src/datadogV1/model/model_geomap_widget_definition_style.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The style to apply to the widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeomapWidgetDefinitionStyle { + /// The color palette to apply to the widget. + #[serde(rename = "palette")] + pub palette: String, + /// Whether to flip the palette tones. + #[serde(rename = "palette_flip")] + pub palette_flip: bool, +} + +impl GeomapWidgetDefinitionStyle { + pub fn new(palette: String, palette_flip: bool) -> GeomapWidgetDefinitionStyle { + GeomapWidgetDefinitionStyle { + palette, + palette_flip, + } + } +} diff --git a/src/datadogV1/model/model_geomap_widget_definition_type.rs b/src/datadogV1/model/model_geomap_widget_definition_type.rs new file mode 100644 index 000000000..fd9bae5cf --- /dev/null +++ b/src/datadogV1/model/model_geomap_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GeomapWidgetDefinitionType { + #[serde(rename = "geomap")] + GEOMAP, +} + +impl ToString for GeomapWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::GEOMAP => String::from("geomap"), + } + } +} diff --git a/src/datadogV1/model/model_geomap_widget_definition_view.rs b/src/datadogV1/model/model_geomap_widget_definition_view.rs new file mode 100644 index 000000000..f72bc34b5 --- /dev/null +++ b/src/datadogV1/model/model_geomap_widget_definition_view.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The view of the world that the map should render. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeomapWidgetDefinitionView { + /// The 2-letter ISO code of a country to focus the map on. Or `WORLD`. + #[serde(rename = "focus")] + pub focus: String, +} + +impl GeomapWidgetDefinitionView { + pub fn new(focus: String) -> GeomapWidgetDefinitionView { + GeomapWidgetDefinitionView { focus } + } +} diff --git a/src/datadogV1/model/model_geomap_widget_request.rs b/src/datadogV1/model/model_geomap_widget_request.rs new file mode 100644 index 000000000..8e19bd7dc --- /dev/null +++ b/src/datadogV1/model/model_geomap_widget_request.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An updated geomap widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct GeomapWidgetRequest { + /// Widget columns. + #[serde(rename = "columns")] + pub columns: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The widget metrics query. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Updated list stream widget. + #[serde(rename = "query")] + pub query: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, +} + +impl GeomapWidgetRequest { + pub fn new() -> GeomapWidgetRequest { + GeomapWidgetRequest { + columns: None, + formulas: None, + log_query: None, + q: None, + queries: None, + query: None, + response_format: None, + rum_query: None, + security_query: None, + } + } +} diff --git a/src/datadogV1/model/model_graph_snapshot.rs b/src/datadogV1/model/model_graph_snapshot.rs index 6bd38da56..74cd94027 100644 --- a/src/datadogV1/model/model_graph_snapshot.rs +++ b/src/datadogV1/model/model_graph_snapshot.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object representing a graph snapshot. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GraphSnapshot { /// A JSON document defining the graph. `graph_def` can be used instead of `metric_query`. /// The JSON document uses the [grammar defined here](https://docs.datadoghq.com/graphing/graphing_json/#grammar) diff --git a/src/datadogV1/model/model_group_widget_definition.rs b/src/datadogV1/model/model_group_widget_definition.rs new file mode 100644 index 000000000..95e3535b5 --- /dev/null +++ b/src/datadogV1/model/model_group_widget_definition.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The groups widget allows you to keep similar graphs together on your timeboard. Each group has a custom header, can hold one to many graphs, and is collapsible. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct GroupWidgetDefinition { + /// Background color of the group title. + #[serde(rename = "background_color")] + pub background_color: Option, + /// URL of image to display as a banner for the group. + #[serde(rename = "banner_img")] + pub banner_img: Option, + /// Layout type of the group. + #[serde(rename = "layout_type")] + pub layout_type: crate::datadogV1::model::WidgetLayoutType, + /// Whether to show the title or not. + #[serde(rename = "show_title")] + pub show_title: Option, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Type of the group widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::GroupWidgetDefinitionType, + /// List of widget groups. + #[serde(rename = "widgets")] + pub widgets: Vec, +} + +impl GroupWidgetDefinition { + pub fn new( + layout_type: crate::datadogV1::model::WidgetLayoutType, + type_: crate::datadogV1::model::GroupWidgetDefinitionType, + widgets: Vec, + ) -> GroupWidgetDefinition { + GroupWidgetDefinition { + background_color: None, + banner_img: None, + layout_type, + show_title: None, + title: None, + title_align: None, + type_, + widgets, + } + } +} diff --git a/src/datadogV1/model/model_group_widget_definition_type.rs b/src/datadogV1/model/model_group_widget_definition_type.rs new file mode 100644 index 000000000..5d0a40227 --- /dev/null +++ b/src/datadogV1/model/model_group_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GroupWidgetDefinitionType { + #[serde(rename = "group")] + GROUP, +} + +impl ToString for GroupWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::GROUP => String::from("group"), + } + } +} diff --git a/src/datadogV1/model/model_heat_map_widget_definition.rs b/src/datadogV1/model/model_heat_map_widget_definition.rs new file mode 100644 index 000000000..6754c6935 --- /dev/null +++ b/src/datadogV1/model/model_heat_map_widget_definition.rs @@ -0,0 +1,65 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The heat map visualization shows metrics aggregated across many tags, such as hosts. The more hosts that have a particular value, the darker that square is. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HeatMapWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// List of widget events. + #[serde(rename = "events")] + pub events: Option>, + /// Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". + #[serde(rename = "legend_size")] + pub legend_size: Option, + /// List of widget types. + #[serde(rename = "requests")] + pub requests: Vec, + /// Whether or not to display the legend on this widget. + #[serde(rename = "show_legend")] + pub show_legend: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the heat map widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::HeatMapWidgetDefinitionType, + /// Axis controls for the widget. + #[serde(rename = "yaxis")] + pub yaxis: Option>, +} + +impl HeatMapWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::HeatMapWidgetDefinitionType, + ) -> HeatMapWidgetDefinition { + HeatMapWidgetDefinition { + custom_links: None, + events: None, + legend_size: None, + requests, + show_legend: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + yaxis: None, + } + } +} diff --git a/src/datadogV1/model/model_heat_map_widget_definition_type.rs b/src/datadogV1/model/model_heat_map_widget_definition_type.rs new file mode 100644 index 000000000..0009568d9 --- /dev/null +++ b/src/datadogV1/model/model_heat_map_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum HeatMapWidgetDefinitionType { + #[serde(rename = "heatmap")] + HEATMAP, +} + +impl ToString for HeatMapWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::HEATMAP => String::from("heatmap"), + } + } +} diff --git a/src/datadogV1/model/model_heat_map_widget_request.rs b/src/datadogV1/model/model_heat_map_widget_request.rs new file mode 100644 index 000000000..9a9135398 --- /dev/null +++ b/src/datadogV1/model/model_heat_map_widget_request.rs @@ -0,0 +1,70 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated heat map widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HeatMapWidgetRequest { + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The event query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Widget query. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, + /// Widget style definition. + #[serde(rename = "style")] + pub style: Option>, +} + +impl HeatMapWidgetRequest { + pub fn new() -> HeatMapWidgetRequest { + HeatMapWidgetRequest { + apm_query: None, + event_query: None, + formulas: None, + log_query: None, + network_query: None, + process_query: None, + profile_metrics_query: None, + q: None, + queries: None, + response_format: None, + rum_query: None, + security_query: None, + style: None, + } + } +} diff --git a/src/datadogV1/model/model_host.rs b/src/datadogV1/model/model_host.rs index c0f496f67..54663eb7b 100644 --- a/src/datadogV1/model/model_host.rs +++ b/src/datadogV1/model/model_host.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object representing a host. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Host { /// Host aliases collected by Datadog. #[serde(rename = "aliases")] diff --git a/src/datadogV1/model/model_host_list_response.rs b/src/datadogV1/model/model_host_list_response.rs index e7bfe1163..40f1ed5e2 100644 --- a/src/datadogV1/model/model_host_list_response.rs +++ b/src/datadogV1/model/model_host_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with Host information from Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostListResponse { /// Array of hosts. #[serde(rename = "host_list")] diff --git a/src/datadogV1/model/model_host_map_request.rs b/src/datadogV1/model/model_host_map_request.rs new file mode 100644 index 000000000..edbffefe0 --- /dev/null +++ b/src/datadogV1/model/model_host_map_request.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated host map. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HostMapRequest { + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Query definition. + #[serde(rename = "q")] + pub q: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, +} + +impl HostMapRequest { + pub fn new() -> HostMapRequest { + HostMapRequest { + apm_query: None, + event_query: None, + log_query: None, + network_query: None, + process_query: None, + profile_metrics_query: None, + q: None, + rum_query: None, + security_query: None, + } + } +} diff --git a/src/datadogV1/model/model_host_map_widget_definition.rs b/src/datadogV1/model/model_host_map_widget_definition.rs new file mode 100644 index 000000000..a08e15eeb --- /dev/null +++ b/src/datadogV1/model/model_host_map_widget_definition.rs @@ -0,0 +1,73 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The host map widget graphs any metric across your hosts using the same visualization available from the main Host Map page. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HostMapWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// List of tag prefixes to group by. + #[serde(rename = "group")] + pub group: Option>, + /// Whether to show the hosts that don’t fit in a group. + #[serde(rename = "no_group_hosts")] + pub no_group_hosts: Option, + /// Whether to show the hosts with no metrics. + #[serde(rename = "no_metric_hosts")] + pub no_metric_hosts: Option, + /// Which type of node to use in the map. + #[serde(rename = "node_type")] + pub node_type: Option, + /// Notes on the title. + #[serde(rename = "notes")] + pub notes: Option, + /// List of definitions. + #[serde(rename = "requests")] + pub requests: Box, + /// List of tags used to filter the map. + #[serde(rename = "scope")] + pub scope: Option>, + /// The style to apply to the widget. + #[serde(rename = "style")] + pub style: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the host map widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::HostMapWidgetDefinitionType, +} + +impl HostMapWidgetDefinition { + pub fn new( + requests: Box, + type_: crate::datadogV1::model::HostMapWidgetDefinitionType, + ) -> HostMapWidgetDefinition { + HostMapWidgetDefinition { + custom_links: None, + group: None, + no_group_hosts: None, + no_metric_hosts: None, + node_type: None, + notes: None, + requests, + scope: None, + style: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_host_map_widget_definition_requests.rs b/src/datadogV1/model/model_host_map_widget_definition_requests.rs new file mode 100644 index 000000000..90a95c76c --- /dev/null +++ b/src/datadogV1/model/model_host_map_widget_definition_requests.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of definitions. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HostMapWidgetDefinitionRequests { + /// Updated host map. + #[serde(rename = "fill")] + pub fill: Option>, + /// Updated host map. + #[serde(rename = "size")] + pub size: Option>, +} + +impl HostMapWidgetDefinitionRequests { + pub fn new() -> HostMapWidgetDefinitionRequests { + HostMapWidgetDefinitionRequests { + fill: None, + size: None, + } + } +} diff --git a/src/datadogV1/model/model_host_map_widget_definition_style.rs b/src/datadogV1/model/model_host_map_widget_definition_style.rs new file mode 100644 index 000000000..7cc48a702 --- /dev/null +++ b/src/datadogV1/model/model_host_map_widget_definition_style.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The style to apply to the widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HostMapWidgetDefinitionStyle { + /// Max value to use to color the map. + #[serde(rename = "fill_max")] + pub fill_max: Option, + /// Min value to use to color the map. + #[serde(rename = "fill_min")] + pub fill_min: Option, + /// Color palette to apply to the widget. + #[serde(rename = "palette")] + pub palette: Option, + /// Whether to flip the palette tones. + #[serde(rename = "palette_flip")] + pub palette_flip: Option, +} + +impl HostMapWidgetDefinitionStyle { + pub fn new() -> HostMapWidgetDefinitionStyle { + HostMapWidgetDefinitionStyle { + fill_max: None, + fill_min: None, + palette: None, + palette_flip: None, + } + } +} diff --git a/src/datadogV1/model/model_host_map_widget_definition_type.rs b/src/datadogV1/model/model_host_map_widget_definition_type.rs new file mode 100644 index 000000000..0e3b5b660 --- /dev/null +++ b/src/datadogV1/model/model_host_map_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum HostMapWidgetDefinitionType { + #[serde(rename = "hostmap")] + HOSTMAP, +} + +impl ToString for HostMapWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::HOSTMAP => String::from("hostmap"), + } + } +} diff --git a/src/datadogV1/model/model_host_meta.rs b/src/datadogV1/model/model_host_meta.rs index 5a357111c..4211cb56a 100644 --- a/src/datadogV1/model/model_host_meta.rs +++ b/src/datadogV1/model/model_host_meta.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Metadata associated with your host. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostMeta { /// A list of Agent checks running on the host. #[serde(rename = "agent_checks")] diff --git a/src/datadogV1/model/model_host_meta_install_method.rs b/src/datadogV1/model/model_host_meta_install_method.rs index 33f0f20d9..10c2839e5 100644 --- a/src/datadogV1/model/model_host_meta_install_method.rs +++ b/src/datadogV1/model/model_host_meta_install_method.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Agent install method. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostMetaInstallMethod { /// The installer version. #[serde(rename = "installer_version")] diff --git a/src/datadogV1/model/model_host_metrics.rs b/src/datadogV1/model/model_host_metrics.rs index f9494149e..cf0a7718a 100644 --- a/src/datadogV1/model/model_host_metrics.rs +++ b/src/datadogV1/model/model_host_metrics.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Host Metrics collected. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostMetrics { /// The percent of CPU used (everything but idle). #[serde(rename = "cpu")] diff --git a/src/datadogV1/model/model_host_mute_response.rs b/src/datadogV1/model/model_host_mute_response.rs index 47673cd91..d9f167e28 100644 --- a/src/datadogV1/model/model_host_mute_response.rs +++ b/src/datadogV1/model/model_host_mute_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with the list of muted host for your organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostMuteResponse { /// Action applied to the hosts. #[serde(rename = "action")] diff --git a/src/datadogV1/model/model_host_mute_settings.rs b/src/datadogV1/model/model_host_mute_settings.rs index e64ba6102..45db05a5d 100644 --- a/src/datadogV1/model/model_host_mute_settings.rs +++ b/src/datadogV1/model/model_host_mute_settings.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Combination of settings to mute a host. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostMuteSettings { /// POSIX timestamp in seconds when the host is unmuted. If omitted, the host remains muted until explicitly unmuted. #[serde(rename = "end")] diff --git a/src/datadogV1/model/model_host_tags.rs b/src/datadogV1/model/model_host_tags.rs index 7b3239ff8..e9452d96c 100644 --- a/src/datadogV1/model/model_host_tags.rs +++ b/src/datadogV1/model/model_host_tags.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Set of tags to associate with your host. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostTags { /// Your host name. #[serde(rename = "host")] diff --git a/src/datadogV1/model/model_host_totals.rs b/src/datadogV1/model/model_host_totals.rs index 817ed3e37..bb7c2040d 100644 --- a/src/datadogV1/model/model_host_totals.rs +++ b/src/datadogV1/model/model_host_totals.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Total number of host currently monitored by Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HostTotals { /// Total number of active host (UP and ???) reporting to Datadog. #[serde(rename = "total_active")] diff --git a/src/datadogV1/model/model_hourly_usage_attribution_body.rs b/src/datadogV1/model/model_hourly_usage_attribution_body.rs index 22ff08752..bfc3aba4d 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_body.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_body.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The usage for one set of tags for one hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageAttributionBody { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs b/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs index a4c6067fe..d18dd339b 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing document metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageAttributionMetadata { /// The metadata for the current pagination. #[serde(rename = "pagination")] diff --git a/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs b/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs index 9f075385e..481cb0975 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_pagination.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata for the current pagination. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageAttributionPagination { /// The cursor to get the next results (if any). To make the next request, use the same parameters and add `next_record_id`. #[serde( diff --git a/src/datadogV1/model/model_hourly_usage_attribution_response.rs b/src/datadogV1/model/model_hourly_usage_attribution_response.rs index 58333b1a5..4a95a42d1 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_response.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the hourly usage attribution by tag(s). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageAttributionResponse { /// The object containing document metadata. #[serde(rename = "metadata")] diff --git a/src/datadogV1/model/model_hourly_usage_attribution_usage_type.rs b/src/datadogV1/model/model_hourly_usage_attribution_usage_type.rs index 95bb2a2fa..e25fba436 100644 --- a/src/datadogV1/model/model_hourly_usage_attribution_usage_type.rs +++ b/src/datadogV1/model/model_hourly_usage_attribution_usage_type.rs @@ -206,9 +206,3 @@ impl ToString for HourlyUsageAttributionUsageType { } } } - -impl Default for HourlyUsageAttributionUsageType { - fn default() -> HourlyUsageAttributionUsageType { - Self::API_USAGE - } -} diff --git a/src/datadogV1/model/model_http_log_error.rs b/src/datadogV1/model/model_http_log_error.rs index 2bb974f2f..4f4ba126c 100644 --- a/src/datadogV1/model/model_http_log_error.rs +++ b/src/datadogV1/model/model_http_log_error.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Invalid query performed. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HTTPLogError { /// Error code. #[serde(rename = "code")] diff --git a/src/datadogV1/model/model_http_log_item.rs b/src/datadogV1/model/model_http_log_item.rs index ea045a930..ef2bcedf8 100644 --- a/src/datadogV1/model/model_http_log_item.rs +++ b/src/datadogV1/model/model_http_log_item.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Logs that are sent over HTTP. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HTTPLogItem { /// The integration name associated with your log: the technology from which the log originated. /// When it matches an integration name, Datadog automatically installs the corresponding parsers and facets. diff --git a/src/datadogV1/model/model_i_frame_widget_definition.rs b/src/datadogV1/model/model_i_frame_widget_definition.rs new file mode 100644 index 000000000..0d42564ca --- /dev/null +++ b/src/datadogV1/model/model_i_frame_widget_definition.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The iframe widget allows you to embed a portion of any other web page on your dashboard. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IFrameWidgetDefinition { + /// Type of the iframe widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::IFrameWidgetDefinitionType, + /// URL of the iframe. + #[serde(rename = "url")] + pub url: String, +} + +impl IFrameWidgetDefinition { + pub fn new( + type_: crate::datadogV1::model::IFrameWidgetDefinitionType, + url: String, + ) -> IFrameWidgetDefinition { + IFrameWidgetDefinition { type_, url } + } +} diff --git a/src/datadogV1/model/model_i_frame_widget_definition_type.rs b/src/datadogV1/model/model_i_frame_widget_definition_type.rs new file mode 100644 index 000000000..e6a8e1494 --- /dev/null +++ b/src/datadogV1/model/model_i_frame_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IFrameWidgetDefinitionType { + #[serde(rename = "iframe")] + IFRAME, +} + +impl ToString for IFrameWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::IFRAME => String::from("iframe"), + } + } +} diff --git a/src/datadogV1/model/model_idp_form_data.rs b/src/datadogV1/model/model_idp_form_data.rs index 53684b62e..fcd22080b 100644 --- a/src/datadogV1/model/model_idp_form_data.rs +++ b/src/datadogV1/model/model_idp_form_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object describing the IdP configuration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IdpFormData { /// The path to the XML metadata file you wish to upload. #[serde(rename = "idp_file")] diff --git a/src/datadogV1/model/model_idp_response.rs b/src/datadogV1/model/model_idp_response.rs index 78b87d31c..987151777 100644 --- a/src/datadogV1/model/model_idp_response.rs +++ b/src/datadogV1/model/model_idp_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The IdP response object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IdpResponse { /// Identity provider response. #[serde(rename = "message")] diff --git a/src/datadogV1/model/model_image_widget_definition.rs b/src/datadogV1/model/model_image_widget_definition.rs new file mode 100644 index 000000000..f23e66a99 --- /dev/null +++ b/src/datadogV1/model/model_image_widget_definition.rs @@ -0,0 +1,59 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The image widget allows you to embed an image on your dashboard. An image can be a PNG, JPG, or animated GIF. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ImageWidgetDefinition { + /// Whether to display a background or not. + #[serde(rename = "has_background")] + pub has_background: Option, + /// Whether to display a border or not. + #[serde(rename = "has_border")] + pub has_border: Option, + /// Horizontal alignment. + #[serde(rename = "horizontal_align")] + pub horizontal_align: Option, + /// Size of the margins around the image. + /// **Note**: `small` and `large` values are deprecated. + #[serde(rename = "margin")] + pub margin: Option, + /// How to size the image on the widget. The values are based on the image `object-fit` CSS properties. + /// **Note**: `zoom`, `fit` and `center` values are deprecated. + #[serde(rename = "sizing")] + pub sizing: Option, + /// Type of the image widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ImageWidgetDefinitionType, + /// URL of the image. + #[serde(rename = "url")] + pub url: String, + /// URL of the image in dark mode. + #[serde(rename = "url_dark_theme")] + pub url_dark_theme: Option, + /// Vertical alignment. + #[serde(rename = "vertical_align")] + pub vertical_align: Option, +} + +impl ImageWidgetDefinition { + pub fn new( + type_: crate::datadogV1::model::ImageWidgetDefinitionType, + url: String, + ) -> ImageWidgetDefinition { + ImageWidgetDefinition { + has_background: None, + has_border: None, + horizontal_align: None, + margin: None, + sizing: None, + type_, + url, + url_dark_theme: None, + vertical_align: None, + } + } +} diff --git a/src/datadogV1/model/model_image_widget_definition_type.rs b/src/datadogV1/model/model_image_widget_definition_type.rs new file mode 100644 index 000000000..84cf53d35 --- /dev/null +++ b/src/datadogV1/model/model_image_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ImageWidgetDefinitionType { + #[serde(rename = "image")] + IMAGE, +} + +impl ToString for ImageWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::IMAGE => String::from("image"), + } + } +} diff --git a/src/datadogV1/model/model_intake_payload_accepted.rs b/src/datadogV1/model/model_intake_payload_accepted.rs index 180eda03b..2676aab93 100644 --- a/src/datadogV1/model/model_intake_payload_accepted.rs +++ b/src/datadogV1/model/model_intake_payload_accepted.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The payload accepted for intake. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IntakePayloadAccepted { /// The status of the intake payload. #[serde(rename = "status")] diff --git a/src/datadogV1/model/model_ip_prefixes_agents.rs b/src/datadogV1/model/model_ip_prefixes_agents.rs index 9ab465dc4..7d87fd789 100644 --- a/src/datadogV1/model/model_ip_prefixes_agents.rs +++ b/src/datadogV1/model/model_ip_prefixes_agents.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Agent endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesAgents { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_api.rs b/src/datadogV1/model/model_ip_prefixes_api.rs index 3046edc08..95966313d 100644 --- a/src/datadogV1/model/model_ip_prefixes_api.rs +++ b/src/datadogV1/model/model_ip_prefixes_api.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the API endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesAPI { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_apm.rs b/src/datadogV1/model/model_ip_prefixes_apm.rs index a522eb273..8d074eb72 100644 --- a/src/datadogV1/model/model_ip_prefixes_apm.rs +++ b/src/datadogV1/model/model_ip_prefixes_apm.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the APM endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesAPM { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_global.rs b/src/datadogV1/model/model_ip_prefixes_global.rs index 9de6f3609..aefd02d9b 100644 --- a/src/datadogV1/model/model_ip_prefixes_global.rs +++ b/src/datadogV1/model/model_ip_prefixes_global.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for all Datadog endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesGlobal { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_logs.rs b/src/datadogV1/model/model_ip_prefixes_logs.rs index 643394b44..205a83b33 100644 --- a/src/datadogV1/model/model_ip_prefixes_logs.rs +++ b/src/datadogV1/model/model_ip_prefixes_logs.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Logs endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesLogs { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_orchestrator.rs b/src/datadogV1/model/model_ip_prefixes_orchestrator.rs index 7fff9d8ce..4677203c7 100644 --- a/src/datadogV1/model/model_ip_prefixes_orchestrator.rs +++ b/src/datadogV1/model/model_ip_prefixes_orchestrator.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Orchestrator endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesOrchestrator { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_process.rs b/src/datadogV1/model/model_ip_prefixes_process.rs index 9a3aae469..4d702fc97 100644 --- a/src/datadogV1/model/model_ip_prefixes_process.rs +++ b/src/datadogV1/model/model_ip_prefixes_process.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Process endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesProcess { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs b/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs index 4acbaaeb6..4293de93e 100644 --- a/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs +++ b/src/datadogV1/model/model_ip_prefixes_remote_configuration.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Remote Configuration endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesRemoteConfiguration { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_synthetics.rs b/src/datadogV1/model/model_ip_prefixes_synthetics.rs index b8f95c08b..f1f7c32ec 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Synthetics endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesSynthetics { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs b/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs index 51d13b144..6a87ef085 100644 --- a/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs +++ b/src/datadogV1/model/model_ip_prefixes_synthetics_private_locations.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Synthetics Private Locations endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesSyntheticsPrivateLocations { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_prefixes_webhooks.rs b/src/datadogV1/model/model_ip_prefixes_webhooks.rs index 197c9be22..3019ee62c 100644 --- a/src/datadogV1/model/model_ip_prefixes_webhooks.rs +++ b/src/datadogV1/model/model_ip_prefixes_webhooks.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Available prefix information for the Webhook endpoints. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPPrefixesWebhooks { /// List of IPv4 prefixes. #[serde(rename = "prefixes_ipv4")] diff --git a/src/datadogV1/model/model_ip_ranges.rs b/src/datadogV1/model/model_ip_ranges.rs index fe0687a0e..f7c4385cc 100644 --- a/src/datadogV1/model/model_ip_ranges.rs +++ b/src/datadogV1/model/model_ip_ranges.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// IP ranges. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPRanges { /// Available prefix information for the Agent endpoints. #[serde(rename = "agents")] diff --git a/src/datadogV1/model/model_list_stream_column.rs b/src/datadogV1/model/model_list_stream_column.rs new file mode 100644 index 000000000..9f88f70cb --- /dev/null +++ b/src/datadogV1/model/model_list_stream_column.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Widget column. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListStreamColumn { + /// Widget column field. + #[serde(rename = "field")] + pub field: String, + /// Widget column width. + #[serde(rename = "width")] + pub width: crate::datadogV1::model::ListStreamColumnWidth, +} + +impl ListStreamColumn { + pub fn new( + field: String, + width: crate::datadogV1::model::ListStreamColumnWidth, + ) -> ListStreamColumn { + ListStreamColumn { field, width } + } +} diff --git a/src/datadogV1/model/model_list_stream_column_width.rs b/src/datadogV1/model/model_list_stream_column_width.rs new file mode 100644 index 000000000..cc9d50009 --- /dev/null +++ b/src/datadogV1/model/model_list_stream_column_width.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ListStreamColumnWidth { + #[serde(rename = "auto")] + AUTO, + #[serde(rename = "compact")] + COMPACT, + #[serde(rename = "full")] + FULL, +} + +impl ToString for ListStreamColumnWidth { + fn to_string(&self) -> String { + match self { + Self::AUTO => String::from("auto"), + Self::COMPACT => String::from("compact"), + Self::FULL => String::from("full"), + } + } +} diff --git a/src/datadogV1/model/model_list_stream_compute_aggregation.rs b/src/datadogV1/model/model_list_stream_compute_aggregation.rs new file mode 100644 index 000000000..c405ccb9c --- /dev/null +++ b/src/datadogV1/model/model_list_stream_compute_aggregation.rs @@ -0,0 +1,61 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ListStreamComputeAggregation { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "median")] + MEDIAN, + #[serde(rename = "pc75")] + PC75, + #[serde(rename = "pc90")] + PC90, + #[serde(rename = "pc95")] + PC95, + #[serde(rename = "pc98")] + PC98, + #[serde(rename = "pc99")] + PC99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, + #[serde(rename = "earliest")] + EARLIEST, + #[serde(rename = "latest")] + LATEST, + #[serde(rename = "most_frequent")] + MOST_FREQUENT, +} + +impl ToString for ListStreamComputeAggregation { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::MEDIAN => String::from("median"), + Self::PC75 => String::from("pc75"), + Self::PC90 => String::from("pc90"), + Self::PC95 => String::from("pc95"), + Self::PC98 => String::from("pc98"), + Self::PC99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + Self::EARLIEST => String::from("earliest"), + Self::LATEST => String::from("latest"), + Self::MOST_FREQUENT => String::from("most_frequent"), + } + } +} diff --git a/src/datadogV1/model/model_list_stream_compute_items.rs b/src/datadogV1/model/model_list_stream_compute_items.rs new file mode 100644 index 000000000..4267fcfee --- /dev/null +++ b/src/datadogV1/model/model_list_stream_compute_items.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of facets and aggregations which to compute. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListStreamComputeItems { + /// Aggregation value. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV1::model::ListStreamComputeAggregation, + /// Facet name. + #[serde(rename = "facet")] + pub facet: Option, +} + +impl ListStreamComputeItems { + pub fn new( + aggregation: crate::datadogV1::model::ListStreamComputeAggregation, + ) -> ListStreamComputeItems { + ListStreamComputeItems { + aggregation, + facet: None, + } + } +} diff --git a/src/datadogV1/model/model_list_stream_group_by_items.rs b/src/datadogV1/model/model_list_stream_group_by_items.rs new file mode 100644 index 000000000..d2d548d1b --- /dev/null +++ b/src/datadogV1/model/model_list_stream_group_by_items.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of facets on which to group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListStreamGroupByItems { + /// Facet name. + #[serde(rename = "facet")] + pub facet: String, +} + +impl ListStreamGroupByItems { + pub fn new(facet: String) -> ListStreamGroupByItems { + ListStreamGroupByItems { facet } + } +} diff --git a/src/datadogV1/model/model_list_stream_query.rs b/src/datadogV1/model/model_list_stream_query.rs new file mode 100644 index 000000000..9b8dc080c --- /dev/null +++ b/src/datadogV1/model/model_list_stream_query.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated list stream widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListStreamQuery { + /// Compute configuration for the List Stream Widget. Compute can be used only with the logs_transaction_stream (from 1 to 5 items) list stream source. + #[serde(rename = "compute")] + pub compute: Option>, + /// Source from which to query items to display in the stream. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::ListStreamSource, + /// Size to use to display an event. + #[serde(rename = "event_size")] + pub event_size: Option, + /// Group by configuration for the List Stream Widget. Group by can be used only with logs_pattern_stream (up to 3 items) or logs_transaction_stream (one group by item is required) list stream source. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// List of indexes. + #[serde(rename = "indexes")] + pub indexes: Option>, + /// Widget query. + #[serde(rename = "query_string")] + pub query_string: String, + /// Which column and order to sort by + #[serde(rename = "sort")] + pub sort: Option>, + /// Option for storage location. Feature in Private Beta. + #[serde(rename = "storage")] + pub storage: Option, +} + +impl ListStreamQuery { + pub fn new( + data_source: crate::datadogV1::model::ListStreamSource, + query_string: String, + ) -> ListStreamQuery { + ListStreamQuery { + compute: None, + data_source, + event_size: None, + group_by: None, + indexes: None, + query_string, + sort: None, + storage: None, + } + } +} diff --git a/src/datadogV1/model/model_list_stream_response_format.rs b/src/datadogV1/model/model_list_stream_response_format.rs new file mode 100644 index 000000000..539891162 --- /dev/null +++ b/src/datadogV1/model/model_list_stream_response_format.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ListStreamResponseFormat { + #[serde(rename = "event_list")] + EVENT_LIST, +} + +impl ToString for ListStreamResponseFormat { + fn to_string(&self) -> String { + match self { + Self::EVENT_LIST => String::from("event_list"), + } + } +} diff --git a/src/datadogV1/model/model_list_stream_source.rs b/src/datadogV1/model/model_list_stream_source.rs new file mode 100644 index 000000000..c5ca8dddf --- /dev/null +++ b/src/datadogV1/model/model_list_stream_source.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ListStreamSource { + #[serde(rename = "logs_stream")] + LOGS_STREAM, + #[serde(rename = "audit_stream")] + AUDIT_STREAM, + #[serde(rename = "ci_pipeline_stream")] + CI_PIPELINE_STREAM, + #[serde(rename = "ci_test_stream")] + CI_TEST_STREAM, + #[serde(rename = "rum_issue_stream")] + RUM_ISSUE_STREAM, + #[serde(rename = "apm_issue_stream")] + APM_ISSUE_STREAM, + #[serde(rename = "trace_stream")] + TRACE_STREAM, + #[serde(rename = "logs_issue_stream")] + LOGS_ISSUE_STREAM, + #[serde(rename = "logs_pattern_stream")] + LOGS_PATTERN_STREAM, + #[serde(rename = "logs_transaction_stream")] + LOGS_TRANSACTION_STREAM, + #[serde(rename = "event_stream")] + EVENT_STREAM, +} + +impl ToString for ListStreamSource { + fn to_string(&self) -> String { + match self { + Self::LOGS_STREAM => String::from("logs_stream"), + Self::AUDIT_STREAM => String::from("audit_stream"), + Self::CI_PIPELINE_STREAM => String::from("ci_pipeline_stream"), + Self::CI_TEST_STREAM => String::from("ci_test_stream"), + Self::RUM_ISSUE_STREAM => String::from("rum_issue_stream"), + Self::APM_ISSUE_STREAM => String::from("apm_issue_stream"), + Self::TRACE_STREAM => String::from("trace_stream"), + Self::LOGS_ISSUE_STREAM => String::from("logs_issue_stream"), + Self::LOGS_PATTERN_STREAM => String::from("logs_pattern_stream"), + Self::LOGS_TRANSACTION_STREAM => String::from("logs_transaction_stream"), + Self::EVENT_STREAM => String::from("event_stream"), + } + } +} diff --git a/src/datadogV1/model/model_list_stream_widget_definition.rs b/src/datadogV1/model/model_list_stream_widget_definition.rs new file mode 100644 index 000000000..60cb0cffa --- /dev/null +++ b/src/datadogV1/model/model_list_stream_widget_definition.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The list stream visualization displays a table of recent events in your application that +/// match a search criteria using user-defined columns. +/// +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListStreamWidgetDefinition { + /// Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". + #[serde(rename = "legend_size")] + pub legend_size: Option, + /// Request payload used to query items. + #[serde(rename = "requests")] + pub requests: Vec, + /// Whether or not to display the legend on this widget. + #[serde(rename = "show_legend")] + pub show_legend: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the list stream widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ListStreamWidgetDefinitionType, +} + +impl ListStreamWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::ListStreamWidgetDefinitionType, + ) -> ListStreamWidgetDefinition { + ListStreamWidgetDefinition { + legend_size: None, + requests, + show_legend: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_list_stream_widget_definition_type.rs b/src/datadogV1/model/model_list_stream_widget_definition_type.rs new file mode 100644 index 000000000..1999ec170 --- /dev/null +++ b/src/datadogV1/model/model_list_stream_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ListStreamWidgetDefinitionType { + #[serde(rename = "list_stream")] + LIST_STREAM, +} + +impl ToString for ListStreamWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::LIST_STREAM => String::from("list_stream"), + } + } +} diff --git a/src/datadogV1/model/model_list_stream_widget_request.rs b/src/datadogV1/model/model_list_stream_widget_request.rs new file mode 100644 index 000000000..57592e9b9 --- /dev/null +++ b/src/datadogV1/model/model_list_stream_widget_request.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated list stream widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListStreamWidgetRequest { + /// Widget columns. + #[serde(rename = "columns")] + pub columns: Vec, + /// Updated list stream widget. + #[serde(rename = "query")] + pub query: Box, + /// Widget response format. + #[serde(rename = "response_format")] + pub response_format: crate::datadogV1::model::ListStreamResponseFormat, +} + +impl ListStreamWidgetRequest { + pub fn new( + columns: Vec, + query: Box, + response_format: crate::datadogV1::model::ListStreamResponseFormat, + ) -> ListStreamWidgetRequest { + ListStreamWidgetRequest { + columns, + query, + response_format, + } + } +} diff --git a/src/datadogV1/model/model_log.rs b/src/datadogV1/model/model_log.rs index 58cb750c8..20bf35489 100644 --- a/src/datadogV1/model/model_log.rs +++ b/src/datadogV1/model/model_log.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object describing a log after being processed and stored by Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Log { /// JSON object containing all log attributes and their associated values. #[serde(rename = "content")] diff --git a/src/datadogV1/model/model_log_content.rs b/src/datadogV1/model/model_log_content.rs index 26c9eda17..49e5cd6ce 100644 --- a/src/datadogV1/model/model_log_content.rs +++ b/src/datadogV1/model/model_log_content.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// JSON object containing all log attributes and their associated values. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogContent { /// JSON object of attributes from your log. #[serde(rename = "attributes")] diff --git a/src/datadogV1/model/model_log_query_definition.rs b/src/datadogV1/model/model_log_query_definition.rs new file mode 100644 index 000000000..04616ee9a --- /dev/null +++ b/src/datadogV1/model/model_log_query_definition.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The log query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogQueryDefinition { + /// Define computation for a log query. + #[serde(rename = "compute")] + pub compute: Option>, + /// List of tag prefixes to group by in the case of a cluster check. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// A coma separated-list of index names. Use "*" query all indexes at once. [Multiple Indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes) + #[serde(rename = "index")] + pub index: Option, + /// This field is mutually exclusive with `compute`. + #[serde(rename = "multi_compute")] + pub multi_compute: Option>, + /// The query being made on the logs. + #[serde(rename = "search")] + pub search: Option>, +} + +impl LogQueryDefinition { + pub fn new() -> LogQueryDefinition { + LogQueryDefinition { + compute: None, + group_by: None, + index: None, + multi_compute: None, + search: None, + } + } +} diff --git a/src/datadogV1/model/model_log_query_definition_group_by.rs b/src/datadogV1/model/model_log_query_definition_group_by.rs new file mode 100644 index 000000000..f2f482d6e --- /dev/null +++ b/src/datadogV1/model/model_log_query_definition_group_by.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Defined items in the group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogQueryDefinitionGroupBy { + /// Facet name. + #[serde(rename = "facet")] + pub facet: String, + /// Maximum number of items in the group. + #[serde(rename = "limit")] + pub limit: Option, + /// Define a sorting method. + #[serde(rename = "sort")] + pub sort: Option>, +} + +impl LogQueryDefinitionGroupBy { + pub fn new(facet: String) -> LogQueryDefinitionGroupBy { + LogQueryDefinitionGroupBy { + facet, + limit: None, + sort: None, + } + } +} diff --git a/src/datadogV1/model/model_log_query_definition_group_by_sort.rs b/src/datadogV1/model/model_log_query_definition_group_by_sort.rs new file mode 100644 index 000000000..f2eb5e021 --- /dev/null +++ b/src/datadogV1/model/model_log_query_definition_group_by_sort.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Define a sorting method. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogQueryDefinitionGroupBySort { + /// The aggregation method. + #[serde(rename = "aggregation")] + pub aggregation: String, + /// Facet name. + #[serde(rename = "facet")] + pub facet: Option, + /// Widget sorting methods. + #[serde(rename = "order")] + pub order: crate::datadogV1::model::WidgetSort, +} + +impl LogQueryDefinitionGroupBySort { + pub fn new( + aggregation: String, + order: crate::datadogV1::model::WidgetSort, + ) -> LogQueryDefinitionGroupBySort { + LogQueryDefinitionGroupBySort { + aggregation, + facet: None, + order, + } + } +} diff --git a/src/datadogV1/model/model_log_query_definition_search.rs b/src/datadogV1/model/model_log_query_definition_search.rs new file mode 100644 index 000000000..f981c20c2 --- /dev/null +++ b/src/datadogV1/model/model_log_query_definition_search.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The query being made on the logs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogQueryDefinitionSearch { + /// Search value to apply. + #[serde(rename = "query")] + pub query: String, +} + +impl LogQueryDefinitionSearch { + pub fn new(query: String) -> LogQueryDefinitionSearch { + LogQueryDefinitionSearch { query } + } +} diff --git a/src/datadogV1/model/model_log_stream_widget_definition.rs b/src/datadogV1/model/model_log_stream_widget_definition.rs new file mode 100644 index 000000000..c385874ef --- /dev/null +++ b/src/datadogV1/model/model_log_stream_widget_definition.rs @@ -0,0 +1,74 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The Log Stream displays a log flow matching the defined query. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogStreamWidgetDefinition { + /// Which columns to display on the widget. + #[serde(rename = "columns")] + pub columns: Option>, + /// An array of index names to query in the stream. Use [] to query all indexes at once. + #[serde(rename = "indexes")] + pub indexes: Option>, + /// ID of the log set to use. + #[deprecated] + #[serde(rename = "logset")] + pub logset: Option, + /// Amount of log lines to display + #[serde(rename = "message_display")] + pub message_display: Option, + /// Query to filter the log stream with. + #[serde(rename = "query")] + pub query: Option, + /// Whether to show the date column or not + #[serde(rename = "show_date_column")] + pub show_date_column: Option, + /// Whether to show the message column or not + #[serde(rename = "show_message_column")] + pub show_message_column: Option, + /// Which column and order to sort by + #[serde(rename = "sort")] + pub sort: Option>, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the log stream widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogStreamWidgetDefinitionType, +} + +impl LogStreamWidgetDefinition { + pub fn new( + type_: crate::datadogV1::model::LogStreamWidgetDefinitionType, + ) -> LogStreamWidgetDefinition { + #[allow(deprecated)] + LogStreamWidgetDefinition { + columns: None, + indexes: None, + logset: None, + message_display: None, + query: None, + show_date_column: None, + show_message_column: None, + sort: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_log_stream_widget_definition_type.rs b/src/datadogV1/model/model_log_stream_widget_definition_type.rs new file mode 100644 index 000000000..c5e94b536 --- /dev/null +++ b/src/datadogV1/model/model_log_stream_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogStreamWidgetDefinitionType { + #[serde(rename = "log_stream")] + LOG_STREAM, +} + +impl ToString for LogStreamWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::LOG_STREAM => String::from("log_stream"), + } + } +} diff --git a/src/datadogV1/model/model_logs_api_error.rs b/src/datadogV1/model/model_logs_api_error.rs index 9a9d7777c..b153e5ad6 100644 --- a/src/datadogV1/model/model_logs_api_error.rs +++ b/src/datadogV1/model/model_logs_api_error.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Error returned by the Logs API #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsAPIError { /// Code identifying the error #[serde(rename = "code")] diff --git a/src/datadogV1/model/model_logs_api_error_response.rs b/src/datadogV1/model/model_logs_api_error_response.rs index bd67441b0..d78255b8c 100644 --- a/src/datadogV1/model/model_logs_api_error_response.rs +++ b/src/datadogV1/model/model_logs_api_error_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response returned by the Logs API when errors occur. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsAPIErrorResponse { /// Error returned by the Logs API #[serde(rename = "error")] diff --git a/src/datadogV1/model/model_logs_arithmetic_processor.rs b/src/datadogV1/model/model_logs_arithmetic_processor.rs new file mode 100644 index 000000000..943c36451 --- /dev/null +++ b/src/datadogV1/model/model_logs_arithmetic_processor.rs @@ -0,0 +1,67 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use the Arithmetic Processor to add a new attribute (without spaces or special characters +/// in the new attribute name) to a log with the result of the provided formula. +/// This enables you to remap different time attributes with different units into a single attribute, +/// or to compute operations on attributes within the same log. +/// +/// The formula can use parentheses and the basic arithmetic operators `-`, `+`, `*`, `/`. +/// +/// By default, the calculation is skipped if an attribute is missing. +/// Select “Replace missing attribute by 0” to automatically populate +/// missing attribute values with 0 to ensure that the calculation is done. +/// An attribute is missing if it is not found in the log attributes, +/// or if it cannot be converted to a number. +/// +/// *Notes*: +/// +/// - The operator `-` needs to be space split in the formula as it can also be contained in attribute names. +/// - If the target attribute already exists, it is overwritten by the result of the formula. +/// - Results are rounded up to the 9th decimal. For example, if the result of the formula is `0.1234567891`, +/// the actual value stored for the attribute is `0.123456789`. +/// - If you need to scale a unit of measure, +/// see [Scale Filter](https://docs.datadoghq.com/logs/log_configuration/parsing/?tab=filter#matcher-and-filter). +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArithmeticProcessor { + /// Arithmetic operation between one or more log attributes. + #[serde(rename = "expression")] + pub expression: String, + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// If `true`, it replaces all missing attributes of expression by `0`, `false` + /// skip the operation if an attribute is missing. + #[serde(rename = "is_replace_missing")] + pub is_replace_missing: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Name of the attribute that contains the result of the arithmetic operation. + #[serde(rename = "target")] + pub target: String, + /// Type of logs arithmetic processor. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsArithmeticProcessorType, +} + +impl LogsArithmeticProcessor { + pub fn new( + expression: String, + target: String, + type_: crate::datadogV1::model::LogsArithmeticProcessorType, + ) -> LogsArithmeticProcessor { + LogsArithmeticProcessor { + expression, + is_enabled: None, + is_replace_missing: None, + name: None, + target, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_arithmetic_processor_type.rs b/src/datadogV1/model/model_logs_arithmetic_processor_type.rs new file mode 100644 index 000000000..a6bf6eba9 --- /dev/null +++ b/src/datadogV1/model/model_logs_arithmetic_processor_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsArithmeticProcessorType { + #[serde(rename = "arithmetic-processor")] + ARITHMETIC_PROCESSOR, +} + +impl ToString for LogsArithmeticProcessorType { + fn to_string(&self) -> String { + match self { + Self::ARITHMETIC_PROCESSOR => String::from("arithmetic-processor"), + } + } +} diff --git a/src/datadogV1/model/model_logs_attribute_remapper.rs b/src/datadogV1/model/model_logs_attribute_remapper.rs new file mode 100644 index 000000000..628e3b163 --- /dev/null +++ b/src/datadogV1/model/model_logs_attribute_remapper.rs @@ -0,0 +1,66 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The remapper processor remaps any source attribute(s) or tag to another target attribute or tag. +/// Constraints on the tag/attribute name are explained in the [Tag Best Practice documentation](https://docs.datadoghq.com/logs/guide/log-parsing-best-practice). +/// Some additional constraints are applied as `:` or `,` are not allowed in the target tag/attribute name. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAttributeRemapper { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Override or not the target element if already set, + #[serde(rename = "override_on_conflict")] + pub override_on_conflict: Option, + /// Remove or preserve the remapped source element. + #[serde(rename = "preserve_source")] + pub preserve_source: Option, + /// Defines if the sources are from log `attribute` or `tag`. + #[serde(rename = "source_type")] + pub source_type: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Final attribute or tag name to remap the sources to. + #[serde(rename = "target")] + pub target: String, + /// If the `target_type` of the remapper is `attribute`, try to cast the value to a new specific type. + /// If the cast is not possible, the original type is kept. `string`, `integer`, or `double` are the possible types. + /// If the `target_type` is `tag`, this parameter may not be specified. + #[serde(rename = "target_format")] + pub target_format: Option, + /// Defines if the final attribute or tag name is from log `attribute` or `tag`. + #[serde(rename = "target_type")] + pub target_type: Option, + /// Type of logs attribute remapper. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsAttributeRemapperType, +} + +impl LogsAttributeRemapper { + pub fn new( + sources: Vec, + target: String, + type_: crate::datadogV1::model::LogsAttributeRemapperType, + ) -> LogsAttributeRemapper { + LogsAttributeRemapper { + is_enabled: None, + name: None, + override_on_conflict: None, + preserve_source: None, + source_type: None, + sources, + target, + target_format: None, + target_type: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_attribute_remapper_type.rs b/src/datadogV1/model/model_logs_attribute_remapper_type.rs new file mode 100644 index 000000000..51381c103 --- /dev/null +++ b/src/datadogV1/model/model_logs_attribute_remapper_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsAttributeRemapperType { + #[serde(rename = "attribute-remapper")] + ATTRIBUTE_REMAPPER, +} + +impl ToString for LogsAttributeRemapperType { + fn to_string(&self) -> String { + match self { + Self::ATTRIBUTE_REMAPPER => String::from("attribute-remapper"), + } + } +} diff --git a/src/datadogV1/model/model_logs_by_retention.rs b/src/datadogV1/model/model_logs_by_retention.rs index 100fa08e9..b13933d43 100644 --- a/src/datadogV1/model/model_logs_by_retention.rs +++ b/src/datadogV1/model/model_logs_by_retention.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing logs usage data broken down by retention period. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsByRetention { /// Indexed logs usage summary for each organization for each retention period with usage. #[serde(rename = "orgs")] diff --git a/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs b/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs index c1b74f8d5..665148884 100644 --- a/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_monthly_usage.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing a summary of indexed logs usage by retention period for a single month. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsByRetentionMonthlyUsage { /// The month for the usage. #[serde(rename = "date")] diff --git a/src/datadogV1/model/model_logs_by_retention_org_usage.rs b/src/datadogV1/model/model_logs_by_retention_org_usage.rs index a29eabd32..41fee2670 100644 --- a/src/datadogV1/model/model_logs_by_retention_org_usage.rs +++ b/src/datadogV1/model/model_logs_by_retention_org_usage.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Indexed logs usage by retention for a single organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsByRetentionOrgUsage { /// Indexed logs usage for each active retention for the organization. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_logs_by_retention_orgs.rs b/src/datadogV1/model/model_logs_by_retention_orgs.rs index 9d8085bbf..c5213ada4 100644 --- a/src/datadogV1/model/model_logs_by_retention_orgs.rs +++ b/src/datadogV1/model/model_logs_by_retention_orgs.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Indexed logs usage summary for each organization for each retention period with usage. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsByRetentionOrgs { /// Indexed logs usage summary for each organization. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_logs_category_processor.rs b/src/datadogV1/model/model_logs_category_processor.rs new file mode 100644 index 000000000..e149f7f4f --- /dev/null +++ b/src/datadogV1/model/model_logs_category_processor.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use the Category Processor to add a new attribute (without spaces or special characters in the new attribute name) +/// to a log matching a provided search query. Use categories to create groups for an analytical view. +/// For example, URL groups, machine groups, environments, and response time buckets. +/// +/// **Notes**: +/// +/// - The syntax of the query is the one of Logs Explorer search bar. +/// The query can be done on any log attribute or tag, whether it is a facet or not. +/// Wildcards can also be used inside your query. +/// - Once the log has matched one of the Processor queries, it stops. +/// Make sure they are properly ordered in case a log could match several queries. +/// - The names of the categories must be unique. +/// - Once defined in the Category Processor, you can map categories to log status using the Log Status Remapper. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsCategoryProcessor { + /// Array of filters to match or not a log and their + /// corresponding `name` to assign a custom value to the log. + #[serde(rename = "categories")] + pub categories: Vec, + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Name of the target attribute which value is defined by the matching category. + #[serde(rename = "target")] + pub target: String, + /// Type of logs category processor. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsCategoryProcessorType, +} + +impl LogsCategoryProcessor { + pub fn new( + categories: Vec, + target: String, + type_: crate::datadogV1::model::LogsCategoryProcessorType, + ) -> LogsCategoryProcessor { + LogsCategoryProcessor { + categories, + is_enabled: None, + name: None, + target, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_category_processor_category.rs b/src/datadogV1/model/model_logs_category_processor_category.rs new file mode 100644 index 000000000..e0de700c6 --- /dev/null +++ b/src/datadogV1/model/model_logs_category_processor_category.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the logs filter. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsCategoryProcessorCategory { + /// Filter for logs. + #[serde(rename = "filter")] + pub filter: Option>, + /// Value to assign to the target attribute. + #[serde(rename = "name")] + pub name: Option, +} + +impl LogsCategoryProcessorCategory { + pub fn new() -> LogsCategoryProcessorCategory { + LogsCategoryProcessorCategory { + filter: None, + name: None, + } + } +} diff --git a/src/datadogV1/model/model_logs_category_processor_type.rs b/src/datadogV1/model/model_logs_category_processor_type.rs new file mode 100644 index 000000000..86f380604 --- /dev/null +++ b/src/datadogV1/model/model_logs_category_processor_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsCategoryProcessorType { + #[serde(rename = "category-processor")] + CATEGORY_PROCESSOR, +} + +impl ToString for LogsCategoryProcessorType { + fn to_string(&self) -> String { + match self { + Self::CATEGORY_PROCESSOR => String::from("category-processor"), + } + } +} diff --git a/src/datadogV1/model/model_logs_date_remapper.rs b/src/datadogV1/model/model_logs_date_remapper.rs new file mode 100644 index 000000000..004ab9b11 --- /dev/null +++ b/src/datadogV1/model/model_logs_date_remapper.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// As Datadog receives logs, it timestamps them using the value(s) from any of these default attributes. +/// +/// - `timestamp` +/// - `date` +/// - `_timestamp` +/// - `Timestamp` +/// - `eventTime` +/// - `published_date` +/// +/// If your logs put their dates in an attribute not in this list, +/// use the log date Remapper Processor to define their date attribute as the official log timestamp. +/// The recognized date formats are ISO8601, UNIX (the milliseconds EPOCH format), and RFC3164. +/// +/// **Note:** If your logs don’t contain any of the default attributes +/// and you haven’t defined your own date attribute, Datadog timestamps +/// the logs with the date it received them. +/// +/// If multiple log date remapper processors can be applied to a given log, +/// only the first one (according to the pipelines order) is taken into account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsDateRemapper { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Type of logs date remapper. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsDateRemapperType, +} + +impl LogsDateRemapper { + pub fn new( + sources: Vec, + type_: crate::datadogV1::model::LogsDateRemapperType, + ) -> LogsDateRemapper { + LogsDateRemapper { + is_enabled: None, + name: None, + sources, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_date_remapper_type.rs b/src/datadogV1/model/model_logs_date_remapper_type.rs new file mode 100644 index 000000000..f7e3e0a27 --- /dev/null +++ b/src/datadogV1/model/model_logs_date_remapper_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsDateRemapperType { + #[serde(rename = "date-remapper")] + DATE_REMAPPER, +} + +impl ToString for LogsDateRemapperType { + fn to_string(&self) -> String { + match self { + Self::DATE_REMAPPER => String::from("date-remapper"), + } + } +} diff --git a/src/datadogV1/model/model_logs_exclusion.rs b/src/datadogV1/model/model_logs_exclusion.rs index e2feea07d..dfb57c695 100644 --- a/src/datadogV1/model/model_logs_exclusion.rs +++ b/src/datadogV1/model/model_logs_exclusion.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Represents the index exclusion filter object from configuration API. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsExclusion { /// Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle. #[serde(rename = "filter")] diff --git a/src/datadogV1/model/model_logs_exclusion_filter.rs b/src/datadogV1/model/model_logs_exclusion_filter.rs index e23c8427b..1c679e7ae 100644 --- a/src/datadogV1/model/model_logs_exclusion_filter.rs +++ b/src/datadogV1/model/model_logs_exclusion_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsExclusionFilter { /// Default query is `*`, meaning all logs flowing in the index would be excluded. /// Scope down exclusion filter to only a subset of logs with a log query. diff --git a/src/datadogV1/model/model_logs_filter.rs b/src/datadogV1/model/model_logs_filter.rs index 56d5d3b99..fbed94375 100644 --- a/src/datadogV1/model/model_logs_filter.rs +++ b/src/datadogV1/model/model_logs_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Filter for logs. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsFilter { /// The filter query. #[serde(rename = "query")] diff --git a/src/datadogV1/model/model_logs_geo_ip_parser.rs b/src/datadogV1/model/model_logs_geo_ip_parser.rs new file mode 100644 index 000000000..c3c67f8e9 --- /dev/null +++ b/src/datadogV1/model/model_logs_geo_ip_parser.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The GeoIP parser takes an IP address attribute and extracts if available +/// the Continent, Country, Subdivision, and City information in the target attribute path. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsGeoIPParser { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Name of the parent attribute that contains all the extracted details from the `sources`. + #[serde(rename = "target")] + pub target: String, + /// Type of GeoIP parser. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsGeoIPParserType, +} + +impl LogsGeoIPParser { + pub fn new( + sources: Vec, + target: String, + type_: crate::datadogV1::model::LogsGeoIPParserType, + ) -> LogsGeoIPParser { + LogsGeoIPParser { + is_enabled: None, + name: None, + sources, + target, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_geo_ip_parser_type.rs b/src/datadogV1/model/model_logs_geo_ip_parser_type.rs new file mode 100644 index 000000000..4513b3b29 --- /dev/null +++ b/src/datadogV1/model/model_logs_geo_ip_parser_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsGeoIPParserType { + #[serde(rename = "geo-ip-parser")] + GEO_IP_PARSER, +} + +impl ToString for LogsGeoIPParserType { + fn to_string(&self) -> String { + match self { + Self::GEO_IP_PARSER => String::from("geo-ip-parser"), + } + } +} diff --git a/src/datadogV1/model/model_logs_grok_parser.rs b/src/datadogV1/model/model_logs_grok_parser.rs new file mode 100644 index 000000000..e5f1d4ed5 --- /dev/null +++ b/src/datadogV1/model/model_logs_grok_parser.rs @@ -0,0 +1,47 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create custom grok rules to parse the full message or [a specific attribute of your raw event](https://docs.datadoghq.com/logs/log_configuration/parsing/#advanced-settings). +/// For more information, see the [parsing section](https://docs.datadoghq.com/logs/log_configuration/parsing). +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsGrokParser { + /// Set of rules for the grok parser. + #[serde(rename = "grok")] + pub grok: Box, + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// List of sample logs to test this grok parser. + #[serde(rename = "samples")] + pub samples: Option>, + /// Name of the log attribute to parse. + #[serde(rename = "source")] + pub source: String, + /// Type of logs grok parser. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsGrokParserType, +} + +impl LogsGrokParser { + pub fn new( + grok: Box, + source: String, + type_: crate::datadogV1::model::LogsGrokParserType, + ) -> LogsGrokParser { + LogsGrokParser { + grok, + is_enabled: None, + name: None, + samples: None, + source, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_grok_parser_rules.rs b/src/datadogV1/model/model_logs_grok_parser_rules.rs new file mode 100644 index 000000000..5f4e640cf --- /dev/null +++ b/src/datadogV1/model/model_logs_grok_parser_rules.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Set of rules for the grok parser. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsGrokParserRules { + /// List of match rules for the grok parser, separated by a new line. + #[serde(rename = "match_rules")] + pub match_rules: String, + /// List of support rules for the grok parser, separated by a new line. + #[serde(rename = "support_rules")] + pub support_rules: Option, +} + +impl LogsGrokParserRules { + pub fn new(match_rules: String) -> LogsGrokParserRules { + LogsGrokParserRules { + match_rules, + support_rules: None, + } + } +} diff --git a/src/datadogV1/model/model_logs_grok_parser_type.rs b/src/datadogV1/model/model_logs_grok_parser_type.rs new file mode 100644 index 000000000..8a7844221 --- /dev/null +++ b/src/datadogV1/model/model_logs_grok_parser_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsGrokParserType { + #[serde(rename = "grok-parser")] + GROK_PARSER, +} + +impl ToString for LogsGrokParserType { + fn to_string(&self) -> String { + match self { + Self::GROK_PARSER => String::from("grok-parser"), + } + } +} diff --git a/src/datadogV1/model/model_logs_index.rs b/src/datadogV1/model/model_logs_index.rs index f69d35eba..a01268e68 100644 --- a/src/datadogV1/model/model_logs_index.rs +++ b/src/datadogV1/model/model_logs_index.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object describing a Datadog Log index. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsIndex { /// The number of log events you can send in this index per day before you are rate-limited. #[serde(rename = "daily_limit")] @@ -33,11 +33,11 @@ pub struct LogsIndex { } impl LogsIndex { - pub fn new(filter: crate::datadogV1::model::LogsFilter, name: String) -> LogsIndex { + pub fn new(filter: Box, name: String) -> LogsIndex { LogsIndex { daily_limit: None, exclusion_filters: None, - filter: Box::new(filter), + filter, is_rate_limited: None, name, num_retention_days: None, diff --git a/src/datadogV1/model/model_logs_index_list_response.rs b/src/datadogV1/model/model_logs_index_list_response.rs index 37304f5dc..e8c0bbfc6 100644 --- a/src/datadogV1/model/model_logs_index_list_response.rs +++ b/src/datadogV1/model/model_logs_index_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object with all Index configurations for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsIndexListResponse { /// Array of Log index configurations. #[serde(rename = "indexes")] diff --git a/src/datadogV1/model/model_logs_index_update_request.rs b/src/datadogV1/model/model_logs_index_update_request.rs index c530f8d0f..4419a5c93 100644 --- a/src/datadogV1/model/model_logs_index_update_request.rs +++ b/src/datadogV1/model/model_logs_index_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object for updating a Datadog Log index. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsIndexUpdateRequest { /// The number of log events you can send in this index per day before you are rate-limited. #[serde(rename = "daily_limit")] @@ -34,12 +34,12 @@ pub struct LogsIndexUpdateRequest { } impl LogsIndexUpdateRequest { - pub fn new(filter: crate::datadogV1::model::LogsFilter) -> LogsIndexUpdateRequest { + pub fn new(filter: Box) -> LogsIndexUpdateRequest { LogsIndexUpdateRequest { daily_limit: None, disable_daily_limit: None, exclusion_filters: None, - filter: Box::new(filter), + filter, num_retention_days: None, } } diff --git a/src/datadogV1/model/model_logs_indexes_order.rs b/src/datadogV1/model/model_logs_indexes_order.rs index 0f4d3d590..af7520169 100644 --- a/src/datadogV1/model/model_logs_indexes_order.rs +++ b/src/datadogV1/model/model_logs_indexes_order.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing the ordered list of log index names. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsIndexesOrder { /// Array of strings identifying by their name(s) the index(es) of your organization. /// Logs are tested against the query filter of each index one by one, following the order of the array. diff --git a/src/datadogV1/model/model_logs_list_request.rs b/src/datadogV1/model/model_logs_list_request.rs index 6ada1652e..cbc2a0191 100644 --- a/src/datadogV1/model/model_logs_list_request.rs +++ b/src/datadogV1/model/model_logs_list_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object to send with the request to retrieve a list of logs from your Organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsListRequest { /// The log index on which the request is performed. For multi-index organizations, /// the default is all live indexes. Historical indexes of rehydrated logs must be specified. @@ -34,14 +34,14 @@ pub struct LogsListRequest { } impl LogsListRequest { - pub fn new(time: crate::datadogV1::model::LogsListRequestTime) -> LogsListRequest { + pub fn new(time: Box) -> LogsListRequest { LogsListRequest { index: None, limit: None, query: None, sort: None, start_at: None, - time: Box::new(time), + time, } } } diff --git a/src/datadogV1/model/model_logs_list_request_time.rs b/src/datadogV1/model/model_logs_list_request_time.rs index 0a52cc1ff..73faa94b9 100644 --- a/src/datadogV1/model/model_logs_list_request_time.rs +++ b/src/datadogV1/model/model_logs_list_request_time.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Timeframe to retrieve the log from. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsListRequestTime { /// Minimum timestamp for requested logs. #[serde(rename = "from")] diff --git a/src/datadogV1/model/model_logs_list_response.rs b/src/datadogV1/model/model_logs_list_response.rs index d59db232c..f5e71d3b1 100644 --- a/src/datadogV1/model/model_logs_list_response.rs +++ b/src/datadogV1/model/model_logs_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response object with all logs matching the request and pagination information. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsListResponse { /// Array of logs matching the request and the `nextLogId` if sent. #[serde(rename = "logs")] diff --git a/src/datadogV1/model/model_logs_lookup_processor.rs b/src/datadogV1/model/model_logs_lookup_processor.rs new file mode 100644 index 000000000..60154b343 --- /dev/null +++ b/src/datadogV1/model/model_logs_lookup_processor.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use the Lookup Processor to define a mapping between a log attribute +/// and a human readable value saved in the processors mapping table. +/// For example, you can use the Lookup Processor to map an internal service ID +/// into a human readable service name. Alternatively, you could also use it to check +/// if the MAC address that just attempted to connect to the production +/// environment belongs to your list of stolen machines. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsLookupProcessor { + /// Value to set the target attribute if the source value is not found in the list. + #[serde(rename = "default_lookup")] + pub default_lookup: Option, + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Mapping table of values for the source attribute and their associated target attribute values, + /// formatted as `["source_key1,target_value1", "source_key2,target_value2"]` + #[serde(rename = "lookup_table")] + pub lookup_table: Vec, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Source attribute used to perform the lookup. + #[serde(rename = "source")] + pub source: String, + /// Name of the attribute that contains the corresponding value in the mapping list + /// or the `default_lookup` if not found in the mapping list. + #[serde(rename = "target")] + pub target: String, + /// Type of logs lookup processor. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsLookupProcessorType, +} + +impl LogsLookupProcessor { + pub fn new( + lookup_table: Vec, + source: String, + target: String, + type_: crate::datadogV1::model::LogsLookupProcessorType, + ) -> LogsLookupProcessor { + LogsLookupProcessor { + default_lookup: None, + is_enabled: None, + lookup_table, + name: None, + source, + target, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_lookup_processor_type.rs b/src/datadogV1/model/model_logs_lookup_processor_type.rs new file mode 100644 index 000000000..479650213 --- /dev/null +++ b/src/datadogV1/model/model_logs_lookup_processor_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsLookupProcessorType { + #[serde(rename = "lookup-processor")] + LOOKUP_PROCESSOR, +} + +impl ToString for LogsLookupProcessorType { + fn to_string(&self) -> String { + match self { + Self::LOOKUP_PROCESSOR => String::from("lookup-processor"), + } + } +} diff --git a/src/datadogV1/model/model_logs_message_remapper.rs b/src/datadogV1/model/model_logs_message_remapper.rs new file mode 100644 index 000000000..bf9cc02f9 --- /dev/null +++ b/src/datadogV1/model/model_logs_message_remapper.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The message is a key attribute in Datadog. +/// It is displayed in the message column of the Log Explorer and you can do full string search on it. +/// Use this Processor to define one or more attributes as the official log message. +/// +/// **Note:** If multiple log message remapper processors can be applied to a given log, +/// only the first one (according to the pipeline order) is taken into account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsMessageRemapper { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Type of logs message remapper. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsMessageRemapperType, +} + +impl LogsMessageRemapper { + pub fn new( + sources: Vec, + type_: crate::datadogV1::model::LogsMessageRemapperType, + ) -> LogsMessageRemapper { + LogsMessageRemapper { + is_enabled: None, + name: None, + sources, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_message_remapper_type.rs b/src/datadogV1/model/model_logs_message_remapper_type.rs new file mode 100644 index 000000000..7b04153fa --- /dev/null +++ b/src/datadogV1/model/model_logs_message_remapper_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsMessageRemapperType { + #[serde(rename = "message-remapper")] + MESSAGE_REMAPPER, +} + +impl ToString for LogsMessageRemapperType { + fn to_string(&self) -> String { + match self { + Self::MESSAGE_REMAPPER => String::from("message-remapper"), + } + } +} diff --git a/src/datadogV1/model/model_logs_pipeline.rs b/src/datadogV1/model/model_logs_pipeline.rs new file mode 100644 index 000000000..fab57bc9b --- /dev/null +++ b/src/datadogV1/model/model_logs_pipeline.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pipelines and processors operate on incoming logs, +/// parsing and transforming them into structured attributes for easier querying. +/// +/// **Note**: These endpoints are only available for admin users. +/// Make sure to use an application key created by an admin. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsPipeline { + /// Filter for logs. + #[serde(rename = "filter")] + pub filter: Option>, + /// ID of the pipeline. + #[serde(rename = "id")] + pub id: Option, + /// Whether or not the pipeline is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Whether or not the pipeline can be edited. + #[serde(rename = "is_read_only")] + pub is_read_only: Option, + /// Name of the pipeline. + #[serde(rename = "name")] + pub name: String, + /// Ordered list of processors in this pipeline. + #[serde(rename = "processors")] + pub processors: Option>, + /// Type of pipeline. + #[serde(rename = "type")] + pub type_: Option, +} + +impl LogsPipeline { + pub fn new(name: String) -> LogsPipeline { + LogsPipeline { + filter: None, + id: None, + is_enabled: None, + is_read_only: None, + name, + processors: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_logs_pipeline_processor.rs b/src/datadogV1/model/model_logs_pipeline_processor.rs new file mode 100644 index 000000000..4378cd390 --- /dev/null +++ b/src/datadogV1/model/model_logs_pipeline_processor.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Nested Pipelines are pipelines within a pipeline. Use Nested Pipelines to split the processing into two steps. +/// For example, first use a high-level filtering such as team and then a second level of filtering based on the +/// integration, service, or any other tag or attribute. +/// +/// A pipeline can contain Nested Pipelines and Processors whereas a Nested Pipeline can only contain Processors. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsPipelineProcessor { + /// Filter for logs. + #[serde(rename = "filter")] + pub filter: Option>, + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Ordered list of processors in this pipeline. + #[serde(rename = "processors")] + pub processors: Option>, + /// Type of logs pipeline processor. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsPipelineProcessorType, +} + +impl LogsPipelineProcessor { + pub fn new(type_: crate::datadogV1::model::LogsPipelineProcessorType) -> LogsPipelineProcessor { + LogsPipelineProcessor { + filter: None, + is_enabled: None, + name: None, + processors: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_pipeline_processor_type.rs b/src/datadogV1/model/model_logs_pipeline_processor_type.rs new file mode 100644 index 000000000..ac1155815 --- /dev/null +++ b/src/datadogV1/model/model_logs_pipeline_processor_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsPipelineProcessorType { + #[serde(rename = "pipeline")] + PIPELINE, +} + +impl ToString for LogsPipelineProcessorType { + fn to_string(&self) -> String { + match self { + Self::PIPELINE => String::from("pipeline"), + } + } +} diff --git a/src/datadogV1/model/model_logs_pipelines_order.rs b/src/datadogV1/model/model_logs_pipelines_order.rs new file mode 100644 index 000000000..663d5b312 --- /dev/null +++ b/src/datadogV1/model/model_logs_pipelines_order.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the ordered list of pipeline IDs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsPipelinesOrder { + /// Ordered Array of `` strings, the order of pipeline IDs in the array + /// define the overall Pipelines order for Datadog. + #[serde(rename = "pipeline_ids")] + pub pipeline_ids: Vec, +} + +impl LogsPipelinesOrder { + pub fn new(pipeline_ids: Vec) -> LogsPipelinesOrder { + LogsPipelinesOrder { pipeline_ids } + } +} diff --git a/src/datadogV1/model/model_logs_processor.rs b/src/datadogV1/model/model_logs_processor.rs new file mode 100644 index 000000000..d68e13a7f --- /dev/null +++ b/src/datadogV1/model/model_logs_processor.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Definition of a logs processor. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogsProcessor { + LogsGrokParser(Box), + LogsDateRemapper(Box), + LogsStatusRemapper(Box), + LogsServiceRemapper(Box), + LogsMessageRemapper(Box), + LogsAttributeRemapper(Box), + LogsURLParser(Box), + LogsUserAgentParser(Box), + LogsCategoryProcessor(Box), + LogsArithmeticProcessor(Box), + LogsStringBuilderProcessor(Box), + LogsPipelineProcessor(Box), + LogsGeoIPParser(Box), + LogsLookupProcessor(Box), + ReferenceTableLogsLookupProcessor( + Box, + ), + LogsTraceRemapper(Box), +} diff --git a/src/datadogV1/model/model_logs_query_compute.rs b/src/datadogV1/model/model_logs_query_compute.rs new file mode 100644 index 000000000..08483f932 --- /dev/null +++ b/src/datadogV1/model/model_logs_query_compute.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Define computation for a log query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsQueryCompute { + /// The aggregation method. + #[serde(rename = "aggregation")] + pub aggregation: String, + /// Facet name. + #[serde(rename = "facet")] + pub facet: Option, + /// Define a time interval in seconds. + #[serde(rename = "interval")] + pub interval: Option, +} + +impl LogsQueryCompute { + pub fn new(aggregation: String) -> LogsQueryCompute { + LogsQueryCompute { + aggregation, + facet: None, + interval: None, + } + } +} diff --git a/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs b/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs index f43b8d56b..9a810b0f2 100644 --- a/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_agg_sum_usage.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing indexed logs usage aggregated across organizations and months for a retention period. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsRetentionAggSumUsage { /// Total indexed logs for this retention period. #[serde(rename = "logs_indexed_logs_usage_agg_sum")] diff --git a/src/datadogV1/model/model_logs_retention_sum_usage.rs b/src/datadogV1/model/model_logs_retention_sum_usage.rs index d8616246b..5ce42e95a 100644 --- a/src/datadogV1/model/model_logs_retention_sum_usage.rs +++ b/src/datadogV1/model/model_logs_retention_sum_usage.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing indexed logs usage grouped by retention period and summed. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsRetentionSumUsage { /// Total indexed logs for this retention period. #[serde(rename = "logs_indexed_logs_usage_sum")] diff --git a/src/datadogV1/model/model_logs_service_remapper.rs b/src/datadogV1/model/model_logs_service_remapper.rs new file mode 100644 index 000000000..47d1c78f3 --- /dev/null +++ b/src/datadogV1/model/model_logs_service_remapper.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use this processor if you want to assign one or more attributes as the official service. +/// +/// **Note:** If multiple service remapper processors can be applied to a given log, +/// only the first one (according to the pipeline order) is taken into account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsServiceRemapper { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Type of logs service remapper. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsServiceRemapperType, +} + +impl LogsServiceRemapper { + pub fn new( + sources: Vec, + type_: crate::datadogV1::model::LogsServiceRemapperType, + ) -> LogsServiceRemapper { + LogsServiceRemapper { + is_enabled: None, + name: None, + sources, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_service_remapper_type.rs b/src/datadogV1/model/model_logs_service_remapper_type.rs new file mode 100644 index 000000000..510ffb20f --- /dev/null +++ b/src/datadogV1/model/model_logs_service_remapper_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsServiceRemapperType { + #[serde(rename = "service-remapper")] + SERVICE_REMAPPER, +} + +impl ToString for LogsServiceRemapperType { + fn to_string(&self) -> String { + match self { + Self::SERVICE_REMAPPER => String::from("service-remapper"), + } + } +} diff --git a/src/datadogV1/model/model_logs_sort.rs b/src/datadogV1/model/model_logs_sort.rs index 61e4f60a3..5e1befcb5 100644 --- a/src/datadogV1/model/model_logs_sort.rs +++ b/src/datadogV1/model/model_logs_sort.rs @@ -20,9 +20,3 @@ impl ToString for LogsSort { } } } - -impl Default for LogsSort { - fn default() -> LogsSort { - Self::TIME_ASCENDING - } -} diff --git a/src/datadogV1/model/model_logs_status_remapper.rs b/src/datadogV1/model/model_logs_status_remapper.rs new file mode 100644 index 000000000..37759d85f --- /dev/null +++ b/src/datadogV1/model/model_logs_status_remapper.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use this Processor if you want to assign some attributes as the official status. +/// +/// Each incoming status value is mapped as follows. +/// +/// - Integers from 0 to 7 map to the Syslog severity standards +/// - Strings beginning with `emerg` or f (case-insensitive) map to `emerg` (0) +/// - Strings beginning with `a` (case-insensitive) map to `alert` (1) +/// - Strings beginning with `c` (case-insensitive) map to `critical` (2) +/// - Strings beginning with `err` (case-insensitive) map to `error` (3) +/// - Strings beginning with `w` (case-insensitive) map to `warning` (4) +/// - Strings beginning with `n` (case-insensitive) map to `notice` (5) +/// - Strings beginning with `i` (case-insensitive) map to `info` (6) +/// - Strings beginning with `d`, `trace` or `verbose` (case-insensitive) map to `debug` (7) +/// - Strings beginning with `o` or matching `OK` or `Success` (case-insensitive) map to OK +/// - All others map to `info` (6) +/// +/// **Note:** If multiple log status remapper processors can be applied to a given log, +/// only the first one (according to the pipelines order) is taken into account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsStatusRemapper { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Type of logs status remapper. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsStatusRemapperType, +} + +impl LogsStatusRemapper { + pub fn new( + sources: Vec, + type_: crate::datadogV1::model::LogsStatusRemapperType, + ) -> LogsStatusRemapper { + LogsStatusRemapper { + is_enabled: None, + name: None, + sources, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_status_remapper_type.rs b/src/datadogV1/model/model_logs_status_remapper_type.rs new file mode 100644 index 000000000..ca4645ac1 --- /dev/null +++ b/src/datadogV1/model/model_logs_status_remapper_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsStatusRemapperType { + #[serde(rename = "status-remapper")] + STATUS_REMAPPER, +} + +impl ToString for LogsStatusRemapperType { + fn to_string(&self) -> String { + match self { + Self::STATUS_REMAPPER => String::from("status-remapper"), + } + } +} diff --git a/src/datadogV1/model/model_logs_string_builder_processor.rs b/src/datadogV1/model/model_logs_string_builder_processor.rs new file mode 100644 index 000000000..37314e44a --- /dev/null +++ b/src/datadogV1/model/model_logs_string_builder_processor.rs @@ -0,0 +1,59 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use the string builder processor to add a new attribute (without spaces or special characters) +/// to a log with the result of the provided template. +/// This enables aggregation of different attributes or raw strings into a single attribute. +/// +/// The template is defined by both raw text and blocks with the syntax `%{attribute_path}`. +/// +/// **Notes**: +/// +/// - The processor only accepts attributes with values or an array of values in the blocks. +/// - If an attribute cannot be used (object or array of object), +/// it is replaced by an empty string or the entire operation is skipped depending on your selection. +/// - If the target attribute already exists, it is overwritten by the result of the template. +/// - Results of the template cannot exceed 256 characters. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsStringBuilderProcessor { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// If true, it replaces all missing attributes of `template` by an empty string. + /// If `false` (default), skips the operation for missing attributes. + #[serde(rename = "is_replace_missing")] + pub is_replace_missing: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// The name of the attribute that contains the result of the template. + #[serde(rename = "target")] + pub target: String, + /// A formula with one or more attributes and raw text. + #[serde(rename = "template")] + pub template: String, + /// Type of logs string builder processor. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsStringBuilderProcessorType, +} + +impl LogsStringBuilderProcessor { + pub fn new( + target: String, + template: String, + type_: crate::datadogV1::model::LogsStringBuilderProcessorType, + ) -> LogsStringBuilderProcessor { + LogsStringBuilderProcessor { + is_enabled: None, + is_replace_missing: None, + name: None, + target, + template, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_string_builder_processor_type.rs b/src/datadogV1/model/model_logs_string_builder_processor_type.rs new file mode 100644 index 000000000..76aff5847 --- /dev/null +++ b/src/datadogV1/model/model_logs_string_builder_processor_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsStringBuilderProcessorType { + #[serde(rename = "string-builder-processor")] + STRING_BUILDER_PROCESSOR, +} + +impl ToString for LogsStringBuilderProcessorType { + fn to_string(&self) -> String { + match self { + Self::STRING_BUILDER_PROCESSOR => String::from("string-builder-processor"), + } + } +} diff --git a/src/datadogV1/model/model_logs_trace_remapper.rs b/src/datadogV1/model/model_logs_trace_remapper.rs new file mode 100644 index 000000000..3b39ccc4b --- /dev/null +++ b/src/datadogV1/model/model_logs_trace_remapper.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// There are two ways to improve correlation between application traces and logs. +/// +/// 1. Follow the documentation on [how to inject a trace ID in the application logs](https://docs.datadoghq.com/tracing/connect_logs_and_traces) +/// and by default log integrations take care of all the rest of the setup. +/// +/// 2. Use the Trace remapper processor to define a log attribute as its associated trace ID. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsTraceRemapper { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Option>, + /// Type of logs trace remapper. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsTraceRemapperType, +} + +impl LogsTraceRemapper { + pub fn new(type_: crate::datadogV1::model::LogsTraceRemapperType) -> LogsTraceRemapper { + LogsTraceRemapper { + is_enabled: None, + name: None, + sources: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_trace_remapper_type.rs b/src/datadogV1/model/model_logs_trace_remapper_type.rs new file mode 100644 index 000000000..da349c2d1 --- /dev/null +++ b/src/datadogV1/model/model_logs_trace_remapper_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsTraceRemapperType { + #[serde(rename = "trace-id-remapper")] + TRACE_ID_REMAPPER, +} + +impl ToString for LogsTraceRemapperType { + fn to_string(&self) -> String { + match self { + Self::TRACE_ID_REMAPPER => String::from("trace-id-remapper"), + } + } +} diff --git a/src/datadogV1/model/model_logs_url_parser.rs b/src/datadogV1/model/model_logs_url_parser.rs new file mode 100644 index 000000000..6366b5101 --- /dev/null +++ b/src/datadogV1/model/model_logs_url_parser.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// This processor extracts query parameters and other important parameters from a URL. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsURLParser { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Normalize the ending slashes or not. + #[serde( + rename = "normalize_ending_slashes", + default, + with = "::serde_with::rust::double_option" + )] + pub normalize_ending_slashes: Option>, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Name of the parent attribute that contains all the extracted details from the `sources`. + #[serde(rename = "target")] + pub target: String, + /// Type of logs URL parser. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsURLParserType, +} + +impl LogsURLParser { + pub fn new( + sources: Vec, + target: String, + type_: crate::datadogV1::model::LogsURLParserType, + ) -> LogsURLParser { + LogsURLParser { + is_enabled: None, + name: None, + normalize_ending_slashes: None, + sources, + target, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_url_parser_type.rs b/src/datadogV1/model/model_logs_url_parser_type.rs new file mode 100644 index 000000000..b4495ec6c --- /dev/null +++ b/src/datadogV1/model/model_logs_url_parser_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsURLParserType { + #[serde(rename = "url-parser")] + URL_PARSER, +} + +impl ToString for LogsURLParserType { + fn to_string(&self) -> String { + match self { + Self::URL_PARSER => String::from("url-parser"), + } + } +} diff --git a/src/datadogV1/model/model_logs_user_agent_parser.rs b/src/datadogV1/model/model_logs_user_agent_parser.rs new file mode 100644 index 000000000..76bd81bd2 --- /dev/null +++ b/src/datadogV1/model/model_logs_user_agent_parser.rs @@ -0,0 +1,47 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The User-Agent parser takes a User-Agent attribute and extracts the OS, browser, device, and other user data. +/// It recognizes major bots like the Google Bot, Yahoo Slurp, and Bing. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsUserAgentParser { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Define if the source attribute is URL encoded or not. + #[serde(rename = "is_encoded")] + pub is_encoded: Option, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Array of source attributes. + #[serde(rename = "sources")] + pub sources: Vec, + /// Name of the parent attribute that contains all the extracted details from the `sources`. + #[serde(rename = "target")] + pub target: String, + /// Type of logs User-Agent parser. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsUserAgentParserType, +} + +impl LogsUserAgentParser { + pub fn new( + sources: Vec, + target: String, + type_: crate::datadogV1::model::LogsUserAgentParserType, + ) -> LogsUserAgentParser { + LogsUserAgentParser { + is_enabled: None, + is_encoded: None, + name: None, + sources, + target, + type_, + } + } +} diff --git a/src/datadogV1/model/model_logs_user_agent_parser_type.rs b/src/datadogV1/model/model_logs_user_agent_parser_type.rs new file mode 100644 index 000000000..937271bb3 --- /dev/null +++ b/src/datadogV1/model/model_logs_user_agent_parser_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsUserAgentParserType { + #[serde(rename = "user-agent-parser")] + USER_AGENT_PARSER, +} + +impl ToString for LogsUserAgentParserType { + fn to_string(&self) -> String { + match self { + Self::USER_AGENT_PARSER => String::from("user-agent-parser"), + } + } +} diff --git a/src/datadogV1/model/model_matching_downtime.rs b/src/datadogV1/model/model_matching_downtime.rs new file mode 100644 index 000000000..52d69878a --- /dev/null +++ b/src/datadogV1/model/model_matching_downtime.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing a downtime that matches this monitor. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MatchingDowntime { + /// POSIX timestamp to end the downtime. + #[serde(rename = "end", default, with = "::serde_with::rust::double_option")] + pub end: Option>, + /// The downtime ID. + #[serde(rename = "id")] + pub id: i64, + /// The scope(s) to which the downtime applies. Must be in `key:value` format. For example, `host:app2`. + /// Provide multiple scopes as a comma-separated list like `env:dev,env:prod`. + /// The resulting downtime applies to sources that matches ALL provided scopes (`env:dev` **AND** `env:prod`). + #[serde(rename = "scope")] + pub scope: Option>, + /// POSIX timestamp to start the downtime. + #[serde(rename = "start")] + pub start: Option, +} + +impl MatchingDowntime { + pub fn new(id: i64) -> MatchingDowntime { + MatchingDowntime { + end: None, + id, + scope: None, + start: None, + } + } +} diff --git a/src/datadogV1/model/model_metric_content_encoding.rs b/src/datadogV1/model/model_metric_content_encoding.rs index 98acbd9e2..77ac622cd 100644 --- a/src/datadogV1/model/model_metric_content_encoding.rs +++ b/src/datadogV1/model/model_metric_content_encoding.rs @@ -20,9 +20,3 @@ impl ToString for MetricContentEncoding { } } } - -impl Default for MetricContentEncoding { - fn default() -> MetricContentEncoding { - Self::DEFLATE - } -} diff --git a/src/datadogV1/model/model_metric_metadata.rs b/src/datadogV1/model/model_metric_metadata.rs index fbac6e97a..3580fc0af 100644 --- a/src/datadogV1/model/model_metric_metadata.rs +++ b/src/datadogV1/model/model_metric_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object with all metric related metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricMetadata { /// Metric description. #[serde(rename = "description")] diff --git a/src/datadogV1/model/model_metric_search_response.rs b/src/datadogV1/model/model_metric_search_response.rs index 93eea102f..bbcee07e4 100644 --- a/src/datadogV1/model/model_metric_search_response.rs +++ b/src/datadogV1/model/model_metric_search_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing the list of metrics matching the search query. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricSearchResponse { /// Search result. #[serde(rename = "results")] diff --git a/src/datadogV1/model/model_metric_search_response_results.rs b/src/datadogV1/model/model_metric_search_response_results.rs index 1cc39f770..e933fc29d 100644 --- a/src/datadogV1/model/model_metric_search_response_results.rs +++ b/src/datadogV1/model/model_metric_search_response_results.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Search result. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricSearchResponseResults { /// List of metrics that match the search query. #[serde(rename = "metrics")] diff --git a/src/datadogV1/model/model_metrics_list_response.rs b/src/datadogV1/model/model_metrics_list_response.rs index 3d8333674..f7c5fbd93 100644 --- a/src/datadogV1/model/model_metrics_list_response.rs +++ b/src/datadogV1/model/model_metrics_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object listing all metric names stored by Datadog since a given time. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricsListResponse { /// Time when the metrics were active, seconds since the Unix epoch. #[serde(rename = "from")] diff --git a/src/datadogV1/model/model_metrics_payload.rs b/src/datadogV1/model/model_metrics_payload.rs index b1aeea310..16cfb851d 100644 --- a/src/datadogV1/model/model_metrics_payload.rs +++ b/src/datadogV1/model/model_metrics_payload.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metrics' payload. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricsPayload { /// A list of time series to submit to Datadog. #[serde(rename = "series")] diff --git a/src/datadogV1/model/model_metrics_query_metadata.rs b/src/datadogV1/model/model_metrics_query_metadata.rs index e92874f19..d592ccfb4 100644 --- a/src/datadogV1/model/model_metrics_query_metadata.rs +++ b/src/datadogV1/model/model_metrics_query_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing all metric names returned and their associated metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricsQueryMetadata { /// Aggregation type. #[serde(rename = "aggr", default, with = "::serde_with::rust::double_option")] diff --git a/src/datadogV1/model/model_metrics_query_response.rs b/src/datadogV1/model/model_metrics_query_response.rs index 8992fccb3..01e850711 100644 --- a/src/datadogV1/model/model_metrics_query_response.rs +++ b/src/datadogV1/model/model_metrics_query_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response Object that includes your query and the list of metrics retrieved. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricsQueryResponse { /// Message indicating the errors if status is not `ok`. #[serde(rename = "error")] diff --git a/src/datadogV1/model/model_metrics_query_unit.rs b/src/datadogV1/model/model_metrics_query_unit.rs index 58f87d7b6..6a96fa741 100644 --- a/src/datadogV1/model/model_metrics_query_unit.rs +++ b/src/datadogV1/model/model_metrics_query_unit.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing the metric unit family, scale factor, name, and short name. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricsQueryUnit { /// Unit family, allows for conversion between units of the same family, for scaling. #[serde(rename = "family")] diff --git a/src/datadogV1/model/model_monitor.rs b/src/datadogV1/model/model_monitor.rs new file mode 100644 index 000000000..e865f7a48 --- /dev/null +++ b/src/datadogV1/model/model_monitor.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing a monitor. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Monitor { + /// Timestamp of the monitor creation. + #[serde(rename = "created")] + pub created: Option, + /// Object describing the creator of the shared element. + #[serde(rename = "creator")] + pub creator: Option>, + /// Whether or not the monitor is deleted. (Always `null`) + #[serde( + rename = "deleted", + default, + with = "::serde_with::rust::double_option" + )] + pub deleted: Option>, + /// ID of this monitor. + #[serde(rename = "id")] + pub id: Option, + /// A list of active v1 downtimes that match this monitor. + #[serde(rename = "matching_downtimes")] + pub matching_downtimes: Option>, + /// A message to include with notifications for this monitor. + #[serde(rename = "message")] + pub message: Option, + /// Last timestamp when the monitor was edited. + #[serde(rename = "modified")] + pub modified: Option, + /// Whether or not the monitor is broken down on different groups. + #[serde(rename = "multi")] + pub multi: Option, + /// The monitor name. + #[serde(rename = "name")] + pub name: Option, + /// List of options associated with your monitor. + #[serde(rename = "options")] + pub options: Option>, + /// The different states your monitor can be in. + #[serde(rename = "overall_state")] + pub overall_state: Option, + /// Integer from 1 (high) to 5 (low) indicating alert severity. + #[serde( + rename = "priority", + default, + with = "::serde_with::rust::double_option" + )] + pub priority: Option>, + /// The monitor query. + #[serde(rename = "query")] + pub query: String, + /// A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) and are located in the `data.id` field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. `restricted_roles` is the successor of `locked`. For more information about `locked` and `restricted_roles`, see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options). + #[serde( + rename = "restricted_roles", + default, + with = "::serde_with::rust::double_option" + )] + pub restricted_roles: Option>>, + /// Wrapper object with the different monitor states. + #[serde(rename = "state")] + pub state: Option>, + /// Tags associated to your monitor. + #[serde(rename = "tags")] + pub tags: Option>, + /// The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::MonitorType, +} + +impl Monitor { + pub fn new(query: String, type_: crate::datadogV1::model::MonitorType) -> Monitor { + Monitor { + created: None, + creator: None, + deleted: None, + id: None, + matching_downtimes: None, + message: None, + modified: None, + multi: None, + name: None, + options: None, + overall_state: None, + priority: None, + query, + restricted_roles: None, + state: None, + tags: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_monitor_device_id.rs b/src/datadogV1/model/model_monitor_device_id.rs new file mode 100644 index 000000000..2671761cf --- /dev/null +++ b/src/datadogV1/model/model_monitor_device_id.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorDeviceID { + #[serde(rename = "laptop_large")] + LAPTOP_LARGE, + #[serde(rename = "tablet")] + TABLET, + #[serde(rename = "mobile_small")] + MOBILE_SMALL, + #[serde(rename = "chrome.laptop_large")] + CHROME_LAPTOP_LARGE, + #[serde(rename = "chrome.tablet")] + CHROME_TABLET, + #[serde(rename = "chrome.mobile_small")] + CHROME_MOBILE_SMALL, + #[serde(rename = "firefox.laptop_large")] + FIREFOX_LAPTOP_LARGE, + #[serde(rename = "firefox.tablet")] + FIREFOX_TABLET, + #[serde(rename = "firefox.mobile_small")] + FIREFOX_MOBILE_SMALL, +} + +impl ToString for MonitorDeviceID { + fn to_string(&self) -> String { + match self { + Self::LAPTOP_LARGE => String::from("laptop_large"), + Self::TABLET => String::from("tablet"), + Self::MOBILE_SMALL => String::from("mobile_small"), + Self::CHROME_LAPTOP_LARGE => String::from("chrome.laptop_large"), + Self::CHROME_TABLET => String::from("chrome.tablet"), + Self::CHROME_MOBILE_SMALL => String::from("chrome.mobile_small"), + Self::FIREFOX_LAPTOP_LARGE => String::from("firefox.laptop_large"), + Self::FIREFOX_TABLET => String::from("firefox.tablet"), + Self::FIREFOX_MOBILE_SMALL => String::from("firefox.mobile_small"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_aggregation.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_aggregation.rs new file mode 100644 index 000000000..2f4403d8a --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_aggregation.rs @@ -0,0 +1,52 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorFormulaAndFunctionEventAggregation { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "median")] + MEDIAN, + #[serde(rename = "pc75")] + PC75, + #[serde(rename = "pc90")] + PC90, + #[serde(rename = "pc95")] + PC95, + #[serde(rename = "pc98")] + PC98, + #[serde(rename = "pc99")] + PC99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, +} + +impl ToString for MonitorFormulaAndFunctionEventAggregation { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::MEDIAN => String::from("median"), + Self::PC75 => String::from("pc75"), + Self::PC90 => String::from("pc90"), + Self::PC95 => String::from("pc95"), + Self::PC98 => String::from("pc98"), + Self::PC99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs new file mode 100644 index 000000000..3595563c3 --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition.rs @@ -0,0 +1,47 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A formula and functions events query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorFormulaAndFunctionEventQueryDefinition { + /// Compute options. + #[serde(rename = "compute")] + pub compute: Box, + /// Data source for event platform-based queries. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV1::model::MonitorFormulaAndFunctionEventsDataSource, + /// Group by options. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. + #[serde(rename = "indexes")] + pub indexes: Option>, + /// Name of the query for use in formulas. + #[serde(rename = "name")] + pub name: String, + /// Search options. + #[serde(rename = "search")] + pub search: + Option>, +} + +impl MonitorFormulaAndFunctionEventQueryDefinition { + pub fn new( + compute: Box, + data_source: crate::datadogV1::model::MonitorFormulaAndFunctionEventsDataSource, + name: String, + ) -> MonitorFormulaAndFunctionEventQueryDefinition { + MonitorFormulaAndFunctionEventQueryDefinition { + compute, + data_source, + group_by: None, + indexes: None, + name, + search: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs new file mode 100644 index 000000000..dab275e37 --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_compute.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Compute options. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorFormulaAndFunctionEventQueryDefinitionCompute { + /// Aggregation methods for event platform queries. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV1::model::MonitorFormulaAndFunctionEventAggregation, + /// A time interval in milliseconds. + #[serde(rename = "interval")] + pub interval: Option, + /// Measurable attribute to compute. + #[serde(rename = "metric")] + pub metric: Option, +} + +impl MonitorFormulaAndFunctionEventQueryDefinitionCompute { + pub fn new( + aggregation: crate::datadogV1::model::MonitorFormulaAndFunctionEventAggregation, + ) -> MonitorFormulaAndFunctionEventQueryDefinitionCompute { + MonitorFormulaAndFunctionEventQueryDefinitionCompute { + aggregation, + interval: None, + metric: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_search.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_search.rs new file mode 100644 index 000000000..a3f163ff2 --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_definition_search.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Search options. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorFormulaAndFunctionEventQueryDefinitionSearch { + /// Events search string. + #[serde(rename = "query")] + pub query: String, +} + +impl MonitorFormulaAndFunctionEventQueryDefinitionSearch { + pub fn new(query: String) -> MonitorFormulaAndFunctionEventQueryDefinitionSearch { + MonitorFormulaAndFunctionEventQueryDefinitionSearch { query } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs new file mode 100644 index 000000000..d058ec6ae --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of objects used to group by. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorFormulaAndFunctionEventQueryGroupBy { + /// Event facet. + #[serde(rename = "facet")] + pub facet: String, + /// Number of groups to return. + #[serde(rename = "limit")] + pub limit: Option, + /// Options for sorting group by results. + #[serde(rename = "sort")] + pub sort: Option>, +} + +impl MonitorFormulaAndFunctionEventQueryGroupBy { + pub fn new(facet: String) -> MonitorFormulaAndFunctionEventQueryGroupBy { + MonitorFormulaAndFunctionEventQueryGroupBy { + facet, + limit: None, + sort: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs new file mode 100644 index 000000000..03530da05 --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_event_query_group_by_sort.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options for sorting group by results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorFormulaAndFunctionEventQueryGroupBySort { + /// Aggregation methods for event platform queries. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV1::model::MonitorFormulaAndFunctionEventAggregation, + /// Metric used for sorting group by results. + #[serde(rename = "metric")] + pub metric: Option, + /// Direction of sort. + #[serde(rename = "order")] + pub order: Option, +} + +impl MonitorFormulaAndFunctionEventQueryGroupBySort { + pub fn new( + aggregation: crate::datadogV1::model::MonitorFormulaAndFunctionEventAggregation, + ) -> MonitorFormulaAndFunctionEventQueryGroupBySort { + MonitorFormulaAndFunctionEventQueryGroupBySort { + aggregation, + metric: None, + order: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_events_data_source.rs b/src/datadogV1/model/model_monitor_formula_and_function_events_data_source.rs new file mode 100644 index 000000000..ea61d382c --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_events_data_source.rs @@ -0,0 +1,37 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorFormulaAndFunctionEventsDataSource { + #[serde(rename = "rum")] + RUM, + #[serde(rename = "ci_pipelines")] + CI_PIPELINES, + #[serde(rename = "ci_tests")] + CI_TESTS, + #[serde(rename = "audit")] + AUDIT, + #[serde(rename = "events")] + EVENTS, + #[serde(rename = "logs")] + LOGS, + #[serde(rename = "spans")] + SPANS, +} + +impl ToString for MonitorFormulaAndFunctionEventsDataSource { + fn to_string(&self) -> String { + match self { + Self::RUM => String::from("rum"), + Self::CI_PIPELINES => String::from("ci_pipelines"), + Self::CI_TESTS => String::from("ci_tests"), + Self::AUDIT => String::from("audit"), + Self::EVENTS => String::from("events"), + Self::LOGS => String::from("logs"), + Self::SPANS => String::from("spans"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs b/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs new file mode 100644 index 000000000..6a0f69dc7 --- /dev/null +++ b/src/datadogV1/model/model_monitor_formula_and_function_query_definition.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A formula and function query. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MonitorFormulaAndFunctionQueryDefinition { + MonitorFormulaAndFunctionEventQueryDefinition( + Box, + ), +} diff --git a/src/datadogV1/model/model_monitor_group_search_response.rs b/src/datadogV1/model/model_monitor_group_search_response.rs new file mode 100644 index 000000000..6edf9fd8b --- /dev/null +++ b/src/datadogV1/model/model_monitor_group_search_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response of a monitor group search. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorGroupSearchResponse { + /// The counts of monitor groups per different criteria. + #[serde(rename = "counts")] + pub counts: Option>, + /// The list of found monitor groups. + #[serde(rename = "groups")] + pub groups: Option>, + /// Metadata about the response. + #[serde(rename = "metadata")] + pub metadata: Option>, +} + +impl MonitorGroupSearchResponse { + pub fn new() -> MonitorGroupSearchResponse { + MonitorGroupSearchResponse { + counts: None, + groups: None, + metadata: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_group_search_response_counts.rs b/src/datadogV1/model/model_monitor_group_search_response_counts.rs new file mode 100644 index 000000000..1a5dfe987 --- /dev/null +++ b/src/datadogV1/model/model_monitor_group_search_response_counts.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The counts of monitor groups per different criteria. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorGroupSearchResponseCounts { + /// Search facets. + #[serde(rename = "status")] + pub status: Option>, + /// Search facets. + #[serde(rename = "type")] + pub type_: Option>, +} + +impl MonitorGroupSearchResponseCounts { + pub fn new() -> MonitorGroupSearchResponseCounts { + MonitorGroupSearchResponseCounts { + status: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_group_search_result.rs b/src/datadogV1/model/model_monitor_group_search_result.rs new file mode 100644 index 000000000..847a6996c --- /dev/null +++ b/src/datadogV1/model/model_monitor_group_search_result.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single monitor group search result. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorGroupSearchResult { + /// The name of the group. + #[serde(rename = "group")] + pub group: Option, + /// The list of tags of the monitor group. + #[serde(rename = "group_tags")] + pub group_tags: Option>, + /// Latest timestamp the monitor group was in NO_DATA state. + #[serde(rename = "last_nodata_ts")] + pub last_nodata_ts: Option, + /// Latest timestamp the monitor group triggered. + #[serde( + rename = "last_triggered_ts", + default, + with = "::serde_with::rust::double_option" + )] + pub last_triggered_ts: Option>, + /// The ID of the monitor. + #[serde(rename = "monitor_id")] + pub monitor_id: Option, + /// The name of the monitor. + #[serde(rename = "monitor_name")] + pub monitor_name: Option, + /// The different states your monitor can be in. + #[serde(rename = "status")] + pub status: Option, +} + +impl MonitorGroupSearchResult { + pub fn new() -> MonitorGroupSearchResult { + MonitorGroupSearchResult { + group: None, + group_tags: None, + last_nodata_ts: None, + last_triggered_ts: None, + monitor_id: None, + monitor_name: None, + status: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_options.rs b/src/datadogV1/model/model_monitor_options.rs new file mode 100644 index 000000000..8177b53e9 --- /dev/null +++ b/src/datadogV1/model/model_monitor_options.rs @@ -0,0 +1,230 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of options associated with your monitor. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorOptions { + /// Type of aggregation performed in the monitor query. + #[serde(rename = "aggregation")] + pub aggregation: Option>, + /// IDs of the device the Synthetics monitor is running on. + #[deprecated] + #[serde(rename = "device_ids")] + pub device_ids: Option>, + /// Whether or not to send a log sample when the log monitor triggers. + #[serde(rename = "enable_logs_sample")] + pub enable_logs_sample: Option, + /// Whether or not to send a list of samples when the monitor triggers. This is only used by CI Test and Pipeline monitors. + #[serde(rename = "enable_samples")] + pub enable_samples: Option, + /// We recommend using the [is_renotify](https://docs.datadoghq.com/monitors/notify/?tab=is_alert#renotify), + /// block in the original message instead. + /// A message to include with a re-notification. Supports the `@username` notification we allow elsewhere. + /// Not applicable if `renotify_interval` is `None`. + #[serde(rename = "escalation_message")] + pub escalation_message: Option, + /// Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to `300` (5min), + /// the timeframe is set to `last_5m` and the time is 7:00, the monitor evaluates data from 6:50 to 6:55. + /// This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor always has data during evaluation. + #[serde( + rename = "evaluation_delay", + default, + with = "::serde_with::rust::double_option" + )] + pub evaluation_delay: Option>, + /// The time span after which groups with missing data are dropped from the monitor state. + /// The minimum value is one hour, and the maximum value is 72 hours. + /// Example values are: "60m", "1h", and "2d". + /// This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. + #[serde(rename = "group_retention_duration")] + pub group_retention_duration: Option, + /// Whether the log alert monitor triggers a single alert or multiple alerts when any group breaches a threshold. + #[serde(rename = "groupby_simple_monitor")] + pub groupby_simple_monitor: Option, + /// A Boolean indicating whether notifications from this monitor automatically inserts its triggering tags into the title. + /// + /// **Examples** + /// - If `True`, `[Triggered on {host:h1}] Monitor Title` + /// - If `False`, `[Triggered] Monitor Title` + #[serde(rename = "include_tags")] + pub include_tags: Option, + /// Whether or not the monitor is locked (only editable by creator and admins). Use `restricted_roles` instead. + #[deprecated] + #[serde(rename = "locked")] + pub locked: Option, + /// How long the test should be in failure before alerting (integer, number of seconds, max 7200). + #[serde( + rename = "min_failure_duration", + default, + with = "::serde_with::rust::double_option" + )] + pub min_failure_duration: Option>, + /// The minimum number of locations in failure at the same time during + /// at least one moment in the `min_failure_duration` period (`min_location_failed` and `min_failure_duration` + /// are part of the advanced alerting rules - integer, >= 1). + #[serde( + rename = "min_location_failed", + default, + with = "::serde_with::rust::double_option" + )] + pub min_location_failed: Option>, + /// Time (in seconds) to skip evaluations for new groups. + /// + /// For example, this option can be used to skip evaluations for new hosts while they initialize. + /// + /// Must be a non negative integer. + #[serde( + rename = "new_group_delay", + default, + with = "::serde_with::rust::double_option" + )] + pub new_group_delay: Option>, + /// Time (in seconds) to allow a host to boot and applications + /// to fully start before starting the evaluation of monitor results. + /// Should be a non negative integer. + /// + /// Use new_group_delay instead. + #[deprecated] + #[serde( + rename = "new_host_delay", + default, + with = "::serde_with::rust::double_option" + )] + pub new_host_delay: Option>, + /// The number of minutes before a monitor notifies after data stops reporting. + /// Datadog recommends at least 2x the monitor timeframe for query alerts or 2 minutes for service checks. + /// If omitted, 2x the evaluation timeframe is used for query alerts, and 24 hours is used for service checks. + #[serde( + rename = "no_data_timeframe", + default, + with = "::serde_with::rust::double_option" + )] + pub no_data_timeframe: Option>, + /// Toggles the display of additional content sent in the monitor notification. + #[serde(rename = "notification_preset_name")] + pub notification_preset_name: + Option, + /// A Boolean indicating whether tagged users is notified on changes to this monitor. + #[serde(rename = "notify_audit")] + pub notify_audit: Option, + /// Controls what granularity a monitor alerts on. Only available for monitors with groupings. + /// For instance, a monitor grouped by `cluster`, `namespace`, and `pod` can be configured to only notify on each + /// new `cluster` violating the alert conditions by setting `notify_by` to `["cluster"]`. Tags mentioned + /// in `notify_by` must be a subset of the grouping tags in the query. + /// For example, a query grouped by `cluster` and `namespace` cannot notify on `region`. + /// Setting `notify_by` to `[*]` configures the monitor to notify as a simple-alert. + #[serde(rename = "notify_by")] + pub notify_by: Option>, + /// A Boolean indicating whether this monitor notifies when data stops reporting. Defaults to `false`. + #[serde(rename = "notify_no_data")] + pub notify_no_data: Option, + /// Controls how groups or monitors are treated if an evaluation does not return any data points. + /// The default option results in different behavior depending on the monitor query type. + /// For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. + /// For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. + /// This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. + #[serde(rename = "on_missing_data")] + pub on_missing_data: Option, + /// The number of minutes after the last notification before a monitor re-notifies on the current status. + /// It only re-notifies if it’s not resolved. + #[serde( + rename = "renotify_interval", + default, + with = "::serde_with::rust::double_option" + )] + pub renotify_interval: Option>, + /// The number of times re-notification messages should be sent on the current status at the provided re-notification interval. + #[serde( + rename = "renotify_occurrences", + default, + with = "::serde_with::rust::double_option" + )] + pub renotify_occurrences: Option>, + /// The types of monitor statuses for which re-notification messages are sent. + #[serde( + rename = "renotify_statuses", + default, + with = "::serde_with::rust::double_option" + )] + pub renotify_statuses: + Option>>>, + /// A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. + /// We highly recommend you set this to `false` for sparse metrics, + /// otherwise some evaluations are skipped. Default is false. + #[serde(rename = "require_full_window")] + pub require_full_window: Option, + /// Configuration options for scheduling. + #[serde(rename = "scheduling_options")] + pub scheduling_options: Option>, + /// Information about the downtime applied to the monitor. Only shows v1 downtimes. + #[deprecated] + #[serde(rename = "silenced")] + pub silenced: Option>, + /// ID of the corresponding Synthetic check. + #[deprecated] + #[serde( + rename = "synthetics_check_id", + default, + with = "::serde_with::rust::double_option" + )] + pub synthetics_check_id: Option>, + /// Alerting time window options. + #[serde(rename = "threshold_windows")] + pub threshold_windows: Option>, + /// List of the different monitor threshold available. + #[serde(rename = "thresholds")] + pub thresholds: Option>, + /// The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours. + #[serde( + rename = "timeout_h", + default, + with = "::serde_with::rust::double_option" + )] + pub timeout_h: Option>, + /// List of requests that can be used in the monitor query. **This feature is currently in beta.** + #[serde(rename = "variables")] + pub variables: Option>, +} + +impl MonitorOptions { + pub fn new() -> MonitorOptions { + #[allow(deprecated)] + MonitorOptions { + aggregation: None, + device_ids: None, + enable_logs_sample: None, + enable_samples: None, + escalation_message: None, + evaluation_delay: None, + group_retention_duration: None, + groupby_simple_monitor: None, + include_tags: None, + locked: None, + min_failure_duration: None, + min_location_failed: None, + new_group_delay: None, + new_host_delay: None, + no_data_timeframe: None, + notification_preset_name: None, + notify_audit: None, + notify_by: None, + notify_no_data: None, + on_missing_data: None, + renotify_interval: None, + renotify_occurrences: None, + renotify_statuses: None, + require_full_window: None, + scheduling_options: None, + silenced: None, + synthetics_check_id: None, + threshold_windows: None, + thresholds: None, + timeout_h: None, + variables: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_options_aggregation.rs b/src/datadogV1/model/model_monitor_options_aggregation.rs new file mode 100644 index 000000000..14473bac5 --- /dev/null +++ b/src/datadogV1/model/model_monitor_options_aggregation.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Type of aggregation performed in the monitor query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorOptionsAggregation { + /// Group to break down the monitor on. + #[serde(rename = "group_by")] + pub group_by: Option, + /// Metric name used in the monitor. + #[serde(rename = "metric")] + pub metric: Option, + /// Metric type used in the monitor. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MonitorOptionsAggregation { + pub fn new() -> MonitorOptionsAggregation { + MonitorOptionsAggregation { + group_by: None, + metric: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_options_custom_schedule.rs b/src/datadogV1/model/model_monitor_options_custom_schedule.rs new file mode 100644 index 000000000..2ecb50118 --- /dev/null +++ b/src/datadogV1/model/model_monitor_options_custom_schedule.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration options for the custom schedule. **This feature is in private beta.** +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorOptionsCustomSchedule { + /// Array of custom schedule recurrences. + #[serde(rename = "recurrences")] + pub recurrences: Option>, +} + +impl MonitorOptionsCustomSchedule { + pub fn new() -> MonitorOptionsCustomSchedule { + MonitorOptionsCustomSchedule { recurrences: None } + } +} diff --git a/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs b/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs new file mode 100644 index 000000000..b7d253a7e --- /dev/null +++ b/src/datadogV1/model/model_monitor_options_custom_schedule_recurrence.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration for a recurrence set on the monitor options for custom schedule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorOptionsCustomScheduleRecurrence { + /// Defines the recurrence rule (RRULE) for a given schedule. + #[serde(rename = "rrule")] + pub rrule: Option, + /// Defines the start date and time of the recurring schedule. + #[serde(rename = "start")] + pub start: Option, + /// Defines the timezone the schedule runs on. + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl MonitorOptionsCustomScheduleRecurrence { + pub fn new() -> MonitorOptionsCustomScheduleRecurrence { + MonitorOptionsCustomScheduleRecurrence { + rrule: None, + start: None, + timezone: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_options_notification_presets.rs b/src/datadogV1/model/model_monitor_options_notification_presets.rs new file mode 100644 index 000000000..4a72d1fd1 --- /dev/null +++ b/src/datadogV1/model/model_monitor_options_notification_presets.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorOptionsNotificationPresets { + #[serde(rename = "show_all")] + SHOW_ALL, + #[serde(rename = "hide_query")] + HIDE_QUERY, + #[serde(rename = "hide_handles")] + HIDE_HANDLES, + #[serde(rename = "hide_all")] + HIDE_ALL, +} + +impl ToString for MonitorOptionsNotificationPresets { + fn to_string(&self) -> String { + match self { + Self::SHOW_ALL => String::from("show_all"), + Self::HIDE_QUERY => String::from("hide_query"), + Self::HIDE_HANDLES => String::from("hide_handles"), + Self::HIDE_ALL => String::from("hide_all"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_options_scheduling_options.rs b/src/datadogV1/model/model_monitor_options_scheduling_options.rs new file mode 100644 index 000000000..34b4c450c --- /dev/null +++ b/src/datadogV1/model/model_monitor_options_scheduling_options.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration options for scheduling. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorOptionsSchedulingOptions { + /// Configuration options for the custom schedule. **This feature is in private beta.** + #[serde(rename = "custom_schedule")] + pub custom_schedule: Option>, + /// Configuration options for the evaluation window. If `hour_starts` is set, no other fields may be set. Otherwise, `day_starts` and `month_starts` must be set together. + #[serde(rename = "evaluation_window")] + pub evaluation_window: + Option>, +} + +impl MonitorOptionsSchedulingOptions { + pub fn new() -> MonitorOptionsSchedulingOptions { + MonitorOptionsSchedulingOptions { + custom_schedule: None, + evaluation_window: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs b/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs new file mode 100644 index 000000000..52933e481 --- /dev/null +++ b/src/datadogV1/model/model_monitor_options_scheduling_options_evaluation_window.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration options for the evaluation window. If `hour_starts` is set, no other fields may be set. Otherwise, `day_starts` and `month_starts` must be set together. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorOptionsSchedulingOptionsEvaluationWindow { + /// The time of the day at which a one day cumulative evaluation window starts. Must be defined in UTC time in `HH:mm` format. + #[serde(rename = "day_starts")] + pub day_starts: Option, + /// The minute of the hour at which a one hour cumulative evaluation window starts. + #[serde(rename = "hour_starts")] + pub hour_starts: Option, + /// The day of the month at which a one month cumulative evaluation window starts. + #[serde(rename = "month_starts")] + pub month_starts: Option, +} + +impl MonitorOptionsSchedulingOptionsEvaluationWindow { + pub fn new() -> MonitorOptionsSchedulingOptionsEvaluationWindow { + MonitorOptionsSchedulingOptionsEvaluationWindow { + day_starts: None, + hour_starts: None, + month_starts: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_overall_states.rs b/src/datadogV1/model/model_monitor_overall_states.rs new file mode 100644 index 000000000..1c3d95294 --- /dev/null +++ b/src/datadogV1/model/model_monitor_overall_states.rs @@ -0,0 +1,37 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorOverallStates { + #[serde(rename = "Alert")] + ALERT, + #[serde(rename = "Ignored")] + IGNORED, + #[serde(rename = "No Data")] + NO_DATA, + #[serde(rename = "OK")] + OK, + #[serde(rename = "Skipped")] + SKIPPED, + #[serde(rename = "Unknown")] + UNKNOWN, + #[serde(rename = "Warn")] + WARN, +} + +impl ToString for MonitorOverallStates { + fn to_string(&self) -> String { + match self { + Self::ALERT => String::from("Alert"), + Self::IGNORED => String::from("Ignored"), + Self::NO_DATA => String::from("No Data"), + Self::OK => String::from("OK"), + Self::SKIPPED => String::from("Skipped"), + Self::UNKNOWN => String::from("Unknown"), + Self::WARN => String::from("Warn"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_renotify_status_type.rs b/src/datadogV1/model/model_monitor_renotify_status_type.rs new file mode 100644 index 000000000..b9ec3e133 --- /dev/null +++ b/src/datadogV1/model/model_monitor_renotify_status_type.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorRenotifyStatusType { + #[serde(rename = "alert")] + ALERT, + #[serde(rename = "warn")] + WARN, + #[serde(rename = "no data")] + NO_DATA, +} + +impl ToString for MonitorRenotifyStatusType { + fn to_string(&self) -> String { + match self { + Self::ALERT => String::from("alert"), + Self::WARN => String::from("warn"), + Self::NO_DATA => String::from("no data"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_search_count_item.rs b/src/datadogV1/model/model_monitor_search_count_item.rs new file mode 100644 index 000000000..092505943 --- /dev/null +++ b/src/datadogV1/model/model_monitor_search_count_item.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A facet item. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorSearchCountItem { + /// The number of found monitors with the listed value. + #[serde(rename = "count")] + pub count: Option, + /// The facet value. + #[serde(rename = "name")] + pub name: Option>, +} + +impl MonitorSearchCountItem { + pub fn new() -> MonitorSearchCountItem { + MonitorSearchCountItem { + count: None, + name: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_search_response.rs b/src/datadogV1/model/model_monitor_search_response.rs new file mode 100644 index 000000000..750247a76 --- /dev/null +++ b/src/datadogV1/model/model_monitor_search_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response form a monitor search. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorSearchResponse { + /// The counts of monitors per different criteria. + #[serde(rename = "counts")] + pub counts: Option>, + /// Metadata about the response. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// The list of found monitors. + #[serde(rename = "monitors")] + pub monitors: Option>, +} + +impl MonitorSearchResponse { + pub fn new() -> MonitorSearchResponse { + MonitorSearchResponse { + counts: None, + metadata: None, + monitors: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_search_response_counts.rs b/src/datadogV1/model/model_monitor_search_response_counts.rs new file mode 100644 index 000000000..ee019869e --- /dev/null +++ b/src/datadogV1/model/model_monitor_search_response_counts.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The counts of monitors per different criteria. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorSearchResponseCounts { + /// Search facets. + #[serde(rename = "muted")] + pub muted: Option>, + /// Search facets. + #[serde(rename = "status")] + pub status: Option>, + /// Search facets. + #[serde(rename = "tag")] + pub tag: Option>, + /// Search facets. + #[serde(rename = "type")] + pub type_: Option>, +} + +impl MonitorSearchResponseCounts { + pub fn new() -> MonitorSearchResponseCounts { + MonitorSearchResponseCounts { + muted: None, + status: None, + tag: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_search_response_metadata.rs b/src/datadogV1/model/model_monitor_search_response_metadata.rs new file mode 100644 index 000000000..ff012ab3c --- /dev/null +++ b/src/datadogV1/model/model_monitor_search_response_metadata.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Metadata about the response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorSearchResponseMetadata { + /// The page to start paginating from. + #[serde(rename = "page")] + pub page: Option, + /// The number of pages. + #[serde(rename = "page_count")] + pub page_count: Option, + /// The number of monitors to return per page. + #[serde(rename = "per_page")] + pub per_page: Option, + /// The total number of monitors. + #[serde(rename = "total_count")] + pub total_count: Option, +} + +impl MonitorSearchResponseMetadata { + pub fn new() -> MonitorSearchResponseMetadata { + MonitorSearchResponseMetadata { + page: None, + page_count: None, + per_page: None, + total_count: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_search_result.rs b/src/datadogV1/model/model_monitor_search_result.rs new file mode 100644 index 000000000..82c070be3 --- /dev/null +++ b/src/datadogV1/model/model_monitor_search_result.rs @@ -0,0 +1,77 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Holds search results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorSearchResult { + /// Classification of the monitor. + #[serde(rename = "classification")] + pub classification: Option, + /// Object describing the creator of the shared element. + #[serde(rename = "creator")] + pub creator: Option>, + /// ID of the monitor. + #[serde(rename = "id")] + pub id: Option, + /// Latest timestamp the monitor triggered. + #[serde( + rename = "last_triggered_ts", + default, + with = "::serde_with::rust::double_option" + )] + pub last_triggered_ts: Option>, + /// Metrics used by the monitor. + #[serde(rename = "metrics")] + pub metrics: Option>, + /// The monitor name. + #[serde(rename = "name")] + pub name: Option, + /// The notification triggered by the monitor. + #[serde(rename = "notifications")] + pub notifications: Option>, + /// The ID of the organization. + #[serde(rename = "org_id")] + pub org_id: Option, + /// The monitor query. + #[serde(rename = "query")] + pub query: Option, + /// The scope(s) to which the downtime applies, for example `host:app2`. + /// Provide multiple scopes as a comma-separated list, for example `env:dev,env:prod`. + /// The resulting downtime applies to sources that matches ALL provided scopes + /// (that is `env:dev AND env:prod`), NOT any of them. + #[serde(rename = "scopes")] + pub scopes: Option>, + /// The different states your monitor can be in. + #[serde(rename = "status")] + pub status: Option, + /// Tags associated with the monitor. + #[serde(rename = "tags")] + pub tags: Option>, + /// The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MonitorSearchResult { + pub fn new() -> MonitorSearchResult { + MonitorSearchResult { + classification: None, + creator: None, + id: None, + last_triggered_ts: None, + metrics: None, + name: None, + notifications: None, + org_id: None, + query: None, + scopes: None, + status: None, + tags: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_search_result_notification.rs b/src/datadogV1/model/model_monitor_search_result_notification.rs new file mode 100644 index 000000000..23c3d6c3d --- /dev/null +++ b/src/datadogV1/model/model_monitor_search_result_notification.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A notification triggered by the monitor. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorSearchResultNotification { + /// The email address that received the notification. + #[serde(rename = "handle")] + pub handle: Option, + /// The username receiving the notification + #[serde(rename = "name")] + pub name: Option, +} + +impl MonitorSearchResultNotification { + pub fn new() -> MonitorSearchResultNotification { + MonitorSearchResultNotification { + handle: None, + name: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_state.rs b/src/datadogV1/model/model_monitor_state.rs new file mode 100644 index 000000000..265505595 --- /dev/null +++ b/src/datadogV1/model/model_monitor_state.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Wrapper object with the different monitor states. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorState { + /// Dictionary where the keys are groups (comma separated lists of tags) and the values are + /// the list of groups your monitor is broken down on. + #[serde(rename = "groups")] + pub groups: + Option>, +} + +impl MonitorState { + pub fn new() -> MonitorState { + MonitorState { groups: None } + } +} diff --git a/src/datadogV1/model/model_monitor_state_group.rs b/src/datadogV1/model/model_monitor_state_group.rs new file mode 100644 index 000000000..b3b9c1934 --- /dev/null +++ b/src/datadogV1/model/model_monitor_state_group.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Monitor state for a single group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorStateGroup { + /// Latest timestamp the monitor was in NO_DATA state. + #[serde(rename = "last_nodata_ts")] + pub last_nodata_ts: Option, + /// Latest timestamp of the notification sent for this monitor group. + #[serde(rename = "last_notified_ts")] + pub last_notified_ts: Option, + /// Latest timestamp the monitor group was resolved. + #[serde(rename = "last_resolved_ts")] + pub last_resolved_ts: Option, + /// Latest timestamp the monitor group triggered. + #[serde(rename = "last_triggered_ts")] + pub last_triggered_ts: Option, + /// The name of the monitor. + #[serde(rename = "name")] + pub name: Option, + /// The different states your monitor can be in. + #[serde(rename = "status")] + pub status: Option, +} + +impl MonitorStateGroup { + pub fn new() -> MonitorStateGroup { + MonitorStateGroup { + last_nodata_ts: None, + last_notified_ts: None, + last_resolved_ts: None, + last_triggered_ts: None, + name: None, + status: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_summary_widget_definition.rs b/src/datadogV1/model/model_monitor_summary_widget_definition.rs new file mode 100644 index 000000000..d21267e86 --- /dev/null +++ b/src/datadogV1/model/model_monitor_summary_widget_definition.rs @@ -0,0 +1,80 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The monitor summary widget displays a summary view of all your Datadog monitors, or a subset based on a query. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorSummaryWidgetDefinition { + /// Which color to use on the widget. + #[serde(rename = "color_preference")] + pub color_preference: Option, + /// The number of monitors to display. + #[deprecated] + #[serde(rename = "count")] + pub count: Option, + /// What to display on the widget. + #[serde(rename = "display_format")] + pub display_format: Option, + /// Whether to show counts of 0 or not. + #[serde(rename = "hide_zero_counts")] + pub hide_zero_counts: Option, + /// Query to filter the monitors with. + #[serde(rename = "query")] + pub query: String, + /// Whether to show the time that has elapsed since the monitor/group triggered. + #[serde(rename = "show_last_triggered")] + pub show_last_triggered: Option, + /// Whether to show the priorities column. + #[serde(rename = "show_priority")] + pub show_priority: Option, + /// Widget sorting methods. + #[serde(rename = "sort")] + pub sort: Option, + /// The start of the list. Typically 0. + #[deprecated] + #[serde(rename = "start")] + pub start: Option, + /// Which summary type should be used. + #[serde(rename = "summary_type")] + pub summary_type: Option, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the monitor summary widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::MonitorSummaryWidgetDefinitionType, +} + +impl MonitorSummaryWidgetDefinition { + pub fn new( + query: String, + type_: crate::datadogV1::model::MonitorSummaryWidgetDefinitionType, + ) -> MonitorSummaryWidgetDefinition { + #[allow(deprecated)] + MonitorSummaryWidgetDefinition { + color_preference: None, + count: None, + display_format: None, + hide_zero_counts: None, + query, + show_last_triggered: None, + show_priority: None, + sort: None, + start: None, + summary_type: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_monitor_summary_widget_definition_type.rs b/src/datadogV1/model/model_monitor_summary_widget_definition_type.rs new file mode 100644 index 000000000..ed62db676 --- /dev/null +++ b/src/datadogV1/model/model_monitor_summary_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorSummaryWidgetDefinitionType { + #[serde(rename = "manage_status")] + MANAGE_STATUS, +} + +impl ToString for MonitorSummaryWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::MANAGE_STATUS => String::from("manage_status"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_threshold_window_options.rs b/src/datadogV1/model/model_monitor_threshold_window_options.rs new file mode 100644 index 000000000..f83ec3dc6 --- /dev/null +++ b/src/datadogV1/model/model_monitor_threshold_window_options.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Alerting time window options. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorThresholdWindowOptions { + /// Describes how long an anomalous metric must be normal before the alert recovers. + #[serde( + rename = "recovery_window", + default, + with = "::serde_with::rust::double_option" + )] + pub recovery_window: Option>, + /// Describes how long a metric must be anomalous before an alert triggers. + #[serde( + rename = "trigger_window", + default, + with = "::serde_with::rust::double_option" + )] + pub trigger_window: Option>, +} + +impl MonitorThresholdWindowOptions { + pub fn new() -> MonitorThresholdWindowOptions { + MonitorThresholdWindowOptions { + recovery_window: None, + trigger_window: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_thresholds.rs b/src/datadogV1/model/model_monitor_thresholds.rs new file mode 100644 index 000000000..d26a649bd --- /dev/null +++ b/src/datadogV1/model/model_monitor_thresholds.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of the different monitor threshold available. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorThresholds { + /// The monitor `CRITICAL` threshold. + #[serde(rename = "critical")] + pub critical: Option, + /// The monitor `CRITICAL` recovery threshold. + #[serde( + rename = "critical_recovery", + default, + with = "::serde_with::rust::double_option" + )] + pub critical_recovery: Option>, + /// The monitor `OK` threshold. + #[serde(rename = "ok", default, with = "::serde_with::rust::double_option")] + pub ok: Option>, + /// The monitor UNKNOWN threshold. + #[serde( + rename = "unknown", + default, + with = "::serde_with::rust::double_option" + )] + pub unknown: Option>, + /// The monitor `WARNING` threshold. + #[serde( + rename = "warning", + default, + with = "::serde_with::rust::double_option" + )] + pub warning: Option>, + /// The monitor `WARNING` recovery threshold. + #[serde( + rename = "warning_recovery", + default, + with = "::serde_with::rust::double_option" + )] + pub warning_recovery: Option>, +} + +impl MonitorThresholds { + pub fn new() -> MonitorThresholds { + MonitorThresholds { + critical: None, + critical_recovery: None, + ok: None, + unknown: None, + warning: None, + warning_recovery: None, + } + } +} diff --git a/src/datadogV1/model/model_monitor_type.rs b/src/datadogV1/model/model_monitor_type.rs new file mode 100644 index 000000000..3deb39f21 --- /dev/null +++ b/src/datadogV1/model/model_monitor_type.rs @@ -0,0 +1,67 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorType { + #[serde(rename = "composite")] + COMPOSITE, + #[serde(rename = "event alert")] + EVENT_ALERT, + #[serde(rename = "log alert")] + LOG_ALERT, + #[serde(rename = "metric alert")] + METRIC_ALERT, + #[serde(rename = "process alert")] + PROCESS_ALERT, + #[serde(rename = "query alert")] + QUERY_ALERT, + #[serde(rename = "rum alert")] + RUM_ALERT, + #[serde(rename = "service check")] + SERVICE_CHECK, + #[serde(rename = "synthetics alert")] + SYNTHETICS_ALERT, + #[serde(rename = "trace-analytics alert")] + TRACE_ANALYTICS_ALERT, + #[serde(rename = "slo alert")] + SLO_ALERT, + #[serde(rename = "event-v2 alert")] + EVENT_V2_ALERT, + #[serde(rename = "audit alert")] + AUDIT_ALERT, + #[serde(rename = "ci-pipelines alert")] + CI_PIPELINES_ALERT, + #[serde(rename = "ci-tests alert")] + CI_TESTS_ALERT, + #[serde(rename = "error-tracking alert")] + ERROR_TRACKING_ALERT, + #[serde(rename = "database-monitoring alert")] + DATABASE_MONITORING_ALERT, +} + +impl ToString for MonitorType { + fn to_string(&self) -> String { + match self { + Self::COMPOSITE => String::from("composite"), + Self::EVENT_ALERT => String::from("event alert"), + Self::LOG_ALERT => String::from("log alert"), + Self::METRIC_ALERT => String::from("metric alert"), + Self::PROCESS_ALERT => String::from("process alert"), + Self::QUERY_ALERT => String::from("query alert"), + Self::RUM_ALERT => String::from("rum alert"), + Self::SERVICE_CHECK => String::from("service check"), + Self::SYNTHETICS_ALERT => String::from("synthetics alert"), + Self::TRACE_ANALYTICS_ALERT => String::from("trace-analytics alert"), + Self::SLO_ALERT => String::from("slo alert"), + Self::EVENT_V2_ALERT => String::from("event-v2 alert"), + Self::AUDIT_ALERT => String::from("audit alert"), + Self::CI_PIPELINES_ALERT => String::from("ci-pipelines alert"), + Self::CI_TESTS_ALERT => String::from("ci-tests alert"), + Self::ERROR_TRACKING_ALERT => String::from("error-tracking alert"), + Self::DATABASE_MONITORING_ALERT => String::from("database-monitoring alert"), + } + } +} diff --git a/src/datadogV1/model/model_monitor_update_request.rs b/src/datadogV1/model/model_monitor_update_request.rs new file mode 100644 index 000000000..e59fd2274 --- /dev/null +++ b/src/datadogV1/model/model_monitor_update_request.rs @@ -0,0 +1,90 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing a monitor update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorUpdateRequest { + /// Timestamp of the monitor creation. + #[serde(rename = "created")] + pub created: Option, + /// Object describing the creator of the shared element. + #[serde(rename = "creator")] + pub creator: Option>, + /// Whether or not the monitor is deleted. (Always `null`) + #[serde( + rename = "deleted", + default, + with = "::serde_with::rust::double_option" + )] + pub deleted: Option>, + /// ID of this monitor. + #[serde(rename = "id")] + pub id: Option, + /// A message to include with notifications for this monitor. + #[serde(rename = "message")] + pub message: Option, + /// Last timestamp when the monitor was edited. + #[serde(rename = "modified")] + pub modified: Option, + /// Whether or not the monitor is broken down on different groups. + #[serde(rename = "multi")] + pub multi: Option, + /// The monitor name. + #[serde(rename = "name")] + pub name: Option, + /// List of options associated with your monitor. + #[serde(rename = "options")] + pub options: Option>, + /// The different states your monitor can be in. + #[serde(rename = "overall_state")] + pub overall_state: Option, + /// Integer from 1 (high) to 5 (low) indicating alert severity. + #[serde(rename = "priority")] + pub priority: Option, + /// The monitor query. + #[serde(rename = "query")] + pub query: Option, + /// A list of unique role identifiers to define which roles are allowed to edit the monitor. The unique identifiers for all roles can be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) and are located in the `data.id` field. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. `restricted_roles` is the successor of `locked`. For more information about `locked` and `restricted_roles`, see the [monitor options docs](https://docs.datadoghq.com/monitors/guide/monitor_api_options/#permissions-options). + #[serde( + rename = "restricted_roles", + default, + with = "::serde_with::rust::double_option" + )] + pub restricted_roles: Option>>, + /// Wrapper object with the different monitor states. + #[serde(rename = "state")] + pub state: Option>, + /// Tags associated to your monitor. + #[serde(rename = "tags")] + pub tags: Option>, + /// The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MonitorUpdateRequest { + pub fn new() -> MonitorUpdateRequest { + MonitorUpdateRequest { + created: None, + creator: None, + deleted: None, + id: None, + message: None, + modified: None, + multi: None, + name: None, + options: None, + overall_state: None, + priority: None, + query: None, + restricted_roles: None, + state: None, + tags: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_monthly_usage_attribution_body.rs b/src/datadogV1/model/model_monthly_usage_attribution_body.rs index db4e946c3..70cccdb5d 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_body.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_body.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Usage Summary by tag for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MonthlyUsageAttributionBody { /// Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]. #[serde(rename = "month")] diff --git a/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs b/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs index 40626bb06..0bc3abdf6 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing document metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MonthlyUsageAttributionMetadata { /// An array of available aggregates. #[serde(rename = "aggregates")] diff --git a/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs b/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs index eec316da0..136b70d34 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_pagination.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata for the current pagination. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MonthlyUsageAttributionPagination { /// The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of the `next_record_id`. #[serde( diff --git a/src/datadogV1/model/model_monthly_usage_attribution_response.rs b/src/datadogV1/model/model_monthly_usage_attribution_response.rs index ca35487d0..7d7b494c4 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_response.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the monthly Usage Summary by tag(s). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MonthlyUsageAttributionResponse { /// The object containing document metadata. #[serde(rename = "metadata")] diff --git a/src/datadogV1/model/model_monthly_usage_attribution_supported_metrics.rs b/src/datadogV1/model/model_monthly_usage_attribution_supported_metrics.rs index 4afa1f0d3..72c5dfc4f 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_supported_metrics.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_supported_metrics.rs @@ -419,9 +419,3 @@ impl ToString for MonthlyUsageAttributionSupportedMetrics { } } } - -impl Default for MonthlyUsageAttributionSupportedMetrics { - fn default() -> MonthlyUsageAttributionSupportedMetrics { - Self::API_USAGE - } -} diff --git a/src/datadogV1/model/model_monthly_usage_attribution_values.rs b/src/datadogV1/model/model_monthly_usage_attribution_values.rs index f9d06b002..eadc542ef 100644 --- a/src/datadogV1/model/model_monthly_usage_attribution_values.rs +++ b/src/datadogV1/model/model_monthly_usage_attribution_values.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Fields in Usage Summary by tag(s). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MonthlyUsageAttributionValues { /// The percentage of synthetic API test usage by tag(s). #[serde(rename = "api_percentage")] diff --git a/src/datadogV1/model/model_note_widget_definition.rs b/src/datadogV1/model/model_note_widget_definition.rs new file mode 100644 index 000000000..a70338a95 --- /dev/null +++ b/src/datadogV1/model/model_note_widget_definition.rs @@ -0,0 +1,61 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The notes and links widget is similar to free text widget, but allows for more formatting options. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NoteWidgetDefinition { + /// Background color of the note. + #[serde(rename = "background_color")] + pub background_color: Option, + /// Content of the note. + #[serde(rename = "content")] + pub content: String, + /// Size of the text. + #[serde(rename = "font_size")] + pub font_size: Option, + /// Whether to add padding or not. + #[serde(rename = "has_padding")] + pub has_padding: Option, + /// Whether to show a tick or not. + #[serde(rename = "show_tick")] + pub show_tick: Option, + /// How to align the text on the widget. + #[serde(rename = "text_align")] + pub text_align: Option, + /// Define how you want to align the text on the widget. + #[serde(rename = "tick_edge")] + pub tick_edge: Option, + /// Where to position the tick on an edge. + #[serde(rename = "tick_pos")] + pub tick_pos: Option, + /// Type of the note widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NoteWidgetDefinitionType, + /// Vertical alignment. + #[serde(rename = "vertical_align")] + pub vertical_align: Option, +} + +impl NoteWidgetDefinition { + pub fn new( + content: String, + type_: crate::datadogV1::model::NoteWidgetDefinitionType, + ) -> NoteWidgetDefinition { + NoteWidgetDefinition { + background_color: None, + content, + font_size: None, + has_padding: None, + show_tick: None, + text_align: None, + tick_edge: None, + tick_pos: None, + type_, + vertical_align: None, + } + } +} diff --git a/src/datadogV1/model/model_note_widget_definition_type.rs b/src/datadogV1/model/model_note_widget_definition_type.rs new file mode 100644 index 000000000..f838a121a --- /dev/null +++ b/src/datadogV1/model/model_note_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NoteWidgetDefinitionType { + #[serde(rename = "note")] + NOTE, +} + +impl ToString for NoteWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::NOTE => String::from("note"), + } + } +} diff --git a/src/datadogV1/model/model_notebook_absolute_time.rs b/src/datadogV1/model/model_notebook_absolute_time.rs new file mode 100644 index 000000000..ca4dac2e5 --- /dev/null +++ b/src/datadogV1/model/model_notebook_absolute_time.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Absolute timeframe. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookAbsoluteTime { + /// The end time. + #[serde(rename = "end")] + pub end: String, + /// Indicates whether the timeframe should be shifted to end at the current time. + #[serde(rename = "live")] + pub live: Option, + /// The start time. + #[serde(rename = "start")] + pub start: String, +} + +impl NotebookAbsoluteTime { + pub fn new(end: String, start: String) -> NotebookAbsoluteTime { + NotebookAbsoluteTime { + end, + live: None, + start, + } + } +} diff --git a/src/datadogV1/model/model_notebook_author.rs b/src/datadogV1/model/model_notebook_author.rs new file mode 100644 index 000000000..7ee61e9c8 --- /dev/null +++ b/src/datadogV1/model/model_notebook_author.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of user object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookAuthor { + /// Creation time of the user. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Whether the user is disabled. + #[serde(rename = "disabled")] + pub disabled: Option, + /// Email of the user. + #[serde(rename = "email")] + pub email: Option, + /// Handle of the user. + #[serde(rename = "handle")] + pub handle: Option, + /// URL of the user's icon. + #[serde(rename = "icon")] + pub icon: Option, + /// Name of the user. + #[serde(rename = "name", default, with = "::serde_with::rust::double_option")] + pub name: Option>, + /// Status of the user. + #[serde(rename = "status")] + pub status: Option, + /// Title of the user. + #[serde(rename = "title", default, with = "::serde_with::rust::double_option")] + pub title: Option>, + /// Whether the user is verified. + #[serde(rename = "verified")] + pub verified: Option, +} + +impl NotebookAuthor { + pub fn new() -> NotebookAuthor { + NotebookAuthor { + created_at: None, + disabled: None, + email: None, + handle: None, + icon: None, + name: None, + status: None, + title: None, + verified: None, + } + } +} diff --git a/src/datadogV1/model/model_notebook_cell_create_request.rs b/src/datadogV1/model/model_notebook_cell_create_request.rs new file mode 100644 index 000000000..7062a63c4 --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_create_request.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The description of a notebook cell create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookCellCreateRequest { + /// The attributes of a notebook cell in create cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, + /// `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/) + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of the Notebook Cell resource. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookCellResourceType, +} + +impl NotebookCellCreateRequest { + pub fn new( + attributes: Box, + type_: crate::datadogV1::model::NotebookCellResourceType, + ) -> NotebookCellCreateRequest { + NotebookCellCreateRequest { attributes, type_ } + } +} diff --git a/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs b/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs new file mode 100644 index 000000000..7fd52e5be --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_create_request_attributes.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The attributes of a notebook cell in create cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, +/// `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/) +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotebookCellCreateRequestAttributes { + NotebookMarkdownCellAttributes(Box), + NotebookTimeseriesCellAttributes( + Box, + ), + NotebookToplistCellAttributes(Box), + NotebookHeatMapCellAttributes(Box), + NotebookDistributionCellAttributes( + Box, + ), + NotebookLogStreamCellAttributes(Box), +} diff --git a/src/datadogV1/model/model_notebook_cell_resource_type.rs b/src/datadogV1/model/model_notebook_cell_resource_type.rs new file mode 100644 index 000000000..402394d2d --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_resource_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NotebookCellResourceType { + #[serde(rename = "notebook_cells")] + NOTEBOOK_CELLS, +} + +impl ToString for NotebookCellResourceType { + fn to_string(&self) -> String { + match self { + Self::NOTEBOOK_CELLS => String::from("notebook_cells"), + } + } +} diff --git a/src/datadogV1/model/model_notebook_cell_response.rs b/src/datadogV1/model/model_notebook_cell_response.rs new file mode 100644 index 000000000..b0993c553 --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_response.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The description of a notebook cell response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookCellResponse { + /// The attributes of a notebook cell response. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, + /// `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/) + #[serde(rename = "attributes")] + pub attributes: Box, + /// Notebook cell ID. + #[serde(rename = "id")] + pub id: String, + /// Type of the Notebook Cell resource. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookCellResourceType, +} + +impl NotebookCellResponse { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV1::model::NotebookCellResourceType, + ) -> NotebookCellResponse { + NotebookCellResponse { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV1/model/model_notebook_cell_response_attributes.rs b/src/datadogV1/model/model_notebook_cell_response_attributes.rs new file mode 100644 index 000000000..bd0d0c057 --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_response_attributes.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The attributes of a notebook cell response. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, +/// `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/) +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotebookCellResponseAttributes { + NotebookMarkdownCellAttributes(Box), + NotebookTimeseriesCellAttributes( + Box, + ), + NotebookToplistCellAttributes(Box), + NotebookHeatMapCellAttributes(Box), + NotebookDistributionCellAttributes( + Box, + ), + NotebookLogStreamCellAttributes(Box), +} diff --git a/src/datadogV1/model/model_notebook_cell_time.rs b/src/datadogV1/model/model_notebook_cell_time.rs new file mode 100644 index 000000000..28c3db740 --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_time.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Timeframe for the notebook cell. When 'null', the notebook global time is used. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotebookCellTime { + NotebookRelativeTime(Box), + NotebookAbsoluteTime(Box), +} diff --git a/src/datadogV1/model/model_notebook_cell_update_request.rs b/src/datadogV1/model/model_notebook_cell_update_request.rs new file mode 100644 index 000000000..48959e4ec --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_update_request.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The description of a notebook cell update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookCellUpdateRequest { + /// The attributes of a notebook cell in update cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, + /// `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/) + #[serde(rename = "attributes")] + pub attributes: Box, + /// Notebook cell ID. + #[serde(rename = "id")] + pub id: String, + /// Type of the Notebook Cell resource. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookCellResourceType, +} + +impl NotebookCellUpdateRequest { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV1::model::NotebookCellResourceType, + ) -> NotebookCellUpdateRequest { + NotebookCellUpdateRequest { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs b/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs new file mode 100644 index 000000000..71e239e96 --- /dev/null +++ b/src/datadogV1/model/model_notebook_cell_update_request_attributes.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The attributes of a notebook cell in update cell request. Valid cell types are `markdown`, `timeseries`, `toplist`, `heatmap`, `distribution`, +/// `log_stream`. [More information on each graph visualization type.](https://docs.datadoghq.com/dashboards/widgets/) +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotebookCellUpdateRequestAttributes { + NotebookMarkdownCellAttributes(Box), + NotebookTimeseriesCellAttributes( + Box, + ), + NotebookToplistCellAttributes(Box), + NotebookHeatMapCellAttributes(Box), + NotebookDistributionCellAttributes( + Box, + ), + NotebookLogStreamCellAttributes(Box), +} diff --git a/src/datadogV1/model/model_notebook_create_data.rs b/src/datadogV1/model/model_notebook_create_data.rs new file mode 100644 index 000000000..2f508cd97 --- /dev/null +++ b/src/datadogV1/model/model_notebook_create_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The data for a notebook create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookCreateData { + /// The data attributes of a notebook. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of the Notebook resource. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookResourceType, +} + +impl NotebookCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV1::model::NotebookResourceType, + ) -> NotebookCreateData { + NotebookCreateData { attributes, type_ } + } +} diff --git a/src/datadogV1/model/model_notebook_create_data_attributes.rs b/src/datadogV1/model/model_notebook_create_data_attributes.rs new file mode 100644 index 000000000..1936729fb --- /dev/null +++ b/src/datadogV1/model/model_notebook_create_data_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The data attributes of a notebook. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookCreateDataAttributes { + /// List of cells to display in the notebook. + #[serde(rename = "cells")] + pub cells: Vec, + /// Metadata associated with the notebook. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// The name of the notebook. + #[serde(rename = "name")] + pub name: String, + /// Publication status of the notebook. For now, always "published". + #[serde(rename = "status")] + pub status: Option, + /// Notebook global timeframe. + #[serde(rename = "time")] + pub time: Box, +} + +impl NotebookCreateDataAttributes { + pub fn new( + cells: Vec, + name: String, + time: Box, + ) -> NotebookCreateDataAttributes { + NotebookCreateDataAttributes { + cells, + metadata: None, + name, + status: None, + time, + } + } +} diff --git a/src/datadogV1/model/model_notebook_create_request.rs b/src/datadogV1/model/model_notebook_create_request.rs new file mode 100644 index 000000000..81e46aa6e --- /dev/null +++ b/src/datadogV1/model/model_notebook_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The description of a notebook create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookCreateRequest { + /// The data for a notebook create request. + #[serde(rename = "data")] + pub data: Box, +} + +impl NotebookCreateRequest { + pub fn new(data: Box) -> NotebookCreateRequest { + NotebookCreateRequest { data } + } +} diff --git a/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs b/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs new file mode 100644 index 000000000..7dc17b300 --- /dev/null +++ b/src/datadogV1/model/model_notebook_distribution_cell_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook `distribution` cell. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookDistributionCellAttributes { + /// The Distribution visualization is another way of showing metrics + /// aggregated across one or several tags, such as hosts. + /// Unlike the heat map, a distribution graph’s x-axis is quantity rather than time. + #[serde(rename = "definition")] + pub definition: Box, + /// The size of the graph. + #[serde(rename = "graph_size")] + pub graph_size: Option, + /// Object describing how to split the graph to display multiple visualizations per request. + #[serde(rename = "split_by")] + pub split_by: Option>, + /// Timeframe for the notebook cell. When 'null', the notebook global time is used. + #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] + pub time: Option>>, +} + +impl NotebookDistributionCellAttributes { + pub fn new( + definition: Box, + ) -> NotebookDistributionCellAttributes { + NotebookDistributionCellAttributes { + definition, + graph_size: None, + split_by: None, + time: None, + } + } +} diff --git a/src/datadogV1/model/model_notebook_global_time.rs b/src/datadogV1/model/model_notebook_global_time.rs new file mode 100644 index 000000000..e6cc05696 --- /dev/null +++ b/src/datadogV1/model/model_notebook_global_time.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Notebook global timeframe. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotebookGlobalTime { + NotebookRelativeTime(Box), + NotebookAbsoluteTime(Box), +} diff --git a/src/datadogV1/model/model_notebook_graph_size.rs b/src/datadogV1/model/model_notebook_graph_size.rs new file mode 100644 index 000000000..9910110b9 --- /dev/null +++ b/src/datadogV1/model/model_notebook_graph_size.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NotebookGraphSize { + #[serde(rename = "xs")] + EXTRA_SMALL, + #[serde(rename = "s")] + SMALL, + #[serde(rename = "m")] + MEDIUM, + #[serde(rename = "l")] + LARGE, + #[serde(rename = "xl")] + EXTRA_LARGE, +} + +impl ToString for NotebookGraphSize { + fn to_string(&self) -> String { + match self { + Self::EXTRA_SMALL => String::from("xs"), + Self::SMALL => String::from("s"), + Self::MEDIUM => String::from("m"), + Self::LARGE => String::from("l"), + Self::EXTRA_LARGE => String::from("xl"), + } + } +} diff --git a/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs b/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs new file mode 100644 index 000000000..1cdf0bed5 --- /dev/null +++ b/src/datadogV1/model/model_notebook_heat_map_cell_attributes.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook `heatmap` cell. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookHeatMapCellAttributes { + /// The heat map visualization shows metrics aggregated across many tags, such as hosts. The more hosts that have a particular value, the darker that square is. + #[serde(rename = "definition")] + pub definition: Box, + /// The size of the graph. + #[serde(rename = "graph_size")] + pub graph_size: Option, + /// Object describing how to split the graph to display multiple visualizations per request. + #[serde(rename = "split_by")] + pub split_by: Option>, + /// Timeframe for the notebook cell. When 'null', the notebook global time is used. + #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] + pub time: Option>>, +} + +impl NotebookHeatMapCellAttributes { + pub fn new( + definition: Box, + ) -> NotebookHeatMapCellAttributes { + NotebookHeatMapCellAttributes { + definition, + graph_size: None, + split_by: None, + time: None, + } + } +} diff --git a/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs b/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs new file mode 100644 index 000000000..b506a5e2b --- /dev/null +++ b/src/datadogV1/model/model_notebook_log_stream_cell_attributes.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook `log_stream` cell. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookLogStreamCellAttributes { + /// The Log Stream displays a log flow matching the defined query. Only available on FREE layout dashboards. + #[serde(rename = "definition")] + pub definition: Box, + /// The size of the graph. + #[serde(rename = "graph_size")] + pub graph_size: Option, + /// Timeframe for the notebook cell. When 'null', the notebook global time is used. + #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] + pub time: Option>>, +} + +impl NotebookLogStreamCellAttributes { + pub fn new( + definition: Box, + ) -> NotebookLogStreamCellAttributes { + NotebookLogStreamCellAttributes { + definition, + graph_size: None, + time: None, + } + } +} diff --git a/src/datadogV1/model/model_notebook_markdown_cell_attributes.rs b/src/datadogV1/model/model_notebook_markdown_cell_attributes.rs new file mode 100644 index 000000000..5fda30b54 --- /dev/null +++ b/src/datadogV1/model/model_notebook_markdown_cell_attributes.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook `markdown` cell. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookMarkdownCellAttributes { + /// Text in a notebook is formatted with [Markdown](https://daringfireball.net/projects/markdown/), which enables the use of headings, subheadings, links, images, lists, and code blocks. + #[serde(rename = "definition")] + pub definition: Box, +} + +impl NotebookMarkdownCellAttributes { + pub fn new( + definition: Box, + ) -> NotebookMarkdownCellAttributes { + NotebookMarkdownCellAttributes { definition } + } +} diff --git a/src/datadogV1/model/model_notebook_markdown_cell_definition.rs b/src/datadogV1/model/model_notebook_markdown_cell_definition.rs new file mode 100644 index 000000000..5f6afdb52 --- /dev/null +++ b/src/datadogV1/model/model_notebook_markdown_cell_definition.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Text in a notebook is formatted with [Markdown](https://daringfireball.net/projects/markdown/), which enables the use of headings, subheadings, links, images, lists, and code blocks. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookMarkdownCellDefinition { + /// The markdown content. + #[serde(rename = "text")] + pub text: String, + /// Type of the markdown cell. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookMarkdownCellDefinitionType, +} + +impl NotebookMarkdownCellDefinition { + pub fn new( + text: String, + type_: crate::datadogV1::model::NotebookMarkdownCellDefinitionType, + ) -> NotebookMarkdownCellDefinition { + NotebookMarkdownCellDefinition { text, type_ } + } +} diff --git a/src/datadogV1/model/model_notebook_markdown_cell_definition_type.rs b/src/datadogV1/model/model_notebook_markdown_cell_definition_type.rs new file mode 100644 index 000000000..ff275c3b9 --- /dev/null +++ b/src/datadogV1/model/model_notebook_markdown_cell_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NotebookMarkdownCellDefinitionType { + #[serde(rename = "markdown")] + MARKDOWN, +} + +impl ToString for NotebookMarkdownCellDefinitionType { + fn to_string(&self) -> String { + match self { + Self::MARKDOWN => String::from("markdown"), + } + } +} diff --git a/src/datadogV1/model/model_notebook_metadata.rs b/src/datadogV1/model/model_notebook_metadata.rs new file mode 100644 index 000000000..49b84e483 --- /dev/null +++ b/src/datadogV1/model/model_notebook_metadata.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Metadata associated with the notebook. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookMetadata { + /// Whether or not the notebook is a template. + #[serde(rename = "is_template")] + pub is_template: Option, + /// Whether or not the notebook takes snapshot image backups of the notebook's fixed-time graphs. + #[serde(rename = "take_snapshots")] + pub take_snapshots: Option, + /// Metadata type of the notebook. + #[serde(rename = "type", default, with = "::serde_with::rust::double_option")] + pub type_: Option>, +} + +impl NotebookMetadata { + pub fn new() -> NotebookMetadata { + NotebookMetadata { + is_template: None, + take_snapshots: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_notebook_metadata_type.rs b/src/datadogV1/model/model_notebook_metadata_type.rs new file mode 100644 index 000000000..3f861f568 --- /dev/null +++ b/src/datadogV1/model/model_notebook_metadata_type.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NotebookMetadataType { + #[serde(rename = "postmortem")] + POSTMORTEM, + #[serde(rename = "runbook")] + RUNBOOK, + #[serde(rename = "investigation")] + INVESTIGATION, + #[serde(rename = "documentation")] + DOCUMENTATION, + #[serde(rename = "report")] + REPORT, +} + +impl ToString for NotebookMetadataType { + fn to_string(&self) -> String { + match self { + Self::POSTMORTEM => String::from("postmortem"), + Self::RUNBOOK => String::from("runbook"), + Self::INVESTIGATION => String::from("investigation"), + Self::DOCUMENTATION => String::from("documentation"), + Self::REPORT => String::from("report"), + } + } +} diff --git a/src/datadogV1/model/model_notebook_relative_time.rs b/src/datadogV1/model/model_notebook_relative_time.rs new file mode 100644 index 000000000..21572f7f1 --- /dev/null +++ b/src/datadogV1/model/model_notebook_relative_time.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relative timeframe. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookRelativeTime { + /// The available timeframes depend on the widget you are using. + #[serde(rename = "live_span")] + pub live_span: crate::datadogV1::model::WidgetLiveSpan, +} + +impl NotebookRelativeTime { + pub fn new(live_span: crate::datadogV1::model::WidgetLiveSpan) -> NotebookRelativeTime { + NotebookRelativeTime { live_span } + } +} diff --git a/src/datadogV1/model/model_notebook_resource_type.rs b/src/datadogV1/model/model_notebook_resource_type.rs new file mode 100644 index 000000000..becee07e6 --- /dev/null +++ b/src/datadogV1/model/model_notebook_resource_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NotebookResourceType { + #[serde(rename = "notebooks")] + NOTEBOOKS, +} + +impl ToString for NotebookResourceType { + fn to_string(&self) -> String { + match self { + Self::NOTEBOOKS => String::from("notebooks"), + } + } +} diff --git a/src/datadogV1/model/model_notebook_response.rs b/src/datadogV1/model/model_notebook_response.rs new file mode 100644 index 000000000..a54aae976 --- /dev/null +++ b/src/datadogV1/model/model_notebook_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The description of a notebook response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookResponse { + /// The data for a notebook. + #[serde(rename = "data")] + pub data: Option>, +} + +impl NotebookResponse { + pub fn new() -> NotebookResponse { + NotebookResponse { data: None } + } +} diff --git a/src/datadogV1/model/model_notebook_response_data.rs b/src/datadogV1/model/model_notebook_response_data.rs new file mode 100644 index 000000000..8513feb09 --- /dev/null +++ b/src/datadogV1/model/model_notebook_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The data for a notebook. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookResponseData { + /// The attributes of a notebook. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Unique notebook ID, assigned when you create the notebook. + #[serde(rename = "id")] + pub id: i64, + /// Type of the Notebook resource. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookResourceType, +} + +impl NotebookResponseData { + pub fn new( + attributes: Box, + id: i64, + type_: crate::datadogV1::model::NotebookResourceType, + ) -> NotebookResponseData { + NotebookResponseData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV1/model/model_notebook_response_data_attributes.rs b/src/datadogV1/model/model_notebook_response_data_attributes.rs new file mode 100644 index 000000000..cb4388f1e --- /dev/null +++ b/src/datadogV1/model/model_notebook_response_data_attributes.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookResponseDataAttributes { + /// Attributes of user object returned by the API. + #[serde(rename = "author")] + pub author: Option>, + /// List of cells to display in the notebook. + #[serde(rename = "cells")] + pub cells: Vec, + /// UTC time stamp for when the notebook was created. + #[serde(rename = "created")] + pub created: Option, + /// Metadata associated with the notebook. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// UTC time stamp for when the notebook was last modified. + #[serde(rename = "modified")] + pub modified: Option, + /// The name of the notebook. + #[serde(rename = "name")] + pub name: String, + /// Publication status of the notebook. For now, always "published". + #[serde(rename = "status")] + pub status: Option, + /// Notebook global timeframe. + #[serde(rename = "time")] + pub time: Box, +} + +impl NotebookResponseDataAttributes { + pub fn new( + cells: Vec, + name: String, + time: Box, + ) -> NotebookResponseDataAttributes { + NotebookResponseDataAttributes { + author: None, + cells, + created: None, + metadata: None, + modified: None, + name, + status: None, + time, + } + } +} diff --git a/src/datadogV1/model/model_notebook_split_by.rs b/src/datadogV1/model/model_notebook_split_by.rs new file mode 100644 index 000000000..c439a8422 --- /dev/null +++ b/src/datadogV1/model/model_notebook_split_by.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing how to split the graph to display multiple visualizations per request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookSplitBy { + /// Keys to split on. + #[serde(rename = "keys")] + pub keys: Vec, + /// Tags to split on. + #[serde(rename = "tags")] + pub tags: Vec, +} + +impl NotebookSplitBy { + pub fn new(keys: Vec, tags: Vec) -> NotebookSplitBy { + NotebookSplitBy { keys, tags } + } +} diff --git a/src/datadogV1/model/model_notebook_status.rs b/src/datadogV1/model/model_notebook_status.rs new file mode 100644 index 000000000..bccb86c8c --- /dev/null +++ b/src/datadogV1/model/model_notebook_status.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NotebookStatus { + #[serde(rename = "published")] + PUBLISHED, +} + +impl ToString for NotebookStatus { + fn to_string(&self) -> String { + match self { + Self::PUBLISHED => String::from("published"), + } + } +} diff --git a/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs b/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs new file mode 100644 index 000000000..3927cfcb4 --- /dev/null +++ b/src/datadogV1/model/model_notebook_timeseries_cell_attributes.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook `timeseries` cell. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookTimeseriesCellAttributes { + /// The timeseries visualization allows you to display the evolution of one or more metrics, log events, or Indexed Spans over time. + #[serde(rename = "definition")] + pub definition: Box, + /// The size of the graph. + #[serde(rename = "graph_size")] + pub graph_size: Option, + /// Object describing how to split the graph to display multiple visualizations per request. + #[serde(rename = "split_by")] + pub split_by: Option>, + /// Timeframe for the notebook cell. When 'null', the notebook global time is used. + #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] + pub time: Option>>, +} + +impl NotebookTimeseriesCellAttributes { + pub fn new( + definition: Box, + ) -> NotebookTimeseriesCellAttributes { + NotebookTimeseriesCellAttributes { + definition, + graph_size: None, + split_by: None, + time: None, + } + } +} diff --git a/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs b/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs new file mode 100644 index 000000000..e8d5043bb --- /dev/null +++ b/src/datadogV1/model/model_notebook_toplist_cell_attributes.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook `toplist` cell. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookToplistCellAttributes { + /// The top list visualization enables you to display a list of Tag value like hostname or service with the most or least of any metric value, such as highest consumers of CPU, hosts with the least disk space, etc. + #[serde(rename = "definition")] + pub definition: Box, + /// The size of the graph. + #[serde(rename = "graph_size")] + pub graph_size: Option, + /// Object describing how to split the graph to display multiple visualizations per request. + #[serde(rename = "split_by")] + pub split_by: Option>, + /// Timeframe for the notebook cell. When 'null', the notebook global time is used. + #[serde(rename = "time", default, with = "::serde_with::rust::double_option")] + pub time: Option>>, +} + +impl NotebookToplistCellAttributes { + pub fn new( + definition: Box, + ) -> NotebookToplistCellAttributes { + NotebookToplistCellAttributes { + definition, + graph_size: None, + split_by: None, + time: None, + } + } +} diff --git a/src/datadogV1/model/model_notebook_update_cell.rs b/src/datadogV1/model/model_notebook_update_cell.rs new file mode 100644 index 000000000..5bc570d61 --- /dev/null +++ b/src/datadogV1/model/model_notebook_update_cell.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Updating a notebook can either insert new cell(s) or update existing cell(s) by including the cell `id`. +/// To delete existing cell(s), simply omit it from the list of cells. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum NotebookUpdateCell { + NotebookCellCreateRequest(Box), + NotebookCellUpdateRequest(Box), +} diff --git a/src/datadogV1/model/model_notebook_update_data.rs b/src/datadogV1/model/model_notebook_update_data.rs new file mode 100644 index 000000000..ca5ce4577 --- /dev/null +++ b/src/datadogV1/model/model_notebook_update_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The data for a notebook update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookUpdateData { + /// The data attributes of a notebook. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of the Notebook resource. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookResourceType, +} + +impl NotebookUpdateData { + pub fn new( + attributes: Box, + type_: crate::datadogV1::model::NotebookResourceType, + ) -> NotebookUpdateData { + NotebookUpdateData { attributes, type_ } + } +} diff --git a/src/datadogV1/model/model_notebook_update_data_attributes.rs b/src/datadogV1/model/model_notebook_update_data_attributes.rs new file mode 100644 index 000000000..89eb2c104 --- /dev/null +++ b/src/datadogV1/model/model_notebook_update_data_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The data attributes of a notebook. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookUpdateDataAttributes { + /// List of cells to display in the notebook. + #[serde(rename = "cells")] + pub cells: Vec, + /// Metadata associated with the notebook. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// The name of the notebook. + #[serde(rename = "name")] + pub name: String, + /// Publication status of the notebook. For now, always "published". + #[serde(rename = "status")] + pub status: Option, + /// Notebook global timeframe. + #[serde(rename = "time")] + pub time: Box, +} + +impl NotebookUpdateDataAttributes { + pub fn new( + cells: Vec, + name: String, + time: Box, + ) -> NotebookUpdateDataAttributes { + NotebookUpdateDataAttributes { + cells, + metadata: None, + name, + status: None, + time, + } + } +} diff --git a/src/datadogV1/model/model_notebook_update_request.rs b/src/datadogV1/model/model_notebook_update_request.rs new file mode 100644 index 000000000..820a036d7 --- /dev/null +++ b/src/datadogV1/model/model_notebook_update_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The description of a notebook update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebookUpdateRequest { + /// The data for a notebook update request. + #[serde(rename = "data")] + pub data: Box, +} + +impl NotebookUpdateRequest { + pub fn new(data: Box) -> NotebookUpdateRequest { + NotebookUpdateRequest { data } + } +} diff --git a/src/datadogV1/model/model_notebooks_response.rs b/src/datadogV1/model/model_notebooks_response.rs new file mode 100644 index 000000000..378c1c664 --- /dev/null +++ b/src/datadogV1/model/model_notebooks_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Notebooks get all response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebooksResponse { + /// List of notebook definitions. + #[serde(rename = "data")] + pub data: Option>, + /// Searches metadata returned by the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl NotebooksResponse { + pub fn new() -> NotebooksResponse { + NotebooksResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV1/model/model_notebooks_response_data.rs b/src/datadogV1/model/model_notebooks_response_data.rs new file mode 100644 index 000000000..76c97cf1b --- /dev/null +++ b/src/datadogV1/model/model_notebooks_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The data for a notebook in get all response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebooksResponseData { + /// The attributes of a notebook in get all response. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Unique notebook ID, assigned when you create the notebook. + #[serde(rename = "id")] + pub id: i64, + /// Type of the Notebook resource. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::NotebookResourceType, +} + +impl NotebooksResponseData { + pub fn new( + attributes: Box, + id: i64, + type_: crate::datadogV1::model::NotebookResourceType, + ) -> NotebooksResponseData { + NotebooksResponseData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV1/model/model_notebooks_response_data_attributes.rs b/src/datadogV1/model/model_notebooks_response_data_attributes.rs new file mode 100644 index 000000000..f72c8dc70 --- /dev/null +++ b/src/datadogV1/model/model_notebooks_response_data_attributes.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes of a notebook in get all response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebooksResponseDataAttributes { + /// Attributes of user object returned by the API. + #[serde(rename = "author")] + pub author: Option>, + /// List of cells to display in the notebook. + #[serde(rename = "cells")] + pub cells: Option>, + /// UTC time stamp for when the notebook was created. + #[serde(rename = "created")] + pub created: Option, + /// Metadata associated with the notebook. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// UTC time stamp for when the notebook was last modified. + #[serde(rename = "modified")] + pub modified: Option, + /// The name of the notebook. + #[serde(rename = "name")] + pub name: String, + /// Publication status of the notebook. For now, always "published". + #[serde(rename = "status")] + pub status: Option, + /// Notebook global timeframe. + #[serde(rename = "time")] + pub time: Option>, +} + +impl NotebooksResponseDataAttributes { + pub fn new(name: String) -> NotebooksResponseDataAttributes { + NotebooksResponseDataAttributes { + author: None, + cells: None, + created: None, + metadata: None, + modified: None, + name, + status: None, + time: None, + } + } +} diff --git a/src/datadogV1/model/model_notebooks_response_meta.rs b/src/datadogV1/model/model_notebooks_response_meta.rs new file mode 100644 index 000000000..2af92d434 --- /dev/null +++ b/src/datadogV1/model/model_notebooks_response_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Searches metadata returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebooksResponseMeta { + /// Pagination metadata returned by the API. + #[serde(rename = "page")] + pub page: Option>, +} + +impl NotebooksResponseMeta { + pub fn new() -> NotebooksResponseMeta { + NotebooksResponseMeta { page: None } + } +} diff --git a/src/datadogV1/model/model_notebooks_response_page.rs b/src/datadogV1/model/model_notebooks_response_page.rs new file mode 100644 index 000000000..3863bb170 --- /dev/null +++ b/src/datadogV1/model/model_notebooks_response_page.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pagination metadata returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotebooksResponsePage { + /// The total number of notebooks that would be returned if the request was not filtered by `start` and `count` parameters. + #[serde(rename = "total_count")] + pub total_count: Option, + /// The total number of notebooks returned. + #[serde(rename = "total_filtered_count")] + pub total_filtered_count: Option, +} + +impl NotebooksResponsePage { + pub fn new() -> NotebooksResponsePage { + NotebooksResponsePage { + total_count: None, + total_filtered_count: None, + } + } +} diff --git a/src/datadogV1/model/model_notify_end_state.rs b/src/datadogV1/model/model_notify_end_state.rs index 06af46dc4..da939fbf6 100644 --- a/src/datadogV1/model/model_notify_end_state.rs +++ b/src/datadogV1/model/model_notify_end_state.rs @@ -23,9 +23,3 @@ impl ToString for NotifyEndState { } } } - -impl Default for NotifyEndState { - fn default() -> NotifyEndState { - Self::ALERT - } -} diff --git a/src/datadogV1/model/model_notify_end_type.rs b/src/datadogV1/model/model_notify_end_type.rs index 3b0e20969..4a3dbdb33 100644 --- a/src/datadogV1/model/model_notify_end_type.rs +++ b/src/datadogV1/model/model_notify_end_type.rs @@ -20,9 +20,3 @@ impl ToString for NotifyEndType { } } } - -impl Default for NotifyEndType { - fn default() -> NotifyEndType { - Self::CANCELED - } -} diff --git a/src/datadogV1/model/model_on_missing_data_option.rs b/src/datadogV1/model/model_on_missing_data_option.rs new file mode 100644 index 000000000..13613dc32 --- /dev/null +++ b/src/datadogV1/model/model_on_missing_data_option.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OnMissingDataOption { + #[serde(rename = "default")] + DEFAULT, + #[serde(rename = "show_no_data")] + SHOW_NO_DATA, + #[serde(rename = "show_and_notify_no_data")] + SHOW_AND_NOTIFY_NO_DATA, + #[serde(rename = "resolve")] + RESOLVE, +} + +impl ToString for OnMissingDataOption { + fn to_string(&self) -> String { + match self { + Self::DEFAULT => String::from("default"), + Self::SHOW_NO_DATA => String::from("show_no_data"), + Self::SHOW_AND_NOTIFY_NO_DATA => String::from("show_and_notify_no_data"), + Self::RESOLVE => String::from("resolve"), + } + } +} diff --git a/src/datadogV1/model/model_org_downgraded_response.rs b/src/datadogV1/model/model_org_downgraded_response.rs index b4699da81..bada92fd1 100644 --- a/src/datadogV1/model/model_org_downgraded_response.rs +++ b/src/datadogV1/model/model_org_downgraded_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Status of downgrade #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrgDowngradedResponse { /// Information pertaining to the downgraded child organization. #[serde(rename = "message")] diff --git a/src/datadogV1/model/model_organization.rs b/src/datadogV1/model/model_organization.rs index ebd19add6..19c068c17 100644 --- a/src/datadogV1/model/model_organization.rs +++ b/src/datadogV1/model/model_organization.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Create, edit, and manage organizations. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Organization { /// A JSON array of billing type. #[deprecated] @@ -18,7 +18,7 @@ pub struct Organization { /// Description of the organization. #[serde(rename = "description")] pub description: Option, - /// The name of the new child-organization, limited to 32 characters. + /// The name of the child organization, limited to 32 characters. #[serde(rename = "name")] pub name: Option, /// The `public_id` of the organization you are operating within. diff --git a/src/datadogV1/model/model_organization_billing.rs b/src/datadogV1/model/model_organization_billing.rs index e252c5ed9..cb144f21b 100644 --- a/src/datadogV1/model/model_organization_billing.rs +++ b/src/datadogV1/model/model_organization_billing.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A JSON array of billing type. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationBilling { /// The type of billing. Only `parent_billing` is supported. #[serde(rename = "type")] diff --git a/src/datadogV1/model/model_organization_create_body.rs b/src/datadogV1/model/model_organization_create_body.rs index 9e6b3c627..52129c57b 100644 --- a/src/datadogV1/model/model_organization_create_body.rs +++ b/src/datadogV1/model/model_organization_create_body.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object describing an organization to create. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationCreateBody { /// A JSON array of billing type. #[deprecated] diff --git a/src/datadogV1/model/model_organization_create_response.rs b/src/datadogV1/model/model_organization_create_response.rs index e2fa2de96..7098cf7d2 100644 --- a/src/datadogV1/model/model_organization_create_response.rs +++ b/src/datadogV1/model/model_organization_create_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response object for an organization creation. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationCreateResponse { /// Datadog API key. #[serde(rename = "api_key")] diff --git a/src/datadogV1/model/model_organization_list_response.rs b/src/datadogV1/model/model_organization_list_response.rs index f04b73023..a2656e007 100644 --- a/src/datadogV1/model/model_organization_list_response.rs +++ b/src/datadogV1/model/model_organization_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with the list of organizations. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationListResponse { /// Array of organization objects. #[serde(rename = "orgs")] diff --git a/src/datadogV1/model/model_organization_response.rs b/src/datadogV1/model/model_organization_response.rs index a102bc020..c43c2f1d9 100644 --- a/src/datadogV1/model/model_organization_response.rs +++ b/src/datadogV1/model/model_organization_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with an organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationResponse { /// Create, edit, and manage organizations. #[serde(rename = "org")] diff --git a/src/datadogV1/model/model_organization_settings.rs b/src/datadogV1/model/model_organization_settings.rs index cf10bfa01..cbce9aa17 100644 --- a/src/datadogV1/model/model_organization_settings.rs +++ b/src/datadogV1/model/model_organization_settings.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A JSON array of settings. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationSettings { /// Whether or not the organization users can share widgets outside of Datadog. #[serde(rename = "private_widget_share")] diff --git a/src/datadogV1/model/model_organization_settings_saml.rs b/src/datadogV1/model/model_organization_settings_saml.rs index bd0ee4ede..c54800bef 100644 --- a/src/datadogV1/model/model_organization_settings_saml.rs +++ b/src/datadogV1/model/model_organization_settings_saml.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// Set the boolean property enabled to enable or disable single sign on with SAML. /// See the SAML documentation for more information about all SAML settings. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationSettingsSaml { /// Whether or not SAML is enabled for this organization. #[serde(rename = "enabled")] diff --git a/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs b/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs index 99e2bce6d..9ce70869a 100644 --- a/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs +++ b/src/datadogV1/model/model_organization_settings_saml_autocreate_users_domains.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Has two properties, `enabled` (boolean) and `domains`, which is a list of domains without the @ symbol. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationSettingsSamlAutocreateUsersDomains { /// List of domains where the SAML automated user creation is enabled. #[serde(rename = "domains")] diff --git a/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs b/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs index c6c2fb171..e45a5484c 100644 --- a/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs +++ b/src/datadogV1/model/model_organization_settings_saml_idp_initiated_login.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Has one property enabled (boolean). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationSettingsSamlIdpInitiatedLogin { /// Whether SAML IdP initiated login is enabled, learn more /// in the [SAML documentation](https://docs.datadoghq.com/account_management/saml/#idp-initiated-login). diff --git a/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs b/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs index 48a4ceaa8..d9d70d38e 100644 --- a/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs +++ b/src/datadogV1/model/model_organization_settings_saml_strict_mode.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Has one property enabled (boolean). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationSettingsSamlStrictMode { /// Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. /// Learn more on the [SAML Strict documentation](https://docs.datadoghq.com/account_management/saml/#saml-strict). diff --git a/src/datadogV1/model/model_organization_subscription.rs b/src/datadogV1/model/model_organization_subscription.rs index 006e3691d..1de3093ac 100644 --- a/src/datadogV1/model/model_organization_subscription.rs +++ b/src/datadogV1/model/model_organization_subscription.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Subscription definition. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OrganizationSubscription { /// The subscription type. Types available are `trial`, `free`, and `pro`. #[serde(rename = "type")] diff --git a/src/datadogV1/model/model_pager_duty_service.rs b/src/datadogV1/model/model_pager_duty_service.rs index d19cbecc3..a4d97649e 100644 --- a/src/datadogV1/model/model_pager_duty_service.rs +++ b/src/datadogV1/model/model_pager_duty_service.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The PagerDuty service that is available for integration with Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PagerDutyService { /// Your service key in PagerDuty. #[serde(rename = "service_key")] diff --git a/src/datadogV1/model/model_pager_duty_service_key.rs b/src/datadogV1/model/model_pager_duty_service_key.rs index 3a3da62af..32895ad5c 100644 --- a/src/datadogV1/model/model_pager_duty_service_key.rs +++ b/src/datadogV1/model/model_pager_duty_service_key.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// PagerDuty service object key. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PagerDutyServiceKey { /// Your service key in PagerDuty. #[serde(rename = "service_key")] diff --git a/src/datadogV1/model/model_pager_duty_service_name.rs b/src/datadogV1/model/model_pager_duty_service_name.rs index c87f92d93..1947529f0 100644 --- a/src/datadogV1/model/model_pager_duty_service_name.rs +++ b/src/datadogV1/model/model_pager_duty_service_name.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// PagerDuty service object name. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PagerDutyServiceName { /// Your service name associated service key in PagerDuty. #[serde(rename = "service_name")] diff --git a/src/datadogV1/model/model_pagination.rs b/src/datadogV1/model/model_pagination.rs index de4eea466..45b6502d2 100644 --- a/src/datadogV1/model/model_pagination.rs +++ b/src/datadogV1/model/model_pagination.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Pagination object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Pagination { /// Total count. #[serde(rename = "total_count")] diff --git a/src/datadogV1/model/model_powerpack_template_variable_contents.rs b/src/datadogV1/model/model_powerpack_template_variable_contents.rs new file mode 100644 index 000000000..557b45bba --- /dev/null +++ b/src/datadogV1/model/model_powerpack_template_variable_contents.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack template variable contents. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackTemplateVariableContents { + /// The name of the variable. + #[serde(rename = "name")] + pub name: String, + /// The tag prefix associated with the variable. + #[serde(rename = "prefix")] + pub prefix: Option, + /// One or many template variable values within the saved view, which will be unioned together using `OR` if more than one is specified. + #[serde(rename = "values")] + pub values: Vec, +} + +impl PowerpackTemplateVariableContents { + pub fn new(name: String, values: Vec) -> PowerpackTemplateVariableContents { + PowerpackTemplateVariableContents { + name, + prefix: None, + values, + } + } +} diff --git a/src/datadogV1/model/model_powerpack_template_variables.rs b/src/datadogV1/model/model_powerpack_template_variables.rs new file mode 100644 index 000000000..feb88e8ea --- /dev/null +++ b/src/datadogV1/model/model_powerpack_template_variables.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack template variables. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackTemplateVariables { + /// Template variables controlled at the powerpack level. + #[serde(rename = "controlled_by_powerpack")] + pub controlled_by_powerpack: + Option>, + /// Template variables controlled by the external resource, such as the dashboard this powerpack is on. + #[serde(rename = "controlled_externally")] + pub controlled_externally: + Option>, +} + +impl PowerpackTemplateVariables { + pub fn new() -> PowerpackTemplateVariables { + PowerpackTemplateVariables { + controlled_by_powerpack: None, + controlled_externally: None, + } + } +} diff --git a/src/datadogV1/model/model_powerpack_widget_definition.rs b/src/datadogV1/model/model_powerpack_widget_definition.rs new file mode 100644 index 000000000..ace4febb7 --- /dev/null +++ b/src/datadogV1/model/model_powerpack_widget_definition.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The powerpack widget allows you to keep similar graphs together on your timeboard. Each group has a custom header, can hold one to many graphs, and is collapsible. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackWidgetDefinition { + /// Background color of the powerpack title. + #[serde(rename = "background_color")] + pub background_color: Option, + /// URL of image to display as a banner for the powerpack. + #[serde(rename = "banner_img")] + pub banner_img: Option, + /// UUID of the associated powerpack. + #[serde(rename = "powerpack_id")] + pub powerpack_id: String, + /// Whether to show the title or not. + #[serde(rename = "show_title")] + pub show_title: Option, + /// Powerpack template variables. + #[serde(rename = "template_variables")] + pub template_variables: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// Type of the powerpack widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::PowerpackWidgetDefinitionType, +} + +impl PowerpackWidgetDefinition { + pub fn new( + powerpack_id: String, + type_: crate::datadogV1::model::PowerpackWidgetDefinitionType, + ) -> PowerpackWidgetDefinition { + PowerpackWidgetDefinition { + background_color: None, + banner_img: None, + powerpack_id, + show_title: None, + template_variables: None, + title: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_powerpack_widget_definition_type.rs b/src/datadogV1/model/model_powerpack_widget_definition_type.rs new file mode 100644 index 000000000..f7aea712c --- /dev/null +++ b/src/datadogV1/model/model_powerpack_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum PowerpackWidgetDefinitionType { + #[serde(rename = "powerpack")] + POWERPACK, +} + +impl ToString for PowerpackWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::POWERPACK => String::from("powerpack"), + } + } +} diff --git a/src/datadogV1/model/model_process_query_definition.rs b/src/datadogV1/model/model_process_query_definition.rs new file mode 100644 index 000000000..cfc7bb576 --- /dev/null +++ b/src/datadogV1/model/model_process_query_definition.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The process query to use in the widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProcessQueryDefinition { + /// List of processes. + #[serde(rename = "filter_by")] + pub filter_by: Option>, + /// Max number of items in the filter list. + #[serde(rename = "limit")] + pub limit: Option, + /// Your chosen metric. + #[serde(rename = "metric")] + pub metric: String, + /// Your chosen search term. + #[serde(rename = "search_by")] + pub search_by: Option, +} + +impl ProcessQueryDefinition { + pub fn new(metric: String) -> ProcessQueryDefinition { + ProcessQueryDefinition { + filter_by: None, + limit: None, + metric, + search_by: None, + } + } +} diff --git a/src/datadogV1/model/model_query_sort_order.rs b/src/datadogV1/model/model_query_sort_order.rs new file mode 100644 index 000000000..ca93f5703 --- /dev/null +++ b/src/datadogV1/model/model_query_sort_order.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum QuerySortOrder { + #[serde(rename = "asc")] + ASC, + #[serde(rename = "desc")] + DESC, +} + +impl ToString for QuerySortOrder { + fn to_string(&self) -> String { + match self { + Self::ASC => String::from("asc"), + Self::DESC => String::from("desc"), + } + } +} diff --git a/src/datadogV1/model/model_query_value_widget_definition.rs b/src/datadogV1/model/model_query_value_widget_definition.rs new file mode 100644 index 000000000..fc59385f4 --- /dev/null +++ b/src/datadogV1/model/model_query_value_widget_definition.rs @@ -0,0 +1,69 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Query values display the current value of a given metric, APM, or log query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct QueryValueWidgetDefinition { + /// Whether to use auto-scaling or not. + #[serde(rename = "autoscale")] + pub autoscale: Option, + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Display a unit of your choice on the widget. + #[serde(rename = "custom_unit")] + pub custom_unit: Option, + /// Number of decimals to show. If not defined, the widget uses the raw value. + #[serde(rename = "precision")] + pub precision: Option, + /// Widget definition. + #[serde(rename = "requests")] + pub requests: Vec, + /// How to align the text on the widget. + #[serde(rename = "text_align")] + pub text_align: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Set a timeseries on the widget background. + #[serde(rename = "timeseries_background")] + pub timeseries_background: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the query value widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::QueryValueWidgetDefinitionType, +} + +impl QueryValueWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::QueryValueWidgetDefinitionType, + ) -> QueryValueWidgetDefinition { + QueryValueWidgetDefinition { + autoscale: None, + custom_links: None, + custom_unit: None, + precision: None, + requests, + text_align: None, + time: None, + timeseries_background: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_query_value_widget_definition_type.rs b/src/datadogV1/model/model_query_value_widget_definition_type.rs new file mode 100644 index 000000000..4e9e58b67 --- /dev/null +++ b/src/datadogV1/model/model_query_value_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum QueryValueWidgetDefinitionType { + #[serde(rename = "query_value")] + QUERY_VALUE, +} + +impl ToString for QueryValueWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::QUERY_VALUE => String::from("query_value"), + } + } +} diff --git a/src/datadogV1/model/model_query_value_widget_request.rs b/src/datadogV1/model/model_query_value_widget_request.rs new file mode 100644 index 000000000..6822fe3bb --- /dev/null +++ b/src/datadogV1/model/model_query_value_widget_request.rs @@ -0,0 +1,78 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated query value widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct QueryValueWidgetRequest { + /// Aggregator used for the request. + #[serde(rename = "aggregator")] + pub aggregator: Option, + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The log query. + #[serde(rename = "audit_query")] + pub audit_query: Option>, + /// List of conditional formats. + #[serde(rename = "conditional_formats")] + pub conditional_formats: Option>, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// TODO. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, +} + +impl QueryValueWidgetRequest { + pub fn new() -> QueryValueWidgetRequest { + QueryValueWidgetRequest { + aggregator: None, + apm_query: None, + audit_query: None, + conditional_formats: None, + event_query: None, + formulas: None, + log_query: None, + network_query: None, + process_query: None, + profile_metrics_query: None, + q: None, + queries: None, + response_format: None, + rum_query: None, + security_query: None, + } + } +} diff --git a/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs b/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs new file mode 100644 index 000000000..09e9a97d0 --- /dev/null +++ b/src/datadogV1/model/model_reference_table_logs_lookup_processor.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// **Note**: Reference Tables are in public beta. +/// Use the Lookup Processor to define a mapping between a log attribute +/// and a human readable value saved in a Reference Table. +/// For example, you can use the Lookup Processor to map an internal service ID +/// into a human readable service name. Alternatively, you could also use it to check +/// if the MAC address that just attempted to connect to the production +/// environment belongs to your list of stolen machines. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ReferenceTableLogsLookupProcessor { + /// Whether or not the processor is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the Reference Table for the source attribute and their associated target attribute values. + #[serde(rename = "lookup_enrichment_table")] + pub lookup_enrichment_table: String, + /// Name of the processor. + #[serde(rename = "name")] + pub name: Option, + /// Source attribute used to perform the lookup. + #[serde(rename = "source")] + pub source: String, + /// Name of the attribute that contains the corresponding value in the mapping list. + #[serde(rename = "target")] + pub target: String, + /// Type of logs lookup processor. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::LogsLookupProcessorType, +} + +impl ReferenceTableLogsLookupProcessor { + pub fn new( + lookup_enrichment_table: String, + source: String, + target: String, + type_: crate::datadogV1::model::LogsLookupProcessorType, + ) -> ReferenceTableLogsLookupProcessor { + ReferenceTableLogsLookupProcessor { + is_enabled: None, + lookup_enrichment_table, + name: None, + source, + target, + type_, + } + } +} diff --git a/src/datadogV1/model/model_response_meta_attributes.rs b/src/datadogV1/model/model_response_meta_attributes.rs index c9ae247a1..f6f170c60 100644 --- a/src/datadogV1/model/model_response_meta_attributes.rs +++ b/src/datadogV1/model/model_response_meta_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object describing meta attributes of response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ResponseMetaAttributes { /// Pagination object. #[serde(rename = "page")] diff --git a/src/datadogV1/model/model_run_workflow_widget_definition.rs b/src/datadogV1/model/model_run_workflow_widget_definition.rs new file mode 100644 index 000000000..ed5d98127 --- /dev/null +++ b/src/datadogV1/model/model_run_workflow_widget_definition.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Run workflow is widget that allows you to run a workflow from a dashboard. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RunWorkflowWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Array of workflow inputs to map to dashboard template variables. + #[serde(rename = "inputs")] + pub inputs: Option>, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the run workflow widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::RunWorkflowWidgetDefinitionType, + /// Workflow id. + #[serde(rename = "workflow_id")] + pub workflow_id: String, +} + +impl RunWorkflowWidgetDefinition { + pub fn new( + type_: crate::datadogV1::model::RunWorkflowWidgetDefinitionType, + workflow_id: String, + ) -> RunWorkflowWidgetDefinition { + RunWorkflowWidgetDefinition { + custom_links: None, + inputs: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + workflow_id, + } + } +} diff --git a/src/datadogV1/model/model_run_workflow_widget_definition_type.rs b/src/datadogV1/model/model_run_workflow_widget_definition_type.rs new file mode 100644 index 000000000..8d8e1fcbe --- /dev/null +++ b/src/datadogV1/model/model_run_workflow_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RunWorkflowWidgetDefinitionType { + #[serde(rename = "run_workflow")] + RUN_WORKFLOW, +} + +impl ToString for RunWorkflowWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::RUN_WORKFLOW => String::from("run_workflow"), + } + } +} diff --git a/src/datadogV1/model/model_run_workflow_widget_input.rs b/src/datadogV1/model/model_run_workflow_widget_input.rs new file mode 100644 index 000000000..d90965217 --- /dev/null +++ b/src/datadogV1/model/model_run_workflow_widget_input.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to map a dashboard template variable to a workflow input. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RunWorkflowWidgetInput { + /// Name of the workflow input. + #[serde(rename = "name")] + pub name: String, + /// Dashboard template variable. Can be suffixed with '.value' or '.key'. + #[serde(rename = "value")] + pub value: String, +} + +impl RunWorkflowWidgetInput { + pub fn new(name: String, value: String) -> RunWorkflowWidgetInput { + RunWorkflowWidgetInput { name, value } + } +} diff --git a/src/datadogV1/model/model_scatter_plot_request.rs b/src/datadogV1/model/model_scatter_plot_request.rs new file mode 100644 index 000000000..b886c5f1b --- /dev/null +++ b/src/datadogV1/model/model_scatter_plot_request.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated scatter plot. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScatterPlotRequest { + /// Aggregator used for the request. + #[serde(rename = "aggregator")] + pub aggregator: Option, + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Query definition. + #[serde(rename = "q")] + pub q: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, +} + +impl ScatterPlotRequest { + pub fn new() -> ScatterPlotRequest { + ScatterPlotRequest { + aggregator: None, + apm_query: None, + event_query: None, + log_query: None, + network_query: None, + process_query: None, + profile_metrics_query: None, + q: None, + rum_query: None, + security_query: None, + } + } +} diff --git a/src/datadogV1/model/model_scatter_plot_widget_definition.rs b/src/datadogV1/model/model_scatter_plot_widget_definition.rs new file mode 100644 index 000000000..54c18d411 --- /dev/null +++ b/src/datadogV1/model/model_scatter_plot_widget_definition.rs @@ -0,0 +1,61 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The scatter plot visualization allows you to graph a chosen scope over two different metrics with their respective aggregation. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScatterPlotWidgetDefinition { + /// List of groups used for colors. + #[serde(rename = "color_by_groups")] + pub color_by_groups: Option>, + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Widget definition. + #[serde(rename = "requests")] + pub requests: Box, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the scatter plot widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ScatterPlotWidgetDefinitionType, + /// Axis controls for the widget. + #[serde(rename = "xaxis")] + pub xaxis: Option>, + /// Axis controls for the widget. + #[serde(rename = "yaxis")] + pub yaxis: Option>, +} + +impl ScatterPlotWidgetDefinition { + pub fn new( + requests: Box, + type_: crate::datadogV1::model::ScatterPlotWidgetDefinitionType, + ) -> ScatterPlotWidgetDefinition { + ScatterPlotWidgetDefinition { + color_by_groups: None, + custom_links: None, + requests, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + xaxis: None, + yaxis: None, + } + } +} diff --git a/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs b/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs new file mode 100644 index 000000000..dd2bd3c39 --- /dev/null +++ b/src/datadogV1/model/model_scatter_plot_widget_definition_requests.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Widget definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScatterPlotWidgetDefinitionRequests { + /// Scatterplot request containing formulas and functions. + #[serde(rename = "table")] + pub table: Option>, + /// Updated scatter plot. + #[serde(rename = "x")] + pub x: Option>, + /// Updated scatter plot. + #[serde(rename = "y")] + pub y: Option>, +} + +impl ScatterPlotWidgetDefinitionRequests { + pub fn new() -> ScatterPlotWidgetDefinitionRequests { + ScatterPlotWidgetDefinitionRequests { + table: None, + x: None, + y: None, + } + } +} diff --git a/src/datadogV1/model/model_scatter_plot_widget_definition_type.rs b/src/datadogV1/model/model_scatter_plot_widget_definition_type.rs new file mode 100644 index 000000000..dc54c7dcd --- /dev/null +++ b/src/datadogV1/model/model_scatter_plot_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScatterPlotWidgetDefinitionType { + #[serde(rename = "scatterplot")] + SCATTERPLOT, +} + +impl ToString for ScatterPlotWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::SCATTERPLOT => String::from("scatterplot"), + } + } +} diff --git a/src/datadogV1/model/model_scatterplot_dimension.rs b/src/datadogV1/model/model_scatterplot_dimension.rs new file mode 100644 index 000000000..78d418877 --- /dev/null +++ b/src/datadogV1/model/model_scatterplot_dimension.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScatterplotDimension { + #[serde(rename = "x")] + X, + #[serde(rename = "y")] + Y, + #[serde(rename = "radius")] + RADIUS, + #[serde(rename = "color")] + COLOR, +} + +impl ToString for ScatterplotDimension { + fn to_string(&self) -> String { + match self { + Self::X => String::from("x"), + Self::Y => String::from("y"), + Self::RADIUS => String::from("radius"), + Self::COLOR => String::from("color"), + } + } +} diff --git a/src/datadogV1/model/model_scatterplot_table_request.rs b/src/datadogV1/model/model_scatterplot_table_request.rs new file mode 100644 index 000000000..47d3f8012 --- /dev/null +++ b/src/datadogV1/model/model_scatterplot_table_request.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scatterplot request containing formulas and functions. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScatterplotTableRequest { + /// List of Scatterplot formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, +} + +impl ScatterplotTableRequest { + pub fn new() -> ScatterplotTableRequest { + ScatterplotTableRequest { + formulas: None, + queries: None, + response_format: None, + } + } +} diff --git a/src/datadogV1/model/model_scatterplot_widget_aggregator.rs b/src/datadogV1/model/model_scatterplot_widget_aggregator.rs new file mode 100644 index 000000000..467877193 --- /dev/null +++ b/src/datadogV1/model/model_scatterplot_widget_aggregator.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScatterplotWidgetAggregator { + #[serde(rename = "avg")] + AVERAGE, + #[serde(rename = "last")] + LAST, + #[serde(rename = "max")] + MAXIMUM, + #[serde(rename = "min")] + MINIMUM, + #[serde(rename = "sum")] + SUM, +} + +impl ToString for ScatterplotWidgetAggregator { + fn to_string(&self) -> String { + match self { + Self::AVERAGE => String::from("avg"), + Self::LAST => String::from("last"), + Self::MAXIMUM => String::from("max"), + Self::MINIMUM => String::from("min"), + Self::SUM => String::from("sum"), + } + } +} diff --git a/src/datadogV1/model/model_scatterplot_widget_formula.rs b/src/datadogV1/model/model_scatterplot_widget_formula.rs new file mode 100644 index 000000000..83818db2b --- /dev/null +++ b/src/datadogV1/model/model_scatterplot_widget_formula.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Formula to be used in a Scatterplot widget query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScatterplotWidgetFormula { + /// Expression alias. + #[serde(rename = "alias")] + pub alias: Option, + /// Dimension of the Scatterplot. + #[serde(rename = "dimension")] + pub dimension: crate::datadogV1::model::ScatterplotDimension, + /// String expression built from queries, formulas, and functions. + #[serde(rename = "formula")] + pub formula: String, +} + +impl ScatterplotWidgetFormula { + pub fn new( + dimension: crate::datadogV1::model::ScatterplotDimension, + formula: String, + ) -> ScatterplotWidgetFormula { + ScatterplotWidgetFormula { + alias: None, + dimension, + formula, + } + } +} diff --git a/src/datadogV1/model/model_search_service_level_objective.rs b/src/datadogV1/model/model_search_service_level_objective.rs index 339600df8..f9bdbe6d2 100644 --- a/src/datadogV1/model/model_search_service_level_objective.rs +++ b/src/datadogV1/model/model_search_service_level_objective.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A service level objective data container. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchServiceLevelObjective { /// A service level objective ID and attributes. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_search_service_level_objective_attributes.rs b/src/datadogV1/model/model_search_service_level_objective_attributes.rs index c65912776..4e4a15f26 100644 --- a/src/datadogV1/model/model_search_service_level_objective_attributes.rs +++ b/src/datadogV1/model/model_search_service_level_objective_attributes.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, and `tags`). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchServiceLevelObjectiveAttributes { /// A list of tags associated with this service level objective. /// Always included in service level objective responses (but may be empty). diff --git a/src/datadogV1/model/model_search_service_level_objective_data.rs b/src/datadogV1/model/model_search_service_level_objective_data.rs index 90d93d2d1..0f98fd96c 100644 --- a/src/datadogV1/model/model_search_service_level_objective_data.rs +++ b/src/datadogV1/model/model_search_service_level_objective_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A service level objective ID and attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchServiceLevelObjectiveData { /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, and `tags`). diff --git a/src/datadogV1/model/model_search_slo_query.rs b/src/datadogV1/model/model_search_slo_query.rs index 6d4ec2f22..a51a6303a 100644 --- a/src/datadogV1/model/model_search_slo_query.rs +++ b/src/datadogV1/model/model_search_slo_query.rs @@ -8,7 +8,7 @@ use serde_with::skip_serializing_none; /// to be used because this will sum up all request counts instead of averaging them, or taking the max or /// min of all of those requests. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOQuery { /// A Datadog metric query for total (valid) events. #[serde(rename = "denominator")] diff --git a/src/datadogV1/model/model_search_slo_response.rs b/src/datadogV1/model/model_search_slo_response.rs index 8040eb594..221dd74e7 100644 --- a/src/datadogV1/model/model_search_slo_response.rs +++ b/src/datadogV1/model/model_search_slo_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A search SLO response containing results from the search query. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponse { /// Data from search SLO response. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_search_slo_response_data.rs b/src/datadogV1/model/model_search_slo_response_data.rs index 9a0f16f6e..edadeef27 100644 --- a/src/datadogV1/model/model_search_slo_response_data.rs +++ b/src/datadogV1/model/model_search_slo_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data from search SLO response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseData { /// Attributes #[serde(rename = "attributes")] diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes.rs b/src/datadogV1/model/model_search_slo_response_data_attributes.rs index a0960a7d1..307deb1ab 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseDataAttributes { /// Facets #[serde(rename = "facets")] diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs index 67ed2fa5b..edac1b9ee 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Facets #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseDataAttributesFacets { /// All tags associated with an SLO. #[serde(rename = "all_tags")] diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs index 74d284022..89265262b 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_int.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Facet #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseDataAttributesFacetsObjectInt { /// Count #[serde(rename = "count")] diff --git a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs index e397a0666..c9e3c31a9 100644 --- a/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs +++ b/src/datadogV1/model/model_search_slo_response_data_attributes_facets_object_string.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Facet #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseDataAttributesFacetsObjectString { /// Count #[serde(rename = "count")] diff --git a/src/datadogV1/model/model_search_slo_response_links.rs b/src/datadogV1/model/model_search_slo_response_links.rs index 0f993398c..51342b88c 100644 --- a/src/datadogV1/model/model_search_slo_response_links.rs +++ b/src/datadogV1/model/model_search_slo_response_links.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Pagination links. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseLinks { /// Link to last page. #[serde(rename = "first")] diff --git a/src/datadogV1/model/model_search_slo_response_meta.rs b/src/datadogV1/model/model_search_slo_response_meta.rs index 49e67bc43..428470511 100644 --- a/src/datadogV1/model/model_search_slo_response_meta.rs +++ b/src/datadogV1/model/model_search_slo_response_meta.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Searches metadata returned by the API. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseMeta { /// Pagination metadata returned by the API. #[serde(rename = "pagination")] diff --git a/src/datadogV1/model/model_search_slo_response_meta_page.rs b/src/datadogV1/model/model_search_slo_response_meta_page.rs index 8897783b8..4dd61dfee 100644 --- a/src/datadogV1/model/model_search_slo_response_meta_page.rs +++ b/src/datadogV1/model/model_search_slo_response_meta_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Pagination metadata returned by the API. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOResponseMetaPage { /// The first number. #[serde(rename = "first_number")] diff --git a/src/datadogV1/model/model_search_slo_threshold.rs b/src/datadogV1/model/model_search_slo_threshold.rs index 4e48b3bd0..2573d1864 100644 --- a/src/datadogV1/model/model_search_slo_threshold.rs +++ b/src/datadogV1/model/model_search_slo_threshold.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// SLO thresholds (target and optionally warning) for a single time window. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SearchSLOThreshold { /// The target value for the service level indicator within the corresponding /// timeframe. diff --git a/src/datadogV1/model/model_search_slo_timeframe.rs b/src/datadogV1/model/model_search_slo_timeframe.rs index 63e5de5c6..5710464c3 100644 --- a/src/datadogV1/model/model_search_slo_timeframe.rs +++ b/src/datadogV1/model/model_search_slo_timeframe.rs @@ -23,9 +23,3 @@ impl ToString for SearchSLOTimeframe { } } } - -impl Default for SearchSLOTimeframe { - fn default() -> SearchSLOTimeframe { - Self::SEVEN_DAYS - } -} diff --git a/src/datadogV1/model/model_selectable_template_variable_items.rs b/src/datadogV1/model/model_selectable_template_variable_items.rs new file mode 100644 index 000000000..ab5711b93 --- /dev/null +++ b/src/datadogV1/model/model_selectable_template_variable_items.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the template variable's name, associated tag/attribute, default value and selectable values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SelectableTemplateVariableItems { + /// The default value of the template variable. + #[serde(rename = "default_value")] + pub default_value: Option, + /// Name of the template variable. + #[serde(rename = "name")] + pub name: Option, + /// The tag/attribute key associated with the template variable. + #[serde(rename = "prefix")] + pub prefix: Option, + /// List of visible tag values on the shared dashboard. + #[serde( + rename = "visible_tags", + default, + with = "::serde_with::rust::double_option" + )] + pub visible_tags: Option>>, +} + +impl SelectableTemplateVariableItems { + pub fn new() -> SelectableTemplateVariableItems { + SelectableTemplateVariableItems { + default_value: None, + name: None, + prefix: None, + visible_tags: None, + } + } +} diff --git a/src/datadogV1/model/model_series.rs b/src/datadogV1/model/model_series.rs index e4e80a8bb..e0673b2f5 100644 --- a/src/datadogV1/model/model_series.rs +++ b/src/datadogV1/model/model_series.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// A metric to submit to Datadog. /// See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Series { /// The name of the host that produced the metric. #[serde(rename = "host")] diff --git a/src/datadogV1/model/model_service_check.rs b/src/datadogV1/model/model_service_check.rs index 634ba96e2..a2528b561 100644 --- a/src/datadogV1/model/model_service_check.rs +++ b/src/datadogV1/model/model_service_check.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object containing service check and status. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ServiceCheck { /// The check. #[serde(rename = "check")] diff --git a/src/datadogV1/model/model_service_check_status.rs b/src/datadogV1/model/model_service_check_status.rs index 6dd3d5468..3624a8bc7 100644 --- a/src/datadogV1/model/model_service_check_status.rs +++ b/src/datadogV1/model/model_service_check_status.rs @@ -25,9 +25,3 @@ impl ToString for ServiceCheckStatus { } } } - -impl Default for ServiceCheckStatus { - fn default() -> ServiceCheckStatus { - Self::OK - } -} diff --git a/src/datadogV1/model/model_service_level_objective.rs b/src/datadogV1/model/model_service_level_objective.rs index fba6b5c9b..a1ab44fda 100644 --- a/src/datadogV1/model/model_service_level_objective.rs +++ b/src/datadogV1/model/model_service_level_objective.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ServiceLevelObjective { /// Creation timestamp (UNIX time in seconds) /// diff --git a/src/datadogV1/model/model_service_level_objective_query.rs b/src/datadogV1/model/model_service_level_objective_query.rs index 2d1152341..225f08e4a 100644 --- a/src/datadogV1/model/model_service_level_objective_query.rs +++ b/src/datadogV1/model/model_service_level_objective_query.rs @@ -8,7 +8,7 @@ use serde_with::skip_serializing_none; /// to be used because this will sum up all request counts instead of averaging them, or taking the max or /// min of all of those requests. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ServiceLevelObjectiveQuery { /// A Datadog metric query for total (valid) events. #[serde(rename = "denominator")] diff --git a/src/datadogV1/model/model_service_level_objective_request.rs b/src/datadogV1/model/model_service_level_objective_request.rs index d09e44a2e..450c1b834 100644 --- a/src/datadogV1/model/model_service_level_objective_request.rs +++ b/src/datadogV1/model/model_service_level_objective_request.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ServiceLevelObjectiveRequest { /// A user-defined description of the service level objective. /// diff --git a/src/datadogV1/model/model_service_map_widget_definition.rs b/src/datadogV1/model/model_service_map_widget_definition.rs new file mode 100644 index 000000000..646025ae8 --- /dev/null +++ b/src/datadogV1/model/model_service_map_widget_definition.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// This widget displays a map of a service to all of the services that call it, and all of the services that it calls. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceMapWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Your environment and primary tag (or * if enabled for your account). + #[serde(rename = "filters")] + pub filters: Vec, + /// The ID of the service you want to map. + #[serde(rename = "service")] + pub service: String, + /// The title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the service map widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ServiceMapWidgetDefinitionType, +} + +impl ServiceMapWidgetDefinition { + pub fn new( + filters: Vec, + service: String, + type_: crate::datadogV1::model::ServiceMapWidgetDefinitionType, + ) -> ServiceMapWidgetDefinition { + ServiceMapWidgetDefinition { + custom_links: None, + filters, + service, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_service_map_widget_definition_type.rs b/src/datadogV1/model/model_service_map_widget_definition_type.rs new file mode 100644 index 000000000..40423c0e3 --- /dev/null +++ b/src/datadogV1/model/model_service_map_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceMapWidgetDefinitionType { + #[serde(rename = "servicemap")] + SERVICEMAP, +} + +impl ToString for ServiceMapWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::SERVICEMAP => String::from("servicemap"), + } + } +} diff --git a/src/datadogV1/model/model_service_summary_widget_definition.rs b/src/datadogV1/model/model_service_summary_widget_definition.rs new file mode 100644 index 000000000..b1057cd35 --- /dev/null +++ b/src/datadogV1/model/model_service_summary_widget_definition.rs @@ -0,0 +1,87 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The service summary displays the graphs of a chosen service in your screenboard. Only available on FREE layout dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceSummaryWidgetDefinition { + /// Number of columns to display. + #[serde(rename = "display_format")] + pub display_format: Option, + /// APM environment. + #[serde(rename = "env")] + pub env: String, + /// APM service. + #[serde(rename = "service")] + pub service: String, + /// Whether to show the latency breakdown or not. + #[serde(rename = "show_breakdown")] + pub show_breakdown: Option, + /// Whether to show the latency distribution or not. + #[serde(rename = "show_distribution")] + pub show_distribution: Option, + /// Whether to show the error metrics or not. + #[serde(rename = "show_errors")] + pub show_errors: Option, + /// Whether to show the hits metrics or not. + #[serde(rename = "show_hits")] + pub show_hits: Option, + /// Whether to show the latency metrics or not. + #[serde(rename = "show_latency")] + pub show_latency: Option, + /// Whether to show the resource list or not. + #[serde(rename = "show_resource_list")] + pub show_resource_list: Option, + /// Size of the widget. + #[serde(rename = "size_format")] + pub size_format: Option, + /// APM span name. + #[serde(rename = "span_name")] + pub span_name: String, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the service summary widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ServiceSummaryWidgetDefinitionType, +} + +impl ServiceSummaryWidgetDefinition { + pub fn new( + env: String, + service: String, + span_name: String, + type_: crate::datadogV1::model::ServiceSummaryWidgetDefinitionType, + ) -> ServiceSummaryWidgetDefinition { + ServiceSummaryWidgetDefinition { + display_format: None, + env, + service, + show_breakdown: None, + show_distribution: None, + show_errors: None, + show_hits: None, + show_latency: None, + show_resource_list: None, + size_format: None, + span_name, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_service_summary_widget_definition_type.rs b/src/datadogV1/model/model_service_summary_widget_definition_type.rs new file mode 100644 index 000000000..a82fda619 --- /dev/null +++ b/src/datadogV1/model/model_service_summary_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceSummaryWidgetDefinitionType { + #[serde(rename = "trace_service")] + TRACE_SERVICE, +} + +impl ToString for ServiceSummaryWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::TRACE_SERVICE => String::from("trace_service"), + } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard.rs b/src/datadogV1/model/model_shared_dashboard.rs new file mode 100644 index 000000000..2afc1303b --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard.rs @@ -0,0 +1,82 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata object associated with how a dashboard has been/will be shared. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboard { + /// User who shared the dashboard. + #[serde(rename = "author")] + pub author: Option>, + /// Date the dashboard was shared. + #[serde(rename = "created_at")] + pub created_at: Option, + /// ID of the dashboard to share. + #[serde(rename = "dashboard_id")] + pub dashboard_id: String, + /// The type of the associated private dashboard. + #[serde(rename = "dashboard_type")] + pub dashboard_type: crate::datadogV1::model::DashboardType, + /// Object containing the live span selection for the dashboard. + #[serde(rename = "global_time")] + pub global_time: Option>, + /// Whether to allow viewers to select a different global time setting for the shared dashboard. + #[serde( + rename = "global_time_selectable_enabled", + default, + with = "::serde_with::rust::double_option" + )] + pub global_time_selectable_enabled: Option>, + /// URL of the shared dashboard. + #[serde(rename = "public_url")] + pub public_url: Option, + /// List of objects representing template variables on the shared dashboard which can have selectable values. + #[serde( + rename = "selectable_template_vars", + default, + with = "::serde_with::rust::double_option" + )] + pub selectable_template_vars: + Option>>>, + /// List of email addresses that can receive an invitation to access to the shared dashboard. + #[serde( + rename = "share_list", + default, + with = "::serde_with::rust::double_option" + )] + pub share_list: Option>>, + /// Type of sharing access (either open to anyone who has the public URL or invite-only). + #[serde( + rename = "share_type", + default, + with = "::serde_with::rust::double_option" + )] + pub share_type: Option>, + /// A unique token assigned to the shared dashboard. + #[serde(rename = "token")] + pub token: Option, +} + +impl SharedDashboard { + pub fn new( + dashboard_id: String, + dashboard_type: crate::datadogV1::model::DashboardType, + ) -> SharedDashboard { + SharedDashboard { + author: None, + created_at: None, + dashboard_id, + dashboard_type, + global_time: None, + global_time_selectable_enabled: None, + public_url: None, + selectable_template_vars: None, + share_list: None, + share_type: None, + token: None, + } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_author.rs b/src/datadogV1/model/model_shared_dashboard_author.rs new file mode 100644 index 000000000..b73e057bd --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_author.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// User who shared the dashboard. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardAuthor { + /// Identifier of the user who shared the dashboard. + #[serde(rename = "handle")] + pub handle: Option, + /// Name of the user who shared the dashboard. + #[serde(rename = "name", default, with = "::serde_with::rust::double_option")] + pub name: Option>, +} + +impl SharedDashboardAuthor { + pub fn new() -> SharedDashboardAuthor { + SharedDashboardAuthor { + handle: None, + name: None, + } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_invites.rs b/src/datadogV1/model/model_shared_dashboard_invites.rs new file mode 100644 index 000000000..c590702da --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_invites.rs @@ -0,0 +1,25 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Invitations data and metadata that exists for a shared dashboard returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardInvites { + /// An object or list of objects containing the information for an invitation to a shared dashboard. + #[serde(rename = "data")] + pub data: Box, + /// Pagination metadata returned by the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SharedDashboardInvites { + pub fn new( + data: Box, + ) -> SharedDashboardInvites { + SharedDashboardInvites { data, meta: None } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data.rs b/src/datadogV1/model/model_shared_dashboard_invites_data.rs new file mode 100644 index 000000000..fe9f44993 --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_invites_data.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object or list of objects containing the information for an invitation to a shared dashboard. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SharedDashboardInvitesData { + SharedDashboardInvitesDataObject( + Box, + ), + SharedDashboardInvitesDataList( + Box>, + ), +} diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data_object.rs b/src/datadogV1/model/model_shared_dashboard_invites_data_object.rs new file mode 100644 index 000000000..ca4b3fbee --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_invites_data_object.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the information for an invitation to a shared dashboard. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardInvitesDataObject { + /// Attributes of the shared dashboard invitation + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type for shared dashboard invitation request body. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::DashboardInviteType, +} + +impl SharedDashboardInvitesDataObject { + pub fn new( + attributes: Box, + type_: crate::datadogV1::model::DashboardInviteType, + ) -> SharedDashboardInvitesDataObject { + SharedDashboardInvitesDataObject { attributes, type_ } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs b/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs new file mode 100644 index 000000000..b68f90c0d --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_invites_data_object_attributes.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the shared dashboard invitation +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardInvitesDataObjectAttributes { + /// When the invitation was sent. + #[serde(rename = "created_at")] + pub created_at: Option, + /// An email address that an invitation has been (or if used in invitation request, will be) sent to. + #[serde(rename = "email")] + pub email: Option, + /// Indicates whether an active session exists for the invitation (produced when a user clicks the link in the email). + #[serde(rename = "has_session")] + pub has_session: Option, + /// When the invitation expires. + #[serde(rename = "invitation_expiry")] + pub invitation_expiry: Option, + /// When the invited user's session expires. null if the invitation has no associated session. + #[serde( + rename = "session_expiry", + default, + with = "::serde_with::rust::double_option" + )] + pub session_expiry: Option>, + /// The unique token of the shared dashboard that was (or is to be) shared. + #[serde(rename = "share_token")] + pub share_token: Option, +} + +impl SharedDashboardInvitesDataObjectAttributes { + pub fn new() -> SharedDashboardInvitesDataObjectAttributes { + SharedDashboardInvitesDataObjectAttributes { + created_at: None, + email: None, + has_session: None, + invitation_expiry: None, + session_expiry: None, + share_token: None, + } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_invites_meta.rs b/src/datadogV1/model/model_shared_dashboard_invites_meta.rs new file mode 100644 index 000000000..f79a32c80 --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pagination metadata returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardInvitesMeta { + /// Object containing the total count of invitations across all pages + #[serde(rename = "page")] + pub page: Option>, +} + +impl SharedDashboardInvitesMeta { + pub fn new() -> SharedDashboardInvitesMeta { + SharedDashboardInvitesMeta { page: None } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs b/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs new file mode 100644 index 000000000..b1e327491 --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_invites_meta_page.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the total count of invitations across all pages +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardInvitesMetaPage { + /// The total number of invitations on this shared board, across all pages. + #[serde(rename = "total_count")] + pub total_count: Option, +} + +impl SharedDashboardInvitesMetaPage { + pub fn new() -> SharedDashboardInvitesMetaPage { + SharedDashboardInvitesMetaPage { total_count: None } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_update_request.rs b/src/datadogV1/model/model_shared_dashboard_update_request.rs new file mode 100644 index 000000000..7a62a5a59 --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_update_request.rs @@ -0,0 +1,57 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update a shared dashboard's settings. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardUpdateRequest { + /// Timeframe setting for the shared dashboard. + #[serde(rename = "global_time")] + pub global_time: Option>, + /// Whether to allow viewers to select a different global time setting for the shared dashboard. + #[serde( + rename = "global_time_selectable_enabled", + default, + with = "::serde_with::rust::double_option" + )] + pub global_time_selectable_enabled: Option>, + /// List of objects representing template variables on the shared dashboard which can have selectable values. + #[serde( + rename = "selectable_template_vars", + default, + with = "::serde_with::rust::double_option" + )] + pub selectable_template_vars: + Option>>>, + /// List of email addresses that can be given access to the shared dashboard. + #[serde( + rename = "share_list", + default, + with = "::serde_with::rust::double_option" + )] + pub share_list: Option>>, + /// Type of sharing access (either open to anyone who has the public URL or invite-only). + #[serde( + rename = "share_type", + default, + with = "::serde_with::rust::double_option" + )] + pub share_type: Option>, +} + +impl SharedDashboardUpdateRequest { + pub fn new( + global_time: Option>, + ) -> SharedDashboardUpdateRequest { + SharedDashboardUpdateRequest { + global_time, + global_time_selectable_enabled: None, + selectable_template_vars: None, + share_list: None, + share_type: None, + } + } +} diff --git a/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs b/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs new file mode 100644 index 000000000..3bf29688a --- /dev/null +++ b/src/datadogV1/model/model_shared_dashboard_update_request_global_time.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Timeframe setting for the shared dashboard. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SharedDashboardUpdateRequestGlobalTime { + /// Dashboard global time live_span selection + #[serde(rename = "live_span")] + pub live_span: Option, +} + +impl SharedDashboardUpdateRequestGlobalTime { + pub fn new() -> SharedDashboardUpdateRequestGlobalTime { + SharedDashboardUpdateRequestGlobalTime { live_span: None } + } +} diff --git a/src/datadogV1/model/model_signal_archive_reason.rs b/src/datadogV1/model/model_signal_archive_reason.rs index b64bc29ed..05ee3702a 100644 --- a/src/datadogV1/model/model_signal_archive_reason.rs +++ b/src/datadogV1/model/model_signal_archive_reason.rs @@ -29,9 +29,3 @@ impl ToString for SignalArchiveReason { } } } - -impl Default for SignalArchiveReason { - fn default() -> SignalArchiveReason { - Self::NONE - } -} diff --git a/src/datadogV1/model/model_signal_assignee_update_request.rs b/src/datadogV1/model/model_signal_assignee_update_request.rs index 9e61a7e87..c562c1c11 100644 --- a/src/datadogV1/model/model_signal_assignee_update_request.rs +++ b/src/datadogV1/model/model_signal_assignee_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes describing an assignee update operation over a security signal. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SignalAssigneeUpdateRequest { /// The UUID of the user being assigned. Use empty string to return signal to unassigned. #[serde(rename = "assignee")] diff --git a/src/datadogV1/model/model_signal_state_update_request.rs b/src/datadogV1/model/model_signal_state_update_request.rs index 080a882a8..f19966a74 100644 --- a/src/datadogV1/model/model_signal_state_update_request.rs +++ b/src/datadogV1/model/model_signal_state_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes describing the change of state for a given state. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SignalStateUpdateRequest { /// Optional comment to explain why a signal is being archived. #[serde(rename = "archiveComment")] diff --git a/src/datadogV1/model/model_signal_triage_state.rs b/src/datadogV1/model/model_signal_triage_state.rs index 30b682d3d..a0672106a 100644 --- a/src/datadogV1/model/model_signal_triage_state.rs +++ b/src/datadogV1/model/model_signal_triage_state.rs @@ -23,9 +23,3 @@ impl ToString for SignalTriageState { } } } - -impl Default for SignalTriageState { - fn default() -> SignalTriageState { - Self::OPEN - } -} diff --git a/src/datadogV1/model/model_slack_integration_channel.rs b/src/datadogV1/model/model_slack_integration_channel.rs index b52788096..c2b0a725b 100644 --- a/src/datadogV1/model/model_slack_integration_channel.rs +++ b/src/datadogV1/model/model_slack_integration_channel.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The Slack channel configuration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SlackIntegrationChannel { /// Configuration options for what is shown in an alert event message. #[serde(rename = "display")] diff --git a/src/datadogV1/model/model_slack_integration_channel_display.rs b/src/datadogV1/model/model_slack_integration_channel_display.rs index 1ad866b00..241c0cda2 100644 --- a/src/datadogV1/model/model_slack_integration_channel_display.rs +++ b/src/datadogV1/model/model_slack_integration_channel_display.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Configuration options for what is shown in an alert event message. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SlackIntegrationChannelDisplay { /// Show the main body of the alert event. #[serde(rename = "message")] diff --git a/src/datadogV1/model/model_slo_bulk_delete_error.rs b/src/datadogV1/model/model_slo_bulk_delete_error.rs index 7b84b020a..71320070f 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_error.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_error.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object describing the error. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOBulkDeleteError { /// The ID of the service level objective object associated with /// this error. diff --git a/src/datadogV1/model/model_slo_bulk_delete_response.rs b/src/datadogV1/model/model_slo_bulk_delete_response.rs index effef547c..224017a07 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_response.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_response.rs @@ -11,7 +11,7 @@ use serde_with::skip_serializing_none; /// it may be partially successful. In such cases, the "data" and "error" /// fields in this response indicate which deletions succeeded and failed. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOBulkDeleteResponse { /// An array of service level objective objects. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_bulk_delete_response_data.rs b/src/datadogV1/model/model_slo_bulk_delete_response_data.rs index e4c569ac3..9f34d6b53 100644 --- a/src/datadogV1/model/model_slo_bulk_delete_response_data.rs +++ b/src/datadogV1/model/model_slo_bulk_delete_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An array of service level objective objects. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOBulkDeleteResponseData { /// An array of service level objective object IDs that indicates /// which objects that were completely deleted. diff --git a/src/datadogV1/model/model_slo_correction.rs b/src/datadogV1/model/model_slo_correction.rs index 557b10299..e4174a725 100644 --- a/src/datadogV1/model/model_slo_correction.rs +++ b/src/datadogV1/model/model_slo_correction.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The response object of a list of SLO corrections. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrection { /// The attribute object associated with the SLO correction. #[serde(rename = "attributes")] diff --git a/src/datadogV1/model/model_slo_correction_category.rs b/src/datadogV1/model/model_slo_correction_category.rs index 4c91babdb..c4a07bc07 100644 --- a/src/datadogV1/model/model_slo_correction_category.rs +++ b/src/datadogV1/model/model_slo_correction_category.rs @@ -26,9 +26,3 @@ impl ToString for SLOCorrectionCategory { } } } - -impl Default for SLOCorrectionCategory { - fn default() -> SLOCorrectionCategory { - Self::SCHEDULED_MAINTENANCE - } -} diff --git a/src/datadogV1/model/model_slo_correction_create_data.rs b/src/datadogV1/model/model_slo_correction_create_data.rs index 39f79cd5e..5811d1ec3 100644 --- a/src/datadogV1/model/model_slo_correction_create_data.rs +++ b/src/datadogV1/model/model_slo_correction_create_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The data object associated with the SLO correction to be created. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionCreateData { /// The attribute object associated with the SLO correction to be created. #[serde(rename = "attributes")] diff --git a/src/datadogV1/model/model_slo_correction_create_request.rs b/src/datadogV1/model/model_slo_correction_create_request.rs index 288c8c613..a664885ab 100644 --- a/src/datadogV1/model/model_slo_correction_create_request.rs +++ b/src/datadogV1/model/model_slo_correction_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object that defines a correction to be applied to an SLO. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionCreateRequest { /// The data object associated with the SLO correction to be created. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_correction_create_request_attributes.rs b/src/datadogV1/model/model_slo_correction_create_request_attributes.rs index 20353a800..3b15c579f 100644 --- a/src/datadogV1/model/model_slo_correction_create_request_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_create_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attribute object associated with the SLO correction to be created. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionCreateRequestAttributes { /// Category the SLO correction belongs to. #[serde(rename = "category")] diff --git a/src/datadogV1/model/model_slo_correction_list_response.rs b/src/datadogV1/model/model_slo_correction_list_response.rs index 07fab7de1..28a8228f9 100644 --- a/src/datadogV1/model/model_slo_correction_list_response.rs +++ b/src/datadogV1/model/model_slo_correction_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A list of SLO correction objects. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionListResponse { /// The list of of SLO corrections objects. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_correction_response.rs b/src/datadogV1/model/model_slo_correction_response.rs index d16c93ab4..3fc15f2f7 100644 --- a/src/datadogV1/model/model_slo_correction_response.rs +++ b/src/datadogV1/model/model_slo_correction_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The response object of an SLO correction. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionResponse { /// The response object of a list of SLO corrections. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_correction_response_attributes.rs b/src/datadogV1/model/model_slo_correction_response_attributes.rs index 385cf86e1..f73d71be8 100644 --- a/src/datadogV1/model/model_slo_correction_response_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attribute object associated with the SLO correction. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionResponseAttributes { /// Category the SLO correction belongs to. #[serde(rename = "category")] diff --git a/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs b/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs index 18e2d8512..674ec6540 100644 --- a/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs +++ b/src/datadogV1/model/model_slo_correction_response_attributes_modifier.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Modifier of the object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionResponseAttributesModifier { /// Email of the Modifier. #[serde(rename = "email")] diff --git a/src/datadogV1/model/model_slo_correction_type.rs b/src/datadogV1/model/model_slo_correction_type.rs index ff8a81156..92c40c920 100644 --- a/src/datadogV1/model/model_slo_correction_type.rs +++ b/src/datadogV1/model/model_slo_correction_type.rs @@ -17,9 +17,3 @@ impl ToString for SLOCorrectionType { } } } - -impl Default for SLOCorrectionType { - fn default() -> SLOCorrectionType { - Self::CORRECTION - } -} diff --git a/src/datadogV1/model/model_slo_correction_update_data.rs b/src/datadogV1/model/model_slo_correction_update_data.rs index 68987d35d..091cbbd43 100644 --- a/src/datadogV1/model/model_slo_correction_update_data.rs +++ b/src/datadogV1/model/model_slo_correction_update_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The data object associated with the SLO correction to be updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionUpdateData { /// The attribute object associated with the SLO correction to be updated. #[serde(rename = "attributes")] diff --git a/src/datadogV1/model/model_slo_correction_update_request.rs b/src/datadogV1/model/model_slo_correction_update_request.rs index bc732fefb..247931e3d 100644 --- a/src/datadogV1/model/model_slo_correction_update_request.rs +++ b/src/datadogV1/model/model_slo_correction_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object that defines a correction to be applied to an SLO. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionUpdateRequest { /// The data object associated with the SLO correction to be updated. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_correction_update_request_attributes.rs b/src/datadogV1/model/model_slo_correction_update_request_attributes.rs index d4473171d..06fc4983f 100644 --- a/src/datadogV1/model/model_slo_correction_update_request_attributes.rs +++ b/src/datadogV1/model/model_slo_correction_update_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attribute object associated with the SLO correction to be updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCorrectionUpdateRequestAttributes { /// Category the SLO correction belongs to. #[serde(rename = "category")] diff --git a/src/datadogV1/model/model_slo_creator.rs b/src/datadogV1/model/model_slo_creator.rs index b4b505dc2..38cdcd156 100644 --- a/src/datadogV1/model/model_slo_creator.rs +++ b/src/datadogV1/model/model_slo_creator.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The creator of the SLO #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOCreator { /// Email of the creator. #[serde(rename = "email")] diff --git a/src/datadogV1/model/model_slo_delete_response.rs b/src/datadogV1/model/model_slo_delete_response.rs index 7af3e10cc..5f133cb73 100644 --- a/src/datadogV1/model/model_slo_delete_response.rs +++ b/src/datadogV1/model/model_slo_delete_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A response list of all service level objective deleted. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLODeleteResponse { /// An array containing the ID of the deleted service level objective object. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_error_timeframe.rs b/src/datadogV1/model/model_slo_error_timeframe.rs index c79936596..19c1074e0 100644 --- a/src/datadogV1/model/model_slo_error_timeframe.rs +++ b/src/datadogV1/model/model_slo_error_timeframe.rs @@ -26,9 +26,3 @@ impl ToString for SLOErrorTimeframe { } } } - -impl Default for SLOErrorTimeframe { - fn default() -> SLOErrorTimeframe { - Self::SEVEN_DAYS - } -} diff --git a/src/datadogV1/model/model_slo_history_metrics.rs b/src/datadogV1/model/model_slo_history_metrics.rs index 9b239cfb7..84bd524a1 100644 --- a/src/datadogV1/model/model_slo_history_metrics.rs +++ b/src/datadogV1/model/model_slo_history_metrics.rs @@ -8,7 +8,7 @@ use serde_with::skip_serializing_none; /// /// This is not included in responses for `monitor` based SLOs. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryMetrics { /// A representation of `metric` based SLO time series for the provided queries. /// This is the same response type from `batch_query` endpoint. @@ -40,19 +40,19 @@ pub struct SLOHistoryMetrics { impl SLOHistoryMetrics { pub fn new( - denominator: crate::datadogV1::model::SLOHistoryMetricsSeries, + denominator: Box, interval: i64, - numerator: crate::datadogV1::model::SLOHistoryMetricsSeries, + numerator: Box, query: String, res_type: String, resp_version: i64, times: Vec, ) -> SLOHistoryMetrics { SLOHistoryMetrics { - denominator: Box::new(denominator), + denominator, interval, message: None, - numerator: Box::new(numerator), + numerator, query, res_type, resp_version, diff --git a/src/datadogV1/model/model_slo_history_metrics_series.rs b/src/datadogV1/model/model_slo_history_metrics_series.rs index 8a585b2c2..64ef1e2bf 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// A representation of `metric` based SLO time series for the provided queries. /// This is the same response type from `batch_query` endpoint. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryMetricsSeries { /// Count of submitted metrics. #[serde(rename = "count")] diff --git a/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs b/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs index e401bc25b..b41786448 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Query metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryMetricsSeriesMetadata { /// Query aggregator function. #[serde(rename = "aggr")] diff --git a/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs b/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs index 59d35ff2a..ef5a8fb78 100644 --- a/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs +++ b/src/datadogV1/model/model_slo_history_metrics_series_metadata_unit.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An Object of metric units. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryMetricsSeriesMetadataUnit { /// The family of metric unit, for example `bytes` is the family for `kibibyte`, `byte`, and `bit` units. #[serde(rename = "family")] diff --git a/src/datadogV1/model/model_slo_history_monitor.rs b/src/datadogV1/model/model_slo_history_monitor.rs index 575a5c7df..d7a232232 100644 --- a/src/datadogV1/model/model_slo_history_monitor.rs +++ b/src/datadogV1/model/model_slo_history_monitor.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. /// This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryMonitor { /// A mapping of threshold `timeframe` to the remaining error budget. #[serde(rename = "error_budget_remaining")] diff --git a/src/datadogV1/model/model_slo_history_response.rs b/src/datadogV1/model/model_slo_history_response.rs index b1392567e..7bb3007c3 100644 --- a/src/datadogV1/model/model_slo_history_response.rs +++ b/src/datadogV1/model/model_slo_history_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A service level objective history response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryResponse { /// An array of service level objective objects. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_history_response_data.rs b/src/datadogV1/model/model_slo_history_response_data.rs index 4075a1292..99e23cbf2 100644 --- a/src/datadogV1/model/model_slo_history_response_data.rs +++ b/src/datadogV1/model/model_slo_history_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An array of service level objective objects. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryResponseData { /// The `from` timestamp in epoch seconds. #[serde(rename = "from_ts")] diff --git a/src/datadogV1/model/model_slo_history_response_error.rs b/src/datadogV1/model/model_slo_history_response_error.rs index 409c705c3..364bbc777 100644 --- a/src/datadogV1/model/model_slo_history_response_error.rs +++ b/src/datadogV1/model/model_slo_history_response_error.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A list of errors while querying the history data for the service level objective. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryResponseError { /// Human readable error. #[serde(rename = "error")] diff --git a/src/datadogV1/model/model_slo_history_response_error_with_type.rs b/src/datadogV1/model/model_slo_history_response_error_with_type.rs index ffd2a77bb..3a3d93e8b 100644 --- a/src/datadogV1/model/model_slo_history_response_error_with_type.rs +++ b/src/datadogV1/model/model_slo_history_response_error_with_type.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An object describing the error with error type and error message. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistoryResponseErrorWithType { /// A message with more details about the error. #[serde(rename = "error_message")] diff --git a/src/datadogV1/model/model_slo_history_sli_data.rs b/src/datadogV1/model/model_slo_history_sli_data.rs index 3f226d06e..d1d1a921c 100644 --- a/src/datadogV1/model/model_slo_history_sli_data.rs +++ b/src/datadogV1/model/model_slo_history_sli_data.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. /// This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOHistorySLIData { /// A mapping of threshold `timeframe` to the remaining error budget. #[serde(rename = "error_budget_remaining")] diff --git a/src/datadogV1/model/model_slo_list_response.rs b/src/datadogV1/model/model_slo_list_response.rs index a1636a8b6..492804c57 100644 --- a/src/datadogV1/model/model_slo_list_response.rs +++ b/src/datadogV1/model/model_slo_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A response with one or more service level objective. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOListResponse { /// An array of service level objective objects. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_slo_list_response_metadata.rs b/src/datadogV1/model/model_slo_list_response_metadata.rs index 4223113c1..af63735c0 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata object containing additional information about the list of SLOs. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOListResponseMetadata { /// The object containing information about the pages of the list of SLOs. #[serde(rename = "page")] diff --git a/src/datadogV1/model/model_slo_list_response_metadata_page.rs b/src/datadogV1/model/model_slo_list_response_metadata_page.rs index e64ca6ae1..22da30088 100644 --- a/src/datadogV1/model/model_slo_list_response_metadata_page.rs +++ b/src/datadogV1/model/model_slo_list_response_metadata_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing information about the pages of the list of SLOs. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOListResponseMetadataPage { /// The total number of resources that could be retrieved ignoring the parameters and filters in the request. #[serde(rename = "total_count")] diff --git a/src/datadogV1/model/model_slo_list_widget_definition.rs b/src/datadogV1/model/model_slo_list_widget_definition.rs new file mode 100644 index 000000000..b82ffd4dc --- /dev/null +++ b/src/datadogV1/model/model_slo_list_widget_definition.rs @@ -0,0 +1,41 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use the SLO List widget to track your SLOs (Service Level Objectives) on dashboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SLOListWidgetDefinition { + /// Array of one request object to display in the widget. + #[serde(rename = "requests")] + pub requests: Vec, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the SLO List widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SLOListWidgetDefinitionType, +} + +impl SLOListWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::SLOListWidgetDefinitionType, + ) -> SLOListWidgetDefinition { + SLOListWidgetDefinition { + requests, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_slo_list_widget_definition_type.rs b/src/datadogV1/model/model_slo_list_widget_definition_type.rs new file mode 100644 index 000000000..9d550aa6c --- /dev/null +++ b/src/datadogV1/model/model_slo_list_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SLOListWidgetDefinitionType { + #[serde(rename = "slo_list")] + SLO_LIST, +} + +impl ToString for SLOListWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::SLO_LIST => String::from("slo_list"), + } + } +} diff --git a/src/datadogV1/model/model_slo_list_widget_query.rs b/src/datadogV1/model/model_slo_list_widget_query.rs new file mode 100644 index 000000000..740947f96 --- /dev/null +++ b/src/datadogV1/model/model_slo_list_widget_query.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated SLO List widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SLOListWidgetQuery { + /// Maximum number of results to display in the table. + #[serde(rename = "limit")] + pub limit: Option, + /// Widget query. + #[serde(rename = "query_string")] + pub query_string: String, + /// Options for sorting results. + #[serde(rename = "sort")] + pub sort: Option>, +} + +impl SLOListWidgetQuery { + pub fn new(query_string: String) -> SLOListWidgetQuery { + SLOListWidgetQuery { + limit: None, + query_string, + sort: None, + } + } +} diff --git a/src/datadogV1/model/model_slo_list_widget_request.rs b/src/datadogV1/model/model_slo_list_widget_request.rs new file mode 100644 index 000000000..4fc1e4a66 --- /dev/null +++ b/src/datadogV1/model/model_slo_list_widget_request.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated SLO List widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SLOListWidgetRequest { + /// Updated SLO List widget. + #[serde(rename = "query")] + pub query: Box, + /// Widget request type. + #[serde(rename = "request_type")] + pub request_type: crate::datadogV1::model::SLOListWidgetRequestType, +} + +impl SLOListWidgetRequest { + pub fn new( + query: Box, + request_type: crate::datadogV1::model::SLOListWidgetRequestType, + ) -> SLOListWidgetRequest { + SLOListWidgetRequest { + query, + request_type, + } + } +} diff --git a/src/datadogV1/model/model_slo_list_widget_request_type.rs b/src/datadogV1/model/model_slo_list_widget_request_type.rs new file mode 100644 index 000000000..ea68f2687 --- /dev/null +++ b/src/datadogV1/model/model_slo_list_widget_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SLOListWidgetRequestType { + #[serde(rename = "slo_list")] + SLO_LIST, +} + +impl ToString for SLOListWidgetRequestType { + fn to_string(&self) -> String { + match self { + Self::SLO_LIST => String::from("slo_list"), + } + } +} diff --git a/src/datadogV1/model/model_slo_overall_statuses.rs b/src/datadogV1/model/model_slo_overall_statuses.rs index adad4510b..2fe2f1c83 100644 --- a/src/datadogV1/model/model_slo_overall_statuses.rs +++ b/src/datadogV1/model/model_slo_overall_statuses.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Overall status of the SLO by timeframes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOOverallStatuses { /// Error message if SLO status or error budget could not be calculated. #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] diff --git a/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs b/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs index 244a46a4c..39bd093c0 100644 --- a/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs +++ b/src/datadogV1/model/model_slo_raw_error_budget_remaining.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Error budget remaining for an SLO. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLORawErrorBudgetRemaining { /// Error budget remaining unit. #[serde(rename = "unit")] diff --git a/src/datadogV1/model/model_slo_response.rs b/src/datadogV1/model/model_slo_response.rs index 89cddd1dc..07c85fe22 100644 --- a/src/datadogV1/model/model_slo_response.rs +++ b/src/datadogV1/model/model_slo_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A service level objective response containing a single service level objective. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOResponse { /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.). diff --git a/src/datadogV1/model/model_slo_response_data.rs b/src/datadogV1/model/model_slo_response_data.rs index 161b665ab..424e7c7d4 100644 --- a/src/datadogV1/model/model_slo_response_data.rs +++ b/src/datadogV1/model/model_slo_response_data.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// A service level objective object includes a service level indicator, thresholds /// for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOResponseData { /// A list of SLO monitors IDs that reference this SLO. This field is returned only when `with_configured_alert_ids` parameter is true in query. #[serde(rename = "configured_alert_ids")] diff --git a/src/datadogV1/model/model_slo_state.rs b/src/datadogV1/model/model_slo_state.rs index a4e9fa92e..ebfa2ec69 100644 --- a/src/datadogV1/model/model_slo_state.rs +++ b/src/datadogV1/model/model_slo_state.rs @@ -26,9 +26,3 @@ impl ToString for SLOState { } } } - -impl Default for SLOState { - fn default() -> SLOState { - Self::BREACHED - } -} diff --git a/src/datadogV1/model/model_slo_status.rs b/src/datadogV1/model/model_slo_status.rs index 41f3c0471..93b94a9bd 100644 --- a/src/datadogV1/model/model_slo_status.rs +++ b/src/datadogV1/model/model_slo_status.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Status of the SLO's primary timeframe. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOStatus { /// Error message if SLO status or error budget could not be calculated. #[serde( diff --git a/src/datadogV1/model/model_slo_threshold.rs b/src/datadogV1/model/model_slo_threshold.rs index a69e5befb..d52c4ce60 100644 --- a/src/datadogV1/model/model_slo_threshold.rs +++ b/src/datadogV1/model/model_slo_threshold.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// SLO thresholds (target and optionally warning) for a single time window. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SLOThreshold { /// The target value for the service level indicator within the corresponding /// timeframe. diff --git a/src/datadogV1/model/model_slo_timeframe.rs b/src/datadogV1/model/model_slo_timeframe.rs index a4a93e4bd..c3e89eeaf 100644 --- a/src/datadogV1/model/model_slo_timeframe.rs +++ b/src/datadogV1/model/model_slo_timeframe.rs @@ -26,9 +26,3 @@ impl ToString for SLOTimeframe { } } } - -impl Default for SLOTimeframe { - fn default() -> SLOTimeframe { - Self::SEVEN_DAYS - } -} diff --git a/src/datadogV1/model/model_slo_type.rs b/src/datadogV1/model/model_slo_type.rs index f61e39a95..50722d129 100644 --- a/src/datadogV1/model/model_slo_type.rs +++ b/src/datadogV1/model/model_slo_type.rs @@ -20,9 +20,3 @@ impl ToString for SLOType { } } } - -impl Default for SLOType { - fn default() -> SLOType { - Self::METRIC - } -} diff --git a/src/datadogV1/model/model_slo_type_numeric.rs b/src/datadogV1/model/model_slo_type_numeric.rs index e43ab8c6a..2303caacb 100644 --- a/src/datadogV1/model/model_slo_type_numeric.rs +++ b/src/datadogV1/model/model_slo_type_numeric.rs @@ -21,9 +21,3 @@ impl ToString for SLOTypeNumeric { } } } - -impl Default for SLOTypeNumeric { - fn default() -> SLOTypeNumeric { - Self::MONITOR - } -} diff --git a/src/datadogV1/model/model_slo_widget_definition.rs b/src/datadogV1/model/model_slo_widget_definition.rs new file mode 100644 index 000000000..ad483fae0 --- /dev/null +++ b/src/datadogV1/model/model_slo_widget_definition.rs @@ -0,0 +1,65 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Use the SLO and uptime widget to track your SLOs (Service Level Objectives) and uptime on screenboards and timeboards. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SLOWidgetDefinition { + /// Additional filters applied to the SLO query. + #[serde(rename = "additional_query_filters")] + pub additional_query_filters: Option, + /// Defined global time target. + #[serde(rename = "global_time_target")] + pub global_time_target: Option, + /// Defined error budget. + #[serde(rename = "show_error_budget")] + pub show_error_budget: Option, + /// ID of the SLO displayed. + #[serde(rename = "slo_id")] + pub slo_id: Option, + /// Times being monitored. + #[serde(rename = "time_windows")] + pub time_windows: Option>, + /// Title of the widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the SLO widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SLOWidgetDefinitionType, + /// Define how you want the SLO to be displayed. + #[serde(rename = "view_mode")] + pub view_mode: Option, + /// Type of view displayed by the widget. + #[serde(rename = "view_type")] + pub view_type: String, +} + +impl SLOWidgetDefinition { + pub fn new( + type_: crate::datadogV1::model::SLOWidgetDefinitionType, + view_type: String, + ) -> SLOWidgetDefinition { + SLOWidgetDefinition { + additional_query_filters: None, + global_time_target: None, + show_error_budget: None, + slo_id: None, + time_windows: None, + title: None, + title_align: None, + title_size: None, + type_, + view_mode: None, + view_type, + } + } +} diff --git a/src/datadogV1/model/model_slo_widget_definition_type.rs b/src/datadogV1/model/model_slo_widget_definition_type.rs new file mode 100644 index 000000000..94f3ca421 --- /dev/null +++ b/src/datadogV1/model/model_slo_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SLOWidgetDefinitionType { + #[serde(rename = "slo")] + SLO, +} + +impl ToString for SLOWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::SLO => String::from("slo"), + } + } +} diff --git a/src/datadogV1/model/model_split_config.rs b/src/datadogV1/model/model_split_config.rs new file mode 100644 index 000000000..dcc3b5ca5 --- /dev/null +++ b/src/datadogV1/model/model_split_config.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Encapsulates all user choices about how to split a graph. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SplitConfig { + /// Maximum number of graphs to display in the widget. + #[serde(rename = "limit")] + pub limit: i64, + /// Controls the order in which graphs appear in the split. + #[serde(rename = "sort")] + pub sort: Box, + /// The dimension(s) on which to split the graph + #[serde(rename = "split_dimensions")] + pub split_dimensions: Vec, + /// Manual selection of tags making split graph widget static + #[serde(rename = "static_splits")] + pub static_splits: Option>>, +} + +impl SplitConfig { + pub fn new( + limit: i64, + sort: Box, + split_dimensions: Vec, + ) -> SplitConfig { + SplitConfig { + limit, + sort, + split_dimensions, + static_splits: None, + } + } +} diff --git a/src/datadogV1/model/model_split_config_sort_compute.rs b/src/datadogV1/model/model_split_config_sort_compute.rs new file mode 100644 index 000000000..76363d12b --- /dev/null +++ b/src/datadogV1/model/model_split_config_sort_compute.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Defines the metric and aggregation used as the sort value. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SplitConfigSortCompute { + /// How to aggregate the sort metric for the purposes of ordering. + #[serde(rename = "aggregation")] + pub aggregation: String, + /// The metric to use for sorting graphs. + #[serde(rename = "metric")] + pub metric: String, +} + +impl SplitConfigSortCompute { + pub fn new(aggregation: String, metric: String) -> SplitConfigSortCompute { + SplitConfigSortCompute { + aggregation, + metric, + } + } +} diff --git a/src/datadogV1/model/model_split_dimension.rs b/src/datadogV1/model/model_split_dimension.rs new file mode 100644 index 000000000..21b8001ab --- /dev/null +++ b/src/datadogV1/model/model_split_dimension.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The property by which the graph splits +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SplitDimension { + /// The system interprets this attribute differently depending on the data source of the query being split. For metrics, it's a tag. For the events platform, it's an attribute or tag. + #[serde(rename = "one_graph_per")] + pub one_graph_per: String, +} + +impl SplitDimension { + pub fn new(one_graph_per: String) -> SplitDimension { + SplitDimension { one_graph_per } + } +} diff --git a/src/datadogV1/model/model_split_graph_source_widget_definition.rs b/src/datadogV1/model/model_split_graph_source_widget_definition.rs new file mode 100644 index 000000000..a80777657 --- /dev/null +++ b/src/datadogV1/model/model_split_graph_source_widget_definition.rs @@ -0,0 +1,19 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The original widget we are splitting on. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SplitGraphSourceWidgetDefinition { + ChangeWidgetDefinition(Box), + GeomapWidgetDefinition(Box), + QueryValueWidgetDefinition(Box), + ScatterPlotWidgetDefinition(Box), + SunburstWidgetDefinition(Box), + TableWidgetDefinition(Box), + TimeseriesWidgetDefinition(Box), + ToplistWidgetDefinition(Box), + TreeMapWidgetDefinition(Box), +} diff --git a/src/datadogV1/model/model_split_graph_viz_size.rs b/src/datadogV1/model/model_split_graph_viz_size.rs new file mode 100644 index 000000000..edd481b54 --- /dev/null +++ b/src/datadogV1/model/model_split_graph_viz_size.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SplitGraphVizSize { + #[serde(rename = "xs")] + XS, + #[serde(rename = "sm")] + SM, + #[serde(rename = "md")] + MD, + #[serde(rename = "lg")] + LG, +} + +impl ToString for SplitGraphVizSize { + fn to_string(&self) -> String { + match self { + Self::XS => String::from("xs"), + Self::SM => String::from("sm"), + Self::MD => String::from("md"), + Self::LG => String::from("lg"), + } + } +} diff --git a/src/datadogV1/model/model_split_graph_widget_definition.rs b/src/datadogV1/model/model_split_graph_widget_definition.rs new file mode 100644 index 000000000..c219235b3 --- /dev/null +++ b/src/datadogV1/model/model_split_graph_widget_definition.rs @@ -0,0 +1,52 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The split graph widget allows you to create repeating units of a graph - one for each value in a group (for example: one per service) +/// +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SplitGraphWidgetDefinition { + /// Normalize y axes across graphs + #[serde(rename = "has_uniform_y_axes")] + pub has_uniform_y_axes: Option, + /// Size of the individual graphs in the split. + #[serde(rename = "size")] + pub size: crate::datadogV1::model::SplitGraphVizSize, + /// The original widget we are splitting on. + #[serde(rename = "source_widget_definition")] + pub source_widget_definition: Box, + /// Encapsulates all user choices about how to split a graph. + #[serde(rename = "split_config")] + pub split_config: Box, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// Type of the split graph widget + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SplitGraphWidgetDefinitionType, +} + +impl SplitGraphWidgetDefinition { + pub fn new( + size: crate::datadogV1::model::SplitGraphVizSize, + source_widget_definition: Box, + split_config: Box, + type_: crate::datadogV1::model::SplitGraphWidgetDefinitionType, + ) -> SplitGraphWidgetDefinition { + SplitGraphWidgetDefinition { + has_uniform_y_axes: None, + size, + source_widget_definition, + split_config, + time: None, + title: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_split_graph_widget_definition_type.rs b/src/datadogV1/model/model_split_graph_widget_definition_type.rs new file mode 100644 index 000000000..763e55baf --- /dev/null +++ b/src/datadogV1/model/model_split_graph_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SplitGraphWidgetDefinitionType { + #[serde(rename = "split_group")] + SPLIT_GROUP, +} + +impl ToString for SplitGraphWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::SPLIT_GROUP => String::from("split_group"), + } + } +} diff --git a/src/datadogV1/model/model_split_sort.rs b/src/datadogV1/model/model_split_sort.rs new file mode 100644 index 000000000..0da04465f --- /dev/null +++ b/src/datadogV1/model/model_split_sort.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Controls the order in which graphs appear in the split. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SplitSort { + /// Defines the metric and aggregation used as the sort value. + #[serde(rename = "compute")] + pub compute: Option>, + /// Widget sorting methods. + #[serde(rename = "order")] + pub order: crate::datadogV1::model::WidgetSort, +} + +impl SplitSort { + pub fn new(order: crate::datadogV1::model::WidgetSort) -> SplitSort { + SplitSort { + compute: None, + order, + } + } +} diff --git a/src/datadogV1/model/model_split_vector_entry_item.rs b/src/datadogV1/model/model_split_vector_entry_item.rs new file mode 100644 index 000000000..ef2bee066 --- /dev/null +++ b/src/datadogV1/model/model_split_vector_entry_item.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The split graph list contains a graph for each value of the split dimension. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SplitVectorEntryItem { + /// The tag key. + #[serde(rename = "tag_key")] + pub tag_key: String, + /// The tag values. + #[serde(rename = "tag_values")] + pub tag_values: Vec, +} + +impl SplitVectorEntryItem { + pub fn new(tag_key: String, tag_values: Vec) -> SplitVectorEntryItem { + SplitVectorEntryItem { + tag_key, + tag_values, + } + } +} diff --git a/src/datadogV1/model/model_successful_signal_update_response.rs b/src/datadogV1/model/model_successful_signal_update_response.rs index 82e08cb12..b3ad04928 100644 --- a/src/datadogV1/model/model_successful_signal_update_response.rs +++ b/src/datadogV1/model/model_successful_signal_update_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Updated signal data following a successfully performed update. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SuccessfulSignalUpdateResponse { /// Status of the response. #[serde(rename = "status")] diff --git a/src/datadogV1/model/model_sunburst_widget_definition.rs b/src/datadogV1/model/model_sunburst_widget_definition.rs new file mode 100644 index 000000000..0733158a5 --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_definition.rs @@ -0,0 +1,57 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Sunbursts are spot on to highlight how groups contribute to the total of a query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SunburstWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Show the total value in this widget. + #[serde(rename = "hide_total")] + pub hide_total: Option, + /// Configuration of the legend. + #[serde(rename = "legend")] + pub legend: Option>, + /// List of sunburst widget requests. + #[serde(rename = "requests")] + pub requests: Vec, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the Sunburst widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SunburstWidgetDefinitionType, +} + +impl SunburstWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::SunburstWidgetDefinitionType, + ) -> SunburstWidgetDefinition { + SunburstWidgetDefinition { + custom_links: None, + hide_total: None, + legend: None, + requests, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_sunburst_widget_definition_type.rs b/src/datadogV1/model/model_sunburst_widget_definition_type.rs new file mode 100644 index 000000000..baa54a282 --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SunburstWidgetDefinitionType { + #[serde(rename = "sunburst")] + SUNBURST, +} + +impl ToString for SunburstWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::SUNBURST => String::from("sunburst"), + } + } +} diff --git a/src/datadogV1/model/model_sunburst_widget_legend.rs b/src/datadogV1/model/model_sunburst_widget_legend.rs new file mode 100644 index 000000000..af4481c32 --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_legend.rs @@ -0,0 +1,14 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; + +/// Configuration of the legend. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SunburstWidgetLegend { + SunburstWidgetLegendTable(Box), + SunburstWidgetLegendInlineAutomatic( + Box, + ), +} diff --git a/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs new file mode 100644 index 000000000..4560246f8 --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration of inline or automatic legends. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SunburstWidgetLegendInlineAutomatic { + /// Whether to hide the percentages of the groups. + #[serde(rename = "hide_percent")] + pub hide_percent: Option, + /// Whether to hide the values of the groups. + #[serde(rename = "hide_value")] + pub hide_value: Option, + /// Whether to show the legend inline or let it be automatically generated. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SunburstWidgetLegendInlineAutomaticType, +} + +impl SunburstWidgetLegendInlineAutomatic { + pub fn new( + type_: crate::datadogV1::model::SunburstWidgetLegendInlineAutomaticType, + ) -> SunburstWidgetLegendInlineAutomatic { + SunburstWidgetLegendInlineAutomatic { + hide_percent: None, + hide_value: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic_type.rs b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic_type.rs new file mode 100644 index 000000000..9259eb175 --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_legend_inline_automatic_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SunburstWidgetLegendInlineAutomaticType { + #[serde(rename = "inline")] + INLINE, + #[serde(rename = "automatic")] + AUTOMATIC, +} + +impl ToString for SunburstWidgetLegendInlineAutomaticType { + fn to_string(&self) -> String { + match self { + Self::INLINE => String::from("inline"), + Self::AUTOMATIC => String::from("automatic"), + } + } +} diff --git a/src/datadogV1/model/model_sunburst_widget_legend_table.rs b/src/datadogV1/model/model_sunburst_widget_legend_table.rs new file mode 100644 index 000000000..c13c6833b --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_legend_table.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration of table-based legend. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SunburstWidgetLegendTable { + /// Whether or not to show a table legend. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SunburstWidgetLegendTableType, +} + +impl SunburstWidgetLegendTable { + pub fn new( + type_: crate::datadogV1::model::SunburstWidgetLegendTableType, + ) -> SunburstWidgetLegendTable { + SunburstWidgetLegendTable { type_ } + } +} diff --git a/src/datadogV1/model/model_sunburst_widget_legend_table_type.rs b/src/datadogV1/model/model_sunburst_widget_legend_table_type.rs new file mode 100644 index 000000000..a5f98b50f --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_legend_table_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SunburstWidgetLegendTableType { + #[serde(rename = "table")] + TABLE, + #[serde(rename = "none")] + NONE, +} + +impl ToString for SunburstWidgetLegendTableType { + fn to_string(&self) -> String { + match self { + Self::TABLE => String::from("table"), + Self::NONE => String::from("none"), + } + } +} diff --git a/src/datadogV1/model/model_sunburst_widget_request.rs b/src/datadogV1/model/model_sunburst_widget_request.rs new file mode 100644 index 000000000..cee4929b0 --- /dev/null +++ b/src/datadogV1/model/model_sunburst_widget_request.rs @@ -0,0 +1,74 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request definition of sunburst widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SunburstWidgetRequest { + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The log query. + #[serde(rename = "audit_query")] + pub audit_query: Option>, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Widget query. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, + /// Widget style definition. + #[serde(rename = "style")] + pub style: Option>, +} + +impl SunburstWidgetRequest { + pub fn new() -> SunburstWidgetRequest { + SunburstWidgetRequest { + apm_query: None, + audit_query: None, + event_query: None, + formulas: None, + log_query: None, + network_query: None, + process_query: None, + profile_metrics_query: None, + q: None, + queries: None, + response_format: None, + rum_query: None, + security_query: None, + style: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_step.rs b/src/datadogV1/model/model_synthetics_api_step.rs new file mode 100644 index 000000000..93722cc54 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_step.rs @@ -0,0 +1,56 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The steps used in a Synthetic multistep API test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPIStep { + /// Determines whether or not to continue with test if this step fails. + #[serde(rename = "allowFailure")] + pub allow_failure: Option, + /// Array of assertions used for the test. + #[serde(rename = "assertions")] + pub assertions: Vec, + /// Array of values to parse and save as variables from the response. + #[serde(rename = "extractedValues")] + pub extracted_values: Option>, + /// Determines whether or not to consider the entire test as failed if this step fails. + /// Can be used only if `allowFailure` is `true`. + #[serde(rename = "isCritical")] + pub is_critical: Option, + /// The name of the step. + #[serde(rename = "name")] + pub name: String, + /// Object describing the Synthetic test request. + #[serde(rename = "request")] + pub request: Box, + /// Object describing the retry strategy to apply to a Synthetic test. + #[serde(rename = "retry")] + pub retry: Option>, + /// The subtype of the Synthetic multistep API test step, currently only supporting `http`. + #[serde(rename = "subtype")] + pub subtype: crate::datadogV1::model::SyntheticsAPIStepSubtype, +} + +impl SyntheticsAPIStep { + pub fn new( + assertions: Vec, + name: String, + request: Box, + subtype: crate::datadogV1::model::SyntheticsAPIStepSubtype, + ) -> SyntheticsAPIStep { + SyntheticsAPIStep { + allow_failure: None, + assertions, + extracted_values: None, + is_critical: None, + name, + request, + retry: None, + subtype, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_step_subtype.rs b/src/datadogV1/model/model_synthetics_api_step_subtype.rs new file mode 100644 index 000000000..89f0edb95 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_step_subtype.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsAPIStepSubtype { + #[serde(rename = "http")] + HTTP, +} + +impl ToString for SyntheticsAPIStepSubtype { + fn to_string(&self) -> String { + match self { + Self::HTTP => String::from("http"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test.rs b/src/datadogV1/model/model_synthetics_api_test.rs new file mode 100644 index 000000000..e01d0a1b0 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test.rs @@ -0,0 +1,71 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing details about a Synthetic API test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPITest { + /// Configuration object for a Synthetic API test. + #[serde(rename = "config")] + pub config: Box, + /// Array of locations used to run the test. + #[serde(rename = "locations")] + pub locations: Vec, + /// Notification message associated with the test. + #[serde(rename = "message")] + pub message: String, + /// The associated monitor ID. + #[serde(rename = "monitor_id")] + pub monitor_id: Option, + /// Name of the test. + #[serde(rename = "name")] + pub name: String, + /// Object describing the extra options for a Synthetic test. + #[serde(rename = "options")] + pub options: Box, + /// The public ID for the test. + #[serde(rename = "public_id")] + pub public_id: Option, + /// Define whether you want to start (`live`) or pause (`paused`) a + /// Synthetic test. + #[serde(rename = "status")] + pub status: Option, + /// The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, + /// `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. + #[serde(rename = "subtype")] + pub subtype: Option, + /// Array of tags attached to the test. + #[serde(rename = "tags")] + pub tags: Option>, + /// Type of the Synthetic test, `api`. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsAPITestType, +} + +impl SyntheticsAPITest { + pub fn new( + config: Box, + locations: Vec, + message: String, + name: String, + options: Box, + type_: crate::datadogV1::model::SyntheticsAPITestType, + ) -> SyntheticsAPITest { + SyntheticsAPITest { + config, + locations, + message, + monitor_id: None, + name, + options, + public_id: None, + status: None, + subtype: None, + tags: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_config.rs b/src/datadogV1/model/model_synthetics_api_test_config.rs new file mode 100644 index 000000000..e0ceddf96 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_config.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration object for a Synthetic API test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPITestConfig { + /// Array of assertions used for the test. Required for single API tests. + #[serde(rename = "assertions")] + pub assertions: Option>, + /// Array of variables used for the test. + #[serde(rename = "configVariables")] + pub config_variables: Option>, + /// Object describing the Synthetic test request. + #[serde(rename = "request")] + pub request: Option>, + /// When the test subtype is `multi`, the steps of the test. + #[serde(rename = "steps")] + pub steps: Option>, +} + +impl SyntheticsAPITestConfig { + pub fn new() -> SyntheticsAPITestConfig { + SyntheticsAPITestConfig { + assertions: None, + config_variables: None, + request: None, + steps: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_failure_code.rs b/src/datadogV1/model/model_synthetics_api_test_failure_code.rs new file mode 100644 index 000000000..886959b5a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_failure_code.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsApiTestFailureCode { + #[serde(rename = "BODY_TOO_LARGE")] + BODY_TOO_LARGE, + #[serde(rename = "DENIED")] + DENIED, + #[serde(rename = "TOO_MANY_REDIRECTS")] + TOO_MANY_REDIRECTS, + #[serde(rename = "AUTHENTICATION_ERROR")] + AUTHENTICATION_ERROR, + #[serde(rename = "DECRYPTION")] + DECRYPTION, + #[serde(rename = "INVALID_CHAR_IN_HEADER")] + INVALID_CHAR_IN_HEADER, + #[serde(rename = "HEADER_TOO_LARGE")] + HEADER_TOO_LARGE, + #[serde(rename = "HEADERS_INCOMPATIBLE_CONTENT_LENGTH")] + HEADERS_INCOMPATIBLE_CONTENT_LENGTH, + #[serde(rename = "INVALID_REQUEST")] + INVALID_REQUEST, + #[serde(rename = "REQUIRES_UPDATE")] + REQUIRES_UPDATE, + #[serde(rename = "UNESCAPED_CHARACTERS_IN_REQUEST_PATH")] + UNESCAPED_CHARACTERS_IN_REQUEST_PATH, + #[serde(rename = "MALFORMED_RESPONSE")] + MALFORMED_RESPONSE, + #[serde(rename = "INCORRECT_ASSERTION")] + INCORRECT_ASSERTION, + #[serde(rename = "CONNREFUSED")] + CONNREFUSED, + #[serde(rename = "CONNRESET")] + CONNRESET, + #[serde(rename = "DNS")] + DNS, + #[serde(rename = "HOSTUNREACH")] + HOSTUNREACH, + #[serde(rename = "NETUNREACH")] + NETUNREACH, + #[serde(rename = "TIMEOUT")] + TIMEOUT, + #[serde(rename = "SSL")] + SSL, + #[serde(rename = "OCSP")] + OCSP, + #[serde(rename = "INVALID_TEST")] + INVALID_TEST, + #[serde(rename = "TUNNEL")] + TUNNEL, + #[serde(rename = "WEBSOCKET")] + WEBSOCKET, + #[serde(rename = "UNKNOWN")] + UNKNOWN, + #[serde(rename = "INTERNAL_ERROR")] + INTERNAL_ERROR, +} + +impl ToString for SyntheticsApiTestFailureCode { + fn to_string(&self) -> String { + match self { + Self::BODY_TOO_LARGE => String::from("BODY_TOO_LARGE"), + Self::DENIED => String::from("DENIED"), + Self::TOO_MANY_REDIRECTS => String::from("TOO_MANY_REDIRECTS"), + Self::AUTHENTICATION_ERROR => String::from("AUTHENTICATION_ERROR"), + Self::DECRYPTION => String::from("DECRYPTION"), + Self::INVALID_CHAR_IN_HEADER => String::from("INVALID_CHAR_IN_HEADER"), + Self::HEADER_TOO_LARGE => String::from("HEADER_TOO_LARGE"), + Self::HEADERS_INCOMPATIBLE_CONTENT_LENGTH => { + String::from("HEADERS_INCOMPATIBLE_CONTENT_LENGTH") + } + Self::INVALID_REQUEST => String::from("INVALID_REQUEST"), + Self::REQUIRES_UPDATE => String::from("REQUIRES_UPDATE"), + Self::UNESCAPED_CHARACTERS_IN_REQUEST_PATH => { + String::from("UNESCAPED_CHARACTERS_IN_REQUEST_PATH") + } + Self::MALFORMED_RESPONSE => String::from("MALFORMED_RESPONSE"), + Self::INCORRECT_ASSERTION => String::from("INCORRECT_ASSERTION"), + Self::CONNREFUSED => String::from("CONNREFUSED"), + Self::CONNRESET => String::from("CONNRESET"), + Self::DNS => String::from("DNS"), + Self::HOSTUNREACH => String::from("HOSTUNREACH"), + Self::NETUNREACH => String::from("NETUNREACH"), + Self::TIMEOUT => String::from("TIMEOUT"), + Self::SSL => String::from("SSL"), + Self::OCSP => String::from("OCSP"), + Self::INVALID_TEST => String::from("INVALID_TEST"), + Self::TUNNEL => String::from("TUNNEL"), + Self::WEBSOCKET => String::from("WEBSOCKET"), + Self::UNKNOWN => String::from("UNKNOWN"), + Self::INTERNAL_ERROR => String::from("INTERNAL_ERROR"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_result_data.rs b/src/datadogV1/model/model_synthetics_api_test_result_data.rs new file mode 100644 index 000000000..477303bf8 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_result_data.rs @@ -0,0 +1,59 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing results for your Synthetic API test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPITestResultData { + /// Object describing the SSL certificate used for a Synthetic test. + #[serde(rename = "cert")] + pub cert: Option>, + /// Status of a Synthetic test. + #[serde(rename = "eventType")] + pub event_type: Option, + /// The API test failure details. + #[serde(rename = "failure")] + pub failure: Option>, + /// The API test HTTP status code. + #[serde(rename = "httpStatusCode")] + pub http_status_code: Option, + /// Request header object used for the API test. + #[serde(rename = "requestHeaders")] + pub request_headers: Option< + std::collections::HashMap>, + >, + /// Response body returned for the API test. + #[serde(rename = "responseBody")] + pub response_body: Option, + /// Response headers returned for the API test. + #[serde(rename = "responseHeaders")] + pub response_headers: Option< + std::collections::HashMap>, + >, + /// Global size in byte of the API test response. + #[serde(rename = "responseSize")] + pub response_size: Option, + /// Object containing all metrics and their values collected for a Synthetic API test. + /// See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics/). + #[serde(rename = "timings")] + pub timings: Option>, +} + +impl SyntheticsAPITestResultData { + pub fn new() -> SyntheticsAPITestResultData { + SyntheticsAPITestResultData { + cert: None, + event_type: None, + failure: None, + http_status_code: None, + request_headers: None, + response_body: None, + response_headers: None, + response_size: None, + timings: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_result_failure.rs b/src/datadogV1/model/model_synthetics_api_test_result_failure.rs new file mode 100644 index 000000000..395175987 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_result_failure.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The API test failure details. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsApiTestResultFailure { + /// Error code that can be returned by a Synthetic test. + #[serde(rename = "code")] + pub code: Option, + /// The API test error message. + #[serde(rename = "message")] + pub message: Option, +} + +impl SyntheticsApiTestResultFailure { + pub fn new() -> SyntheticsApiTestResultFailure { + SyntheticsApiTestResultFailure { + code: None, + message: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_result_full.rs b/src/datadogV1/model/model_synthetics_api_test_result_full.rs new file mode 100644 index 000000000..eb1cd163b --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_result_full.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object returned describing a API test result. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPITestResultFull { + /// Object describing the API test configuration. + #[serde(rename = "check")] + pub check: Option>, + /// When the API test was conducted. + #[serde(rename = "check_time")] + pub check_time: Option, + /// Version of the API test used. + #[serde(rename = "check_version")] + pub check_version: Option, + /// Locations for which to query the API test results. + #[serde(rename = "probe_dc")] + pub probe_dc: Option, + /// Object containing results for your Synthetic API test. + #[serde(rename = "result")] + pub result: Option>, + /// ID of the API test result. + #[serde(rename = "result_id")] + pub result_id: Option, + /// The status of your Synthetic monitor. + /// * `O` for not triggered + /// * `1` for triggered + /// * `2` for no data + #[serde(rename = "status")] + pub status: Option, +} + +impl SyntheticsAPITestResultFull { + pub fn new() -> SyntheticsAPITestResultFull { + SyntheticsAPITestResultFull { + check: None, + check_time: None, + check_version: None, + probe_dc: None, + result: None, + result_id: None, + status: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_result_full_check.rs b/src/datadogV1/model/model_synthetics_api_test_result_full_check.rs new file mode 100644 index 000000000..3e4dfa740 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_result_full_check.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the API test configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPITestResultFullCheck { + /// Configuration object for a Synthetic test. + #[serde(rename = "config")] + pub config: Box, +} + +impl SyntheticsAPITestResultFullCheck { + pub fn new( + config: Box, + ) -> SyntheticsAPITestResultFullCheck { + SyntheticsAPITestResultFullCheck { config } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_result_short.rs b/src/datadogV1/model/model_synthetics_api_test_result_short.rs new file mode 100644 index 000000000..907583c44 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_result_short.rs @@ -0,0 +1,41 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object with the results of a single Synthetic API test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPITestResultShort { + /// Last time the API test was performed. + #[serde(rename = "check_time")] + pub check_time: Option, + /// Location from which the API test was performed. + #[serde(rename = "probe_dc")] + pub probe_dc: Option, + /// Result of the last API test run. + #[serde(rename = "result")] + pub result: Option>, + /// ID of the API test result. + #[serde(rename = "result_id")] + pub result_id: Option, + /// The status of your Synthetic monitor. + /// * `O` for not triggered + /// * `1` for triggered + /// * `2` for no data + #[serde(rename = "status")] + pub status: Option, +} + +impl SyntheticsAPITestResultShort { + pub fn new() -> SyntheticsAPITestResultShort { + SyntheticsAPITestResultShort { + check_time: None, + probe_dc: None, + result: None, + result_id: None, + status: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs b/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs new file mode 100644 index 000000000..aded8161e --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_result_short_result.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Result of the last API test run. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAPITestResultShortResult { + /// Describes if the test run has passed or failed. + #[serde(rename = "passed")] + pub passed: Option, + /// Object containing all metrics and their values collected for a Synthetic API test. + /// See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics/). + #[serde(rename = "timings")] + pub timings: Option>, +} + +impl SyntheticsAPITestResultShortResult { + pub fn new() -> SyntheticsAPITestResultShortResult { + SyntheticsAPITestResultShortResult { + passed: None, + timings: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_api_test_type.rs b/src/datadogV1/model/model_synthetics_api_test_type.rs new file mode 100644 index 000000000..674107f3a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_api_test_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsAPITestType { + #[serde(rename = "api")] + API, +} + +impl ToString for SyntheticsAPITestType { + fn to_string(&self) -> String { + match self { + Self::API => String::from("api"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion.rs b/src/datadogV1/model/model_synthetics_assertion.rs new file mode 100644 index 000000000..e127a46c2 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Object describing the assertions type, their associated operator, +/// which property they apply, and upon which target. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SyntheticsAssertion { + SyntheticsAssertionTarget(Box), + SyntheticsAssertionJSONPathTarget( + Box, + ), + SyntheticsAssertionXPathTarget(Box), +} diff --git a/src/datadogV1/model/model_synthetics_assertion_json_path_operator.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_operator.rs new file mode 100644 index 000000000..5f1415c23 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_json_path_operator.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsAssertionJSONPathOperator { + #[serde(rename = "validatesJSONPath")] + VALIDATES_JSON_PATH, +} + +impl ToString for SyntheticsAssertionJSONPathOperator { + fn to_string(&self) -> String { + match self { + Self::VALIDATES_JSON_PATH => String::from("validatesJSONPath"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs new file mode 100644 index 000000000..54ff40bfe --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_json_path_target.rs @@ -0,0 +1,37 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An assertion for the `validatesJSONPath` operator. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAssertionJSONPathTarget { + /// Assertion operator to apply. + #[serde(rename = "operator")] + pub operator: crate::datadogV1::model::SyntheticsAssertionJSONPathOperator, + /// The associated assertion property. + #[serde(rename = "property")] + pub property: Option, + /// Composed target for `validatesJSONPath` operator. + #[serde(rename = "target")] + pub target: Option>, + /// Type of the assertion. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsAssertionType, +} + +impl SyntheticsAssertionJSONPathTarget { + pub fn new( + operator: crate::datadogV1::model::SyntheticsAssertionJSONPathOperator, + type_: crate::datadogV1::model::SyntheticsAssertionType, + ) -> SyntheticsAssertionJSONPathTarget { + SyntheticsAssertionJSONPathTarget { + operator, + property: None, + target: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs b/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs new file mode 100644 index 000000000..62a095875 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_json_path_target_target.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Composed target for `validatesJSONPath` operator. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAssertionJSONPathTargetTarget { + /// The JSON path to assert. + #[serde(rename = "jsonPath")] + pub json_path: Option, + /// The specific operator to use on the path. + #[serde(rename = "operator")] + pub operator: Option, + /// The path target value to compare to. + #[serde(rename = "targetValue")] + pub target_value: Option>, +} + +impl SyntheticsAssertionJSONPathTargetTarget { + pub fn new() -> SyntheticsAssertionJSONPathTargetTarget { + SyntheticsAssertionJSONPathTargetTarget { + json_path: None, + operator: None, + target_value: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_operator.rs b/src/datadogV1/model/model_synthetics_assertion_operator.rs new file mode 100644 index 000000000..5941611a6 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_operator.rs @@ -0,0 +1,61 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsAssertionOperator { + #[serde(rename = "contains")] + CONTAINS, + #[serde(rename = "doesNotContain")] + DOES_NOT_CONTAIN, + #[serde(rename = "is")] + IS, + #[serde(rename = "isNot")] + IS_NOT, + #[serde(rename = "lessThan")] + LESS_THAN, + #[serde(rename = "lessThanOrEqual")] + LESS_THAN_OR_EQUAL, + #[serde(rename = "moreThan")] + MORE_THAN, + #[serde(rename = "moreThanOrEqual")] + MORE_THAN_OR_EQUAL, + #[serde(rename = "matches")] + MATCHES, + #[serde(rename = "doesNotMatch")] + DOES_NOT_MATCH, + #[serde(rename = "validates")] + VALIDATES, + #[serde(rename = "isInMoreThan")] + IS_IN_MORE_DAYS_THAN, + #[serde(rename = "isInLessThan")] + IS_IN_LESS_DAYS_THAN, + #[serde(rename = "doesNotExist")] + DOES_NOT_EXIST, + #[serde(rename = "isUndefined")] + IS_UNDEFINED, +} + +impl ToString for SyntheticsAssertionOperator { + fn to_string(&self) -> String { + match self { + Self::CONTAINS => String::from("contains"), + Self::DOES_NOT_CONTAIN => String::from("doesNotContain"), + Self::IS => String::from("is"), + Self::IS_NOT => String::from("isNot"), + Self::LESS_THAN => String::from("lessThan"), + Self::LESS_THAN_OR_EQUAL => String::from("lessThanOrEqual"), + Self::MORE_THAN => String::from("moreThan"), + Self::MORE_THAN_OR_EQUAL => String::from("moreThanOrEqual"), + Self::MATCHES => String::from("matches"), + Self::DOES_NOT_MATCH => String::from("doesNotMatch"), + Self::VALIDATES => String::from("validates"), + Self::IS_IN_MORE_DAYS_THAN => String::from("isInMoreThan"), + Self::IS_IN_LESS_DAYS_THAN => String::from("isInLessThan"), + Self::DOES_NOT_EXIST => String::from("doesNotExist"), + Self::IS_UNDEFINED => String::from("isUndefined"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_target.rs b/src/datadogV1/model/model_synthetics_assertion_target.rs new file mode 100644 index 000000000..c20e55945 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_target.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An assertion which uses a simple target. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAssertionTarget { + /// Assertion operator to apply. + #[serde(rename = "operator")] + pub operator: crate::datadogV1::model::SyntheticsAssertionOperator, + /// The associated assertion property. + #[serde(rename = "property")] + pub property: Option, + /// Value used by the operator. + #[serde(rename = "target")] + pub target: std::collections::HashMap, + /// Timings scope for response time assertions. + #[serde(rename = "timingsScope")] + pub timings_scope: Option, + /// Type of the assertion. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsAssertionType, +} + +impl SyntheticsAssertionTarget { + pub fn new( + operator: crate::datadogV1::model::SyntheticsAssertionOperator, + target: std::collections::HashMap, + type_: crate::datadogV1::model::SyntheticsAssertionType, + ) -> SyntheticsAssertionTarget { + SyntheticsAssertionTarget { + operator, + property: None, + target, + timings_scope: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_timings_scope.rs b/src/datadogV1/model/model_synthetics_assertion_timings_scope.rs new file mode 100644 index 000000000..5b0939cda --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_timings_scope.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsAssertionTimingsScope { + #[serde(rename = "all")] + ALL, + #[serde(rename = "withoutDNS")] + WITHOUT_DNS, +} + +impl ToString for SyntheticsAssertionTimingsScope { + fn to_string(&self) -> String { + match self { + Self::ALL => String::from("all"), + Self::WITHOUT_DNS => String::from("withoutDNS"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_type.rs b/src/datadogV1/model/model_synthetics_assertion_type.rs new file mode 100644 index 000000000..dedec6178 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_type.rs @@ -0,0 +1,73 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsAssertionType { + #[serde(rename = "body")] + BODY, + #[serde(rename = "header")] + HEADER, + #[serde(rename = "statusCode")] + STATUS_CODE, + #[serde(rename = "certificate")] + CERTIFICATE, + #[serde(rename = "responseTime")] + RESPONSE_TIME, + #[serde(rename = "property")] + PROPERTY, + #[serde(rename = "recordEvery")] + RECORD_EVERY, + #[serde(rename = "recordSome")] + RECORD_SOME, + #[serde(rename = "tlsVersion")] + TLS_VERSION, + #[serde(rename = "minTlsVersion")] + MIN_TLS_VERSION, + #[serde(rename = "latency")] + LATENCY, + #[serde(rename = "packetLossPercentage")] + PACKET_LOSS_PERCENTAGE, + #[serde(rename = "packetsReceived")] + PACKETS_RECEIVED, + #[serde(rename = "networkHop")] + NETWORK_HOP, + #[serde(rename = "receivedMessage")] + RECEIVED_MESSAGE, + #[serde(rename = "grpcHealthcheckStatus")] + GRPC_HEALTHCHECK_STATUS, + #[serde(rename = "grpcMetadata")] + GRPC_METADATA, + #[serde(rename = "grpcProto")] + GRPC_PROTO, + #[serde(rename = "connection")] + CONNECTION, +} + +impl ToString for SyntheticsAssertionType { + fn to_string(&self) -> String { + match self { + Self::BODY => String::from("body"), + Self::HEADER => String::from("header"), + Self::STATUS_CODE => String::from("statusCode"), + Self::CERTIFICATE => String::from("certificate"), + Self::RESPONSE_TIME => String::from("responseTime"), + Self::PROPERTY => String::from("property"), + Self::RECORD_EVERY => String::from("recordEvery"), + Self::RECORD_SOME => String::from("recordSome"), + Self::TLS_VERSION => String::from("tlsVersion"), + Self::MIN_TLS_VERSION => String::from("minTlsVersion"), + Self::LATENCY => String::from("latency"), + Self::PACKET_LOSS_PERCENTAGE => String::from("packetLossPercentage"), + Self::PACKETS_RECEIVED => String::from("packetsReceived"), + Self::NETWORK_HOP => String::from("networkHop"), + Self::RECEIVED_MESSAGE => String::from("receivedMessage"), + Self::GRPC_HEALTHCHECK_STATUS => String::from("grpcHealthcheckStatus"), + Self::GRPC_METADATA => String::from("grpcMetadata"), + Self::GRPC_PROTO => String::from("grpcProto"), + Self::CONNECTION => String::from("connection"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_x_path_operator.rs b/src/datadogV1/model/model_synthetics_assertion_x_path_operator.rs new file mode 100644 index 000000000..b5845be93 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_x_path_operator.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsAssertionXPathOperator { + #[serde(rename = "validatesXPath")] + VALIDATES_X_PATH, +} + +impl ToString for SyntheticsAssertionXPathOperator { + fn to_string(&self) -> String { + match self { + Self::VALIDATES_X_PATH => String::from("validatesXPath"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs b/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs new file mode 100644 index 000000000..b0d59f9be --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_x_path_target.rs @@ -0,0 +1,37 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An assertion for the `validatesXPath` operator. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAssertionXPathTarget { + /// Assertion operator to apply. + #[serde(rename = "operator")] + pub operator: crate::datadogV1::model::SyntheticsAssertionXPathOperator, + /// The associated assertion property. + #[serde(rename = "property")] + pub property: Option, + /// Composed target for `validatesXPath` operator. + #[serde(rename = "target")] + pub target: Option>, + /// Type of the assertion. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsAssertionType, +} + +impl SyntheticsAssertionXPathTarget { + pub fn new( + operator: crate::datadogV1::model::SyntheticsAssertionXPathOperator, + type_: crate::datadogV1::model::SyntheticsAssertionType, + ) -> SyntheticsAssertionXPathTarget { + SyntheticsAssertionXPathTarget { + operator, + property: None, + target: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs b/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs new file mode 100644 index 000000000..65651b823 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_assertion_x_path_target_target.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Composed target for `validatesXPath` operator. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsAssertionXPathTargetTarget { + /// The specific operator to use on the path. + #[serde(rename = "operator")] + pub operator: Option, + /// The path target value to compare to. + #[serde(rename = "targetValue")] + pub target_value: Option>, + /// The X path to assert. + #[serde(rename = "xPath")] + pub x_path: Option, +} + +impl SyntheticsAssertionXPathTargetTarget { + pub fn new() -> SyntheticsAssertionXPathTargetTarget { + SyntheticsAssertionXPathTargetTarget { + operator: None, + target_value: None, + x_path: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth.rs b/src/datadogV1/model/model_synthetics_basic_auth.rs new file mode 100644 index 000000000..ee4738958 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Object to handle basic authentication when performing the test. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SyntheticsBasicAuth { + SyntheticsBasicAuthWeb(Box), + SyntheticsBasicAuthSigv4(Box), + SyntheticsBasicAuthNTLM(Box), + SyntheticsBasicAuthDigest(Box), + SyntheticsBasicAuthOauthClient(Box), + SyntheticsBasicAuthOauthROP(Box), +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_digest.rs b/src/datadogV1/model/model_synthetics_basic_auth_digest.rs new file mode 100644 index 000000000..cc9cafffe --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_digest.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to handle digest authentication when performing the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBasicAuthDigest { + /// Password to use for the digest authentication. + #[serde(rename = "password")] + pub password: String, + /// The type of basic authentication to use when performing the test. + #[serde(rename = "type")] + pub type_: Option, + /// Username to use for the digest authentication. + #[serde(rename = "username")] + pub username: String, +} + +impl SyntheticsBasicAuthDigest { + pub fn new(password: String, username: String) -> SyntheticsBasicAuthDigest { + SyntheticsBasicAuthDigest { + password, + type_: None, + username, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_digest_type.rs b/src/datadogV1/model/model_synthetics_basic_auth_digest_type.rs new file mode 100644 index 000000000..a3c579c7d --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_digest_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBasicAuthDigestType { + #[serde(rename = "digest")] + DIGEST, +} + +impl ToString for SyntheticsBasicAuthDigestType { + fn to_string(&self) -> String { + match self { + Self::DIGEST => String::from("digest"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs b/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs new file mode 100644 index 000000000..30c1578ad --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_ntlm.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to handle `NTLM` authentication when performing the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBasicAuthNTLM { + /// Domain for the authentication to use when performing the test. + #[serde(rename = "domain")] + pub domain: Option, + /// Password for the authentication to use when performing the test. + #[serde(rename = "password")] + pub password: Option, + /// The type of authentication to use when performing the test. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsBasicAuthNTLMType, + /// Username for the authentication to use when performing the test. + #[serde(rename = "username")] + pub username: Option, + /// Workstation for the authentication to use when performing the test. + #[serde(rename = "workstation")] + pub workstation: Option, +} + +impl SyntheticsBasicAuthNTLM { + pub fn new( + type_: crate::datadogV1::model::SyntheticsBasicAuthNTLMType, + ) -> SyntheticsBasicAuthNTLM { + SyntheticsBasicAuthNTLM { + domain: None, + password: None, + type_, + username: None, + workstation: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_ntlm_type.rs b/src/datadogV1/model/model_synthetics_basic_auth_ntlm_type.rs new file mode 100644 index 000000000..313239c78 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_ntlm_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBasicAuthNTLMType { + #[serde(rename = "ntlm")] + NTLM, +} + +impl ToString for SyntheticsBasicAuthNTLMType { + fn to_string(&self) -> String { + match self { + Self::NTLM => String::from("ntlm"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs new file mode 100644 index 000000000..d82e87f93 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client.rs @@ -0,0 +1,56 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to handle `oauth client` authentication when performing the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBasicAuthOauthClient { + /// Access token URL to use when performing the authentication. + #[serde(rename = "accessTokenUrl")] + pub access_token_url: String, + /// Audience to use when performing the authentication. + #[serde(rename = "audience")] + pub audience: Option, + /// Client ID to use when performing the authentication. + #[serde(rename = "clientId")] + pub client_id: String, + /// Client secret to use when performing the authentication. + #[serde(rename = "clientSecret")] + pub client_secret: String, + /// Resource to use when performing the authentication. + #[serde(rename = "resource")] + pub resource: Option, + /// Scope to use when performing the authentication. + #[serde(rename = "scope")] + pub scope: Option, + /// Type of token to use when performing the authentication. + #[serde(rename = "tokenApiAuthentication")] + pub token_api_authentication: + crate::datadogV1::model::SyntheticsBasicAuthOauthTokenApiAuthentication, + /// The type of basic authentication to use when performing the test. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SyntheticsBasicAuthOauthClient { + pub fn new( + access_token_url: String, + client_id: String, + client_secret: String, + token_api_authentication: crate::datadogV1::model::SyntheticsBasicAuthOauthTokenApiAuthentication, + ) -> SyntheticsBasicAuthOauthClient { + SyntheticsBasicAuthOauthClient { + access_token_url, + audience: None, + client_id, + client_secret, + resource: None, + scope: None, + token_api_authentication, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_client_type.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client_type.rs new file mode 100644 index 000000000..75ce73163 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_client_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBasicAuthOauthClientType { + #[serde(rename = "oauth-client")] + OAUTH_CLIENT, +} + +impl ToString for SyntheticsBasicAuthOauthClientType { + fn to_string(&self) -> String { + match self { + Self::OAUTH_CLIENT => String::from("oauth-client"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs new file mode 100644 index 000000000..a19e95ad8 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop.rs @@ -0,0 +1,64 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to handle `oauth rop` authentication when performing the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBasicAuthOauthROP { + /// Access token URL to use when performing the authentication. + #[serde(rename = "accessTokenUrl")] + pub access_token_url: String, + /// Audience to use when performing the authentication. + #[serde(rename = "audience")] + pub audience: Option, + /// Client ID to use when performing the authentication. + #[serde(rename = "clientId")] + pub client_id: Option, + /// Client secret to use when performing the authentication. + #[serde(rename = "clientSecret")] + pub client_secret: Option, + /// Password to use when performing the authentication. + #[serde(rename = "password")] + pub password: String, + /// Resource to use when performing the authentication. + #[serde(rename = "resource")] + pub resource: Option, + /// Scope to use when performing the authentication. + #[serde(rename = "scope")] + pub scope: Option, + /// Type of token to use when performing the authentication. + #[serde(rename = "tokenApiAuthentication")] + pub token_api_authentication: + crate::datadogV1::model::SyntheticsBasicAuthOauthTokenApiAuthentication, + /// The type of basic authentication to use when performing the test. + #[serde(rename = "type")] + pub type_: Option, + /// Username to use when performing the authentication. + #[serde(rename = "username")] + pub username: String, +} + +impl SyntheticsBasicAuthOauthROP { + pub fn new( + access_token_url: String, + password: String, + token_api_authentication: crate::datadogV1::model::SyntheticsBasicAuthOauthTokenApiAuthentication, + username: String, + ) -> SyntheticsBasicAuthOauthROP { + SyntheticsBasicAuthOauthROP { + access_token_url, + audience: None, + client_id: None, + client_secret: None, + password, + resource: None, + scope: None, + token_api_authentication, + type_: None, + username, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop_type.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop_type.rs new file mode 100644 index 000000000..d827b5763 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_rop_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBasicAuthOauthROPType { + #[serde(rename = "oauth-rop")] + OAUTH_ROP, +} + +impl ToString for SyntheticsBasicAuthOauthROPType { + fn to_string(&self) -> String { + match self { + Self::OAUTH_ROP => String::from("oauth-rop"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_oauth_token_api_authentication.rs b/src/datadogV1/model/model_synthetics_basic_auth_oauth_token_api_authentication.rs new file mode 100644 index 000000000..36ce14728 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_oauth_token_api_authentication.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBasicAuthOauthTokenApiAuthentication { + #[serde(rename = "header")] + HEADER, + #[serde(rename = "body")] + BODY, +} + +impl ToString for SyntheticsBasicAuthOauthTokenApiAuthentication { + fn to_string(&self) -> String { + match self { + Self::HEADER => String::from("header"), + Self::BODY => String::from("body"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs b/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs new file mode 100644 index 000000000..052a4c328 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_sigv4.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to handle `SIGV4` authentication when performing the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBasicAuthSigv4 { + /// Access key for the `SIGV4` authentication. + #[serde(rename = "accessKey")] + pub access_key: String, + /// Region for the `SIGV4` authentication. + #[serde(rename = "region")] + pub region: Option, + /// Secret key for the `SIGV4` authentication. + #[serde(rename = "secretKey")] + pub secret_key: String, + /// Service name for the `SIGV4` authentication. + #[serde(rename = "serviceName")] + pub service_name: Option, + /// Session token for the `SIGV4` authentication. + #[serde(rename = "sessionToken")] + pub session_token: Option, + /// The type of authentication to use when performing the test. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsBasicAuthSigv4Type, +} + +impl SyntheticsBasicAuthSigv4 { + pub fn new( + access_key: String, + secret_key: String, + type_: crate::datadogV1::model::SyntheticsBasicAuthSigv4Type, + ) -> SyntheticsBasicAuthSigv4 { + SyntheticsBasicAuthSigv4 { + access_key, + region: None, + secret_key, + service_name: None, + session_token: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_sigv4_type.rs b/src/datadogV1/model/model_synthetics_basic_auth_sigv4_type.rs new file mode 100644 index 000000000..07f8a7f6d --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_sigv4_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBasicAuthSigv4Type { + #[serde(rename = "sigv4")] + SIGV4, +} + +impl ToString for SyntheticsBasicAuthSigv4Type { + fn to_string(&self) -> String { + match self { + Self::SIGV4 => String::from("sigv4"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_web.rs b/src/datadogV1/model/model_synthetics_basic_auth_web.rs new file mode 100644 index 000000000..2fb8c290a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_web.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to handle basic authentication when performing the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBasicAuthWeb { + /// Password to use for the basic authentication. + #[serde(rename = "password")] + pub password: String, + /// The type of basic authentication to use when performing the test. + #[serde(rename = "type")] + pub type_: Option, + /// Username to use for the basic authentication. + #[serde(rename = "username")] + pub username: String, +} + +impl SyntheticsBasicAuthWeb { + pub fn new(password: String, username: String) -> SyntheticsBasicAuthWeb { + SyntheticsBasicAuthWeb { + password, + type_: None, + username, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_basic_auth_web_type.rs b/src/datadogV1/model/model_synthetics_basic_auth_web_type.rs new file mode 100644 index 000000000..49b49924e --- /dev/null +++ b/src/datadogV1/model/model_synthetics_basic_auth_web_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBasicAuthWebType { + #[serde(rename = "web")] + WEB, +} + +impl ToString for SyntheticsBasicAuthWebType { + fn to_string(&self) -> String { + match self { + Self::WEB => String::from("web"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_batch_details.rs b/src/datadogV1/model/model_synthetics_batch_details.rs new file mode 100644 index 000000000..a383cc348 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_batch_details.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details about a batch response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBatchDetails { + /// Wrapper object that contains the details of a batch. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SyntheticsBatchDetails { + pub fn new() -> SyntheticsBatchDetails { + SyntheticsBatchDetails { data: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_batch_details_data.rs b/src/datadogV1/model/model_synthetics_batch_details_data.rs new file mode 100644 index 000000000..6f64e2cde --- /dev/null +++ b/src/datadogV1/model/model_synthetics_batch_details_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Wrapper object that contains the details of a batch. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBatchDetailsData { + /// Metadata for the Synthetic tests run. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// List of results for the batch. + #[serde(rename = "results")] + pub results: Option>, + /// Determines whether or not the batch has passed, failed, or is in progress. + #[serde(rename = "status")] + pub status: Option, +} + +impl SyntheticsBatchDetailsData { + pub fn new() -> SyntheticsBatchDetailsData { + SyntheticsBatchDetailsData { + metadata: None, + results: None, + status: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_batch_result.rs b/src/datadogV1/model/model_synthetics_batch_result.rs new file mode 100644 index 000000000..10a66ed40 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_batch_result.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object with the results of a Synthetic batch. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBatchResult { + /// The device ID. + #[serde(rename = "device")] + pub device: Option, + /// Total duration in millisecond of the test. + #[serde(rename = "duration")] + pub duration: Option, + /// Execution rule for a Synthetic test. + #[serde(rename = "execution_rule")] + pub execution_rule: Option, + /// Name of the location. + #[serde(rename = "location")] + pub location: Option, + /// The ID of the result to get. + #[serde(rename = "result_id")] + pub result_id: Option, + /// Number of times this result has been retried. + #[serde(rename = "retries")] + pub retries: Option, + /// Determines whether or not the batch has passed, failed, or is in progress. + #[serde(rename = "status")] + pub status: Option, + /// Name of the test. + #[serde(rename = "test_name")] + pub test_name: Option, + /// The public ID of the Synthetic test. + #[serde(rename = "test_public_id")] + pub test_public_id: Option, + /// Type of the Synthetic test, either `api` or `browser`. + #[serde(rename = "test_type")] + pub test_type: Option, +} + +impl SyntheticsBatchResult { + pub fn new() -> SyntheticsBatchResult { + SyntheticsBatchResult { + device: None, + duration: None, + execution_rule: None, + location: None, + result_id: None, + retries: None, + status: None, + test_name: None, + test_public_id: None, + test_type: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_error.rs b/src/datadogV1/model/model_synthetics_browser_error.rs new file mode 100644 index 000000000..8ff3a1335 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_error.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Error response object for a browser test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserError { + /// Description of the error. + #[serde(rename = "description")] + pub description: String, + /// Name of the error. + #[serde(rename = "name")] + pub name: String, + /// Status Code of the error. + #[serde(rename = "status")] + pub status: Option, + /// Error type returned by a browser test. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsBrowserErrorType, +} + +impl SyntheticsBrowserError { + pub fn new( + description: String, + name: String, + type_: crate::datadogV1::model::SyntheticsBrowserErrorType, + ) -> SyntheticsBrowserError { + SyntheticsBrowserError { + description, + name, + status: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_error_type.rs b/src/datadogV1/model/model_synthetics_browser_error_type.rs new file mode 100644 index 000000000..0be29e251 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_error_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBrowserErrorType { + #[serde(rename = "network")] + NETWORK, + #[serde(rename = "js")] + JS, +} + +impl ToString for SyntheticsBrowserErrorType { + fn to_string(&self) -> String { + match self { + Self::NETWORK => String::from("network"), + Self::JS => String::from("js"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test.rs b/src/datadogV1/model/model_synthetics_browser_test.rs new file mode 100644 index 000000000..e43dae678 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test.rs @@ -0,0 +1,70 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing details about a Synthetic browser test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTest { + /// Configuration object for a Synthetic browser test. + #[serde(rename = "config")] + pub config: Box, + /// Array of locations used to run the test. + #[serde(rename = "locations")] + pub locations: Vec, + /// Notification message associated with the test. Message can either be text or an empty string. + #[serde(rename = "message")] + pub message: String, + /// The associated monitor ID. + #[serde(rename = "monitor_id")] + pub monitor_id: Option, + /// Name of the test. + #[serde(rename = "name")] + pub name: String, + /// Object describing the extra options for a Synthetic test. + #[serde(rename = "options")] + pub options: Box, + /// The public ID of the test. + #[serde(rename = "public_id")] + pub public_id: Option, + /// Define whether you want to start (`live`) or pause (`paused`) a + /// Synthetic test. + #[serde(rename = "status")] + pub status: Option, + /// Array of steps for the test. + #[serde(rename = "steps")] + pub steps: Option>, + /// Array of tags attached to the test. + #[serde(rename = "tags")] + pub tags: Option>, + /// Type of the Synthetic test, `browser`. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsBrowserTestType, +} + +impl SyntheticsBrowserTest { + pub fn new( + config: Box, + locations: Vec, + message: String, + name: String, + options: Box, + type_: crate::datadogV1::model::SyntheticsBrowserTestType, + ) -> SyntheticsBrowserTest { + SyntheticsBrowserTest { + config, + locations, + message, + monitor_id: None, + name, + options, + public_id: None, + status: None, + steps: None, + tags: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_config.rs b/src/datadogV1/model/model_synthetics_browser_test_config.rs new file mode 100644 index 000000000..cd9349137 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_config.rs @@ -0,0 +1,41 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration object for a Synthetic browser test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestConfig { + /// Array of assertions used for the test. + #[serde(rename = "assertions")] + pub assertions: Vec, + /// Array of variables used for the test. + #[serde(rename = "configVariables")] + pub config_variables: Option>, + /// Object describing the Synthetic test request. + #[serde(rename = "request")] + pub request: Box, + /// Cookies to be used for the request, using the [Set-Cookie](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) syntax. + #[serde(rename = "setCookie")] + pub set_cookie: Option, + /// Array of variables used for the test steps. + #[serde(rename = "variables")] + pub variables: Option>, +} + +impl SyntheticsBrowserTestConfig { + pub fn new( + assertions: Vec, + request: Box, + ) -> SyntheticsBrowserTestConfig { + SyntheticsBrowserTestConfig { + assertions, + config_variables: None, + request, + set_cookie: None, + variables: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_failure_code.rs b/src/datadogV1/model/model_synthetics_browser_test_failure_code.rs new file mode 100644 index 000000000..afee63e0e --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_failure_code.rs @@ -0,0 +1,115 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBrowserTestFailureCode { + #[serde(rename = "API_REQUEST_FAILURE")] + API_REQUEST_FAILURE, + #[serde(rename = "ASSERTION_FAILURE")] + ASSERTION_FAILURE, + #[serde(rename = "DOWNLOAD_FILE_TOO_LARGE")] + DOWNLOAD_FILE_TOO_LARGE, + #[serde(rename = "ELEMENT_NOT_INTERACTABLE")] + ELEMENT_NOT_INTERACTABLE, + #[serde(rename = "EMAIL_VARIABLE_NOT_DEFINED")] + EMAIL_VARIABLE_NOT_DEFINED, + #[serde(rename = "EVALUATE_JAVASCRIPT")] + EVALUATE_JAVASCRIPT, + #[serde(rename = "EVALUATE_JAVASCRIPT_CONTEXT")] + EVALUATE_JAVASCRIPT_CONTEXT, + #[serde(rename = "EXTRACT_VARIABLE")] + EXTRACT_VARIABLE, + #[serde(rename = "FORBIDDEN_URL")] + FORBIDDEN_URL, + #[serde(rename = "FRAME_DETACHED")] + FRAME_DETACHED, + #[serde(rename = "INCONSISTENCIES")] + INCONSISTENCIES, + #[serde(rename = "INTERNAL_ERROR")] + INTERNAL_ERROR, + #[serde(rename = "INVALID_TYPE_TEXT_DELAY")] + INVALID_TYPE_TEXT_DELAY, + #[serde(rename = "INVALID_URL")] + INVALID_URL, + #[serde(rename = "INVALID_VARIABLE_PATTERN")] + INVALID_VARIABLE_PATTERN, + #[serde(rename = "INVISIBLE_ELEMENT")] + INVISIBLE_ELEMENT, + #[serde(rename = "LOCATE_ELEMENT")] + LOCATE_ELEMENT, + #[serde(rename = "NAVIGATE_TO_LINK")] + NAVIGATE_TO_LINK, + #[serde(rename = "OPEN_URL")] + OPEN_URL, + #[serde(rename = "PRESS_KEY")] + PRESS_KEY, + #[serde(rename = "SERVER_CERTIFICATE")] + SERVER_CERTIFICATE, + #[serde(rename = "SELECT_OPTION")] + SELECT_OPTION, + #[serde(rename = "STEP_TIMEOUT")] + STEP_TIMEOUT, + #[serde(rename = "SUB_TEST_NOT_PASSED")] + SUB_TEST_NOT_PASSED, + #[serde(rename = "TEST_TIMEOUT")] + TEST_TIMEOUT, + #[serde(rename = "TOO_MANY_HTTP_REQUESTS")] + TOO_MANY_HTTP_REQUESTS, + #[serde(rename = "UNAVAILABLE_BROWSER")] + UNAVAILABLE_BROWSER, + #[serde(rename = "UNKNOWN")] + UNKNOWN, + #[serde(rename = "UNSUPPORTED_AUTH_SCHEMA")] + UNSUPPORTED_AUTH_SCHEMA, + #[serde(rename = "UPLOAD_FILES_ELEMENT_TYPE")] + UPLOAD_FILES_ELEMENT_TYPE, + #[serde(rename = "UPLOAD_FILES_DIALOG")] + UPLOAD_FILES_DIALOG, + #[serde(rename = "UPLOAD_FILES_DYNAMIC_ELEMENT")] + UPLOAD_FILES_DYNAMIC_ELEMENT, + #[serde(rename = "UPLOAD_FILES_NAME")] + UPLOAD_FILES_NAME, +} + +impl ToString for SyntheticsBrowserTestFailureCode { + fn to_string(&self) -> String { + match self { + Self::API_REQUEST_FAILURE => String::from("API_REQUEST_FAILURE"), + Self::ASSERTION_FAILURE => String::from("ASSERTION_FAILURE"), + Self::DOWNLOAD_FILE_TOO_LARGE => String::from("DOWNLOAD_FILE_TOO_LARGE"), + Self::ELEMENT_NOT_INTERACTABLE => String::from("ELEMENT_NOT_INTERACTABLE"), + Self::EMAIL_VARIABLE_NOT_DEFINED => String::from("EMAIL_VARIABLE_NOT_DEFINED"), + Self::EVALUATE_JAVASCRIPT => String::from("EVALUATE_JAVASCRIPT"), + Self::EVALUATE_JAVASCRIPT_CONTEXT => String::from("EVALUATE_JAVASCRIPT_CONTEXT"), + Self::EXTRACT_VARIABLE => String::from("EXTRACT_VARIABLE"), + Self::FORBIDDEN_URL => String::from("FORBIDDEN_URL"), + Self::FRAME_DETACHED => String::from("FRAME_DETACHED"), + Self::INCONSISTENCIES => String::from("INCONSISTENCIES"), + Self::INTERNAL_ERROR => String::from("INTERNAL_ERROR"), + Self::INVALID_TYPE_TEXT_DELAY => String::from("INVALID_TYPE_TEXT_DELAY"), + Self::INVALID_URL => String::from("INVALID_URL"), + Self::INVALID_VARIABLE_PATTERN => String::from("INVALID_VARIABLE_PATTERN"), + Self::INVISIBLE_ELEMENT => String::from("INVISIBLE_ELEMENT"), + Self::LOCATE_ELEMENT => String::from("LOCATE_ELEMENT"), + Self::NAVIGATE_TO_LINK => String::from("NAVIGATE_TO_LINK"), + Self::OPEN_URL => String::from("OPEN_URL"), + Self::PRESS_KEY => String::from("PRESS_KEY"), + Self::SERVER_CERTIFICATE => String::from("SERVER_CERTIFICATE"), + Self::SELECT_OPTION => String::from("SELECT_OPTION"), + Self::STEP_TIMEOUT => String::from("STEP_TIMEOUT"), + Self::SUB_TEST_NOT_PASSED => String::from("SUB_TEST_NOT_PASSED"), + Self::TEST_TIMEOUT => String::from("TEST_TIMEOUT"), + Self::TOO_MANY_HTTP_REQUESTS => String::from("TOO_MANY_HTTP_REQUESTS"), + Self::UNAVAILABLE_BROWSER => String::from("UNAVAILABLE_BROWSER"), + Self::UNKNOWN => String::from("UNKNOWN"), + Self::UNSUPPORTED_AUTH_SCHEMA => String::from("UNSUPPORTED_AUTH_SCHEMA"), + Self::UPLOAD_FILES_ELEMENT_TYPE => String::from("UPLOAD_FILES_ELEMENT_TYPE"), + Self::UPLOAD_FILES_DIALOG => String::from("UPLOAD_FILES_DIALOG"), + Self::UPLOAD_FILES_DYNAMIC_ELEMENT => String::from("UPLOAD_FILES_DYNAMIC_ELEMENT"), + Self::UPLOAD_FILES_NAME => String::from("UPLOAD_FILES_NAME"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_data.rs b/src/datadogV1/model/model_synthetics_browser_test_result_data.rs new file mode 100644 index 000000000..03cd4c842 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_result_data.rs @@ -0,0 +1,67 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing results for your Synthetic browser test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestResultData { + /// Type of browser device used for the browser test. + #[serde(rename = "browserType")] + pub browser_type: Option, + /// Browser version used for the browser test. + #[serde(rename = "browserVersion")] + pub browser_version: Option, + /// Object describing the device used to perform the Synthetic test. + #[serde(rename = "device")] + pub device: Option>, + /// Global duration in second of the browser test. + #[serde(rename = "duration")] + pub duration: Option, + /// Error returned for the browser test. + #[serde(rename = "error")] + pub error: Option, + /// The browser test failure details. + #[serde(rename = "failure")] + pub failure: Option>, + /// Whether or not the browser test was conducted. + #[serde(rename = "passed")] + pub passed: Option, + /// The amount of email received during the browser test. + #[serde(rename = "receivedEmailCount")] + pub received_email_count: Option, + /// Starting URL for the browser test. + #[serde(rename = "startUrl")] + pub start_url: Option, + /// Array containing the different browser test steps. + #[serde(rename = "stepDetails")] + pub step_details: Option>, + /// Whether or not a thumbnail is associated with the browser test. + #[serde(rename = "thumbnailsBucketKey")] + pub thumbnails_bucket_key: Option, + /// Time in second to wait before the browser test starts after + /// reaching the start URL. + #[serde(rename = "timeToInteractive")] + pub time_to_interactive: Option, +} + +impl SyntheticsBrowserTestResultData { + pub fn new() -> SyntheticsBrowserTestResultData { + SyntheticsBrowserTestResultData { + browser_type: None, + browser_version: None, + device: None, + duration: None, + error: None, + failure: None, + passed: None, + received_email_count: None, + start_url: None, + step_details: None, + thumbnails_bucket_key: None, + time_to_interactive: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs b/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs new file mode 100644 index 000000000..2a3b39239 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_result_failure.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The browser test failure details. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestResultFailure { + /// Error code that can be returned by a Synthetic test. + #[serde(rename = "code")] + pub code: Option, + /// The browser test error message. + #[serde(rename = "message")] + pub message: Option, +} + +impl SyntheticsBrowserTestResultFailure { + pub fn new() -> SyntheticsBrowserTestResultFailure { + SyntheticsBrowserTestResultFailure { + code: None, + message: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_full.rs b/src/datadogV1/model/model_synthetics_browser_test_result_full.rs new file mode 100644 index 000000000..042de72d1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_result_full.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object returned describing a browser test result. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestResultFull { + /// Object describing the browser test configuration. + #[serde(rename = "check")] + pub check: Option>, + /// When the browser test was conducted. + #[serde(rename = "check_time")] + pub check_time: Option, + /// Version of the browser test used. + #[serde(rename = "check_version")] + pub check_version: Option, + /// Location from which the browser test was performed. + #[serde(rename = "probe_dc")] + pub probe_dc: Option, + /// Object containing results for your Synthetic browser test. + #[serde(rename = "result")] + pub result: Option>, + /// ID of the browser test result. + #[serde(rename = "result_id")] + pub result_id: Option, + /// The status of your Synthetic monitor. + /// * `O` for not triggered + /// * `1` for triggered + /// * `2` for no data + #[serde(rename = "status")] + pub status: Option, +} + +impl SyntheticsBrowserTestResultFull { + pub fn new() -> SyntheticsBrowserTestResultFull { + SyntheticsBrowserTestResultFull { + check: None, + check_time: None, + check_version: None, + probe_dc: None, + result: None, + result_id: None, + status: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_full_check.rs b/src/datadogV1/model/model_synthetics_browser_test_result_full_check.rs new file mode 100644 index 000000000..62c4286c2 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_result_full_check.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the browser test configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestResultFullCheck { + /// Configuration object for a Synthetic test. + #[serde(rename = "config")] + pub config: Box, +} + +impl SyntheticsBrowserTestResultFullCheck { + pub fn new( + config: Box, + ) -> SyntheticsBrowserTestResultFullCheck { + SyntheticsBrowserTestResultFullCheck { config } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_short.rs b/src/datadogV1/model/model_synthetics_browser_test_result_short.rs new file mode 100644 index 000000000..2c8860b67 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_result_short.rs @@ -0,0 +1,41 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object with the results of a single Synthetic browser test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestResultShort { + /// Last time the browser test was performed. + #[serde(rename = "check_time")] + pub check_time: Option, + /// Location from which the Browser test was performed. + #[serde(rename = "probe_dc")] + pub probe_dc: Option, + /// Object with the result of the last browser test run. + #[serde(rename = "result")] + pub result: Option>, + /// ID of the browser test result. + #[serde(rename = "result_id")] + pub result_id: Option, + /// The status of your Synthetic monitor. + /// * `O` for not triggered + /// * `1` for triggered + /// * `2` for no data + #[serde(rename = "status")] + pub status: Option, +} + +impl SyntheticsBrowserTestResultShort { + pub fn new() -> SyntheticsBrowserTestResultShort { + SyntheticsBrowserTestResultShort { + check_time: None, + probe_dc: None, + result: None, + result_id: None, + status: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs b/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs new file mode 100644 index 000000000..f44476341 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_result_short_result.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object with the result of the last browser test run. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestResultShortResult { + /// Object describing the device used to perform the Synthetic test. + #[serde(rename = "device")] + pub device: Option>, + /// Length in milliseconds of the browser test run. + #[serde(rename = "duration")] + pub duration: Option, + /// Amount of errors collected for a single browser test run. + #[serde(rename = "errorCount")] + pub error_count: Option, + /// Amount of browser test steps completed before failing. + #[serde(rename = "stepCountCompleted")] + pub step_count_completed: Option, + /// Total amount of browser test steps. + #[serde(rename = "stepCountTotal")] + pub step_count_total: Option, +} + +impl SyntheticsBrowserTestResultShortResult { + pub fn new() -> SyntheticsBrowserTestResultShortResult { + SyntheticsBrowserTestResultShortResult { + device: None, + duration: None, + error_count: None, + step_count_completed: None, + step_count_total: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs b/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs new file mode 100644 index 000000000..98ce5125f --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_rum_settings.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The RUM data collection settings for the Synthetic browser test. +/// **Note:** There are 3 ways to format RUM settings: +/// +/// `{ isEnabled: false }` +/// RUM data is not collected. +/// +/// `{ isEnabled: true }` +/// RUM data is collected from the Synthetic test's default application. +/// +/// `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` +/// RUM data is collected using the specified application. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserTestRumSettings { + /// RUM application ID used to collect RUM data for the browser test. + #[serde(rename = "applicationId")] + pub application_id: Option, + /// RUM application API key ID used to collect RUM data for the browser test. + #[serde(rename = "clientTokenId")] + pub client_token_id: Option, + /// Determines whether RUM data is collected during test runs. + #[serde(rename = "isEnabled")] + pub is_enabled: bool, +} + +impl SyntheticsBrowserTestRumSettings { + pub fn new(is_enabled: bool) -> SyntheticsBrowserTestRumSettings { + SyntheticsBrowserTestRumSettings { + application_id: None, + client_token_id: None, + is_enabled, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_test_type.rs b/src/datadogV1/model/model_synthetics_browser_test_type.rs new file mode 100644 index 000000000..71d3c6b96 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_test_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBrowserTestType { + #[serde(rename = "browser")] + BROWSER, +} + +impl ToString for SyntheticsBrowserTestType { + fn to_string(&self) -> String { + match self { + Self::BROWSER => String::from("browser"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_variable.rs b/src/datadogV1/model/model_synthetics_browser_variable.rs new file mode 100644 index 000000000..fb0d0a1e1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_variable.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object defining a variable that can be used in your browser test. +/// See the [Recording Steps documentation](https://docs.datadoghq.com/synthetics/browser_tests/actions/?tab=testanelementontheactivepage#variables). +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsBrowserVariable { + /// Example for the variable. + #[serde(rename = "example")] + pub example: Option, + /// ID for the variable. Global variables require an ID. + #[serde(rename = "id")] + pub id: Option, + /// Name of the variable. + #[serde(rename = "name")] + pub name: String, + /// Pattern of the variable. + #[serde(rename = "pattern")] + pub pattern: Option, + /// Determines whether or not the browser test variable is obfuscated. Can only be used with browser variables of type `text`. + #[serde(rename = "secure")] + pub secure: Option, + /// Type of browser test variable. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsBrowserVariableType, +} + +impl SyntheticsBrowserVariable { + pub fn new( + name: String, + type_: crate::datadogV1::model::SyntheticsBrowserVariableType, + ) -> SyntheticsBrowserVariable { + SyntheticsBrowserVariable { + example: None, + id: None, + name, + pattern: None, + secure: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_browser_variable_type.rs b/src/datadogV1/model/model_synthetics_browser_variable_type.rs new file mode 100644 index 000000000..2e52038b7 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_browser_variable_type.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsBrowserVariableType { + #[serde(rename = "element")] + ELEMENT, + #[serde(rename = "email")] + EMAIL, + #[serde(rename = "global")] + GLOBAL, + #[serde(rename = "javascript")] + JAVASCRIPT, + #[serde(rename = "text")] + TEXT, +} + +impl ToString for SyntheticsBrowserVariableType { + fn to_string(&self) -> String { + match self { + Self::ELEMENT => String::from("element"), + Self::EMAIL => String::from("email"), + Self::GLOBAL => String::from("global"), + Self::JAVASCRIPT => String::from("javascript"), + Self::TEXT => String::from("text"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_check_type.rs b/src/datadogV1/model/model_synthetics_check_type.rs new file mode 100644 index 000000000..e7632973f --- /dev/null +++ b/src/datadogV1/model/model_synthetics_check_type.rs @@ -0,0 +1,58 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsCheckType { + #[serde(rename = "equals")] + EQUALS, + #[serde(rename = "notEquals")] + NOT_EQUALS, + #[serde(rename = "contains")] + CONTAINS, + #[serde(rename = "notContains")] + NOT_CONTAINS, + #[serde(rename = "startsWith")] + STARTS_WITH, + #[serde(rename = "notStartsWith")] + NOT_STARTS_WITH, + #[serde(rename = "greater")] + GREATER, + #[serde(rename = "lower")] + LOWER, + #[serde(rename = "greaterEquals")] + GREATER_EQUALS, + #[serde(rename = "lowerEquals")] + LOWER_EQUALS, + #[serde(rename = "matchRegex")] + MATCH_REGEX, + #[serde(rename = "between")] + BETWEEN, + #[serde(rename = "isEmpty")] + IS_EMPTY, + #[serde(rename = "notIsEmpty")] + NOT_IS_EMPTY, +} + +impl ToString for SyntheticsCheckType { + fn to_string(&self) -> String { + match self { + Self::EQUALS => String::from("equals"), + Self::NOT_EQUALS => String::from("notEquals"), + Self::CONTAINS => String::from("contains"), + Self::NOT_CONTAINS => String::from("notContains"), + Self::STARTS_WITH => String::from("startsWith"), + Self::NOT_STARTS_WITH => String::from("notStartsWith"), + Self::GREATER => String::from("greater"), + Self::LOWER => String::from("lower"), + Self::GREATER_EQUALS => String::from("greaterEquals"), + Self::LOWER_EQUALS => String::from("lowerEquals"), + Self::MATCH_REGEX => String::from("matchRegex"), + Self::BETWEEN => String::from("between"), + Self::IS_EMPTY => String::from("isEmpty"), + Self::NOT_IS_EMPTY => String::from("notIsEmpty"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs new file mode 100644 index 000000000..2a49359f3 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Metadata for the Synthetic tests run. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCIBatchMetadata { + /// Description of the CI provider. + #[serde(rename = "ci")] + pub ci: Option>, + /// Git information. + #[serde(rename = "git")] + pub git: Option>, +} + +impl SyntheticsCIBatchMetadata { + pub fn new() -> SyntheticsCIBatchMetadata { + SyntheticsCIBatchMetadata { + ci: None, + git: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs new file mode 100644 index 000000000..35dd2edf8 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_ci.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Description of the CI provider. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCIBatchMetadataCI { + /// Description of the CI pipeline. + #[serde(rename = "pipeline")] + pub pipeline: Option>, + /// Description of the CI provider. + #[serde(rename = "provider")] + pub provider: Option>, +} + +impl SyntheticsCIBatchMetadataCI { + pub fn new() -> SyntheticsCIBatchMetadataCI { + SyntheticsCIBatchMetadataCI { + pipeline: None, + provider: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs new file mode 100644 index 000000000..4533c728b --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_git.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Git information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCIBatchMetadataGit { + /// Branch name. + #[serde(rename = "branch")] + pub branch: Option, + /// The commit SHA. + #[serde(rename = "commitSha")] + pub commit_sha: Option, +} + +impl SyntheticsCIBatchMetadataGit { + pub fn new() -> SyntheticsCIBatchMetadataGit { + SyntheticsCIBatchMetadataGit { + branch: None, + commit_sha: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs new file mode 100644 index 000000000..15c5944fd --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_pipeline.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Description of the CI pipeline. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCIBatchMetadataPipeline { + /// URL of the pipeline. + #[serde(rename = "url")] + pub url: Option, +} + +impl SyntheticsCIBatchMetadataPipeline { + pub fn new() -> SyntheticsCIBatchMetadataPipeline { + SyntheticsCIBatchMetadataPipeline { url: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs b/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs new file mode 100644 index 000000000..f61925f09 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ci_batch_metadata_provider.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Description of the CI provider. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCIBatchMetadataProvider { + /// Name of the CI provider. + #[serde(rename = "name")] + pub name: Option, +} + +impl SyntheticsCIBatchMetadataProvider { + pub fn new() -> SyntheticsCIBatchMetadataProvider { + SyntheticsCIBatchMetadataProvider { name: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_ci_test.rs b/src/datadogV1/model/model_synthetics_ci_test.rs new file mode 100644 index 000000000..0fee7e497 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ci_test.rs @@ -0,0 +1,74 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration for Continuous Testing. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCITest { + /// Disable certificate checks in API tests. + #[serde(rename = "allowInsecureCertificates")] + pub allow_insecure_certificates: Option, + /// Object to handle basic authentication when performing the test. + #[serde(rename = "basicAuth")] + pub basic_auth: Option>, + /// Body to include in the test. + #[serde(rename = "body")] + pub body: Option, + /// Type of the data sent in a Synthetic API test. + #[serde(rename = "bodyType")] + pub body_type: Option, + /// Cookies for the request. + #[serde(rename = "cookies")] + pub cookies: Option, + /// For browser test, array with the different device IDs used to run the test. + #[serde(rename = "deviceIds")] + pub device_ids: Option>, + /// For API HTTP test, whether or not the test should follow redirects. + #[serde(rename = "followRedirects")] + pub follow_redirects: Option, + /// Headers to include when performing the test. + #[serde(rename = "headers")] + pub headers: Option>, + /// Array of locations used to run the test. + #[serde(rename = "locations")] + pub locations: Option>, + /// Metadata for the Synthetic tests run. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// The public ID of the Synthetic test to trigger. + #[serde(rename = "public_id")] + pub public_id: String, + /// Object describing the retry strategy to apply to a Synthetic test. + #[serde(rename = "retry")] + pub retry: Option>, + /// Starting URL for the browser test. + #[serde(rename = "startUrl")] + pub start_url: Option, + /// Variables to replace in the test. + #[serde(rename = "variables")] + pub variables: Option>, +} + +impl SyntheticsCITest { + pub fn new(public_id: String) -> SyntheticsCITest { + SyntheticsCITest { + allow_insecure_certificates: None, + basic_auth: None, + body: None, + body_type: None, + cookies: None, + device_ids: None, + follow_redirects: None, + headers: None, + locations: None, + metadata: None, + public_id, + retry: None, + start_url: None, + variables: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_ci_test_body.rs b/src/datadogV1/model/model_synthetics_ci_test_body.rs new file mode 100644 index 000000000..f9c87bbca --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ci_test_body.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the synthetics tests to trigger. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCITestBody { + /// Individual synthetics test. + #[serde(rename = "tests")] + pub tests: Option>, +} + +impl SyntheticsCITestBody { + pub fn new() -> SyntheticsCITestBody { + SyntheticsCITestBody { tests: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_config_variable.rs b/src/datadogV1/model/model_synthetics_config_variable.rs new file mode 100644 index 000000000..53ce8fbde --- /dev/null +++ b/src/datadogV1/model/model_synthetics_config_variable.rs @@ -0,0 +1,45 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object defining a variable that can be used in your test configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsConfigVariable { + /// Example for the variable. + #[serde(rename = "example")] + pub example: Option, + /// ID of the variable for global variables. + #[serde(rename = "id")] + pub id: Option, + /// Name of the variable. + #[serde(rename = "name")] + pub name: String, + /// Pattern of the variable. + #[serde(rename = "pattern")] + pub pattern: Option, + /// Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`. + #[serde(rename = "secure")] + pub secure: Option, + /// Type of the configuration variable. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsConfigVariableType, +} + +impl SyntheticsConfigVariable { + pub fn new( + name: String, + type_: crate::datadogV1::model::SyntheticsConfigVariableType, + ) -> SyntheticsConfigVariable { + SyntheticsConfigVariable { + example: None, + id: None, + name, + pattern: None, + secure: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_config_variable_type.rs b/src/datadogV1/model/model_synthetics_config_variable_type.rs new file mode 100644 index 000000000..6751ef6ec --- /dev/null +++ b/src/datadogV1/model/model_synthetics_config_variable_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsConfigVariableType { + #[serde(rename = "global")] + GLOBAL, + #[serde(rename = "text")] + TEXT, +} + +impl ToString for SyntheticsConfigVariableType { + fn to_string(&self) -> String { + match self { + Self::GLOBAL => String::from("global"), + Self::TEXT => String::from("text"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_core_web_vitals.rs b/src/datadogV1/model/model_synthetics_core_web_vitals.rs new file mode 100644 index 000000000..32a337c96 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_core_web_vitals.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Core Web Vitals attached to a browser test step. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsCoreWebVitals { + /// Cumulative Layout Shift. + #[serde(rename = "cls")] + pub cls: Option, + /// Largest Contentful Paint in milliseconds. + #[serde(rename = "lcp")] + pub lcp: Option, + /// URL attached to the metrics. + #[serde(rename = "url")] + pub url: Option, +} + +impl SyntheticsCoreWebVitals { + pub fn new() -> SyntheticsCoreWebVitals { + SyntheticsCoreWebVitals { + cls: None, + lcp: None, + url: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_delete_tests_payload.rs b/src/datadogV1/model/model_synthetics_delete_tests_payload.rs new file mode 100644 index 000000000..09b041f14 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_delete_tests_payload.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A JSON list of the ID or IDs of the Synthetic tests that you want +/// to delete. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsDeleteTestsPayload { + /// An array of Synthetic test IDs you want to delete. + #[serde(rename = "public_ids")] + pub public_ids: Option>, +} + +impl SyntheticsDeleteTestsPayload { + pub fn new() -> SyntheticsDeleteTestsPayload { + SyntheticsDeleteTestsPayload { public_ids: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_delete_tests_response.rs b/src/datadogV1/model/model_synthetics_delete_tests_response.rs new file mode 100644 index 000000000..39e638d34 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_delete_tests_response.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object for deleting Synthetic tests. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsDeleteTestsResponse { + /// Array of objects containing a deleted Synthetic test ID with + /// the associated deletion timestamp. + #[serde(rename = "deleted_tests")] + pub deleted_tests: Option>, +} + +impl SyntheticsDeleteTestsResponse { + pub fn new() -> SyntheticsDeleteTestsResponse { + SyntheticsDeleteTestsResponse { + deleted_tests: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_deleted_test.rs b/src/datadogV1/model/model_synthetics_deleted_test.rs new file mode 100644 index 000000000..3464e249c --- /dev/null +++ b/src/datadogV1/model/model_synthetics_deleted_test.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing a deleted Synthetic test ID with the associated +/// deletion timestamp. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsDeletedTest { + /// Deletion timestamp of the Synthetic test ID. + #[serde(rename = "deleted_at")] + pub deleted_at: Option, + /// The Synthetic test ID deleted. + #[serde(rename = "public_id")] + pub public_id: Option, +} + +impl SyntheticsDeletedTest { + pub fn new() -> SyntheticsDeletedTest { + SyntheticsDeletedTest { + deleted_at: None, + public_id: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_device.rs b/src/datadogV1/model/model_synthetics_device.rs new file mode 100644 index 000000000..3d4f3374a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_device.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the device used to perform the Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsDevice { + /// Screen height of the device. + #[serde(rename = "height")] + pub height: i64, + /// The device ID. + #[serde(rename = "id")] + pub id: crate::datadogV1::model::SyntheticsDeviceID, + /// Whether or not the device is a mobile. + #[serde(rename = "isMobile")] + pub is_mobile: Option, + /// The device name. + #[serde(rename = "name")] + pub name: String, + /// Screen width of the device. + #[serde(rename = "width")] + pub width: i64, +} + +impl SyntheticsDevice { + pub fn new( + height: i64, + id: crate::datadogV1::model::SyntheticsDeviceID, + name: String, + width: i64, + ) -> SyntheticsDevice { + SyntheticsDevice { + height, + id, + is_mobile: None, + name, + width, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_device_id.rs b/src/datadogV1/model/model_synthetics_device_id.rs new file mode 100644 index 000000000..aaeca46ff --- /dev/null +++ b/src/datadogV1/model/model_synthetics_device_id.rs @@ -0,0 +1,52 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsDeviceID { + #[serde(rename = "laptop_large")] + LAPTOP_LARGE, + #[serde(rename = "tablet")] + TABLET, + #[serde(rename = "mobile_small")] + MOBILE_SMALL, + #[serde(rename = "chrome.laptop_large")] + CHROME_LAPTOP_LARGE, + #[serde(rename = "chrome.tablet")] + CHROME_TABLET, + #[serde(rename = "chrome.mobile_small")] + CHROME_MOBILE_SMALL, + #[serde(rename = "firefox.laptop_large")] + FIREFOX_LAPTOP_LARGE, + #[serde(rename = "firefox.tablet")] + FIREFOX_TABLET, + #[serde(rename = "firefox.mobile_small")] + FIREFOX_MOBILE_SMALL, + #[serde(rename = "edge.laptop_large")] + EDGE_LAPTOP_LARGE, + #[serde(rename = "edge.tablet")] + EDGE_TABLET, + #[serde(rename = "edge.mobile_small")] + EDGE_MOBILE_SMALL, +} + +impl ToString for SyntheticsDeviceID { + fn to_string(&self) -> String { + match self { + Self::LAPTOP_LARGE => String::from("laptop_large"), + Self::TABLET => String::from("tablet"), + Self::MOBILE_SMALL => String::from("mobile_small"), + Self::CHROME_LAPTOP_LARGE => String::from("chrome.laptop_large"), + Self::CHROME_TABLET => String::from("chrome.tablet"), + Self::CHROME_MOBILE_SMALL => String::from("chrome.mobile_small"), + Self::FIREFOX_LAPTOP_LARGE => String::from("firefox.laptop_large"), + Self::FIREFOX_TABLET => String::from("firefox.tablet"), + Self::FIREFOX_MOBILE_SMALL => String::from("firefox.mobile_small"), + Self::EDGE_LAPTOP_LARGE => String::from("edge.laptop_large"), + Self::EDGE_TABLET => String::from("edge.tablet"), + Self::EDGE_MOBILE_SMALL => String::from("edge.mobile_small"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs b/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs new file mode 100644 index 000000000..554cf4461 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_get_api_test_latest_results_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object with the latest Synthetic API test run. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGetAPITestLatestResultsResponse { + /// Timestamp of the latest API test run. + #[serde(rename = "last_timestamp_fetched")] + pub last_timestamp_fetched: Option, + /// Result of the latest API test run. + #[serde(rename = "results")] + pub results: Option>, +} + +impl SyntheticsGetAPITestLatestResultsResponse { + pub fn new() -> SyntheticsGetAPITestLatestResultsResponse { + SyntheticsGetAPITestLatestResultsResponse { + last_timestamp_fetched: None, + results: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs b/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs new file mode 100644 index 000000000..6c8ef1142 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_get_browser_test_latest_results_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object with the latest Synthetic browser test run. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGetBrowserTestLatestResultsResponse { + /// Timestamp of the latest browser test run. + #[serde(rename = "last_timestamp_fetched")] + pub last_timestamp_fetched: Option, + /// Result of the latest browser test run. + #[serde(rename = "results")] + pub results: Option>, +} + +impl SyntheticsGetBrowserTestLatestResultsResponse { + pub fn new() -> SyntheticsGetBrowserTestLatestResultsResponse { + SyntheticsGetBrowserTestLatestResultsResponse { + last_timestamp_fetched: None, + results: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable.rs b/src/datadogV1/model/model_synthetics_global_variable.rs new file mode 100644 index 000000000..4c1c76e43 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable.rs @@ -0,0 +1,56 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Synthetic global variable. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGlobalVariable { + /// Attributes of the global variable. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Description of the global variable. + #[serde(rename = "description")] + pub description: String, + /// Unique identifier of the global variable. + #[serde(rename = "id")] + pub id: Option, + /// Name of the global variable. Unique across Synthetic global variables. + #[serde(rename = "name")] + pub name: String, + /// Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. + #[serde(rename = "parse_test_options")] + pub parse_test_options: + Option>, + /// A Synthetic test ID to use as a test to generate the variable value. + #[serde(rename = "parse_test_public_id")] + pub parse_test_public_id: Option, + /// Tags of the global variable. + #[serde(rename = "tags")] + pub tags: Vec, + /// Value of the global variable. + #[serde(rename = "value")] + pub value: Box, +} + +impl SyntheticsGlobalVariable { + pub fn new( + description: String, + name: String, + tags: Vec, + value: Box, + ) -> SyntheticsGlobalVariable { + SyntheticsGlobalVariable { + attributes: None, + description, + id: None, + name, + parse_test_options: None, + parse_test_public_id: None, + tags, + value, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable_attributes.rs b/src/datadogV1/model/model_synthetics_global_variable_attributes.rs new file mode 100644 index 000000000..e7927fb31 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable_attributes.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the global variable. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGlobalVariableAttributes { + /// A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + #[serde(rename = "restricted_roles")] + pub restricted_roles: Option>, +} + +impl SyntheticsGlobalVariableAttributes { + pub fn new() -> SyntheticsGlobalVariableAttributes { + SyntheticsGlobalVariableAttributes { + restricted_roles: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable_options.rs b/src/datadogV1/model/model_synthetics_global_variable_options.rs new file mode 100644 index 000000000..a2c192df3 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable_options.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options for the Global Variable for MFA. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGlobalVariableOptions { + /// Parameters for the TOTP/MFA variable + #[serde(rename = "totp_parameters")] + pub totp_parameters: + Option>, +} + +impl SyntheticsGlobalVariableOptions { + pub fn new() -> SyntheticsGlobalVariableOptions { + SyntheticsGlobalVariableOptions { + totp_parameters: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs new file mode 100644 index 000000000..99d13eaed --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGlobalVariableParseTestOptions { + /// When type is `http_header`, name of the header to use to extract the value. + #[serde(rename = "field")] + pub field: Option, + /// When type is `local_variable`, name of the local variable to use to extract the value. + #[serde(rename = "localVariableName")] + pub local_variable_name: Option, + /// Details of the parser to use for the global variable. + #[serde(rename = "parser")] + pub parser: Option>, + /// Property of the Synthetic Test Response to use for a Synthetic global variable. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType, +} + +impl SyntheticsGlobalVariableParseTestOptions { + pub fn new( + type_: crate::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType, + ) -> SyntheticsGlobalVariableParseTestOptions { + SyntheticsGlobalVariableParseTestOptions { + field: None, + local_variable_name: None, + parser: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable_parse_test_options_type.rs b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options_type.rs new file mode 100644 index 000000000..a2ef3b614 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable_parse_test_options_type.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsGlobalVariableParseTestOptionsType { + #[serde(rename = "http_body")] + HTTP_BODY, + #[serde(rename = "http_header")] + HTTP_HEADER, + #[serde(rename = "local_variable")] + LOCAL_VARIABLE, +} + +impl ToString for SyntheticsGlobalVariableParseTestOptionsType { + fn to_string(&self) -> String { + match self { + Self::HTTP_BODY => String::from("http_body"), + Self::HTTP_HEADER => String::from("http_header"), + Self::LOCAL_VARIABLE => String::from("local_variable"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable_parser_type.rs b/src/datadogV1/model/model_synthetics_global_variable_parser_type.rs new file mode 100644 index 000000000..e2b388cb1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable_parser_type.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsGlobalVariableParserType { + #[serde(rename = "raw")] + RAW, + #[serde(rename = "json_path")] + JSON_PATH, + #[serde(rename = "regex")] + REGEX, + #[serde(rename = "x_path")] + X_PATH, +} + +impl ToString for SyntheticsGlobalVariableParserType { + fn to_string(&self) -> String { + match self { + Self::RAW => String::from("raw"), + Self::JSON_PATH => String::from("json_path"), + Self::REGEX => String::from("regex"), + Self::X_PATH => String::from("x_path"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs b/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs new file mode 100644 index 000000000..c249e74e7 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable_totp_parameters.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Parameters for the TOTP/MFA variable +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGlobalVariableTOTPParameters { + /// Number of digits for the OTP code. + #[serde(rename = "digits")] + pub digits: Option, + /// Interval for which to refresh the token (in seconds). + #[serde(rename = "refresh_interval")] + pub refresh_interval: Option, +} + +impl SyntheticsGlobalVariableTOTPParameters { + pub fn new() -> SyntheticsGlobalVariableTOTPParameters { + SyntheticsGlobalVariableTOTPParameters { + digits: None, + refresh_interval: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_global_variable_value.rs b/src/datadogV1/model/model_synthetics_global_variable_value.rs new file mode 100644 index 000000000..87f9dfe8f --- /dev/null +++ b/src/datadogV1/model/model_synthetics_global_variable_value.rs @@ -0,0 +1,31 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Value of the global variable. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsGlobalVariableValue { + /// Options for the Global Variable for MFA. + #[serde(rename = "options")] + pub options: Option>, + /// Determines if the value of the variable is hidden. + #[serde(rename = "secure")] + pub secure: Option, + /// Value of the global variable. When reading a global variable, + /// the value will not be present if the variable is hidden with the `secure` property. + #[serde(rename = "value")] + pub value: Option, +} + +impl SyntheticsGlobalVariableValue { + pub fn new() -> SyntheticsGlobalVariableValue { + SyntheticsGlobalVariableValue { + options: None, + secure: None, + value: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_list_global_variables_response.rs b/src/datadogV1/model/model_synthetics_list_global_variables_response.rs new file mode 100644 index 000000000..47764ce21 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_list_global_variables_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing an array of Synthetic global variables. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsListGlobalVariablesResponse { + /// Array of Synthetic global variables. + #[serde(rename = "variables")] + pub variables: Option>, +} + +impl SyntheticsListGlobalVariablesResponse { + pub fn new() -> SyntheticsListGlobalVariablesResponse { + SyntheticsListGlobalVariablesResponse { variables: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_list_tests_response.rs b/src/datadogV1/model/model_synthetics_list_tests_response.rs new file mode 100644 index 000000000..c347c71e6 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_list_tests_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing an array of Synthetic tests configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsListTestsResponse { + /// Array of Synthetic tests configuration. + #[serde(rename = "tests")] + pub tests: Option>, +} + +impl SyntheticsListTestsResponse { + pub fn new() -> SyntheticsListTestsResponse { + SyntheticsListTestsResponse { tests: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_location.rs b/src/datadogV1/model/model_synthetics_location.rs new file mode 100644 index 000000000..21eae43f1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_location.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Synthetic location that can be used when creating or editing a +/// test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsLocation { + /// Unique identifier of the location. + #[serde(rename = "id")] + pub id: Option, + /// Name of the location. + #[serde(rename = "name")] + pub name: Option, +} + +impl SyntheticsLocation { + pub fn new() -> SyntheticsLocation { + SyntheticsLocation { + id: None, + name: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_locations.rs b/src/datadogV1/model/model_synthetics_locations.rs new file mode 100644 index 000000000..55aac5a12 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_locations.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of Synthetic locations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsLocations { + /// List of Synthetic locations. + #[serde(rename = "locations")] + pub locations: Option>, +} + +impl SyntheticsLocations { + pub fn new() -> SyntheticsLocations { + SyntheticsLocations { locations: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_parsing_options.rs b/src/datadogV1/model/model_synthetics_parsing_options.rs new file mode 100644 index 000000000..4618793ab --- /dev/null +++ b/src/datadogV1/model/model_synthetics_parsing_options.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Parsing options for variables to extract. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsParsingOptions { + /// When type is `http_header`, name of the header to use to extract the value. + #[serde(rename = "field")] + pub field: Option, + /// Name of the variable to extract. + #[serde(rename = "name")] + pub name: Option, + /// Details of the parser to use for the global variable. + #[serde(rename = "parser")] + pub parser: Option>, + /// Determines whether or not the extracted value will be obfuscated. + #[serde(rename = "secure")] + pub secure: Option, + /// Property of the Synthetic Test Response to use for a Synthetic global variable. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SyntheticsParsingOptions { + pub fn new() -> SyntheticsParsingOptions { + SyntheticsParsingOptions { + field: None, + name: None, + parser: None, + secure: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_patch_test_body.rs b/src/datadogV1/model/model_synthetics_patch_test_body.rs new file mode 100644 index 000000000..307c29065 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_patch_test_body.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Wrapper around an array of [JSON Patch](https://jsonpatch.com) operations to perform on the test +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPatchTestBody { + /// Array of [JSON Patch](https://jsonpatch.com) operations to perform on the test + #[serde(rename = "data")] + pub data: Option>, +} + +impl SyntheticsPatchTestBody { + pub fn new() -> SyntheticsPatchTestBody { + SyntheticsPatchTestBody { data: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_patch_test_operation.rs b/src/datadogV1/model/model_synthetics_patch_test_operation.rs new file mode 100644 index 000000000..51b3bb6b3 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_patch_test_operation.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single [JSON Patch](https://jsonpatch.com) operation to perform on the test +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPatchTestOperation { + /// The operation to perform + #[serde(rename = "op")] + pub op: Option, + /// The path to the value to modify + #[serde(rename = "path")] + pub path: Option, + /// A value to use in a [JSON Patch](https://jsonpatch.com) operation + #[serde(rename = "value")] + pub value: Option>, +} + +impl SyntheticsPatchTestOperation { + pub fn new() -> SyntheticsPatchTestOperation { + SyntheticsPatchTestOperation { + op: None, + path: None, + value: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_patch_test_operation_name.rs b/src/datadogV1/model/model_synthetics_patch_test_operation_name.rs new file mode 100644 index 000000000..aec6b37fd --- /dev/null +++ b/src/datadogV1/model/model_synthetics_patch_test_operation_name.rs @@ -0,0 +1,34 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsPatchTestOperationName { + #[serde(rename = "add")] + ADD, + #[serde(rename = "remove")] + REMOVE, + #[serde(rename = "replace")] + REPLACE, + #[serde(rename = "move")] + MOVE, + #[serde(rename = "copy")] + COPY, + #[serde(rename = "test")] + TEST, +} + +impl ToString for SyntheticsPatchTestOperationName { + fn to_string(&self) -> String { + match self { + Self::ADD => String::from("add"), + Self::REMOVE => String::from("remove"), + Self::REPLACE => String::from("replace"), + Self::MOVE => String::from("move"), + Self::COPY => String::from("copy"), + Self::TEST => String::from("test"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_playing_tab.rs b/src/datadogV1/model/model_synthetics_playing_tab.rs new file mode 100644 index 000000000..e8e008275 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_playing_tab.rs @@ -0,0 +1,29 @@ +// 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. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i64)] +pub enum SyntheticsPlayingTab { + MAIN_TAB = -1, + NEW_TAB = 0, + TAB_1 = 1, + TAB_2 = 2, + TAB_3 = 3, +} + +impl ToString for SyntheticsPlayingTab { + fn to_string(&self) -> String { + match self { + Self::MAIN_TAB => String::from("-1"), + Self::NEW_TAB => String::from("0"), + Self::TAB_1 => String::from("1"), + Self::TAB_2 => String::from("2"), + Self::TAB_3 => String::from("3"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_private_location.rs b/src/datadogV1/model/model_synthetics_private_location.rs new file mode 100644 index 000000000..7bfa36107 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_private_location.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing information about the private location to create. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPrivateLocation { + /// Description of the private location. + #[serde(rename = "description")] + pub description: String, + /// Unique identifier of the private location. + #[serde(rename = "id")] + pub id: Option, + /// Object containing metadata about the private location. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// Name of the private location. + #[serde(rename = "name")] + pub name: String, + /// Secrets for the private location. Only present in the response when creating the private location. + #[serde(rename = "secrets")] + pub secrets: Option>, + /// Array of tags attached to the private location. + #[serde(rename = "tags")] + pub tags: Vec, +} + +impl SyntheticsPrivateLocation { + pub fn new(description: String, name: String, tags: Vec) -> SyntheticsPrivateLocation { + SyntheticsPrivateLocation { + description, + id: None, + metadata: None, + name, + secrets: None, + tags, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_private_location_creation_response.rs b/src/datadogV1/model/model_synthetics_private_location_creation_response.rs new file mode 100644 index 000000000..b5cce65ef --- /dev/null +++ b/src/datadogV1/model/model_synthetics_private_location_creation_response.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object that contains the new private location, the public key for result encryption, and the configuration skeleton. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPrivateLocationCreationResponse { + /// Configuration skeleton for the private location. See installation instructions of the private location on how to use this configuration. + #[serde(rename = "config")] + pub config: Option>, + /// Object containing information about the private location to create. + #[serde(rename = "private_location")] + pub private_location: Option>, + /// Public key for the result encryption. + #[serde(rename = "result_encryption")] + pub result_encryption: Option< + Box, + >, +} + +impl SyntheticsPrivateLocationCreationResponse { + pub fn new() -> SyntheticsPrivateLocationCreationResponse { + SyntheticsPrivateLocationCreationResponse { + config: None, + private_location: None, + result_encryption: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs b/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs new file mode 100644 index 000000000..65e596a5e --- /dev/null +++ b/src/datadogV1/model/model_synthetics_private_location_creation_response_result_encryption.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Public key for the result encryption. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPrivateLocationCreationResponseResultEncryption { + /// Fingerprint for the encryption key. + #[serde(rename = "id")] + pub id: Option, + /// Public key for result encryption. + #[serde(rename = "key")] + pub key: Option, +} + +impl SyntheticsPrivateLocationCreationResponseResultEncryption { + pub fn new() -> SyntheticsPrivateLocationCreationResponseResultEncryption { + SyntheticsPrivateLocationCreationResponseResultEncryption { + id: None, + key: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_private_location_metadata.rs b/src/datadogV1/model/model_synthetics_private_location_metadata.rs new file mode 100644 index 000000000..4588291c1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_private_location_metadata.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing metadata about the private location. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPrivateLocationMetadata { + /// A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + #[serde(rename = "restricted_roles")] + pub restricted_roles: Option>, +} + +impl SyntheticsPrivateLocationMetadata { + pub fn new() -> SyntheticsPrivateLocationMetadata { + SyntheticsPrivateLocationMetadata { + restricted_roles: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets.rs b/src/datadogV1/model/model_synthetics_private_location_secrets.rs new file mode 100644 index 000000000..c200aba1a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_private_location_secrets.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Secrets for the private location. Only present in the response when creating the private location. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPrivateLocationSecrets { + /// Authentication part of the secrets. + #[serde(rename = "authentication")] + pub authentication: + Option>, + /// Private key for the private location. + #[serde(rename = "config_decryption")] + pub config_decryption: + Option>, +} + +impl SyntheticsPrivateLocationSecrets { + pub fn new() -> SyntheticsPrivateLocationSecrets { + SyntheticsPrivateLocationSecrets { + authentication: None, + config_decryption: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs b/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs new file mode 100644 index 000000000..06a9ea5de --- /dev/null +++ b/src/datadogV1/model/model_synthetics_private_location_secrets_authentication.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Authentication part of the secrets. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPrivateLocationSecretsAuthentication { + /// Access key for the private location. + #[serde(rename = "id")] + pub id: Option, + /// Secret access key for the private location. + #[serde(rename = "key")] + pub key: Option, +} + +impl SyntheticsPrivateLocationSecretsAuthentication { + pub fn new() -> SyntheticsPrivateLocationSecretsAuthentication { + SyntheticsPrivateLocationSecretsAuthentication { + id: None, + key: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs b/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs new file mode 100644 index 000000000..e40809a4e --- /dev/null +++ b/src/datadogV1/model/model_synthetics_private_location_secrets_config_decryption.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Private key for the private location. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsPrivateLocationSecretsConfigDecryption { + /// Private key for the private location. + #[serde(rename = "key")] + pub key: Option, +} + +impl SyntheticsPrivateLocationSecretsConfigDecryption { + pub fn new() -> SyntheticsPrivateLocationSecretsConfigDecryption { + SyntheticsPrivateLocationSecretsConfigDecryption { key: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate.rs b/src/datadogV1/model/model_synthetics_ssl_certificate.rs new file mode 100644 index 000000000..657788a8a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ssl_certificate.rs @@ -0,0 +1,66 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the SSL certificate used for a Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsSSLCertificate { + /// Cipher used for the connection. + #[serde(rename = "cipher")] + pub cipher: Option, + /// Exponent associated to the certificate. + #[serde(rename = "exponent")] + pub exponent: Option, + /// Array of extensions and details used for the certificate. + #[serde(rename = "extKeyUsage")] + pub ext_key_usage: Option>, + /// MD5 digest of the DER-encoded Certificate information. + #[serde(rename = "fingerprint")] + pub fingerprint: Option, + /// SHA-1 digest of the DER-encoded Certificate information. + #[serde(rename = "fingerprint256")] + pub fingerprint256: Option, + /// Object describing the issuer of a SSL certificate. + #[serde(rename = "issuer")] + pub issuer: Option>, + /// Modulus associated to the SSL certificate private key. + #[serde(rename = "modulus")] + pub modulus: Option, + /// TLS protocol used for the test. + #[serde(rename = "protocol")] + pub protocol: Option, + /// Serial Number assigned by Symantec to the SSL certificate. + #[serde(rename = "serialNumber")] + pub serial_number: Option, + /// Object describing the SSL certificate used for the test. + #[serde(rename = "subject")] + pub subject: Option>, + /// Date from which the SSL certificate is valid. + #[serde(rename = "validFrom")] + pub valid_from: Option, + /// Date until which the SSL certificate is valid. + #[serde(rename = "validTo")] + pub valid_to: Option, +} + +impl SyntheticsSSLCertificate { + pub fn new() -> SyntheticsSSLCertificate { + SyntheticsSSLCertificate { + cipher: None, + exponent: None, + ext_key_usage: None, + fingerprint: None, + fingerprint256: None, + issuer: None, + modulus: None, + protocol: None, + serial_number: None, + subject: None, + valid_from: None, + valid_to: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs b/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs new file mode 100644 index 000000000..59291af5e --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_issuer.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the issuer of a SSL certificate. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsSSLCertificateIssuer { + /// Country Name that issued the certificate. + #[serde(rename = "C")] + pub c: Option, + /// Common Name that issued certificate. + #[serde(rename = "CN")] + pub cn: Option, + /// Locality that issued the certificate. + #[serde(rename = "L")] + pub l: Option, + /// Organization that issued the certificate. + #[serde(rename = "O")] + pub o: Option, + /// Organizational Unit that issued the certificate. + #[serde(rename = "OU")] + pub ou: Option, + /// State Or Province Name that issued the certificate. + #[serde(rename = "ST")] + pub st: Option, +} + +impl SyntheticsSSLCertificateIssuer { + pub fn new() -> SyntheticsSSLCertificateIssuer { + SyntheticsSSLCertificateIssuer { + c: None, + cn: None, + l: None, + o: None, + ou: None, + st: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs b/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs new file mode 100644 index 000000000..880a53302 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_ssl_certificate_subject.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the SSL certificate used for the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsSSLCertificateSubject { + /// Country Name associated with the certificate. + #[serde(rename = "C")] + pub c: Option, + /// Common Name that associated with the certificate. + #[serde(rename = "CN")] + pub cn: Option, + /// Locality associated with the certificate. + #[serde(rename = "L")] + pub l: Option, + /// Organization associated with the certificate. + #[serde(rename = "O")] + pub o: Option, + /// Organizational Unit associated with the certificate. + #[serde(rename = "OU")] + pub ou: Option, + /// State Or Province Name associated with the certificate. + #[serde(rename = "ST")] + pub st: Option, + /// Subject Alternative Name associated with the certificate. + #[serde(rename = "altName")] + pub alt_name: Option, +} + +impl SyntheticsSSLCertificateSubject { + pub fn new() -> SyntheticsSSLCertificateSubject { + SyntheticsSSLCertificateSubject { + c: None, + cn: None, + l: None, + o: None, + ou: None, + st: None, + alt_name: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_status.rs b/src/datadogV1/model/model_synthetics_status.rs new file mode 100644 index 000000000..73c3c11b5 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_status.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsStatus { + #[serde(rename = "passed")] + PASSED, + #[serde(rename = "skipped")] + skipped, + #[serde(rename = "failed")] + failed, +} + +impl ToString for SyntheticsStatus { + fn to_string(&self) -> String { + match self { + Self::PASSED => String::from("passed"), + Self::skipped => String::from("skipped"), + Self::failed => String::from("failed"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_step.rs b/src/datadogV1/model/model_synthetics_step.rs new file mode 100644 index 000000000..e6879b44a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_step.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The steps used in a Synthetic browser test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsStep { + /// A boolean set to allow this step to fail. + #[serde(rename = "allowFailure")] + pub allow_failure: Option, + /// A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails. + #[serde(rename = "isCritical")] + pub is_critical: Option, + /// The name of the step. + #[serde(rename = "name")] + pub name: Option, + /// A boolean set to not take a screenshot for the step. + #[serde(rename = "noScreenshot")] + pub no_screenshot: Option, + /// The parameters of the step. + #[serde(rename = "params")] + pub params: Option>, + /// The time before declaring a step failed. + #[serde(rename = "timeout")] + pub timeout: Option, + /// Step type used in your Synthetic test. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SyntheticsStep { + pub fn new() -> SyntheticsStep { + SyntheticsStep { + allow_failure: None, + is_critical: None, + name: None, + no_screenshot: None, + params: None, + timeout: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_step_detail.rs b/src/datadogV1/model/model_synthetics_step_detail.rs new file mode 100644 index 000000000..67bfa039f --- /dev/null +++ b/src/datadogV1/model/model_synthetics_step_detail.rs @@ -0,0 +1,87 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing a step for a Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsStepDetail { + /// Array of errors collected for a browser test. + #[serde(rename = "browserErrors")] + pub browser_errors: Option>, + /// Type of assertion to apply in an API test. + #[serde(rename = "checkType")] + pub check_type: Option, + /// Description of the test. + #[serde(rename = "description")] + pub description: Option, + /// Total duration in millisecond of the test. + #[serde(rename = "duration")] + pub duration: Option, + /// Error returned by the test. + #[serde(rename = "error")] + pub error: Option, + /// Navigate between different tabs for your browser test. + #[serde(rename = "playingTab")] + pub playing_tab: Option, + /// Whether or not screenshots where collected by the test. + #[serde(rename = "screenshotBucketKey")] + pub screenshot_bucket_key: Option, + /// Whether or not to skip this step. + #[serde(rename = "skipped")] + pub skipped: Option, + /// Whether or not snapshots where collected by the test. + #[serde(rename = "snapshotBucketKey")] + pub snapshot_bucket_key: Option, + /// The step ID. + #[serde(rename = "stepId")] + pub step_id: Option, + /// If this step includes a sub-test. + /// [Subtests documentation](https://docs.datadoghq.com/synthetics/browser_tests/advanced_options/#subtests). + #[serde(rename = "subTestStepDetails")] + pub sub_test_step_details: Option>, + /// Time before starting the step. + #[serde(rename = "timeToInteractive")] + pub time_to_interactive: Option, + /// Step type used in your Synthetic test. + #[serde(rename = "type")] + pub type_: Option, + /// URL to perform the step against. + #[serde(rename = "url")] + pub url: Option, + /// Value for the step. + #[serde(rename = "value")] + pub value: Option>, + /// Array of Core Web Vitals metrics for the step. + #[serde(rename = "vitalsMetrics")] + pub vitals_metrics: Option>, + /// Warning collected that didn't failed the step. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl SyntheticsStepDetail { + pub fn new() -> SyntheticsStepDetail { + SyntheticsStepDetail { + browser_errors: None, + check_type: None, + description: None, + duration: None, + error: None, + playing_tab: None, + screenshot_bucket_key: None, + skipped: None, + snapshot_bucket_key: None, + step_id: None, + sub_test_step_details: None, + time_to_interactive: None, + type_: None, + url: None, + value: None, + vitals_metrics: None, + warnings: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_step_detail_warning.rs b/src/datadogV1/model/model_synthetics_step_detail_warning.rs new file mode 100644 index 000000000..fb4cae158 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_step_detail_warning.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object collecting warnings for a given step. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsStepDetailWarning { + /// Message for the warning. + #[serde(rename = "message")] + pub message: String, + /// User locator used. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsWarningType, +} + +impl SyntheticsStepDetailWarning { + pub fn new( + message: String, + type_: crate::datadogV1::model::SyntheticsWarningType, + ) -> SyntheticsStepDetailWarning { + SyntheticsStepDetailWarning { message, type_ } + } +} diff --git a/src/datadogV1/model/model_synthetics_step_type.rs b/src/datadogV1/model/model_synthetics_step_type.rs new file mode 100644 index 000000000..1a7a76120 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_step_type.rs @@ -0,0 +1,91 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsStepType { + #[serde(rename = "assertCurrentUrl")] + ASSERT_CURRENT_URL, + #[serde(rename = "assertElementAttribute")] + ASSERT_ELEMENT_ATTRIBUTE, + #[serde(rename = "assertElementContent")] + ASSERT_ELEMENT_CONTENT, + #[serde(rename = "assertElementPresent")] + ASSERT_ELEMENT_PRESENT, + #[serde(rename = "assertEmail")] + ASSERT_EMAIL, + #[serde(rename = "assertFileDownload")] + ASSERT_FILE_DOWNLOAD, + #[serde(rename = "assertFromJavascript")] + ASSERT_FROM_JAVASCRIPT, + #[serde(rename = "assertPageContains")] + ASSERT_PAGE_CONTAINS, + #[serde(rename = "assertPageLacks")] + ASSERT_PAGE_LACKS, + #[serde(rename = "click")] + CLICK, + #[serde(rename = "extractFromJavascript")] + EXTRACT_FROM_JAVASCRIPT, + #[serde(rename = "extractVariable")] + EXTRACT_VARIABLE, + #[serde(rename = "goToEmailLink")] + GO_TO_EMAIL_LINK, + #[serde(rename = "goToUrl")] + GO_TO_URL, + #[serde(rename = "goToUrlAndMeasureTti")] + GO_TO_URL_AND_MEASURE_TTI, + #[serde(rename = "hover")] + HOVER, + #[serde(rename = "playSubTest")] + PLAY_SUB_TEST, + #[serde(rename = "pressKey")] + PRESS_KEY, + #[serde(rename = "refresh")] + REFRESH, + #[serde(rename = "runApiTest")] + RUN_API_TEST, + #[serde(rename = "scroll")] + SCROLL, + #[serde(rename = "selectOption")] + SELECT_OPTION, + #[serde(rename = "typeText")] + TYPE_TEXT, + #[serde(rename = "uploadFiles")] + UPLOAD_FILES, + #[serde(rename = "wait")] + WAIT, +} + +impl ToString for SyntheticsStepType { + fn to_string(&self) -> String { + match self { + Self::ASSERT_CURRENT_URL => String::from("assertCurrentUrl"), + Self::ASSERT_ELEMENT_ATTRIBUTE => String::from("assertElementAttribute"), + Self::ASSERT_ELEMENT_CONTENT => String::from("assertElementContent"), + Self::ASSERT_ELEMENT_PRESENT => String::from("assertElementPresent"), + Self::ASSERT_EMAIL => String::from("assertEmail"), + Self::ASSERT_FILE_DOWNLOAD => String::from("assertFileDownload"), + Self::ASSERT_FROM_JAVASCRIPT => String::from("assertFromJavascript"), + Self::ASSERT_PAGE_CONTAINS => String::from("assertPageContains"), + Self::ASSERT_PAGE_LACKS => String::from("assertPageLacks"), + Self::CLICK => String::from("click"), + Self::EXTRACT_FROM_JAVASCRIPT => String::from("extractFromJavascript"), + Self::EXTRACT_VARIABLE => String::from("extractVariable"), + Self::GO_TO_EMAIL_LINK => String::from("goToEmailLink"), + Self::GO_TO_URL => String::from("goToUrl"), + Self::GO_TO_URL_AND_MEASURE_TTI => String::from("goToUrlAndMeasureTti"), + Self::HOVER => String::from("hover"), + Self::PLAY_SUB_TEST => String::from("playSubTest"), + Self::PRESS_KEY => String::from("pressKey"), + Self::REFRESH => String::from("refresh"), + Self::RUN_API_TEST => String::from("runApiTest"), + Self::SCROLL => String::from("scroll"), + Self::SELECT_OPTION => String::from("selectOption"), + Self::TYPE_TEXT => String::from("typeText"), + Self::UPLOAD_FILES => String::from("uploadFiles"), + Self::WAIT => String::from("wait"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_call_type.rs b/src/datadogV1/model/model_synthetics_test_call_type.rs new file mode 100644 index 000000000..958d01c9b --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_call_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestCallType { + #[serde(rename = "healthcheck")] + HEALTHCHECK, + #[serde(rename = "unary")] + UNARY, +} + +impl ToString for SyntheticsTestCallType { + fn to_string(&self) -> String { + match self { + Self::HEALTHCHECK => String::from("healthcheck"), + Self::UNARY => String::from("unary"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_ci_options.rs b/src/datadogV1/model/model_synthetics_test_ci_options.rs new file mode 100644 index 000000000..f81ca3423 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_ci_options.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// CI/CD options for a Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestCiOptions { + /// Execution rule for a Synthetic test. + #[serde(rename = "executionRule")] + pub execution_rule: Option, +} + +impl SyntheticsTestCiOptions { + pub fn new() -> SyntheticsTestCiOptions { + SyntheticsTestCiOptions { + execution_rule: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_config.rs b/src/datadogV1/model/model_synthetics_test_config.rs new file mode 100644 index 000000000..c543fbbb1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_config.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration object for a Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestConfig { + /// Array of assertions used for the test. Required for single API tests. + #[serde(rename = "assertions")] + pub assertions: Option>, + /// Array of variables used for the test. + #[serde(rename = "configVariables")] + pub config_variables: Option>, + /// Object describing the Synthetic test request. + #[serde(rename = "request")] + pub request: Option>, + /// Browser tests only - array of variables used for the test steps. + #[serde(rename = "variables")] + pub variables: Option>, +} + +impl SyntheticsTestConfig { + pub fn new() -> SyntheticsTestConfig { + SyntheticsTestConfig { + assertions: None, + config_variables: None, + request: None, + variables: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_details.rs b/src/datadogV1/model/model_synthetics_test_details.rs new file mode 100644 index 000000000..5d7b89ab8 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_details.rs @@ -0,0 +1,72 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing details about your Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestDetails { + /// Configuration object for a Synthetic test. + #[serde(rename = "config")] + pub config: Option>, + /// Object describing the creator of the shared element. + #[serde(rename = "creator")] + pub creator: Option>, + /// Array of locations used to run the test. + #[serde(rename = "locations")] + pub locations: Option>, + /// Notification message associated with the test. + #[serde(rename = "message")] + pub message: Option, + /// The associated monitor ID. + #[serde(rename = "monitor_id")] + pub monitor_id: Option, + /// Name of the test. + #[serde(rename = "name")] + pub name: Option, + /// Object describing the extra options for a Synthetic test. + #[serde(rename = "options")] + pub options: Option>, + /// The test public ID. + #[serde(rename = "public_id")] + pub public_id: Option, + /// Define whether you want to start (`live`) or pause (`paused`) a + /// Synthetic test. + #[serde(rename = "status")] + pub status: Option, + /// For browser test, the steps of the test. + #[serde(rename = "steps")] + pub steps: Option>, + /// The subtype of the Synthetic API test, `http`, `ssl`, `tcp`, + /// `dns`, `icmp`, `udp`, `websocket`, `grpc` or `multi`. + #[serde(rename = "subtype")] + pub subtype: Option, + /// Array of tags attached to the test. + #[serde(rename = "tags")] + pub tags: Option>, + /// Type of the Synthetic test, either `api` or `browser`. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SyntheticsTestDetails { + pub fn new() -> SyntheticsTestDetails { + SyntheticsTestDetails { + config: None, + creator: None, + locations: None, + message: None, + monitor_id: None, + name: None, + options: None, + public_id: None, + status: None, + steps: None, + subtype: None, + tags: None, + type_: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_details_sub_type.rs b/src/datadogV1/model/model_synthetics_test_details_sub_type.rs new file mode 100644 index 000000000..83f80c7c2 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_details_sub_type.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestDetailsSubType { + #[serde(rename = "http")] + HTTP, + #[serde(rename = "ssl")] + SSL, + #[serde(rename = "tcp")] + TCP, + #[serde(rename = "dns")] + DNS, + #[serde(rename = "multi")] + MULTI, + #[serde(rename = "icmp")] + ICMP, + #[serde(rename = "udp")] + UDP, + #[serde(rename = "websocket")] + WEBSOCKET, + #[serde(rename = "grpc")] + GRPC, +} + +impl ToString for SyntheticsTestDetailsSubType { + fn to_string(&self) -> String { + match self { + Self::HTTP => String::from("http"), + Self::SSL => String::from("ssl"), + Self::TCP => String::from("tcp"), + Self::DNS => String::from("dns"), + Self::MULTI => String::from("multi"), + Self::ICMP => String::from("icmp"), + Self::UDP => String::from("udp"), + Self::WEBSOCKET => String::from("websocket"), + Self::GRPC => String::from("grpc"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_details_type.rs b/src/datadogV1/model/model_synthetics_test_details_type.rs new file mode 100644 index 000000000..2d86aaf25 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_details_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestDetailsType { + #[serde(rename = "api")] + API, + #[serde(rename = "browser")] + BROWSER, +} + +impl ToString for SyntheticsTestDetailsType { + fn to_string(&self) -> String { + match self { + Self::API => String::from("api"), + Self::BROWSER => String::from("browser"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_execution_rule.rs b/src/datadogV1/model/model_synthetics_test_execution_rule.rs new file mode 100644 index 000000000..6e56d661b --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_execution_rule.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestExecutionRule { + #[serde(rename = "blocking")] + BLOCKING, + #[serde(rename = "non_blocking")] + NON_BLOCKING, + #[serde(rename = "skipped")] + SKIPPED, +} + +impl ToString for SyntheticsTestExecutionRule { + fn to_string(&self) -> String { + match self { + Self::BLOCKING => String::from("blocking"), + Self::NON_BLOCKING => String::from("non_blocking"), + Self::SKIPPED => String::from("skipped"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_monitor_status.rs b/src/datadogV1/model/model_synthetics_test_monitor_status.rs new file mode 100644 index 000000000..e426a8bf4 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_monitor_status.rs @@ -0,0 +1,25 @@ +// 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. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i64)] +pub enum SyntheticsTestMonitorStatus { + UNTRIGGERED = 0, + TRIGGERED = 1, + NO_DATA = 2, +} + +impl ToString for SyntheticsTestMonitorStatus { + fn to_string(&self) -> String { + match self { + Self::UNTRIGGERED => String::from("0"), + Self::TRIGGERED => String::from("1"), + Self::NO_DATA => String::from("2"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_options.rs b/src/datadogV1/model/model_synthetics_test_options.rs new file mode 100644 index 000000000..7400682bd --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_options.rs @@ -0,0 +1,119 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the extra options for a Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestOptions { + /// For SSL test, whether or not the test should allow self signed + /// certificates. + #[serde(rename = "accept_self_signed")] + pub accept_self_signed: Option, + /// Allows loading insecure content for an HTTP request in an API test. + #[serde(rename = "allow_insecure")] + pub allow_insecure: Option, + /// For SSL test, whether or not the test should fail on revoked certificate in stapled OCSP. + #[serde(rename = "checkCertificateRevocation")] + pub check_certificate_revocation: Option, + /// CI/CD options for a Synthetic test. + #[serde(rename = "ci")] + pub ci: Option>, + /// For browser test, array with the different device IDs used to run the test. + #[serde(rename = "device_ids")] + pub device_ids: Option>, + /// Whether or not to disable CORS mechanism. + #[serde(rename = "disableCors")] + pub disable_cors: Option, + /// Disable Content Security Policy for browser tests. + #[serde(rename = "disableCsp")] + pub disable_csp: Option, + /// For API HTTP test, whether or not the test should follow redirects. + #[serde(rename = "follow_redirects")] + pub follow_redirects: Option, + /// HTTP version to use for a Synthetic test. + #[serde(rename = "httpVersion")] + pub http_version: Option, + /// Ignore server certificate error for browser tests. + #[serde(rename = "ignoreServerCertificateError")] + pub ignore_server_certificate_error: Option, + /// Timeout before declaring the initial step as failed (in seconds) for browser tests. + #[serde(rename = "initialNavigationTimeout")] + pub initial_navigation_timeout: Option, + /// Minimum amount of time in failure required to trigger an alert. + #[serde(rename = "min_failure_duration")] + pub min_failure_duration: Option, + /// Minimum number of locations in failure required to trigger + /// an alert. + #[serde(rename = "min_location_failed")] + pub min_location_failed: Option, + /// The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs. + #[serde(rename = "monitor_name")] + pub monitor_name: Option, + /// Object containing the options for a Synthetic test as a monitor + /// (for example, renotification). + #[serde(rename = "monitor_options")] + pub monitor_options: Option>, + /// Integer from 1 (high) to 5 (low) indicating alert severity. + #[serde(rename = "monitor_priority")] + pub monitor_priority: Option, + /// Prevents saving screenshots of the steps. + #[serde(rename = "noScreenshot")] + pub no_screenshot: Option, + /// A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + #[serde(rename = "restricted_roles")] + pub restricted_roles: Option>, + /// Object describing the retry strategy to apply to a Synthetic test. + #[serde(rename = "retry")] + pub retry: Option>, + /// The RUM data collection settings for the Synthetic browser test. + /// **Note:** There are 3 ways to format RUM settings: + /// + /// `{ isEnabled: false }` + /// RUM data is not collected. + /// + /// `{ isEnabled: true }` + /// RUM data is collected from the Synthetic test's default application. + /// + /// `{ isEnabled: true, applicationId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", clientTokenId: 12345 }` + /// RUM data is collected using the specified application. + #[serde(rename = "rumSettings")] + pub rum_settings: Option>, + /// Object containing timeframes and timezone used for advanced scheduling. + #[serde(rename = "scheduling")] + pub scheduling: Option>, + /// The frequency at which to run the Synthetic test (in seconds). + #[serde(rename = "tick_every")] + pub tick_every: Option, +} + +impl SyntheticsTestOptions { + pub fn new() -> SyntheticsTestOptions { + SyntheticsTestOptions { + accept_self_signed: None, + allow_insecure: None, + check_certificate_revocation: None, + ci: None, + device_ids: None, + disable_cors: None, + disable_csp: None, + follow_redirects: None, + http_version: None, + ignore_server_certificate_error: None, + initial_navigation_timeout: None, + min_failure_duration: None, + min_location_failed: None, + monitor_name: None, + monitor_options: None, + monitor_priority: None, + no_screenshot: None, + restricted_roles: None, + retry: None, + rum_settings: None, + scheduling: None, + tick_every: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_options_http_version.rs b/src/datadogV1/model/model_synthetics_test_options_http_version.rs new file mode 100644 index 000000000..ca325cba7 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_options_http_version.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestOptionsHTTPVersion { + #[serde(rename = "http1")] + HTTP1, + #[serde(rename = "http2")] + HTTP2, + #[serde(rename = "any")] + ANY, +} + +impl ToString for SyntheticsTestOptionsHTTPVersion { + fn to_string(&self) -> String { + match self { + Self::HTTP1 => String::from("http1"), + Self::HTTP2 => String::from("http2"), + Self::ANY => String::from("any"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs b/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs new file mode 100644 index 000000000..47161efc1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_options_monitor_options.rs @@ -0,0 +1,24 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the options for a Synthetic test as a monitor +/// (for example, renotification). +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestOptionsMonitorOptions { + /// Time interval before renotifying if the test is still failing + /// (in minutes). + #[serde(rename = "renotify_interval")] + pub renotify_interval: Option, +} + +impl SyntheticsTestOptionsMonitorOptions { + pub fn new() -> SyntheticsTestOptionsMonitorOptions { + SyntheticsTestOptionsMonitorOptions { + renotify_interval: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_options_retry.rs b/src/datadogV1/model/model_synthetics_test_options_retry.rs new file mode 100644 index 000000000..526cc5bd7 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_options_retry.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the retry strategy to apply to a Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestOptionsRetry { + /// Number of times a test needs to be retried before marking a + /// location as failed. Defaults to 0. + #[serde(rename = "count")] + pub count: Option, + /// Time interval between retries (in milliseconds). Defaults to + /// 300ms. + #[serde(rename = "interval")] + pub interval: Option, +} + +impl SyntheticsTestOptionsRetry { + pub fn new() -> SyntheticsTestOptionsRetry { + SyntheticsTestOptionsRetry { + count: None, + interval: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_options_scheduling.rs b/src/datadogV1/model/model_synthetics_test_options_scheduling.rs new file mode 100644 index 000000000..46d39c7a7 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing timeframes and timezone used for advanced scheduling. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestOptionsScheduling { + /// Array containing objects describing the scheduling pattern to apply to each day. + #[serde(rename = "timeframes")] + pub timeframes: Option>, + /// Timezone in which the timeframe is based. + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl SyntheticsTestOptionsScheduling { + pub fn new() -> SyntheticsTestOptionsScheduling { + SyntheticsTestOptionsScheduling { + timeframes: None, + timezone: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs b/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs new file mode 100644 index 000000000..4f4e40cf2 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_options_scheduling_timeframe.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing a timeframe. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestOptionsSchedulingTimeframe { + /// Number representing the day of the week. + #[serde(rename = "day")] + pub day: Option, + /// The hour of the day on which scheduling starts. + #[serde(rename = "from")] + pub from: Option, + /// The hour of the day on which scheduling ends. + #[serde(rename = "to")] + pub to: Option, +} + +impl SyntheticsTestOptionsSchedulingTimeframe { + pub fn new() -> SyntheticsTestOptionsSchedulingTimeframe { + SyntheticsTestOptionsSchedulingTimeframe { + day: None, + from: None, + to: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_pause_status.rs b/src/datadogV1/model/model_synthetics_test_pause_status.rs new file mode 100644 index 000000000..238d6b41c --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_pause_status.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestPauseStatus { + #[serde(rename = "live")] + LIVE, + #[serde(rename = "paused")] + PAUSED, +} + +impl ToString for SyntheticsTestPauseStatus { + fn to_string(&self) -> String { + match self { + Self::LIVE => String::from("live"), + Self::PAUSED => String::from("paused"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_process_status.rs b/src/datadogV1/model/model_synthetics_test_process_status.rs new file mode 100644 index 000000000..41c25fe3e --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_process_status.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestProcessStatus { + #[serde(rename = "not_scheduled")] + NOT_SCHEDULED, + #[serde(rename = "scheduled")] + SCHEDULED, + #[serde(rename = "finished")] + FINISHED, + #[serde(rename = "finished_with_error")] + FINISHED_WITH_ERROR, +} + +impl ToString for SyntheticsTestProcessStatus { + fn to_string(&self) -> String { + match self { + Self::NOT_SCHEDULED => String::from("not_scheduled"), + Self::SCHEDULED => String::from("scheduled"), + Self::FINISHED => String::from("finished"), + Self::FINISHED_WITH_ERROR => String::from("finished_with_error"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_request.rs b/src/datadogV1/model/model_synthetics_test_request.rs new file mode 100644 index 000000000..e56231362 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_request.rs @@ -0,0 +1,128 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the Synthetic test request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestRequest { + /// Allows loading insecure content for an HTTP request in a multistep test step. + #[serde(rename = "allow_insecure")] + pub allow_insecure: Option, + /// Object to handle basic authentication when performing the test. + #[serde(rename = "basicAuth")] + pub basic_auth: Option>, + /// Body to include in the test. + #[serde(rename = "body")] + pub body: Option, + /// Type of the request body. + #[serde(rename = "bodyType")] + pub body_type: Option, + /// The type of gRPC call to perform. + #[serde(rename = "callType")] + pub call_type: Option, + /// Client certificate to use when performing the test request. + #[serde(rename = "certificate")] + pub certificate: Option>, + /// By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`. + #[serde(rename = "certificateDomains")] + pub certificate_domains: Option>, + /// A protobuf JSON descriptor that needs to be gzipped first then base64 encoded. + #[serde(rename = "compressedJsonDescriptor")] + pub compressed_json_descriptor: Option, + /// DNS server to use for DNS tests. + #[serde(rename = "dnsServer")] + pub dns_server: Option, + /// DNS server port to use for DNS tests. + #[serde(rename = "dnsServerPort")] + pub dns_server_port: Option, + /// Specifies whether or not the request follows redirects. + #[serde(rename = "follow_redirects")] + pub follow_redirects: Option, + /// Headers to include when performing the test. + #[serde(rename = "headers")] + pub headers: Option>, + /// Host name to perform the test with. + #[serde(rename = "host")] + pub host: Option, + /// Message to send for UDP or WebSocket tests. + #[serde(rename = "message")] + pub message: Option, + /// Metadata to include when performing the gRPC test. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// Either the HTTP method/verb to use or a gRPC method available on the service set in the `service` field. Required if `subtype` is `HTTP` or if `subtype` is `grpc` and `callType` is `unary`. + #[serde(rename = "method")] + pub method: Option, + /// Determines whether or not to save the response body. + #[serde(rename = "noSavingResponseBody")] + pub no_saving_response_body: Option, + /// Number of pings to use per test. + #[serde(rename = "numberOfPackets")] + pub number_of_packets: Option, + /// Persist cookies across redirects. + #[serde(rename = "persistCookies")] + pub persist_cookies: Option, + /// Port to use when performing the test. + #[serde(rename = "port")] + pub port: Option, + /// The proxy to perform the test. + #[serde(rename = "proxy")] + pub proxy: Option>, + /// Query to use for the test. + #[serde(rename = "query")] + pub query: Option>, + /// For SSL tests, it specifies on which server you want to initiate the TLS handshake, + /// allowing the server to present one of multiple possible certificates on + /// the same IP address and TCP port number. + #[serde(rename = "servername")] + pub servername: Option, + /// The gRPC service on which you want to perform the gRPC call. + #[serde(rename = "service")] + pub service: Option, + /// Turns on a traceroute probe to discover all gateways along the path to the host destination. + #[serde(rename = "shouldTrackHops")] + pub should_track_hops: Option, + /// Timeout in seconds for the test. + #[serde(rename = "timeout")] + pub timeout: Option, + /// URL to perform the test with. + #[serde(rename = "url")] + pub url: Option, +} + +impl SyntheticsTestRequest { + pub fn new() -> SyntheticsTestRequest { + SyntheticsTestRequest { + allow_insecure: None, + basic_auth: None, + body: None, + body_type: None, + call_type: None, + certificate: None, + certificate_domains: None, + compressed_json_descriptor: None, + dns_server: None, + dns_server_port: None, + follow_redirects: None, + headers: None, + host: None, + message: None, + metadata: None, + method: None, + no_saving_response_body: None, + number_of_packets: None, + persist_cookies: None, + port: None, + proxy: None, + query: None, + servername: None, + service: None, + should_track_hops: None, + timeout: None, + url: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_request_body_type.rs b/src/datadogV1/model/model_synthetics_test_request_body_type.rs new file mode 100644 index 000000000..ce5008fab --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_request_body_type.rs @@ -0,0 +1,36 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsTestRequestBodyType { + #[serde(rename = "text/plain")] + TEXT_PLAIN, + #[serde(rename = "application/json")] + APPLICATION_JSON, + #[serde(rename = "text/xml")] + TEXT_XML, + #[serde(rename = "text/html")] + TEXT_HTML, + #[serde(rename = "application/x-www-form-urlencoded")] + APPLICATION_X_WWW_FORM_URLENCODED, + #[serde(rename = "graphql")] + GRAPHQL, +} + +impl ToString for SyntheticsTestRequestBodyType { + fn to_string(&self) -> String { + match self { + Self::TEXT_PLAIN => String::from("text/plain"), + Self::APPLICATION_JSON => String::from("application/json"), + Self::TEXT_XML => String::from("text/xml"), + Self::TEXT_HTML => String::from("text/html"), + Self::APPLICATION_X_WWW_FORM_URLENCODED => { + String::from("application/x-www-form-urlencoded") + } + Self::GRAPHQL => String::from("graphql"), + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_request_certificate.rs b/src/datadogV1/model/model_synthetics_test_request_certificate.rs new file mode 100644 index 000000000..634c1e547 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_request_certificate.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Client certificate to use when performing the test request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestRequestCertificate { + /// Define a request certificate. + #[serde(rename = "cert")] + pub cert: Option>, + /// Define a request certificate. + #[serde(rename = "key")] + pub key: Option>, +} + +impl SyntheticsTestRequestCertificate { + pub fn new() -> SyntheticsTestRequestCertificate { + SyntheticsTestRequestCertificate { + cert: None, + key: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs b/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs new file mode 100644 index 000000000..27bb6d6ec --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_request_certificate_item.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Define a request certificate. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestRequestCertificateItem { + /// Content of the certificate or key. + #[serde(rename = "content")] + pub content: Option, + /// File name for the certificate or key. + #[serde(rename = "filename")] + pub filename: Option, + /// Date of update of the certificate or key, ISO format. + #[serde(rename = "updatedAt")] + pub updated_at: Option, +} + +impl SyntheticsTestRequestCertificateItem { + pub fn new() -> SyntheticsTestRequestCertificateItem { + SyntheticsTestRequestCertificateItem { + content: None, + filename: None, + updated_at: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_test_request_proxy.rs b/src/datadogV1/model/model_synthetics_test_request_proxy.rs new file mode 100644 index 000000000..7c68405a6 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_test_request_proxy.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The proxy to perform the test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTestRequestProxy { + /// Headers to include when performing the test. + #[serde(rename = "headers")] + pub headers: Option>, + /// URL of the proxy to perform the test. + #[serde(rename = "url")] + pub url: String, +} + +impl SyntheticsTestRequestProxy { + pub fn new(url: String) -> SyntheticsTestRequestProxy { + SyntheticsTestRequestProxy { headers: None, url } + } +} diff --git a/src/datadogV1/model/model_synthetics_timing.rs b/src/datadogV1/model/model_synthetics_timing.rs new file mode 100644 index 000000000..cd9149428 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_timing.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing all metrics and their values collected for a Synthetic API test. +/// See the [Synthetic Monitoring Metrics documentation](https://docs.datadoghq.com/synthetics/metrics/). +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTiming { + /// The duration in millisecond of the DNS lookup. + #[serde(rename = "dns")] + pub dns: Option, + /// The time in millisecond to download the response. + #[serde(rename = "download")] + pub download: Option, + /// The time in millisecond to first byte. + #[serde(rename = "firstByte")] + pub first_byte: Option, + /// The duration in millisecond of the TLS handshake. + #[serde(rename = "handshake")] + pub handshake: Option, + /// The time in millisecond spent during redirections. + #[serde(rename = "redirect")] + pub redirect: Option, + /// The duration in millisecond of the TLS handshake. + #[serde(rename = "ssl")] + pub ssl: Option, + /// Time in millisecond to establish the TCP connection. + #[serde(rename = "tcp")] + pub tcp: Option, + /// The overall time in millisecond the request took to be processed. + #[serde(rename = "total")] + pub total: Option, + /// Time spent in millisecond waiting for a response. + #[serde(rename = "wait")] + pub wait: Option, +} + +impl SyntheticsTiming { + pub fn new() -> SyntheticsTiming { + SyntheticsTiming { + dns: None, + download: None, + first_byte: None, + handshake: None, + redirect: None, + ssl: None, + tcp: None, + total: None, + wait: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_trigger_body.rs b/src/datadogV1/model/model_synthetics_trigger_body.rs new file mode 100644 index 000000000..ec1f97443 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_trigger_body.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing the Synthetic tests to trigger. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTriggerBody { + /// Individual Synthetic test. + #[serde(rename = "tests")] + pub tests: Vec, +} + +impl SyntheticsTriggerBody { + pub fn new( + tests: Vec, + ) -> SyntheticsTriggerBody { + SyntheticsTriggerBody { tests } + } +} diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs b/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs new file mode 100644 index 000000000..a2f63f248 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_trigger_ci_test_location.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Synthetic location. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTriggerCITestLocation { + /// Unique identifier of the location. + #[serde(rename = "id")] + pub id: Option, + /// Name of the location. + #[serde(rename = "name")] + pub name: Option, +} + +impl SyntheticsTriggerCITestLocation { + pub fn new() -> SyntheticsTriggerCITestLocation { + SyntheticsTriggerCITestLocation { + id: None, + name: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs b/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs new file mode 100644 index 000000000..c8c935483 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_trigger_ci_test_run_result.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Information about a single test run. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTriggerCITestRunResult { + /// The device ID. + #[serde(rename = "device")] + pub device: Option, + /// The location ID of the test run. + #[serde(rename = "location")] + pub location: Option, + /// The public ID of the Synthetic test. + #[serde(rename = "public_id")] + pub public_id: Option, + /// ID of the result. + #[serde(rename = "result_id")] + pub result_id: Option, +} + +impl SyntheticsTriggerCITestRunResult { + pub fn new() -> SyntheticsTriggerCITestRunResult { + SyntheticsTriggerCITestRunResult { + device: None, + location: None, + public_id: None, + result_id: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs b/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs new file mode 100644 index 000000000..fe94c2cd1 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_trigger_ci_tests_response.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing information about the tests triggered. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTriggerCITestsResponse { + /// The public ID of the batch triggered. + #[serde( + rename = "batch_id", + default, + with = "::serde_with::rust::double_option" + )] + pub batch_id: Option>, + /// List of Synthetic locations. + #[serde(rename = "locations")] + pub locations: Option>, + /// Information about the tests runs. + #[serde(rename = "results")] + pub results: Option>, + /// The public IDs of the Synthetic test triggered. + #[serde(rename = "triggered_check_ids")] + pub triggered_check_ids: Option>, +} + +impl SyntheticsTriggerCITestsResponse { + pub fn new() -> SyntheticsTriggerCITestsResponse { + SyntheticsTriggerCITestsResponse { + batch_id: None, + locations: None, + results: None, + triggered_check_ids: None, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_trigger_test.rs b/src/datadogV1/model/model_synthetics_trigger_test.rs new file mode 100644 index 000000000..9c33e9562 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_trigger_test.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Test configuration for Synthetics +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsTriggerTest { + /// Metadata for the Synthetic tests run. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// The public ID of the Synthetic test to trigger. + #[serde(rename = "public_id")] + pub public_id: String, +} + +impl SyntheticsTriggerTest { + pub fn new(public_id: String) -> SyntheticsTriggerTest { + SyntheticsTriggerTest { + metadata: None, + public_id, + } + } +} diff --git a/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs b/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs new file mode 100644 index 000000000..12c82c1f4 --- /dev/null +++ b/src/datadogV1/model/model_synthetics_update_test_pause_status_payload.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to start or pause an existing Synthetic test. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsUpdateTestPauseStatusPayload { + /// Define whether you want to start (`live`) or pause (`paused`) a + /// Synthetic test. + #[serde(rename = "new_status")] + pub new_status: Option, +} + +impl SyntheticsUpdateTestPauseStatusPayload { + pub fn new() -> SyntheticsUpdateTestPauseStatusPayload { + SyntheticsUpdateTestPauseStatusPayload { new_status: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_variable_parser.rs b/src/datadogV1/model/model_synthetics_variable_parser.rs new file mode 100644 index 000000000..a8818674a --- /dev/null +++ b/src/datadogV1/model/model_synthetics_variable_parser.rs @@ -0,0 +1,25 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details of the parser to use for the global variable. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SyntheticsVariableParser { + /// Type of parser for a Synthetic global variable from a synthetics test. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::SyntheticsGlobalVariableParserType, + /// Regex or JSON path used for the parser. Not used with type `raw`. + #[serde(rename = "value")] + pub value: Option, +} + +impl SyntheticsVariableParser { + pub fn new( + type_: crate::datadogV1::model::SyntheticsGlobalVariableParserType, + ) -> SyntheticsVariableParser { + SyntheticsVariableParser { type_, value: None } + } +} diff --git a/src/datadogV1/model/model_synthetics_warning_type.rs b/src/datadogV1/model/model_synthetics_warning_type.rs new file mode 100644 index 000000000..b7a70249d --- /dev/null +++ b/src/datadogV1/model/model_synthetics_warning_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SyntheticsWarningType { + #[serde(rename = "user_locator")] + USER_LOCATOR, +} + +impl ToString for SyntheticsWarningType { + fn to_string(&self) -> String { + match self { + Self::USER_LOCATOR => String::from("user_locator"), + } + } +} diff --git a/src/datadogV1/model/model_table_widget_cell_display_mode.rs b/src/datadogV1/model/model_table_widget_cell_display_mode.rs new file mode 100644 index 000000000..d58c23753 --- /dev/null +++ b/src/datadogV1/model/model_table_widget_cell_display_mode.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TableWidgetCellDisplayMode { + #[serde(rename = "number")] + NUMBER, + #[serde(rename = "bar")] + BAR, +} + +impl ToString for TableWidgetCellDisplayMode { + fn to_string(&self) -> String { + match self { + Self::NUMBER => String::from("number"), + Self::BAR => String::from("bar"), + } + } +} diff --git a/src/datadogV1/model/model_table_widget_definition.rs b/src/datadogV1/model/model_table_widget_definition.rs new file mode 100644 index 000000000..6b6cb53d7 --- /dev/null +++ b/src/datadogV1/model/model_table_widget_definition.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The table visualization is available on timeboards and screenboards. It displays columns of metrics grouped by tag key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TableWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// Controls the display of the search bar. + #[serde(rename = "has_search_bar")] + pub has_search_bar: Option, + /// Widget definition. + #[serde(rename = "requests")] + pub requests: Vec, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the table widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::TableWidgetDefinitionType, +} + +impl TableWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::TableWidgetDefinitionType, + ) -> TableWidgetDefinition { + TableWidgetDefinition { + custom_links: None, + has_search_bar: None, + requests, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_table_widget_definition_type.rs b/src/datadogV1/model/model_table_widget_definition_type.rs new file mode 100644 index 000000000..70a0da135 --- /dev/null +++ b/src/datadogV1/model/model_table_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TableWidgetDefinitionType { + #[serde(rename = "query_table")] + QUERY_TABLE, +} + +impl ToString for TableWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::QUERY_TABLE => String::from("query_table"), + } + } +} diff --git a/src/datadogV1/model/model_table_widget_has_search_bar.rs b/src/datadogV1/model/model_table_widget_has_search_bar.rs new file mode 100644 index 000000000..6312f8e61 --- /dev/null +++ b/src/datadogV1/model/model_table_widget_has_search_bar.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TableWidgetHasSearchBar { + #[serde(rename = "always")] + ALWAYS, + #[serde(rename = "never")] + NEVER, + #[serde(rename = "auto")] + AUTO, +} + +impl ToString for TableWidgetHasSearchBar { + fn to_string(&self) -> String { + match self { + Self::ALWAYS => String::from("always"), + Self::NEVER => String::from("never"), + Self::AUTO => String::from("auto"), + } + } +} diff --git a/src/datadogV1/model/model_table_widget_request.rs b/src/datadogV1/model/model_table_widget_request.rs new file mode 100644 index 000000000..6d7f4669b --- /dev/null +++ b/src/datadogV1/model/model_table_widget_request.rs @@ -0,0 +1,94 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated table widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TableWidgetRequest { + /// Aggregator used for the request. + #[serde(rename = "aggregator")] + pub aggregator: Option, + /// The column name (defaults to the metric name). + #[serde(rename = "alias")] + pub alias: Option, + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The APM stats query for table and distributions widgets. + #[serde(rename = "apm_stats_query")] + pub apm_stats_query: Option>, + /// A list of display modes for each table cell. + #[serde(rename = "cell_display_mode")] + pub cell_display_mode: Option>, + /// List of conditional formats. + #[serde(rename = "conditional_formats")] + pub conditional_formats: Option>, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// For metric queries, the number of lines to show in the table. Only one request should have this property. + #[serde(rename = "limit")] + pub limit: Option, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// Widget sorting methods. + #[serde(rename = "order")] + pub order: Option, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Query definition. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, +} + +impl TableWidgetRequest { + pub fn new() -> TableWidgetRequest { + TableWidgetRequest { + aggregator: None, + alias: None, + apm_query: None, + apm_stats_query: None, + cell_display_mode: None, + conditional_formats: None, + event_query: None, + formulas: None, + limit: None, + log_query: None, + network_query: None, + order: None, + process_query: None, + profile_metrics_query: None, + q: None, + queries: None, + response_format: None, + rum_query: None, + security_query: None, + } + } +} diff --git a/src/datadogV1/model/model_tag_to_hosts.rs b/src/datadogV1/model/model_tag_to_hosts.rs index 658aa0efd..ae6e8cc55 100644 --- a/src/datadogV1/model/model_tag_to_hosts.rs +++ b/src/datadogV1/model/model_tag_to_hosts.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// In this object, the key is the tag, the value is a list of host names that are reporting that tag. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TagToHosts { /// A list of tags to apply to the host. #[serde(rename = "tags")] diff --git a/src/datadogV1/model/model_target_format_type.rs b/src/datadogV1/model/model_target_format_type.rs new file mode 100644 index 000000000..f8ec3f1a4 --- /dev/null +++ b/src/datadogV1/model/model_target_format_type.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TargetFormatType { + #[serde(rename = "auto")] + AUTO, + #[serde(rename = "string")] + STRING, + #[serde(rename = "integer")] + INTEGER, + #[serde(rename = "double")] + DOUBLE, +} + +impl ToString for TargetFormatType { + fn to_string(&self) -> String { + match self { + Self::AUTO => String::from("auto"), + Self::STRING => String::from("string"), + Self::INTEGER => String::from("integer"), + Self::DOUBLE => String::from("double"), + } + } +} diff --git a/src/datadogV1/model/model_timeseries_background.rs b/src/datadogV1/model/model_timeseries_background.rs new file mode 100644 index 000000000..7479ac647 --- /dev/null +++ b/src/datadogV1/model/model_timeseries_background.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Set a timeseries on the widget background. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesBackground { + /// Timeseries is made using an area or bars. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::TimeseriesBackgroundType, + /// Axis controls for the widget. + #[serde(rename = "yaxis")] + pub yaxis: Option>, +} + +impl TimeseriesBackground { + pub fn new(type_: crate::datadogV1::model::TimeseriesBackgroundType) -> TimeseriesBackground { + TimeseriesBackground { type_, yaxis: None } + } +} diff --git a/src/datadogV1/model/model_timeseries_background_type.rs b/src/datadogV1/model/model_timeseries_background_type.rs new file mode 100644 index 000000000..d60e30ffe --- /dev/null +++ b/src/datadogV1/model/model_timeseries_background_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TimeseriesBackgroundType { + #[serde(rename = "bars")] + BARS, + #[serde(rename = "area")] + AREA, +} + +impl ToString for TimeseriesBackgroundType { + fn to_string(&self) -> String { + match self { + Self::BARS => String::from("bars"), + Self::AREA => String::from("area"), + } + } +} diff --git a/src/datadogV1/model/model_timeseries_widget_definition.rs b/src/datadogV1/model/model_timeseries_widget_definition.rs new file mode 100644 index 000000000..cd234d1b4 --- /dev/null +++ b/src/datadogV1/model/model_timeseries_widget_definition.rs @@ -0,0 +1,81 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The timeseries visualization allows you to display the evolution of one or more metrics, log events, or Indexed Spans over time. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// List of widget events. + #[serde(rename = "events")] + pub events: Option>, + /// Columns displayed in the legend. + #[serde(rename = "legend_columns")] + pub legend_columns: Option>, + /// Layout of the legend. + #[serde(rename = "legend_layout")] + pub legend_layout: Option, + /// Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". + #[serde(rename = "legend_size")] + pub legend_size: Option, + /// List of markers. + #[serde(rename = "markers")] + pub markers: Option>, + /// List of timeseries widget requests. + #[serde(rename = "requests")] + pub requests: Vec, + /// Axis controls for the widget. + #[serde(rename = "right_yaxis")] + pub right_yaxis: Option>, + /// (screenboard only) Show the legend for this widget. + #[serde(rename = "show_legend")] + pub show_legend: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the timeseries widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::TimeseriesWidgetDefinitionType, + /// Axis controls for the widget. + #[serde(rename = "yaxis")] + pub yaxis: Option>, +} + +impl TimeseriesWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::TimeseriesWidgetDefinitionType, + ) -> TimeseriesWidgetDefinition { + TimeseriesWidgetDefinition { + custom_links: None, + events: None, + legend_columns: None, + legend_layout: None, + legend_size: None, + markers: None, + requests, + right_yaxis: None, + show_legend: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + yaxis: None, + } + } +} diff --git a/src/datadogV1/model/model_timeseries_widget_definition_type.rs b/src/datadogV1/model/model_timeseries_widget_definition_type.rs new file mode 100644 index 000000000..795d5483a --- /dev/null +++ b/src/datadogV1/model/model_timeseries_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TimeseriesWidgetDefinitionType { + #[serde(rename = "timeseries")] + TIMESERIES, +} + +impl ToString for TimeseriesWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES => String::from("timeseries"), + } + } +} diff --git a/src/datadogV1/model/model_timeseries_widget_expression_alias.rs b/src/datadogV1/model/model_timeseries_widget_expression_alias.rs new file mode 100644 index 000000000..61a072d0d --- /dev/null +++ b/src/datadogV1/model/model_timeseries_widget_expression_alias.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Define an expression alias. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesWidgetExpressionAlias { + /// Expression alias. + #[serde(rename = "alias_name")] + pub alias_name: Option, + /// Expression name. + #[serde(rename = "expression")] + pub expression: String, +} + +impl TimeseriesWidgetExpressionAlias { + pub fn new(expression: String) -> TimeseriesWidgetExpressionAlias { + TimeseriesWidgetExpressionAlias { + alias_name: None, + expression, + } + } +} diff --git a/src/datadogV1/model/model_timeseries_widget_legend_column.rs b/src/datadogV1/model/model_timeseries_widget_legend_column.rs new file mode 100644 index 000000000..11a13b33a --- /dev/null +++ b/src/datadogV1/model/model_timeseries_widget_legend_column.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TimeseriesWidgetLegendColumn { + #[serde(rename = "value")] + VALUE, + #[serde(rename = "avg")] + AVG, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, +} + +impl ToString for TimeseriesWidgetLegendColumn { + fn to_string(&self) -> String { + match self { + Self::VALUE => String::from("value"), + Self::AVG => String::from("avg"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + } + } +} diff --git a/src/datadogV1/model/model_timeseries_widget_legend_layout.rs b/src/datadogV1/model/model_timeseries_widget_legend_layout.rs new file mode 100644 index 000000000..7c9c774ee --- /dev/null +++ b/src/datadogV1/model/model_timeseries_widget_legend_layout.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TimeseriesWidgetLegendLayout { + #[serde(rename = "auto")] + AUTO, + #[serde(rename = "horizontal")] + HORIZONTAL, + #[serde(rename = "vertical")] + VERTICAL, +} + +impl ToString for TimeseriesWidgetLegendLayout { + fn to_string(&self) -> String { + match self { + Self::AUTO => String::from("auto"), + Self::HORIZONTAL => String::from("horizontal"), + Self::VERTICAL => String::from("vertical"), + } + } +} diff --git a/src/datadogV1/model/model_timeseries_widget_request.rs b/src/datadogV1/model/model_timeseries_widget_request.rs new file mode 100644 index 000000000..588a884c1 --- /dev/null +++ b/src/datadogV1/model/model_timeseries_widget_request.rs @@ -0,0 +1,86 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated timeseries widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesWidgetRequest { + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The log query. + #[serde(rename = "audit_query")] + pub audit_query: Option>, + /// Type of display to use for the request. + #[serde(rename = "display_type")] + pub display_type: Option, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// Used to define expression aliases. + #[serde(rename = "metadata")] + pub metadata: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// Whether or not to display a second y-axis on the right. + #[serde(rename = "on_right_yaxis")] + pub on_right_yaxis: Option, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Widget query. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, + /// Define request widget style. + #[serde(rename = "style")] + pub style: Option>, +} + +impl TimeseriesWidgetRequest { + pub fn new() -> TimeseriesWidgetRequest { + TimeseriesWidgetRequest { + apm_query: None, + audit_query: None, + display_type: None, + event_query: None, + formulas: None, + log_query: None, + metadata: None, + network_query: None, + on_right_yaxis: None, + process_query: None, + profile_metrics_query: None, + q: None, + queries: None, + response_format: None, + rum_query: None, + security_query: None, + style: None, + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_definition.rs b/src/datadogV1/model/model_toplist_widget_definition.rs new file mode 100644 index 000000000..4a9e28322 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_definition.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The top list visualization enables you to display a list of Tag value like hostname or service with the most or least of any metric value, such as highest consumers of CPU, hosts with the least disk space, etc. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ToplistWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// List of top list widget requests. + #[serde(rename = "requests")] + pub requests: Vec, + /// Style customization for a top list widget. + #[serde(rename = "style")] + pub style: Option>, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the top list widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ToplistWidgetDefinitionType, +} + +impl ToplistWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::ToplistWidgetDefinitionType, + ) -> ToplistWidgetDefinition { + ToplistWidgetDefinition { + custom_links: None, + requests, + style: None, + time: None, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_definition_type.rs b/src/datadogV1/model/model_toplist_widget_definition_type.rs new file mode 100644 index 000000000..7006c1620 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ToplistWidgetDefinitionType { + #[serde(rename = "toplist")] + TOPLIST, +} + +impl ToString for ToplistWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::TOPLIST => String::from("toplist"), + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_display.rs b/src/datadogV1/model/model_toplist_widget_display.rs new file mode 100644 index 000000000..508b23690 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_display.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Top list widget display options. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ToplistWidgetDisplay { + ToplistWidgetStacked(Box), + ToplistWidgetFlat(Box), +} diff --git a/src/datadogV1/model/model_toplist_widget_flat.rs b/src/datadogV1/model/model_toplist_widget_flat.rs new file mode 100644 index 000000000..252943553 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_flat.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Top list widget flat display. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ToplistWidgetFlat { + /// Top list widget flat display type. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ToplistWidgetFlatType, +} + +impl ToplistWidgetFlat { + pub fn new(type_: crate::datadogV1::model::ToplistWidgetFlatType) -> ToplistWidgetFlat { + ToplistWidgetFlat { type_ } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_flat_type.rs b/src/datadogV1/model/model_toplist_widget_flat_type.rs new file mode 100644 index 000000000..8a6d79046 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_flat_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ToplistWidgetFlatType { + #[serde(rename = "flat")] + FLAT, +} + +impl ToString for ToplistWidgetFlatType { + fn to_string(&self) -> String { + match self { + Self::FLAT => String::from("flat"), + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_legend.rs b/src/datadogV1/model/model_toplist_widget_legend.rs new file mode 100644 index 000000000..bbd2cc61e --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_legend.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ToplistWidgetLegend { + #[serde(rename = "automatic")] + AUTOMATIC, + #[serde(rename = "inline")] + INLINE, + #[serde(rename = "none")] + NONE, +} + +impl ToString for ToplistWidgetLegend { + fn to_string(&self) -> String { + match self { + Self::AUTOMATIC => String::from("automatic"), + Self::INLINE => String::from("inline"), + Self::NONE => String::from("none"), + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_request.rs b/src/datadogV1/model/model_toplist_widget_request.rs new file mode 100644 index 000000000..8b9f7ed4a --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_request.rs @@ -0,0 +1,78 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Updated top list widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ToplistWidgetRequest { + /// The log query. + #[serde(rename = "apm_query")] + pub apm_query: Option>, + /// The log query. + #[serde(rename = "audit_query")] + pub audit_query: Option>, + /// List of conditional formats. + #[serde(rename = "conditional_formats")] + pub conditional_formats: Option>, + /// The log query. + #[serde(rename = "event_query")] + pub event_query: Option>, + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// The log query. + #[serde(rename = "log_query")] + pub log_query: Option>, + /// The log query. + #[serde(rename = "network_query")] + pub network_query: Option>, + /// The process query to use in the widget. + #[serde(rename = "process_query")] + pub process_query: Option>, + /// The log query. + #[serde(rename = "profile_metrics_query")] + pub profile_metrics_query: Option>, + /// Widget query. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, + /// The log query. + #[serde(rename = "rum_query")] + pub rum_query: Option>, + /// The log query. + #[serde(rename = "security_query")] + pub security_query: Option>, + /// Define request widget style. + #[serde(rename = "style")] + pub style: Option>, +} + +impl ToplistWidgetRequest { + pub fn new() -> ToplistWidgetRequest { + ToplistWidgetRequest { + apm_query: None, + audit_query: None, + conditional_formats: None, + event_query: None, + formulas: None, + log_query: None, + network_query: None, + process_query: None, + profile_metrics_query: None, + q: None, + queries: None, + response_format: None, + rum_query: None, + security_query: None, + style: None, + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_scaling.rs b/src/datadogV1/model/model_toplist_widget_scaling.rs new file mode 100644 index 000000000..cdf464a5a --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_scaling.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ToplistWidgetScaling { + #[serde(rename = "absolute")] + ABSOLUTE, + #[serde(rename = "relative")] + RELATIVE, +} + +impl ToString for ToplistWidgetScaling { + fn to_string(&self) -> String { + match self { + Self::ABSOLUTE => String::from("absolute"), + Self::RELATIVE => String::from("relative"), + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_stacked.rs b/src/datadogV1/model/model_toplist_widget_stacked.rs new file mode 100644 index 000000000..4f54b31a7 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_stacked.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Top list widget stacked display options. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ToplistWidgetStacked { + /// Top list widget stacked legend behavior. + #[serde(rename = "legend")] + pub legend: crate::datadogV1::model::ToplistWidgetLegend, + /// Top list widget stacked display type. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::ToplistWidgetStackedType, +} + +impl ToplistWidgetStacked { + pub fn new( + legend: crate::datadogV1::model::ToplistWidgetLegend, + type_: crate::datadogV1::model::ToplistWidgetStackedType, + ) -> ToplistWidgetStacked { + ToplistWidgetStacked { legend, type_ } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_stacked_type.rs b/src/datadogV1/model/model_toplist_widget_stacked_type.rs new file mode 100644 index 000000000..6efaf51c8 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_stacked_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ToplistWidgetStackedType { + #[serde(rename = "stacked")] + STACKED, +} + +impl ToString for ToplistWidgetStackedType { + fn to_string(&self) -> String { + match self { + Self::STACKED => String::from("stacked"), + } + } +} diff --git a/src/datadogV1/model/model_toplist_widget_style.rs b/src/datadogV1/model/model_toplist_widget_style.rs new file mode 100644 index 000000000..eb635a267 --- /dev/null +++ b/src/datadogV1/model/model_toplist_widget_style.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Style customization for a top list widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ToplistWidgetStyle { + /// Top list widget display options. + #[serde(rename = "display")] + pub display: Option>, + /// Top list widget scaling definition. + #[serde(rename = "scaling")] + pub scaling: Option, +} + +impl ToplistWidgetStyle { + pub fn new() -> ToplistWidgetStyle { + ToplistWidgetStyle { + display: None, + scaling: None, + } + } +} diff --git a/src/datadogV1/model/model_topology_map_widget_definition.rs b/src/datadogV1/model/model_topology_map_widget_definition.rs new file mode 100644 index 000000000..71fa2ced9 --- /dev/null +++ b/src/datadogV1/model/model_topology_map_widget_definition.rs @@ -0,0 +1,45 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// This widget displays a topology of nodes and edges for different data sources. It replaces the service map widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TopologyMapWidgetDefinition { + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// One or more Topology requests. + #[serde(rename = "requests")] + pub requests: Vec, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// How to align the text on the widget. + #[serde(rename = "title_align")] + pub title_align: Option, + /// Size of the title. + #[serde(rename = "title_size")] + pub title_size: Option, + /// Type of the topology map widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::TopologyMapWidgetDefinitionType, +} + +impl TopologyMapWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::TopologyMapWidgetDefinitionType, + ) -> TopologyMapWidgetDefinition { + TopologyMapWidgetDefinition { + custom_links: None, + requests, + title: None, + title_align: None, + title_size: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_topology_map_widget_definition_type.rs b/src/datadogV1/model/model_topology_map_widget_definition_type.rs new file mode 100644 index 000000000..37f6a8cd9 --- /dev/null +++ b/src/datadogV1/model/model_topology_map_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TopologyMapWidgetDefinitionType { + #[serde(rename = "topology_map")] + TOPOLOGY_MAP, +} + +impl ToString for TopologyMapWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::TOPOLOGY_MAP => String::from("topology_map"), + } + } +} diff --git a/src/datadogV1/model/model_topology_query.rs b/src/datadogV1/model/model_topology_query.rs new file mode 100644 index 000000000..b21cf73f1 --- /dev/null +++ b/src/datadogV1/model/model_topology_query.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Query to service-based topology data sources like the service map or data streams. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TopologyQuery { + /// Name of the data source + #[serde(rename = "data_source")] + pub data_source: Option, + /// Your environment and primary tag (or * if enabled for your account). + #[serde(rename = "filters")] + pub filters: Option>, + /// Name of the service + #[serde(rename = "service")] + pub service: Option, +} + +impl TopologyQuery { + pub fn new() -> TopologyQuery { + TopologyQuery { + data_source: None, + filters: None, + service: None, + } + } +} diff --git a/src/datadogV1/model/model_topology_query_data_source.rs b/src/datadogV1/model/model_topology_query_data_source.rs new file mode 100644 index 000000000..98c9ef23c --- /dev/null +++ b/src/datadogV1/model/model_topology_query_data_source.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TopologyQueryDataSource { + #[serde(rename = "data_streams")] + DATA_STREAMS, + #[serde(rename = "service_map")] + SERVICE_MAP, +} + +impl ToString for TopologyQueryDataSource { + fn to_string(&self) -> String { + match self { + Self::DATA_STREAMS => String::from("data_streams"), + Self::SERVICE_MAP => String::from("service_map"), + } + } +} diff --git a/src/datadogV1/model/model_topology_request.rs b/src/datadogV1/model/model_topology_request.rs new file mode 100644 index 000000000..f2ec2e69f --- /dev/null +++ b/src/datadogV1/model/model_topology_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request that will return nodes and edges to be used by topology map. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TopologyRequest { + /// Query to service-based topology data sources like the service map or data streams. + #[serde(rename = "query")] + pub query: Option>, + /// Widget request type. + #[serde(rename = "request_type")] + pub request_type: Option, +} + +impl TopologyRequest { + pub fn new() -> TopologyRequest { + TopologyRequest { + query: None, + request_type: None, + } + } +} diff --git a/src/datadogV1/model/model_topology_request_type.rs b/src/datadogV1/model/model_topology_request_type.rs new file mode 100644 index 000000000..8c832ba45 --- /dev/null +++ b/src/datadogV1/model/model_topology_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TopologyRequestType { + #[serde(rename = "topology")] + TOPOLOGY, +} + +impl ToString for TopologyRequestType { + fn to_string(&self) -> String { + match self { + Self::TOPOLOGY => String::from("topology"), + } + } +} diff --git a/src/datadogV1/model/model_tree_map_color_by.rs b/src/datadogV1/model/model_tree_map_color_by.rs new file mode 100644 index 000000000..b549c33be --- /dev/null +++ b/src/datadogV1/model/model_tree_map_color_by.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TreeMapColorBy { + #[serde(rename = "user")] + USER, +} + +impl ToString for TreeMapColorBy { + fn to_string(&self) -> String { + match self { + Self::USER => String::from("user"), + } + } +} diff --git a/src/datadogV1/model/model_tree_map_group_by.rs b/src/datadogV1/model/model_tree_map_group_by.rs new file mode 100644 index 000000000..b9da6272b --- /dev/null +++ b/src/datadogV1/model/model_tree_map_group_by.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TreeMapGroupBy { + #[serde(rename = "user")] + USER, + #[serde(rename = "family")] + FAMILY, + #[serde(rename = "process")] + PROCESS, +} + +impl ToString for TreeMapGroupBy { + fn to_string(&self) -> String { + match self { + Self::USER => String::from("user"), + Self::FAMILY => String::from("family"), + Self::PROCESS => String::from("process"), + } + } +} diff --git a/src/datadogV1/model/model_tree_map_size_by.rs b/src/datadogV1/model/model_tree_map_size_by.rs new file mode 100644 index 000000000..cb93e879e --- /dev/null +++ b/src/datadogV1/model/model_tree_map_size_by.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TreeMapSizeBy { + #[serde(rename = "pct_cpu")] + PCT_CPU, + #[serde(rename = "pct_mem")] + PCT_MEM, +} + +impl ToString for TreeMapSizeBy { + fn to_string(&self) -> String { + match self { + Self::PCT_CPU => String::from("pct_cpu"), + Self::PCT_MEM => String::from("pct_mem"), + } + } +} diff --git a/src/datadogV1/model/model_tree_map_widget_definition.rs b/src/datadogV1/model/model_tree_map_widget_definition.rs new file mode 100644 index 000000000..f2de3d377 --- /dev/null +++ b/src/datadogV1/model/model_tree_map_widget_definition.rs @@ -0,0 +1,57 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The treemap visualization enables you to display hierarchical and nested data. It is well suited for queries that describe part-whole relationships, such as resource usage by availability zone, data center, or team. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TreeMapWidgetDefinition { + /// (deprecated) The attribute formerly used to determine color in the widget. + #[deprecated] + #[serde(rename = "color_by")] + pub color_by: Option, + /// List of custom links. + #[serde(rename = "custom_links")] + pub custom_links: Option>, + /// (deprecated) The attribute formerly used to group elements in the widget. + #[deprecated] + #[serde(rename = "group_by")] + pub group_by: Option, + /// List of treemap widget requests. + #[serde(rename = "requests")] + pub requests: Vec, + /// (deprecated) The attribute formerly used to determine size in the widget. + #[deprecated] + #[serde(rename = "size_by")] + pub size_by: Option, + /// Time setting for the widget. + #[serde(rename = "time")] + pub time: Option>, + /// Title of your widget. + #[serde(rename = "title")] + pub title: Option, + /// Type of the treemap widget. + #[serde(rename = "type")] + pub type_: crate::datadogV1::model::TreeMapWidgetDefinitionType, +} + +impl TreeMapWidgetDefinition { + pub fn new( + requests: Vec, + type_: crate::datadogV1::model::TreeMapWidgetDefinitionType, + ) -> TreeMapWidgetDefinition { + #[allow(deprecated)] + TreeMapWidgetDefinition { + color_by: None, + custom_links: None, + group_by: None, + requests, + size_by: None, + time: None, + title: None, + type_, + } + } +} diff --git a/src/datadogV1/model/model_tree_map_widget_definition_type.rs b/src/datadogV1/model/model_tree_map_widget_definition_type.rs new file mode 100644 index 000000000..025fe5d95 --- /dev/null +++ b/src/datadogV1/model/model_tree_map_widget_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TreeMapWidgetDefinitionType { + #[serde(rename = "treemap")] + TREEMAP, +} + +impl ToString for TreeMapWidgetDefinitionType { + fn to_string(&self) -> String { + match self { + Self::TREEMAP => String::from("treemap"), + } + } +} diff --git a/src/datadogV1/model/model_tree_map_widget_request.rs b/src/datadogV1/model/model_tree_map_widget_request.rs new file mode 100644 index 000000000..7e11096fa --- /dev/null +++ b/src/datadogV1/model/model_tree_map_widget_request.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An updated treemap widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TreeMapWidgetRequest { + /// List of formulas that operate on queries. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// The widget metrics query. + #[serde(rename = "q")] + pub q: Option, + /// List of queries that can be returned directly or used in formulas. + #[serde(rename = "queries")] + pub queries: Option>, + /// Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + #[serde(rename = "response_format")] + pub response_format: Option, +} + +impl TreeMapWidgetRequest { + pub fn new() -> TreeMapWidgetRequest { + TreeMapWidgetRequest { + formulas: None, + q: None, + queries: None, + response_format: None, + } + } +} diff --git a/src/datadogV1/model/model_usage_analyzed_logs_hour.rs b/src/datadogV1/model/model_usage_analyzed_logs_hour.rs index 1762a0419..2b7482545 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_hour.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The number of analyzed logs for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAnalyzedLogsHour { /// Contains the number of analyzed logs. #[serde( diff --git a/src/datadogV1/model/model_usage_analyzed_logs_response.rs b/src/datadogV1/model/model_usage_analyzed_logs_response.rs index 8f045b4dc..c4c595699 100644 --- a/src/datadogV1/model/model_usage_analyzed_logs_response.rs +++ b/src/datadogV1/model/model_usage_analyzed_logs_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A response containing the number of analyzed logs for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAnalyzedLogsResponse { /// Get hourly usage for analyzed logs. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_attribution_aggregates_body.rs b/src/datadogV1/model/model_usage_attribution_aggregates_body.rs index 2b166d182..daee99f7b 100644 --- a/src/datadogV1/model/model_usage_attribution_aggregates_body.rs +++ b/src/datadogV1/model/model_usage_attribution_aggregates_body.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing the aggregates. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAttributionAggregatesBody { /// The aggregate type. #[serde(rename = "agg_type")] diff --git a/src/datadogV1/model/model_usage_attribution_body.rs b/src/datadogV1/model/model_usage_attribution_body.rs index 43a789c41..2f1db910b 100644 --- a/src/datadogV1/model/model_usage_attribution_body.rs +++ b/src/datadogV1/model/model_usage_attribution_body.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Usage Summary by tag for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAttributionBody { /// Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]. #[serde(rename = "month")] diff --git a/src/datadogV1/model/model_usage_attribution_metadata.rs b/src/datadogV1/model/model_usage_attribution_metadata.rs index 37bed917b..acebba8e0 100644 --- a/src/datadogV1/model/model_usage_attribution_metadata.rs +++ b/src/datadogV1/model/model_usage_attribution_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing document metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAttributionMetadata { /// An array of available aggregates. #[serde(rename = "aggregates")] diff --git a/src/datadogV1/model/model_usage_attribution_pagination.rs b/src/datadogV1/model/model_usage_attribution_pagination.rs index 356165f11..86894d986 100644 --- a/src/datadogV1/model/model_usage_attribution_pagination.rs +++ b/src/datadogV1/model/model_usage_attribution_pagination.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata for the current pagination. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAttributionPagination { /// Maximum amount of records to be returned. #[serde(rename = "limit")] diff --git a/src/datadogV1/model/model_usage_attribution_response.rs b/src/datadogV1/model/model_usage_attribution_response.rs index 42bcbec84..704f21622 100644 --- a/src/datadogV1/model/model_usage_attribution_response.rs +++ b/src/datadogV1/model/model_usage_attribution_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the Usage Summary by tag(s). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAttributionResponse { /// The object containing document metadata. #[serde(rename = "metadata")] diff --git a/src/datadogV1/model/model_usage_attribution_sort.rs b/src/datadogV1/model/model_usage_attribution_sort.rs index 94d32a206..8b8d96554 100644 --- a/src/datadogV1/model/model_usage_attribution_sort.rs +++ b/src/datadogV1/model/model_usage_attribution_sort.rs @@ -134,9 +134,3 @@ impl ToString for UsageAttributionSort { } } } - -impl Default for UsageAttributionSort { - fn default() -> UsageAttributionSort { - Self::API_PERCENTAGE - } -} diff --git a/src/datadogV1/model/model_usage_attribution_supported_metrics.rs b/src/datadogV1/model/model_usage_attribution_supported_metrics.rs index 79fc8dbaa..b88dbfb3e 100644 --- a/src/datadogV1/model/model_usage_attribution_supported_metrics.rs +++ b/src/datadogV1/model/model_usage_attribution_supported_metrics.rs @@ -167,9 +167,3 @@ impl ToString for UsageAttributionSupportedMetrics { } } } - -impl Default for UsageAttributionSupportedMetrics { - fn default() -> UsageAttributionSupportedMetrics { - Self::CUSTOM_TIMESERIES_USAGE - } -} diff --git a/src/datadogV1/model/model_usage_attribution_values.rs b/src/datadogV1/model/model_usage_attribution_values.rs index 6f0e39ea9..70a37f515 100644 --- a/src/datadogV1/model/model_usage_attribution_values.rs +++ b/src/datadogV1/model/model_usage_attribution_values.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Fields in Usage Summary by tag(s). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAttributionValues { /// The percentage of synthetic API test usage by tag(s). #[serde(rename = "api_percentage")] diff --git a/src/datadogV1/model/model_usage_audit_logs_hour.rs b/src/datadogV1/model/model_usage_audit_logs_hour.rs index b7e703a67..40e3b2233 100644 --- a/src/datadogV1/model/model_usage_audit_logs_hour.rs +++ b/src/datadogV1/model/model_usage_audit_logs_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Audit logs usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAuditLogsHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_audit_logs_response.rs b/src/datadogV1/model/model_usage_audit_logs_response.rs index 9bf58b77f..7be420f15 100644 --- a/src/datadogV1/model/model_usage_audit_logs_response.rs +++ b/src/datadogV1/model/model_usage_audit_logs_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the audit logs usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAuditLogsResponse { /// Get hourly usage for audit logs. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_billable_summary_body.rs b/src/datadogV1/model/model_usage_billable_summary_body.rs index 976487cee..9aedc2b7a 100644 --- a/src/datadogV1/model/model_usage_billable_summary_body.rs +++ b/src/datadogV1/model/model_usage_billable_summary_body.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with properties for each aggregated usage type. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageBillableSummaryBody { /// The total account usage. #[serde(rename = "account_billable_usage")] diff --git a/src/datadogV1/model/model_usage_billable_summary_hour.rs b/src/datadogV1/model/model_usage_billable_summary_hour.rs index 75d2cdd7b..7fe054b07 100644 --- a/src/datadogV1/model/model_usage_billable_summary_hour.rs +++ b/src/datadogV1/model/model_usage_billable_summary_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with monthly summary of data billed by Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageBillableSummaryHour { /// The billing plan. #[serde(rename = "billing_plan")] diff --git a/src/datadogV1/model/model_usage_billable_summary_keys.rs b/src/datadogV1/model/model_usage_billable_summary_keys.rs index 6798c9328..06e838d48 100644 --- a/src/datadogV1/model/model_usage_billable_summary_keys.rs +++ b/src/datadogV1/model/model_usage_billable_summary_keys.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with aggregated usage types. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageBillableSummaryKeys { /// Response with properties for each aggregated usage type. #[serde(rename = "apm_fargate_average")] diff --git a/src/datadogV1/model/model_usage_billable_summary_response.rs b/src/datadogV1/model/model_usage_billable_summary_response.rs index aecb28459..067fbbb43 100644 --- a/src/datadogV1/model/model_usage_billable_summary_response.rs +++ b/src/datadogV1/model/model_usage_billable_summary_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with monthly summary of data billed by Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageBillableSummaryResponse { /// An array of objects regarding usage of billable summary. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_ci_visibility_hour.rs b/src/datadogV1/model/model_usage_ci_visibility_hour.rs index b0444a13a..3e33ea4b2 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_hour.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// CI visibility usage in a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCIVisibilityHour { /// The number of spans for pipelines in the queried hour. #[serde( diff --git a/src/datadogV1/model/model_usage_ci_visibility_response.rs b/src/datadogV1/model/model_usage_ci_visibility_response.rs index e8f0333ea..5e42b15e3 100644 --- a/src/datadogV1/model/model_usage_ci_visibility_response.rs +++ b/src/datadogV1/model/model_usage_ci_visibility_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// CI visibility usage response #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCIVisibilityResponse { /// Response containing CI visibility usage. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs b/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs index fe1e47bf8..42702520d 100644 --- a/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs +++ b/src/datadogV1/model/model_usage_cloud_security_posture_management_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Cloud Security Management Pro usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCloudSecurityPostureManagementHour { /// The number of Cloud Security Management Pro Azure app services hosts during a given hour. #[serde( diff --git a/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs b/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs index d63a78311..0fc9339fc 100644 --- a/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs +++ b/src/datadogV1/model/model_usage_cloud_security_posture_management_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The response containing the Cloud Security Management Pro usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCloudSecurityPostureManagementResponse { /// Get hourly usage for Cloud Security Management Pro. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_custom_reports_attributes.rs b/src/datadogV1/model/model_usage_custom_reports_attributes.rs index 5aec74410..462aa7b49 100644 --- a/src/datadogV1/model/model_usage_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_custom_reports_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The response containing attributes for custom reports. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCustomReportsAttributes { /// The date the specified custom report was computed. #[serde(rename = "computed_on")] diff --git a/src/datadogV1/model/model_usage_custom_reports_data.rs b/src/datadogV1/model/model_usage_custom_reports_data.rs index 892d30221..0418d89f7 100644 --- a/src/datadogV1/model/model_usage_custom_reports_data.rs +++ b/src/datadogV1/model/model_usage_custom_reports_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The response containing the date and type for custom reports. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCustomReportsData { /// The response containing attributes for custom reports. #[serde(rename = "attributes")] diff --git a/src/datadogV1/model/model_usage_custom_reports_meta.rs b/src/datadogV1/model/model_usage_custom_reports_meta.rs index 71ac90c2a..ddd417f53 100644 --- a/src/datadogV1/model/model_usage_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_custom_reports_meta.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing document metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCustomReportsMeta { /// The object containing page total count. #[serde(rename = "page")] diff --git a/src/datadogV1/model/model_usage_custom_reports_page.rs b/src/datadogV1/model/model_usage_custom_reports_page.rs index 311e2207f..9ee2b313b 100644 --- a/src/datadogV1/model/model_usage_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_custom_reports_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing page total count. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCustomReportsPage { /// Total page count. #[serde(rename = "total_count")] diff --git a/src/datadogV1/model/model_usage_custom_reports_response.rs b/src/datadogV1/model/model_usage_custom_reports_response.rs index 58aa1928f..e5f1b6981 100644 --- a/src/datadogV1/model/model_usage_custom_reports_response.rs +++ b/src/datadogV1/model/model_usage_custom_reports_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing available custom reports. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCustomReportsResponse { /// An array of available custom reports. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_usage_cws_hour.rs b/src/datadogV1/model/model_usage_cws_hour.rs index 87ab7acca..3a51e42f2 100644 --- a/src/datadogV1/model/model_usage_cws_hour.rs +++ b/src/datadogV1/model/model_usage_cws_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Cloud Workload Security usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCWSHour { /// The total number of Cloud Workload Security container hours from the start of the given hour’s month until the given hour. #[serde( diff --git a/src/datadogV1/model/model_usage_cws_response.rs b/src/datadogV1/model/model_usage_cws_response.rs index 4f80ebe50..8f412417a 100644 --- a/src/datadogV1/model/model_usage_cws_response.rs +++ b/src/datadogV1/model/model_usage_cws_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the Cloud Workload Security usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageCWSResponse { /// Get hourly usage for Cloud Workload Security. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_dbm_hour.rs b/src/datadogV1/model/model_usage_dbm_hour.rs index 542e77337..686455493 100644 --- a/src/datadogV1/model/model_usage_dbm_hour.rs +++ b/src/datadogV1/model/model_usage_dbm_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Database Monitoring usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageDBMHour { /// The total number of Database Monitoring host hours from the start of the given hour’s month until the given hour. #[serde( diff --git a/src/datadogV1/model/model_usage_dbm_response.rs b/src/datadogV1/model/model_usage_dbm_response.rs index 755879ed3..014a52923 100644 --- a/src/datadogV1/model/model_usage_dbm_response.rs +++ b/src/datadogV1/model/model_usage_dbm_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the Database Monitoring usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageDBMResponse { /// Get hourly usage for Database Monitoring #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_fargate_hour.rs b/src/datadogV1/model/model_usage_fargate_hour.rs index fc2afd757..8544e5633 100644 --- a/src/datadogV1/model/model_usage_fargate_hour.rs +++ b/src/datadogV1/model/model_usage_fargate_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of Fargate tasks run and hourly usage. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageFargateHour { /// The high-water mark of APM ECS Fargate tasks during the given hour. #[serde( diff --git a/src/datadogV1/model/model_usage_fargate_response.rs b/src/datadogV1/model/model_usage_fargate_response.rs index 593e15f34..c04b774a6 100644 --- a/src/datadogV1/model/model_usage_fargate_response.rs +++ b/src/datadogV1/model/model_usage_fargate_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of Fargate tasks run and hourly usage. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageFargateResponse { /// Array with the number of hourly Fargate tasks recorded for a given organization. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_host_hour.rs b/src/datadogV1/model/model_usage_host_hour.rs index aa26c7017..d5d88cf15 100644 --- a/src/datadogV1/model/model_usage_host_hour.rs +++ b/src/datadogV1/model/model_usage_host_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of hosts/containers recorded for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageHostHour { /// Contains the total number of infrastructure hosts reporting /// during a given hour that were running the Datadog Agent. diff --git a/src/datadogV1/model/model_usage_hosts_response.rs b/src/datadogV1/model/model_usage_hosts_response.rs index 5e1bc096d..247167c40 100644 --- a/src/datadogV1/model/model_usage_hosts_response.rs +++ b/src/datadogV1/model/model_usage_hosts_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Host usage response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageHostsResponse { /// An array of objects related to host usage. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_incident_management_hour.rs b/src/datadogV1/model/model_usage_incident_management_hour.rs index 8be001f6d..119e78255 100644 --- a/src/datadogV1/model/model_usage_incident_management_hour.rs +++ b/src/datadogV1/model/model_usage_incident_management_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Incident management usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIncidentManagementHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_incident_management_response.rs b/src/datadogV1/model/model_usage_incident_management_response.rs index fd6adb1fd..87c7eea79 100644 --- a/src/datadogV1/model/model_usage_incident_management_response.rs +++ b/src/datadogV1/model/model_usage_incident_management_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the incident management usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIncidentManagementResponse { /// Get hourly usage for incident management. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_indexed_spans_hour.rs b/src/datadogV1/model/model_usage_indexed_spans_hour.rs index cdb482c7b..f8bc152f2 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_hour.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The hours of indexed spans usage. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIndexedSpansHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_indexed_spans_response.rs b/src/datadogV1/model/model_usage_indexed_spans_response.rs index 3fdfcb378..4a6490c96 100644 --- a/src/datadogV1/model/model_usage_indexed_spans_response.rs +++ b/src/datadogV1/model/model_usage_indexed_spans_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A response containing indexed spans usage. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIndexedSpansResponse { /// Array with the number of hourly traces indexed for a given organization. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_ingested_spans_hour.rs b/src/datadogV1/model/model_usage_ingested_spans_hour.rs index 258ee16cd..8af759590 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_hour.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Ingested spans usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIngestedSpansHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_ingested_spans_response.rs b/src/datadogV1/model/model_usage_ingested_spans_response.rs index 6efa752e6..858b19dc6 100644 --- a/src/datadogV1/model/model_usage_ingested_spans_response.rs +++ b/src/datadogV1/model/model_usage_ingested_spans_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the ingested spans usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIngestedSpansResponse { /// Get hourly usage for ingested spans. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_io_t_hour.rs b/src/datadogV1/model/model_usage_io_t_hour.rs index fd7351a6e..c48840a8e 100644 --- a/src/datadogV1/model/model_usage_io_t_hour.rs +++ b/src/datadogV1/model/model_usage_io_t_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// IoT usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIoTHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_io_t_response.rs b/src/datadogV1/model/model_usage_io_t_response.rs index 96f85b358..e708ad2b1 100644 --- a/src/datadogV1/model/model_usage_io_t_response.rs +++ b/src/datadogV1/model/model_usage_io_t_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the IoT usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageIoTResponse { /// Get hourly usage for IoT. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_lambda_hour.rs b/src/datadogV1/model/model_usage_lambda_hour.rs index ce78d7ef4..942d7f918 100644 --- a/src/datadogV1/model/model_usage_lambda_hour.rs +++ b/src/datadogV1/model/model_usage_lambda_hour.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// Number of lambda functions and sum of the invocations of all lambda functions /// for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLambdaHour { /// Contains the number of different functions for each region and AWS account. #[serde( diff --git a/src/datadogV1/model/model_usage_lambda_response.rs b/src/datadogV1/model/model_usage_lambda_response.rs index a21a93ea3..f3bd0d034 100644 --- a/src/datadogV1/model/model_usage_lambda_response.rs +++ b/src/datadogV1/model/model_usage_lambda_response.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of lambda functions and sum of the invocations of all lambda functions /// for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLambdaResponse { /// Get hourly usage for Lambda. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_logs_by_index_hour.rs b/src/datadogV1/model/model_usage_logs_by_index_hour.rs index 6a8e43b58..ba3fdd8eb 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of indexed logs for each hour and index for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLogsByIndexHour { /// The total number of indexed logs for the queried hour. #[serde(rename = "event_count")] diff --git a/src/datadogV1/model/model_usage_logs_by_index_response.rs b/src/datadogV1/model/model_usage_logs_by_index_response.rs index b4a74dd18..08af1973e 100644 --- a/src/datadogV1/model/model_usage_logs_by_index_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_index_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of indexed logs for each hour and index for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLogsByIndexResponse { /// An array of objects regarding hourly usage of logs by index response. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_logs_by_retention_hour.rs b/src/datadogV1/model/model_usage_logs_by_retention_hour.rs index 422485394..5275d3d06 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_hour.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The number of indexed logs for each hour for a given organization broken down by retention period. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLogsByRetentionHour { /// Total logs indexed with this retention period during a given hour. #[serde( diff --git a/src/datadogV1/model/model_usage_logs_by_retention_response.rs b/src/datadogV1/model/model_usage_logs_by_retention_response.rs index 00a54056c..fc2073612 100644 --- a/src/datadogV1/model/model_usage_logs_by_retention_response.rs +++ b/src/datadogV1/model/model_usage_logs_by_retention_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the indexed logs usage broken down by retention period for an organization during a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLogsByRetentionResponse { /// Get hourly usage for indexed logs by retention period. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_logs_hour.rs b/src/datadogV1/model/model_usage_logs_hour.rs index b5e32c414..6d31d7a12 100644 --- a/src/datadogV1/model/model_usage_logs_hour.rs +++ b/src/datadogV1/model/model_usage_logs_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Hour usage for logs. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLogsHour { /// Contains the number of billable log bytes ingested. #[serde( diff --git a/src/datadogV1/model/model_usage_logs_response.rs b/src/datadogV1/model/model_usage_logs_response.rs index 80ad3ae51..5561d4f3b 100644 --- a/src/datadogV1/model/model_usage_logs_response.rs +++ b/src/datadogV1/model/model_usage_logs_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of logs for each hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLogsResponse { /// An array of objects regarding hourly usage of logs. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_metric_category.rs b/src/datadogV1/model/model_usage_metric_category.rs index 46d72f923..4945b1b20 100644 --- a/src/datadogV1/model/model_usage_metric_category.rs +++ b/src/datadogV1/model/model_usage_metric_category.rs @@ -20,9 +20,3 @@ impl ToString for UsageMetricCategory { } } } - -impl Default for UsageMetricCategory { - fn default() -> UsageMetricCategory { - Self::STANDARD - } -} diff --git a/src/datadogV1/model/model_usage_network_flows_hour.rs b/src/datadogV1/model/model_usage_network_flows_hour.rs index 6a9d1c3ef..6f1c761c2 100644 --- a/src/datadogV1/model/model_usage_network_flows_hour.rs +++ b/src/datadogV1/model/model_usage_network_flows_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of netflow events indexed for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageNetworkFlowsHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_network_flows_response.rs b/src/datadogV1/model/model_usage_network_flows_response.rs index 96991e7c6..59bf7dbbf 100644 --- a/src/datadogV1/model/model_usage_network_flows_response.rs +++ b/src/datadogV1/model/model_usage_network_flows_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of netflow events indexed for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageNetworkFlowsResponse { /// Get hourly usage for Network Flows. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_network_hosts_hour.rs b/src/datadogV1/model/model_usage_network_hosts_hour.rs index 2ab593163..002364e75 100644 --- a/src/datadogV1/model/model_usage_network_hosts_hour.rs +++ b/src/datadogV1/model/model_usage_network_hosts_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of active NPM hosts for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageNetworkHostsHour { /// Contains the number of active NPM hosts. #[serde( diff --git a/src/datadogV1/model/model_usage_network_hosts_response.rs b/src/datadogV1/model/model_usage_network_hosts_response.rs index 2d8a681b1..25a4ecff1 100644 --- a/src/datadogV1/model/model_usage_network_hosts_response.rs +++ b/src/datadogV1/model/model_usage_network_hosts_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of active NPM hosts for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageNetworkHostsResponse { /// Get hourly usage for NPM hosts. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_online_archive_hour.rs b/src/datadogV1/model/model_usage_online_archive_hour.rs index 17256d224..166271c6f 100644 --- a/src/datadogV1/model/model_usage_online_archive_hour.rs +++ b/src/datadogV1/model/model_usage_online_archive_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Online Archive usage in a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageOnlineArchiveHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_online_archive_response.rs b/src/datadogV1/model/model_usage_online_archive_response.rs index 6d2d8c324..7c1a4ba8e 100644 --- a/src/datadogV1/model/model_usage_online_archive_response.rs +++ b/src/datadogV1/model/model_usage_online_archive_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Online Archive usage response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageOnlineArchiveResponse { /// Response containing Online Archive usage. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_profiling_hour.rs b/src/datadogV1/model/model_usage_profiling_hour.rs index db48fc0bc..8205ebe1b 100644 --- a/src/datadogV1/model/model_usage_profiling_hour.rs +++ b/src/datadogV1/model/model_usage_profiling_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The number of profiled hosts for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageProfilingHour { /// Contains the total number of profiled Azure app services reporting during a given hour. #[serde( diff --git a/src/datadogV1/model/model_usage_profiling_response.rs b/src/datadogV1/model/model_usage_profiling_response.rs index 4773d04a1..9930c11d0 100644 --- a/src/datadogV1/model/model_usage_profiling_response.rs +++ b/src/datadogV1/model/model_usage_profiling_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of profiled hosts for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageProfilingResponse { /// Get hourly usage for profiled hosts. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_reports_type.rs b/src/datadogV1/model/model_usage_reports_type.rs index f1b302ab3..f7c58fe4d 100644 --- a/src/datadogV1/model/model_usage_reports_type.rs +++ b/src/datadogV1/model/model_usage_reports_type.rs @@ -17,9 +17,3 @@ impl ToString for UsageReportsType { } } } - -impl Default for UsageReportsType { - fn default() -> UsageReportsType { - Self::REPORTS - } -} diff --git a/src/datadogV1/model/model_usage_rum_sessions_hour.rs b/src/datadogV1/model/model_usage_rum_sessions_hour.rs index 8ff535cf0..bbf5ea0c7 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_hour.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of RUM Sessions recorded for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageRumSessionsHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_rum_sessions_response.rs b/src/datadogV1/model/model_usage_rum_sessions_response.rs index 2fecdbba5..ea5642752 100644 --- a/src/datadogV1/model/model_usage_rum_sessions_response.rs +++ b/src/datadogV1/model/model_usage_rum_sessions_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of RUM Sessions for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageRumSessionsResponse { /// Get hourly usage for RUM Sessions. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_rum_units_hour.rs b/src/datadogV1/model/model_usage_rum_units_hour.rs index 2ffaeef05..9f62f8542 100644 --- a/src/datadogV1/model/model_usage_rum_units_hour.rs +++ b/src/datadogV1/model/model_usage_rum_units_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of RUM Units used for each hour for a given organization (data available as of November 1, 2021). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageRumUnitsHour { /// The number of browser RUM units. #[serde( diff --git a/src/datadogV1/model/model_usage_rum_units_response.rs b/src/datadogV1/model/model_usage_rum_units_response.rs index 0cb80f9a1..3162c983e 100644 --- a/src/datadogV1/model/model_usage_rum_units_response.rs +++ b/src/datadogV1/model/model_usage_rum_units_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of RUM Units for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageRumUnitsResponse { /// Get hourly usage for RUM Units. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_sds_hour.rs b/src/datadogV1/model/model_usage_sds_hour.rs index a83ce6aca..19a147be7 100644 --- a/src/datadogV1/model/model_usage_sds_hour.rs +++ b/src/datadogV1/model/model_usage_sds_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Sensitive Data Scanner usage for a given organization for a given hour. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSDSHour { /// The total number of bytes scanned of APM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour. #[serde( diff --git a/src/datadogV1/model/model_usage_sds_response.rs b/src/datadogV1/model/model_usage_sds_response.rs index bbffeec35..9c742ca3e 100644 --- a/src/datadogV1/model/model_usage_sds_response.rs +++ b/src/datadogV1/model/model_usage_sds_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the Sensitive Data Scanner usage for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSDSResponse { /// Get hourly usage for Sensitive Data Scanner. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_snmp_hour.rs b/src/datadogV1/model/model_usage_snmp_hour.rs index 04949d043..f734bca0a 100644 --- a/src/datadogV1/model/model_usage_snmp_hour.rs +++ b/src/datadogV1/model/model_usage_snmp_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The number of SNMP devices for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSNMPHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_snmp_response.rs b/src/datadogV1/model/model_usage_snmp_response.rs index 520da55ca..9f9c4de0a 100644 --- a/src/datadogV1/model/model_usage_snmp_response.rs +++ b/src/datadogV1/model/model_usage_snmp_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of SNMP devices for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSNMPResponse { /// Get hourly usage for SNMP devices. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_sort.rs b/src/datadogV1/model/model_usage_sort.rs index bb2cd7758..aadcce593 100644 --- a/src/datadogV1/model/model_usage_sort.rs +++ b/src/datadogV1/model/model_usage_sort.rs @@ -26,9 +26,3 @@ impl ToString for UsageSort { } } } - -impl Default for UsageSort { - fn default() -> UsageSort { - Self::COMPUTED_ON - } -} diff --git a/src/datadogV1/model/model_usage_sort_direction.rs b/src/datadogV1/model/model_usage_sort_direction.rs index f90d44d9d..975096a7a 100644 --- a/src/datadogV1/model/model_usage_sort_direction.rs +++ b/src/datadogV1/model/model_usage_sort_direction.rs @@ -20,9 +20,3 @@ impl ToString for UsageSortDirection { } } } - -impl Default for UsageSortDirection { - fn default() -> UsageSortDirection { - Self::DESC - } -} diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs b/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs index 938ffc696..be29f40af 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The response containing attributes for specified custom reports. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSpecifiedCustomReportsAttributes { /// The date the specified custom report was computed. #[serde(rename = "computed_on")] diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_data.rs b/src/datadogV1/model/model_usage_specified_custom_reports_data.rs index f7bba9078..0c97698da 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_data.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing date and type for specified custom reports. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSpecifiedCustomReportsData { /// The response containing attributes for specified custom reports. #[serde(rename = "attributes")] diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs b/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs index f1c66d1a4..4dcf8e9a0 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_meta.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing document metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSpecifiedCustomReportsMeta { /// The object containing page total count for specified ID. #[serde(rename = "page")] diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_page.rs b/src/datadogV1/model/model_usage_specified_custom_reports_page.rs index 812c81360..842b85389 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_page.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing page total count for specified ID. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSpecifiedCustomReportsPage { /// Total page count. #[serde(rename = "total_count")] diff --git a/src/datadogV1/model/model_usage_specified_custom_reports_response.rs b/src/datadogV1/model/model_usage_specified_custom_reports_response.rs index 9668dc0c2..33a632946 100644 --- a/src/datadogV1/model/model_usage_specified_custom_reports_response.rs +++ b/src/datadogV1/model/model_usage_specified_custom_reports_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Returns available specified custom reports. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSpecifiedCustomReportsResponse { /// Response containing date and type for specified custom reports. #[serde(rename = "data")] diff --git a/src/datadogV1/model/model_usage_summary_date.rs b/src/datadogV1/model/model_usage_summary_date.rs index 9da84a61b..86e06a559 100644 --- a/src/datadogV1/model/model_usage_summary_date.rs +++ b/src/datadogV1/model/model_usage_summary_date.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with hourly report of all data billed by Datadog all organizations. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSummaryDate { /// Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations. #[serde(rename = "agent_host_top99p")] diff --git a/src/datadogV1/model/model_usage_summary_date_org.rs b/src/datadogV1/model/model_usage_summary_date_org.rs index da1aa2bed..d6bb83c04 100644 --- a/src/datadogV1/model/model_usage_summary_date_org.rs +++ b/src/datadogV1/model/model_usage_summary_date_org.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Global hourly report of all data billed by Datadog for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSummaryDateOrg { /// Shows the 99th percentile of all agent hosts over all hours in the current date for the given org. #[serde(rename = "agent_host_top99p")] @@ -144,6 +144,12 @@ pub struct UsageSummaryDateOrg { /// Shows the 99th percentile of all Cloud Security Management Pro hosts over all hours in the current date for the given org. #[serde(rename = "cspm_host_top99p")] pub cspm_host_top99p: Option, + /// Shows the average number of distinct historical custom metrics over all hours in the current date for the given org. + #[serde(rename = "custom_historical_ts_avg")] + pub custom_historical_ts_avg: Option, + /// Shows the average number of distinct live custom metrics over all hours in the current date for the given org. + #[serde(rename = "custom_live_ts_avg")] + pub custom_live_ts_avg: Option, /// Shows the average number of distinct custom metrics over all hours in the current date for the given org. #[serde(rename = "custom_ts_avg")] pub custom_ts_avg: Option, @@ -372,6 +378,8 @@ impl UsageSummaryDateOrg { cspm_container_hwm: None, cspm_gcp_host_top99p: None, cspm_host_top99p: None, + custom_historical_ts_avg: None, + custom_live_ts_avg: None, custom_ts_avg: None, cws_container_count_avg: None, cws_host_top99p: None, diff --git a/src/datadogV1/model/model_usage_summary_response.rs b/src/datadogV1/model/model_usage_summary_response.rs index 6f42e66e6..1aa45f016 100644 --- a/src/datadogV1/model/model_usage_summary_response.rs +++ b/src/datadogV1/model/model_usage_summary_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSummaryResponse { /// Shows the 99th percentile of all agent hosts over all hours in the current months for all organizations. #[serde(rename = "agent_host_top99p_sum")] @@ -147,6 +147,12 @@ pub struct UsageSummaryResponse { /// Shows the 99th percentile of all Cloud Security Management Pro hosts over all hours in the current months for all organizations. #[serde(rename = "cspm_host_top99p_sum")] pub cspm_host_top99p_sum: Option, + /// Shows the average number of distinct historical custom metrics over all hours in the current months for all organizations. + #[serde(rename = "custom_historical_ts_sum")] + pub custom_historical_ts_sum: Option, + /// Shows the average number of distinct live custom metrics over all hours in the current months for all organizations. + #[serde(rename = "custom_live_ts_sum")] + pub custom_live_ts_sum: Option, /// Shows the average number of distinct custom metrics over all hours in the current months for all organizations. #[serde(rename = "custom_ts_sum")] pub custom_ts_sum: Option, @@ -394,6 +400,8 @@ impl UsageSummaryResponse { cspm_container_hwm_sum: None, cspm_gcp_host_top99p_sum: None, cspm_host_top99p_sum: None, + custom_historical_ts_sum: None, + custom_live_ts_sum: None, custom_ts_sum: None, cws_containers_avg_sum: None, cws_host_top99p_sum: None, diff --git a/src/datadogV1/model/model_usage_synthetics_api_hour.rs b/src/datadogV1/model/model_usage_synthetics_api_hour.rs index edd5215fa..1a3875f79 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of Synthetics API tests run for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSyntheticsAPIHour { /// Contains the number of Synthetics API tests run. #[serde( diff --git a/src/datadogV1/model/model_usage_synthetics_api_response.rs b/src/datadogV1/model/model_usage_synthetics_api_response.rs index 4182f1ce2..728d62ff4 100644 --- a/src/datadogV1/model/model_usage_synthetics_api_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_api_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of Synthetics API tests run for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSyntheticsAPIResponse { /// Get hourly usage for Synthetics API tests. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_synthetics_browser_hour.rs b/src/datadogV1/model/model_usage_synthetics_browser_hour.rs index d272ed43c..65c52c61a 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of Synthetics Browser tests run for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSyntheticsBrowserHour { /// Contains the number of Synthetics Browser tests run. #[serde( diff --git a/src/datadogV1/model/model_usage_synthetics_browser_response.rs b/src/datadogV1/model/model_usage_synthetics_browser_response.rs index fc706f1de..ca4686b2e 100644 --- a/src/datadogV1/model/model_usage_synthetics_browser_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_browser_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of Synthetics Browser tests run for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSyntheticsBrowserResponse { /// Get hourly usage for Synthetics Browser tests. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_synthetics_hour.rs b/src/datadogV1/model/model_usage_synthetics_hour.rs index ba43ad59e..6111809ea 100644 --- a/src/datadogV1/model/model_usage_synthetics_hour.rs +++ b/src/datadogV1/model/model_usage_synthetics_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The number of synthetics tests run for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSyntheticsHour { /// Contains the number of Synthetics API tests run. #[serde(rename = "check_calls_count")] diff --git a/src/datadogV1/model/model_usage_synthetics_response.rs b/src/datadogV1/model/model_usage_synthetics_response.rs index a404964e5..37c04cb00 100644 --- a/src/datadogV1/model/model_usage_synthetics_response.rs +++ b/src/datadogV1/model/model_usage_synthetics_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of Synthetics API tests run for each hour for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageSyntheticsResponse { /// Array with the number of hourly Synthetics test run for a given organization. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_timeseries_hour.rs b/src/datadogV1/model/model_usage_timeseries_hour.rs index a19d5c261..c93ae4dcb 100644 --- a/src/datadogV1/model/model_usage_timeseries_hour.rs +++ b/src/datadogV1/model/model_usage_timeseries_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The hourly usage of timeseries. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageTimeseriesHour { /// The hour for the usage. #[serde(rename = "hour")] diff --git a/src/datadogV1/model/model_usage_timeseries_response.rs b/src/datadogV1/model/model_usage_timeseries_response.rs index 87500fe90..a3d60c1d8 100644 --- a/src/datadogV1/model/model_usage_timeseries_response.rs +++ b/src/datadogV1/model/model_usage_timeseries_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing hourly usage of timeseries. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageTimeseriesResponse { /// An array of objects regarding hourly usage of timeseries. #[serde(rename = "usage")] diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs b/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs index f8ef39a83..8cedadef2 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_hour.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Number of hourly recorded custom metrics for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageTopAvgMetricsHour { /// Average number of timeseries per hour in which the metric occurs. #[serde(rename = "avg_metric_hour")] diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs b/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs index 9c3eae843..5f744c34f 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing document metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageTopAvgMetricsMetadata { /// The day value from the user request that contains the returned usage data. (If day was used the request) #[serde(rename = "day")] diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs b/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs index 0fd08383f..781743846 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_pagination.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata for the current pagination. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageTopAvgMetricsPagination { /// Maximum amount of records to be returned. #[serde(rename = "limit")] diff --git a/src/datadogV1/model/model_usage_top_avg_metrics_response.rs b/src/datadogV1/model/model_usage_top_avg_metrics_response.rs index 511b11235..5373b819a 100644 --- a/src/datadogV1/model/model_usage_top_avg_metrics_response.rs +++ b/src/datadogV1/model/model_usage_top_avg_metrics_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing the number of hourly recorded custom metrics for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageTopAvgMetricsResponse { /// The object containing document metadata. #[serde(rename = "metadata")] diff --git a/src/datadogV1/model/model_user.rs b/src/datadogV1/model/model_user.rs index c68edac05..2fa5bcdb9 100644 --- a/src/datadogV1/model/model_user.rs +++ b/src/datadogV1/model/model_user.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Create, edit, and disable users. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct User { /// The access role of the user. Options are **st** (standard user), **adm** (admin user), or **ro** (read-only user). #[serde( diff --git a/src/datadogV1/model/model_user_disable_response.rs b/src/datadogV1/model/model_user_disable_response.rs index c4f78b536..e9f65bbe4 100644 --- a/src/datadogV1/model/model_user_disable_response.rs +++ b/src/datadogV1/model/model_user_disable_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Array of user disabled for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UserDisableResponse { /// Information pertaining to a user disabled for a given organization. #[serde(rename = "message")] diff --git a/src/datadogV1/model/model_user_list_response.rs b/src/datadogV1/model/model_user_list_response.rs index 650e75227..576fd22df 100644 --- a/src/datadogV1/model/model_user_list_response.rs +++ b/src/datadogV1/model/model_user_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Array of Datadog users for a given organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UserListResponse { /// Array of users. #[serde(rename = "users")] diff --git a/src/datadogV1/model/model_user_response.rs b/src/datadogV1/model/model_user_response.rs index 4232ee99a..371b79546 100644 --- a/src/datadogV1/model/model_user_response.rs +++ b/src/datadogV1/model/model_user_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A Datadog User. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UserResponse { /// Create, edit, and disable users. #[serde(rename = "user")] diff --git a/src/datadogV1/model/model_webhooks_integration.rs b/src/datadogV1/model/model_webhooks_integration.rs index 6d432784b..7209f62cd 100644 --- a/src/datadogV1/model/model_webhooks_integration.rs +++ b/src/datadogV1/model/model_webhooks_integration.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Datadog-Webhooks integration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct WebhooksIntegration { /// If `null`, uses no header. /// If given a JSON payload, these will be headers attached to your webhook. diff --git a/src/datadogV1/model/model_webhooks_integration_custom_variable.rs b/src/datadogV1/model/model_webhooks_integration_custom_variable.rs index 2d83b47b1..d405debf8 100644 --- a/src/datadogV1/model/model_webhooks_integration_custom_variable.rs +++ b/src/datadogV1/model/model_webhooks_integration_custom_variable.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Custom variable for Webhook integration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct WebhooksIntegrationCustomVariable { /// Make custom variable is secret or not. /// If the custom variable is secret, the value is not returned in the response payload. diff --git a/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs b/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs index dfdea37e5..b1d5c4cd3 100644 --- a/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs +++ b/src/datadogV1/model/model_webhooks_integration_custom_variable_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Custom variable for Webhook integration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct WebhooksIntegrationCustomVariableResponse { /// Make custom variable is secret or not. /// If the custom variable is secret, the value is not returned in the response payload. diff --git a/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs b/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs index 96f24d29a..28f0ce660 100644 --- a/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs +++ b/src/datadogV1/model/model_webhooks_integration_custom_variable_update_request.rs @@ -8,7 +8,7 @@ use serde_with::skip_serializing_none; /// /// *All properties are optional.* #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct WebhooksIntegrationCustomVariableUpdateRequest { /// Make custom variable is secret or not. /// If the custom variable is secret, the value is not returned in the response payload. diff --git a/src/datadogV1/model/model_webhooks_integration_encoding.rs b/src/datadogV1/model/model_webhooks_integration_encoding.rs index 087193ed3..2a4fecc12 100644 --- a/src/datadogV1/model/model_webhooks_integration_encoding.rs +++ b/src/datadogV1/model/model_webhooks_integration_encoding.rs @@ -20,9 +20,3 @@ impl ToString for WebhooksIntegrationEncoding { } } } - -impl Default for WebhooksIntegrationEncoding { - fn default() -> WebhooksIntegrationEncoding { - Self::JSON - } -} diff --git a/src/datadogV1/model/model_webhooks_integration_update_request.rs b/src/datadogV1/model/model_webhooks_integration_update_request.rs index 31e377009..c90297361 100644 --- a/src/datadogV1/model/model_webhooks_integration_update_request.rs +++ b/src/datadogV1/model/model_webhooks_integration_update_request.rs @@ -8,7 +8,7 @@ use serde_with::skip_serializing_none; /// /// *All properties are optional.* #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct WebhooksIntegrationUpdateRequest { /// If `null`, uses no header. /// If given a JSON payload, these will be headers attached to your webhook. diff --git a/src/datadogV1/model/model_widget.rs b/src/datadogV1/model/model_widget.rs new file mode 100644 index 000000000..b1b2e723c --- /dev/null +++ b/src/datadogV1/model/model_widget.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Information about widget. +/// +/// **Note**: The `layout` property is required for widgets in dashboards with `free` `layout_type`. +/// For the **new dashboard layout**, the `layout` property depends on the `reflow_type` of the dashboard. +/// - If `reflow_type` is `fixed`, `layout` is required. +/// - If `reflow_type` is `auto`, `layout` should not be set. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Widget { + /// [Definition of the widget](https://docs.datadoghq.com/dashboards/widgets/). + #[serde(rename = "definition")] + pub definition: Box, + /// ID of the widget. + #[serde(rename = "id")] + pub id: Option, + /// The layout for a widget on a `free` or **new dashboard layout** dashboard. + #[serde(rename = "layout")] + pub layout: Option>, +} + +impl Widget { + pub fn new(definition: Box) -> Widget { + Widget { + definition, + id: None, + layout: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_aggregator.rs b/src/datadogV1/model/model_widget_aggregator.rs new file mode 100644 index 000000000..2cd46901a --- /dev/null +++ b/src/datadogV1/model/model_widget_aggregator.rs @@ -0,0 +1,34 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetAggregator { + #[serde(rename = "avg")] + AVERAGE, + #[serde(rename = "last")] + LAST, + #[serde(rename = "max")] + MAXIMUM, + #[serde(rename = "min")] + MINIMUM, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "percentile")] + PERCENTILE, +} + +impl ToString for WidgetAggregator { + fn to_string(&self) -> String { + match self { + Self::AVERAGE => String::from("avg"), + Self::LAST => String::from("last"), + Self::MAXIMUM => String::from("max"), + Self::MINIMUM => String::from("min"), + Self::SUM => String::from("sum"), + Self::PERCENTILE => String::from("percentile"), + } + } +} diff --git a/src/datadogV1/model/model_widget_axis.rs b/src/datadogV1/model/model_widget_axis.rs new file mode 100644 index 000000000..204f79383 --- /dev/null +++ b/src/datadogV1/model/model_widget_axis.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Axis controls for the widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetAxis { + /// Set to `true` to include zero. + #[serde(rename = "include_zero")] + pub include_zero: Option, + /// The label of the axis to display on the graph. Only usable on Scatterplot Widgets. + #[serde(rename = "label")] + pub label: Option, + /// Specifies maximum numeric value to show on the axis. Defaults to `auto`. + #[serde(rename = "max")] + pub max: Option, + /// Specifies minimum numeric value to show on the axis. Defaults to `auto`. + #[serde(rename = "min")] + pub min: Option, + /// Specifies the scale type. Possible values are `linear`, `log`, `sqrt`, and `pow##` (for example `pow2` or `pow0.5`). + #[serde(rename = "scale")] + pub scale: Option, +} + +impl WidgetAxis { + pub fn new() -> WidgetAxis { + WidgetAxis { + include_zero: None, + label: None, + max: None, + min: None, + scale: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_change_type.rs b/src/datadogV1/model/model_widget_change_type.rs new file mode 100644 index 000000000..7f5c1f5e6 --- /dev/null +++ b/src/datadogV1/model/model_widget_change_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetChangeType { + #[serde(rename = "absolute")] + ABSOLUTE, + #[serde(rename = "relative")] + RELATIVE, +} + +impl ToString for WidgetChangeType { + fn to_string(&self) -> String { + match self { + Self::ABSOLUTE => String::from("absolute"), + Self::RELATIVE => String::from("relative"), + } + } +} diff --git a/src/datadogV1/model/model_widget_color_preference.rs b/src/datadogV1/model/model_widget_color_preference.rs new file mode 100644 index 000000000..b13e467f7 --- /dev/null +++ b/src/datadogV1/model/model_widget_color_preference.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetColorPreference { + #[serde(rename = "background")] + BACKGROUND, + #[serde(rename = "text")] + TEXT, +} + +impl ToString for WidgetColorPreference { + fn to_string(&self) -> String { + match self { + Self::BACKGROUND => String::from("background"), + Self::TEXT => String::from("text"), + } + } +} diff --git a/src/datadogV1/model/model_widget_comparator.rs b/src/datadogV1/model/model_widget_comparator.rs new file mode 100644 index 000000000..1c550832a --- /dev/null +++ b/src/datadogV1/model/model_widget_comparator.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetComparator { + #[serde(rename = "=")] + EQUAL_TO, + #[serde(rename = ">")] + GREATER_THAN, + #[serde(rename = ">=")] + GREATER_THAN_OR_EQUAL_TO, + #[serde(rename = "<")] + LESS_THAN, + #[serde(rename = "<=")] + LESS_THAN_OR_EQUAL_TO, +} + +impl ToString for WidgetComparator { + fn to_string(&self) -> String { + match self { + Self::EQUAL_TO => String::from("="), + Self::GREATER_THAN => String::from(">"), + Self::GREATER_THAN_OR_EQUAL_TO => String::from(">="), + Self::LESS_THAN => String::from("<"), + Self::LESS_THAN_OR_EQUAL_TO => String::from("<="), + } + } +} diff --git a/src/datadogV1/model/model_widget_compare_to.rs b/src/datadogV1/model/model_widget_compare_to.rs new file mode 100644 index 000000000..947ab3947 --- /dev/null +++ b/src/datadogV1/model/model_widget_compare_to.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetCompareTo { + #[serde(rename = "hour_before")] + HOUR_BEFORE, + #[serde(rename = "day_before")] + DAY_BEFORE, + #[serde(rename = "week_before")] + WEEK_BEFORE, + #[serde(rename = "month_before")] + MONTH_BEFORE, +} + +impl ToString for WidgetCompareTo { + fn to_string(&self) -> String { + match self { + Self::HOUR_BEFORE => String::from("hour_before"), + Self::DAY_BEFORE => String::from("day_before"), + Self::WEEK_BEFORE => String::from("week_before"), + Self::MONTH_BEFORE => String::from("month_before"), + } + } +} diff --git a/src/datadogV1/model/model_widget_conditional_format.rs b/src/datadogV1/model/model_widget_conditional_format.rs new file mode 100644 index 000000000..c4c705e8a --- /dev/null +++ b/src/datadogV1/model/model_widget_conditional_format.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Define a conditional format for the widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetConditionalFormat { + /// Comparator to apply. + #[serde(rename = "comparator")] + pub comparator: crate::datadogV1::model::WidgetComparator, + /// Color palette to apply to the background, same values available as palette. + #[serde(rename = "custom_bg_color")] + pub custom_bg_color: Option, + /// Color palette to apply to the foreground, same values available as palette. + #[serde(rename = "custom_fg_color")] + pub custom_fg_color: Option, + /// True hides values. + #[serde(rename = "hide_value")] + pub hide_value: Option, + /// Displays an image as the background. + #[serde(rename = "image_url")] + pub image_url: Option, + /// Metric from the request to correlate this conditional format with. + #[serde(rename = "metric")] + pub metric: Option, + /// Color palette to apply. + #[serde(rename = "palette")] + pub palette: crate::datadogV1::model::WidgetPalette, + /// Defines the displayed timeframe. + #[serde(rename = "timeframe")] + pub timeframe: Option, + /// Value for the comparator. + #[serde(rename = "value")] + pub value: f64, +} + +impl WidgetConditionalFormat { + pub fn new( + comparator: crate::datadogV1::model::WidgetComparator, + palette: crate::datadogV1::model::WidgetPalette, + value: f64, + ) -> WidgetConditionalFormat { + WidgetConditionalFormat { + comparator, + custom_bg_color: None, + custom_fg_color: None, + hide_value: None, + image_url: None, + metric: None, + palette, + timeframe: None, + value, + } + } +} diff --git a/src/datadogV1/model/model_widget_custom_link.rs b/src/datadogV1/model/model_widget_custom_link.rs new file mode 100644 index 000000000..cf56378ad --- /dev/null +++ b/src/datadogV1/model/model_widget_custom_link.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Custom links help you connect a data value to a URL, like a Datadog page or your AWS console. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetCustomLink { + /// The flag for toggling context menu link visibility. + #[serde(rename = "is_hidden")] + pub is_hidden: Option, + /// The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags as variables. + #[serde(rename = "label")] + pub label: Option, + /// The URL of the custom link. URL must include `http` or `https`. A relative URL must start with `/`. + #[serde(rename = "link")] + pub link: Option, + /// The label ID that refers to a context menu link. Can be `logs`, `hosts`, `traces`, `profiles`, `processes`, `containers`, or `rum`. + #[serde(rename = "override_label")] + pub override_label: Option, +} + +impl WidgetCustomLink { + pub fn new() -> WidgetCustomLink { + WidgetCustomLink { + is_hidden: None, + label: None, + link: None, + override_label: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_definition.rs b/src/datadogV1/model/model_widget_definition.rs new file mode 100644 index 000000000..45289beca --- /dev/null +++ b/src/datadogV1/model/model_widget_definition.rs @@ -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. +use serde::{Deserialize, Serialize}; + +/// [Definition of the widget](https://docs.datadoghq.com/dashboards/widgets/). +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum WidgetDefinition { + AlertGraphWidgetDefinition(Box), + AlertValueWidgetDefinition(Box), + ChangeWidgetDefinition(Box), + CheckStatusWidgetDefinition(Box), + DistributionWidgetDefinition(Box), + EventStreamWidgetDefinition(Box), + EventTimelineWidgetDefinition(Box), + FreeTextWidgetDefinition(Box), + FunnelWidgetDefinition(Box), + GeomapWidgetDefinition(Box), + GroupWidgetDefinition(Box), + HeatMapWidgetDefinition(Box), + HostMapWidgetDefinition(Box), + IFrameWidgetDefinition(Box), + ImageWidgetDefinition(Box), + ListStreamWidgetDefinition(Box), + LogStreamWidgetDefinition(Box), + MonitorSummaryWidgetDefinition(Box), + NoteWidgetDefinition(Box), + PowerpackWidgetDefinition(Box), + QueryValueWidgetDefinition(Box), + RunWorkflowWidgetDefinition(Box), + SLOListWidgetDefinition(Box), + SLOWidgetDefinition(Box), + ScatterPlotWidgetDefinition(Box), + ServiceMapWidgetDefinition(Box), + ServiceSummaryWidgetDefinition(Box), + SplitGraphWidgetDefinition(Box), + SunburstWidgetDefinition(Box), + TableWidgetDefinition(Box), + TimeseriesWidgetDefinition(Box), + ToplistWidgetDefinition(Box), + TopologyMapWidgetDefinition(Box), + TreeMapWidgetDefinition(Box), +} diff --git a/src/datadogV1/model/model_widget_display_type.rs b/src/datadogV1/model/model_widget_display_type.rs new file mode 100644 index 000000000..f24cc6ea2 --- /dev/null +++ b/src/datadogV1/model/model_widget_display_type.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetDisplayType { + #[serde(rename = "area")] + AREA, + #[serde(rename = "bars")] + BARS, + #[serde(rename = "line")] + LINE, + #[serde(rename = "overlay")] + OVERLAY, +} + +impl ToString for WidgetDisplayType { + fn to_string(&self) -> String { + match self { + Self::AREA => String::from("area"), + Self::BARS => String::from("bars"), + Self::LINE => String::from("line"), + Self::OVERLAY => String::from("overlay"), + } + } +} diff --git a/src/datadogV1/model/model_widget_event.rs b/src/datadogV1/model/model_widget_event.rs new file mode 100644 index 000000000..0b3d9334e --- /dev/null +++ b/src/datadogV1/model/model_widget_event.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Event overlay control options. +/// +/// See the dedicated [Events JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/widget_json/#events-schema) +/// to learn how to build the ``. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetEvent { + /// Query definition. + #[serde(rename = "q")] + pub q: String, + /// The execution method for multi-value filters. + #[serde(rename = "tags_execution")] + pub tags_execution: Option, +} + +impl WidgetEvent { + pub fn new(q: String) -> WidgetEvent { + WidgetEvent { + q, + tags_execution: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_event_size.rs b/src/datadogV1/model/model_widget_event_size.rs new file mode 100644 index 000000000..20eaa9a45 --- /dev/null +++ b/src/datadogV1/model/model_widget_event_size.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetEventSize { + #[serde(rename = "s")] + SMALL, + #[serde(rename = "l")] + LARGE, +} + +impl ToString for WidgetEventSize { + fn to_string(&self) -> String { + match self { + Self::SMALL => String::from("s"), + Self::LARGE => String::from("l"), + } + } +} diff --git a/src/datadogV1/model/model_widget_field_sort.rs b/src/datadogV1/model/model_widget_field_sort.rs new file mode 100644 index 000000000..db7076d69 --- /dev/null +++ b/src/datadogV1/model/model_widget_field_sort.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Which column and order to sort by +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetFieldSort { + /// Facet path for the column + #[serde(rename = "column")] + pub column: String, + /// Widget sorting methods. + #[serde(rename = "order")] + pub order: crate::datadogV1::model::WidgetSort, +} + +impl WidgetFieldSort { + pub fn new(column: String, order: crate::datadogV1::model::WidgetSort) -> WidgetFieldSort { + WidgetFieldSort { column, order } + } +} diff --git a/src/datadogV1/model/model_widget_formula.rs b/src/datadogV1/model/model_widget_formula.rs new file mode 100644 index 000000000..e5b6edb24 --- /dev/null +++ b/src/datadogV1/model/model_widget_formula.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Formula to be used in a widget query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetFormula { + /// Expression alias. + #[serde(rename = "alias")] + pub alias: Option, + /// Define a display mode for the table cell. + #[serde(rename = "cell_display_mode")] + pub cell_display_mode: Option, + /// List of conditional formats. + #[serde(rename = "conditional_formats")] + pub conditional_formats: Option>, + /// String expression built from queries, formulas, and functions. + #[serde(rename = "formula")] + pub formula: String, + /// Options for limiting results returned. + #[serde(rename = "limit")] + pub limit: Option>, + /// Styling options for widget formulas. + #[serde(rename = "style")] + pub style: Option>, +} + +impl WidgetFormula { + pub fn new(formula: String) -> WidgetFormula { + WidgetFormula { + alias: None, + cell_display_mode: None, + conditional_formats: None, + formula, + limit: None, + style: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_formula_limit.rs b/src/datadogV1/model/model_widget_formula_limit.rs new file mode 100644 index 000000000..f10e2280a --- /dev/null +++ b/src/datadogV1/model/model_widget_formula_limit.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options for limiting results returned. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetFormulaLimit { + /// Number of results to return. + #[serde(rename = "count")] + pub count: Option, + /// Direction of sort. + #[serde(rename = "order")] + pub order: Option, +} + +impl WidgetFormulaLimit { + pub fn new() -> WidgetFormulaLimit { + WidgetFormulaLimit { + count: None, + order: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_formula_style.rs b/src/datadogV1/model/model_widget_formula_style.rs new file mode 100644 index 000000000..0671217a8 --- /dev/null +++ b/src/datadogV1/model/model_widget_formula_style.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Styling options for widget formulas. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetFormulaStyle { + /// The color palette used to display the formula. A guide to the available color palettes can be found at https://docs.datadoghq.com/dashboards/guide/widget_colors + #[serde(rename = "palette")] + pub palette: Option, + /// Index specifying which color to use within the palette. + #[serde(rename = "palette_index")] + pub palette_index: Option, +} + +impl WidgetFormulaStyle { + pub fn new() -> WidgetFormulaStyle { + WidgetFormulaStyle { + palette: None, + palette_index: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_grouping.rs b/src/datadogV1/model/model_widget_grouping.rs new file mode 100644 index 000000000..84f2040b7 --- /dev/null +++ b/src/datadogV1/model/model_widget_grouping.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetGrouping { + #[serde(rename = "check")] + CHECK, + #[serde(rename = "cluster")] + CLUSTER, +} + +impl ToString for WidgetGrouping { + fn to_string(&self) -> String { + match self { + Self::CHECK => String::from("check"), + Self::CLUSTER => String::from("cluster"), + } + } +} diff --git a/src/datadogV1/model/model_widget_horizontal_align.rs b/src/datadogV1/model/model_widget_horizontal_align.rs new file mode 100644 index 000000000..84e2215a0 --- /dev/null +++ b/src/datadogV1/model/model_widget_horizontal_align.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetHorizontalAlign { + #[serde(rename = "center")] + CENTER, + #[serde(rename = "left")] + LEFT, + #[serde(rename = "right")] + RIGHT, +} + +impl ToString for WidgetHorizontalAlign { + fn to_string(&self) -> String { + match self { + Self::CENTER => String::from("center"), + Self::LEFT => String::from("left"), + Self::RIGHT => String::from("right"), + } + } +} diff --git a/src/datadogV1/model/model_widget_image_sizing.rs b/src/datadogV1/model/model_widget_image_sizing.rs new file mode 100644 index 000000000..b2b07ae6d --- /dev/null +++ b/src/datadogV1/model/model_widget_image_sizing.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetImageSizing { + #[serde(rename = "fill")] + FILL, + #[serde(rename = "contain")] + CONTAIN, + #[serde(rename = "cover")] + COVER, + #[serde(rename = "none")] + NONE, + #[serde(rename = "scale-down")] + SCALEDOWN, + #[serde(rename = "zoom")] + ZOOM, + #[serde(rename = "fit")] + FIT, + #[serde(rename = "center")] + CENTER, +} + +impl ToString for WidgetImageSizing { + fn to_string(&self) -> String { + match self { + Self::FILL => String::from("fill"), + Self::CONTAIN => String::from("contain"), + Self::COVER => String::from("cover"), + Self::NONE => String::from("none"), + Self::SCALEDOWN => String::from("scale-down"), + Self::ZOOM => String::from("zoom"), + Self::FIT => String::from("fit"), + Self::CENTER => String::from("center"), + } + } +} diff --git a/src/datadogV1/model/model_widget_layout.rs b/src/datadogV1/model/model_widget_layout.rs new file mode 100644 index 000000000..e6b677c3c --- /dev/null +++ b/src/datadogV1/model/model_widget_layout.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The layout for a widget on a `free` or **new dashboard layout** dashboard. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetLayout { + /// The height of the widget. Should be a non-negative integer. + #[serde(rename = "height")] + pub height: i64, + /// Whether the widget should be the first one on the second column in high density or not. + /// **Note**: Only for the **new dashboard layout** and only one widget in the dashboard should have this property set to `true`. + #[serde(rename = "is_column_break")] + pub is_column_break: Option, + /// The width of the widget. Should be a non-negative integer. + #[serde(rename = "width")] + pub width: i64, + /// The position of the widget on the x (horizontal) axis. Should be a non-negative integer. + #[serde(rename = "x")] + pub x: i64, + /// The position of the widget on the y (vertical) axis. Should be a non-negative integer. + #[serde(rename = "y")] + pub y: i64, +} + +impl WidgetLayout { + pub fn new(height: i64, width: i64, x: i64, y: i64) -> WidgetLayout { + WidgetLayout { + height, + is_column_break: None, + width, + x, + y, + } + } +} diff --git a/src/datadogV1/model/model_widget_layout_type.rs b/src/datadogV1/model/model_widget_layout_type.rs new file mode 100644 index 000000000..8cce2e72a --- /dev/null +++ b/src/datadogV1/model/model_widget_layout_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetLayoutType { + #[serde(rename = "ordered")] + ORDERED, +} + +impl ToString for WidgetLayoutType { + fn to_string(&self) -> String { + match self { + Self::ORDERED => String::from("ordered"), + } + } +} diff --git a/src/datadogV1/model/model_widget_line_type.rs b/src/datadogV1/model/model_widget_line_type.rs new file mode 100644 index 000000000..b13c2d7b5 --- /dev/null +++ b/src/datadogV1/model/model_widget_line_type.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetLineType { + #[serde(rename = "dashed")] + DASHED, + #[serde(rename = "dotted")] + DOTTED, + #[serde(rename = "solid")] + SOLID, +} + +impl ToString for WidgetLineType { + fn to_string(&self) -> String { + match self { + Self::DASHED => String::from("dashed"), + Self::DOTTED => String::from("dotted"), + Self::SOLID => String::from("solid"), + } + } +} diff --git a/src/datadogV1/model/model_widget_line_width.rs b/src/datadogV1/model/model_widget_line_width.rs new file mode 100644 index 000000000..ffe09c5e3 --- /dev/null +++ b/src/datadogV1/model/model_widget_line_width.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetLineWidth { + #[serde(rename = "normal")] + NORMAL, + #[serde(rename = "thick")] + THICK, + #[serde(rename = "thin")] + THIN, +} + +impl ToString for WidgetLineWidth { + fn to_string(&self) -> String { + match self { + Self::NORMAL => String::from("normal"), + Self::THICK => String::from("thick"), + Self::THIN => String::from("thin"), + } + } +} diff --git a/src/datadogV1/model/model_widget_live_span.rs b/src/datadogV1/model/model_widget_live_span.rs new file mode 100644 index 000000000..fd5239c3c --- /dev/null +++ b/src/datadogV1/model/model_widget_live_span.rs @@ -0,0 +1,67 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetLiveSpan { + #[serde(rename = "1m")] + PAST_ONE_MINUTE, + #[serde(rename = "5m")] + PAST_FIVE_MINUTES, + #[serde(rename = "10m")] + PAST_TEN_MINUTES, + #[serde(rename = "15m")] + PAST_FIFTEEN_MINUTES, + #[serde(rename = "30m")] + PAST_THIRTY_MINUTES, + #[serde(rename = "1h")] + PAST_ONE_HOUR, + #[serde(rename = "4h")] + PAST_FOUR_HOURS, + #[serde(rename = "1d")] + PAST_ONE_DAY, + #[serde(rename = "2d")] + PAST_TWO_DAYS, + #[serde(rename = "1w")] + PAST_ONE_WEEK, + #[serde(rename = "1mo")] + PAST_ONE_MONTH, + #[serde(rename = "3mo")] + PAST_THREE_MONTHS, + #[serde(rename = "6mo")] + PAST_SIX_MONTHS, + #[serde(rename = "week_to_date")] + WEEK_TO_DATE, + #[serde(rename = "month_to_date")] + MONTH_TO_DATE, + #[serde(rename = "1y")] + PAST_ONE_YEAR, + #[serde(rename = "alert")] + ALERT, +} + +impl ToString for WidgetLiveSpan { + fn to_string(&self) -> String { + match self { + Self::PAST_ONE_MINUTE => String::from("1m"), + Self::PAST_FIVE_MINUTES => String::from("5m"), + Self::PAST_TEN_MINUTES => String::from("10m"), + Self::PAST_FIFTEEN_MINUTES => String::from("15m"), + Self::PAST_THIRTY_MINUTES => String::from("30m"), + Self::PAST_ONE_HOUR => String::from("1h"), + Self::PAST_FOUR_HOURS => String::from("4h"), + Self::PAST_ONE_DAY => String::from("1d"), + Self::PAST_TWO_DAYS => String::from("2d"), + Self::PAST_ONE_WEEK => String::from("1w"), + Self::PAST_ONE_MONTH => String::from("1mo"), + Self::PAST_THREE_MONTHS => String::from("3mo"), + Self::PAST_SIX_MONTHS => String::from("6mo"), + Self::WEEK_TO_DATE => String::from("week_to_date"), + Self::MONTH_TO_DATE => String::from("month_to_date"), + Self::PAST_ONE_YEAR => String::from("1y"), + Self::ALERT => String::from("alert"), + } + } +} diff --git a/src/datadogV1/model/model_widget_margin.rs b/src/datadogV1/model/model_widget_margin.rs new file mode 100644 index 000000000..c312237d1 --- /dev/null +++ b/src/datadogV1/model/model_widget_margin.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetMargin { + #[serde(rename = "sm")] + SM, + #[serde(rename = "md")] + MD, + #[serde(rename = "lg")] + LG, + #[serde(rename = "small")] + SMALL, + #[serde(rename = "large")] + LARGE, +} + +impl ToString for WidgetMargin { + fn to_string(&self) -> String { + match self { + Self::SM => String::from("sm"), + Self::MD => String::from("md"), + Self::LG => String::from("lg"), + Self::SMALL => String::from("small"), + Self::LARGE => String::from("large"), + } + } +} diff --git a/src/datadogV1/model/model_widget_marker.rs b/src/datadogV1/model/model_widget_marker.rs new file mode 100644 index 000000000..25ba10ad4 --- /dev/null +++ b/src/datadogV1/model/model_widget_marker.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Markers allow you to add visual conditional formatting for your graphs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetMarker { + /// Combination of: + /// - A severity error, warning, ok, or info + /// - A line type: dashed, solid, or bold + /// In this case of a Distribution widget, this can be set to be `x_axis_percentile`. + /// + #[serde(rename = "display_type")] + pub display_type: Option, + /// Label to display over the marker. + #[serde(rename = "label")] + pub label: Option, + /// Timestamp for the widget. + #[serde(rename = "time")] + pub time: Option, + /// Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. + #[serde(rename = "value")] + pub value: String, +} + +impl WidgetMarker { + pub fn new(value: String) -> WidgetMarker { + WidgetMarker { + display_type: None, + label: None, + time: None, + value, + } + } +} diff --git a/src/datadogV1/model/model_widget_message_display.rs b/src/datadogV1/model/model_widget_message_display.rs new file mode 100644 index 000000000..fa3e74658 --- /dev/null +++ b/src/datadogV1/model/model_widget_message_display.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetMessageDisplay { + #[serde(rename = "inline")] + INLINE, + #[serde(rename = "expanded-md")] + EXPANDED_MEDIUM, + #[serde(rename = "expanded-lg")] + EXPANDED_LARGE, +} + +impl ToString for WidgetMessageDisplay { + fn to_string(&self) -> String { + match self { + Self::INLINE => String::from("inline"), + Self::EXPANDED_MEDIUM => String::from("expanded-md"), + Self::EXPANDED_LARGE => String::from("expanded-lg"), + } + } +} diff --git a/src/datadogV1/model/model_widget_monitor_summary_display_format.rs b/src/datadogV1/model/model_widget_monitor_summary_display_format.rs new file mode 100644 index 000000000..a31141f20 --- /dev/null +++ b/src/datadogV1/model/model_widget_monitor_summary_display_format.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetMonitorSummaryDisplayFormat { + #[serde(rename = "counts")] + COUNTS, + #[serde(rename = "countsAndList")] + COUNTS_AND_LIST, + #[serde(rename = "list")] + LIST, +} + +impl ToString for WidgetMonitorSummaryDisplayFormat { + fn to_string(&self) -> String { + match self { + Self::COUNTS => String::from("counts"), + Self::COUNTS_AND_LIST => String::from("countsAndList"), + Self::LIST => String::from("list"), + } + } +} diff --git a/src/datadogV1/model/model_widget_monitor_summary_sort.rs b/src/datadogV1/model/model_widget_monitor_summary_sort.rs new file mode 100644 index 000000000..992437652 --- /dev/null +++ b/src/datadogV1/model/model_widget_monitor_summary_sort.rs @@ -0,0 +1,67 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetMonitorSummarySort { + #[serde(rename = "name")] + NAME, + #[serde(rename = "group")] + GROUP, + #[serde(rename = "status")] + STATUS, + #[serde(rename = "tags")] + TAGS, + #[serde(rename = "triggered")] + TRIGGERED, + #[serde(rename = "group,asc")] + GROUP_ASCENDING, + #[serde(rename = "group,desc")] + GROUP_DESCENDING, + #[serde(rename = "name,asc")] + NAME_ASCENDING, + #[serde(rename = "name,desc")] + NAME_DESCENDING, + #[serde(rename = "status,asc")] + STATUS_ASCENDING, + #[serde(rename = "status,desc")] + STATUS_DESCENDING, + #[serde(rename = "tags,asc")] + TAGS_ASCENDING, + #[serde(rename = "tags,desc")] + TAGS_DESCENDING, + #[serde(rename = "triggered,asc")] + TRIGGERED_ASCENDING, + #[serde(rename = "triggered,desc")] + TRIGGERED_DESCENDING, + #[serde(rename = "priority,asc")] + PRIORITY_ASCENDING, + #[serde(rename = "priority,desc")] + PRIORITY_DESCENDING, +} + +impl ToString for WidgetMonitorSummarySort { + fn to_string(&self) -> String { + match self { + Self::NAME => String::from("name"), + Self::GROUP => String::from("group"), + Self::STATUS => String::from("status"), + Self::TAGS => String::from("tags"), + Self::TRIGGERED => String::from("triggered"), + Self::GROUP_ASCENDING => String::from("group,asc"), + Self::GROUP_DESCENDING => String::from("group,desc"), + Self::NAME_ASCENDING => String::from("name,asc"), + Self::NAME_DESCENDING => String::from("name,desc"), + Self::STATUS_ASCENDING => String::from("status,asc"), + Self::STATUS_DESCENDING => String::from("status,desc"), + Self::TAGS_ASCENDING => String::from("tags,asc"), + Self::TAGS_DESCENDING => String::from("tags,desc"), + Self::TRIGGERED_ASCENDING => String::from("triggered,asc"), + Self::TRIGGERED_DESCENDING => String::from("triggered,desc"), + Self::PRIORITY_ASCENDING => String::from("priority,asc"), + Self::PRIORITY_DESCENDING => String::from("priority,desc"), + } + } +} diff --git a/src/datadogV1/model/model_widget_node_type.rs b/src/datadogV1/model/model_widget_node_type.rs new file mode 100644 index 000000000..f7d84e70e --- /dev/null +++ b/src/datadogV1/model/model_widget_node_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetNodeType { + #[serde(rename = "host")] + HOST, + #[serde(rename = "container")] + CONTAINER, +} + +impl ToString for WidgetNodeType { + fn to_string(&self) -> String { + match self { + Self::HOST => String::from("host"), + Self::CONTAINER => String::from("container"), + } + } +} diff --git a/src/datadogV1/model/model_widget_order_by.rs b/src/datadogV1/model/model_widget_order_by.rs new file mode 100644 index 000000000..4b28732cd --- /dev/null +++ b/src/datadogV1/model/model_widget_order_by.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetOrderBy { + #[serde(rename = "change")] + CHANGE, + #[serde(rename = "name")] + NAME, + #[serde(rename = "present")] + PRESENT, + #[serde(rename = "past")] + PAST, +} + +impl ToString for WidgetOrderBy { + fn to_string(&self) -> String { + match self { + Self::CHANGE => String::from("change"), + Self::NAME => String::from("name"), + Self::PRESENT => String::from("present"), + Self::PAST => String::from("past"), + } + } +} diff --git a/src/datadogV1/model/model_widget_palette.rs b/src/datadogV1/model/model_widget_palette.rs new file mode 100644 index 000000000..e1b7f1a4c --- /dev/null +++ b/src/datadogV1/model/model_widget_palette.rs @@ -0,0 +1,73 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetPalette { + #[serde(rename = "blue")] + BLUE, + #[serde(rename = "custom_bg")] + CUSTOM_BACKGROUND, + #[serde(rename = "custom_image")] + CUSTOM_IMAGE, + #[serde(rename = "custom_text")] + CUSTOM_TEXT, + #[serde(rename = "gray_on_white")] + GRAY_ON_WHITE, + #[serde(rename = "grey")] + GREY, + #[serde(rename = "green")] + GREEN, + #[serde(rename = "orange")] + ORANGE, + #[serde(rename = "red")] + RED, + #[serde(rename = "red_on_white")] + RED_ON_WHITE, + #[serde(rename = "white_on_gray")] + WHITE_ON_GRAY, + #[serde(rename = "white_on_green")] + WHITE_ON_GREEN, + #[serde(rename = "green_on_white")] + GREEN_ON_WHITE, + #[serde(rename = "white_on_red")] + WHITE_ON_RED, + #[serde(rename = "white_on_yellow")] + WHITE_ON_YELLOW, + #[serde(rename = "yellow_on_white")] + YELLOW_ON_WHITE, + #[serde(rename = "black_on_light_yellow")] + BLACK_ON_LIGHT_YELLOW, + #[serde(rename = "black_on_light_green")] + BLACK_ON_LIGHT_GREEN, + #[serde(rename = "black_on_light_red")] + BLACK_ON_LIGHT_RED, +} + +impl ToString for WidgetPalette { + fn to_string(&self) -> String { + match self { + Self::BLUE => String::from("blue"), + Self::CUSTOM_BACKGROUND => String::from("custom_bg"), + Self::CUSTOM_IMAGE => String::from("custom_image"), + Self::CUSTOM_TEXT => String::from("custom_text"), + Self::GRAY_ON_WHITE => String::from("gray_on_white"), + Self::GREY => String::from("grey"), + Self::GREEN => String::from("green"), + Self::ORANGE => String::from("orange"), + Self::RED => String::from("red"), + Self::RED_ON_WHITE => String::from("red_on_white"), + Self::WHITE_ON_GRAY => String::from("white_on_gray"), + Self::WHITE_ON_GREEN => String::from("white_on_green"), + Self::GREEN_ON_WHITE => String::from("green_on_white"), + Self::WHITE_ON_RED => String::from("white_on_red"), + Self::WHITE_ON_YELLOW => String::from("white_on_yellow"), + Self::YELLOW_ON_WHITE => String::from("yellow_on_white"), + Self::BLACK_ON_LIGHT_YELLOW => String::from("black_on_light_yellow"), + Self::BLACK_ON_LIGHT_GREEN => String::from("black_on_light_green"), + Self::BLACK_ON_LIGHT_RED => String::from("black_on_light_red"), + } + } +} diff --git a/src/datadogV1/model/model_widget_request_style.rs b/src/datadogV1/model/model_widget_request_style.rs new file mode 100644 index 000000000..5176f0ee1 --- /dev/null +++ b/src/datadogV1/model/model_widget_request_style.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Define request widget style. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetRequestStyle { + /// Type of lines displayed. + #[serde(rename = "line_type")] + pub line_type: Option, + /// Width of line displayed. + #[serde(rename = "line_width")] + pub line_width: Option, + /// Color palette to apply to the widget. + #[serde(rename = "palette")] + pub palette: Option, +} + +impl WidgetRequestStyle { + pub fn new() -> WidgetRequestStyle { + WidgetRequestStyle { + line_type: None, + line_width: None, + palette: None, + } + } +} diff --git a/src/datadogV1/model/model_widget_service_summary_display_format.rs b/src/datadogV1/model/model_widget_service_summary_display_format.rs new file mode 100644 index 000000000..5e8e907dd --- /dev/null +++ b/src/datadogV1/model/model_widget_service_summary_display_format.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetServiceSummaryDisplayFormat { + #[serde(rename = "one_column")] + ONE_COLUMN, + #[serde(rename = "two_column")] + TWO_COLUMN, + #[serde(rename = "three_column")] + THREE_COLUMN, +} + +impl ToString for WidgetServiceSummaryDisplayFormat { + fn to_string(&self) -> String { + match self { + Self::ONE_COLUMN => String::from("one_column"), + Self::TWO_COLUMN => String::from("two_column"), + Self::THREE_COLUMN => String::from("three_column"), + } + } +} diff --git a/src/datadogV1/model/model_widget_size_format.rs b/src/datadogV1/model/model_widget_size_format.rs new file mode 100644 index 000000000..cd1875e3e --- /dev/null +++ b/src/datadogV1/model/model_widget_size_format.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetSizeFormat { + #[serde(rename = "small")] + SMALL, + #[serde(rename = "medium")] + MEDIUM, + #[serde(rename = "large")] + LARGE, +} + +impl ToString for WidgetSizeFormat { + fn to_string(&self) -> String { + match self { + Self::SMALL => String::from("small"), + Self::MEDIUM => String::from("medium"), + Self::LARGE => String::from("large"), + } + } +} diff --git a/src/datadogV1/model/model_widget_sort.rs b/src/datadogV1/model/model_widget_sort.rs new file mode 100644 index 000000000..b026cd319 --- /dev/null +++ b/src/datadogV1/model/model_widget_sort.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetSort { + #[serde(rename = "asc")] + ASCENDING, + #[serde(rename = "desc")] + DESCENDING, +} + +impl ToString for WidgetSort { + fn to_string(&self) -> String { + match self { + Self::ASCENDING => String::from("asc"), + Self::DESCENDING => String::from("desc"), + } + } +} diff --git a/src/datadogV1/model/model_widget_style.rs b/src/datadogV1/model/model_widget_style.rs new file mode 100644 index 000000000..59209ad00 --- /dev/null +++ b/src/datadogV1/model/model_widget_style.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Widget style definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetStyle { + /// Color palette to apply to the widget. + #[serde(rename = "palette")] + pub palette: Option, +} + +impl WidgetStyle { + pub fn new() -> WidgetStyle { + WidgetStyle { palette: None } + } +} diff --git a/src/datadogV1/model/model_widget_summary_type.rs b/src/datadogV1/model/model_widget_summary_type.rs new file mode 100644 index 000000000..e17064fb2 --- /dev/null +++ b/src/datadogV1/model/model_widget_summary_type.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetSummaryType { + #[serde(rename = "monitors")] + MONITORS, + #[serde(rename = "groups")] + GROUPS, + #[serde(rename = "combined")] + COMBINED, +} + +impl ToString for WidgetSummaryType { + fn to_string(&self) -> String { + match self { + Self::MONITORS => String::from("monitors"), + Self::GROUPS => String::from("groups"), + Self::COMBINED => String::from("combined"), + } + } +} diff --git a/src/datadogV1/model/model_widget_text_align.rs b/src/datadogV1/model/model_widget_text_align.rs new file mode 100644 index 000000000..4e02ceecd --- /dev/null +++ b/src/datadogV1/model/model_widget_text_align.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetTextAlign { + #[serde(rename = "center")] + CENTER, + #[serde(rename = "left")] + LEFT, + #[serde(rename = "right")] + RIGHT, +} + +impl ToString for WidgetTextAlign { + fn to_string(&self) -> String { + match self { + Self::CENTER => String::from("center"), + Self::LEFT => String::from("left"), + Self::RIGHT => String::from("right"), + } + } +} diff --git a/src/datadogV1/model/model_widget_tick_edge.rs b/src/datadogV1/model/model_widget_tick_edge.rs new file mode 100644 index 000000000..9b71a2d0a --- /dev/null +++ b/src/datadogV1/model/model_widget_tick_edge.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetTickEdge { + #[serde(rename = "bottom")] + BOTTOM, + #[serde(rename = "left")] + LEFT, + #[serde(rename = "right")] + RIGHT, + #[serde(rename = "top")] + TOP, +} + +impl ToString for WidgetTickEdge { + fn to_string(&self) -> String { + match self { + Self::BOTTOM => String::from("bottom"), + Self::LEFT => String::from("left"), + Self::RIGHT => String::from("right"), + Self::TOP => String::from("top"), + } + } +} diff --git a/src/datadogV1/model/model_widget_time.rs b/src/datadogV1/model/model_widget_time.rs new file mode 100644 index 000000000..45cf0e837 --- /dev/null +++ b/src/datadogV1/model/model_widget_time.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Time setting for the widget. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct WidgetTime { + /// The available timeframes depend on the widget you are using. + #[serde(rename = "live_span")] + pub live_span: Option, +} + +impl WidgetTime { + pub fn new() -> WidgetTime { + WidgetTime { live_span: None } + } +} diff --git a/src/datadogV1/model/model_widget_time_windows.rs b/src/datadogV1/model/model_widget_time_windows.rs new file mode 100644 index 000000000..6b2b6a2ff --- /dev/null +++ b/src/datadogV1/model/model_widget_time_windows.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetTimeWindows { + #[serde(rename = "7d")] + SEVEN_DAYS, + #[serde(rename = "30d")] + THIRTY_DAYS, + #[serde(rename = "90d")] + NINETY_DAYS, + #[serde(rename = "week_to_date")] + WEEK_TO_DATE, + #[serde(rename = "previous_week")] + PREVIOUS_WEEK, + #[serde(rename = "month_to_date")] + MONTH_TO_DATE, + #[serde(rename = "previous_month")] + PREVIOUS_MONTH, + #[serde(rename = "global_time")] + GLOBAL_TIME, +} + +impl ToString for WidgetTimeWindows { + fn to_string(&self) -> String { + match self { + Self::SEVEN_DAYS => String::from("7d"), + Self::THIRTY_DAYS => String::from("30d"), + Self::NINETY_DAYS => String::from("90d"), + Self::WEEK_TO_DATE => String::from("week_to_date"), + Self::PREVIOUS_WEEK => String::from("previous_week"), + Self::MONTH_TO_DATE => String::from("month_to_date"), + Self::PREVIOUS_MONTH => String::from("previous_month"), + Self::GLOBAL_TIME => String::from("global_time"), + } + } +} diff --git a/src/datadogV1/model/model_widget_vertical_align.rs b/src/datadogV1/model/model_widget_vertical_align.rs new file mode 100644 index 000000000..ec07420f9 --- /dev/null +++ b/src/datadogV1/model/model_widget_vertical_align.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetVerticalAlign { + #[serde(rename = "center")] + CENTER, + #[serde(rename = "top")] + TOP, + #[serde(rename = "bottom")] + BOTTOM, +} + +impl ToString for WidgetVerticalAlign { + fn to_string(&self) -> String { + match self { + Self::CENTER => String::from("center"), + Self::TOP => String::from("top"), + Self::BOTTOM => String::from("bottom"), + } + } +} diff --git a/src/datadogV1/model/model_widget_view_mode.rs b/src/datadogV1/model/model_widget_view_mode.rs new file mode 100644 index 000000000..2053bac08 --- /dev/null +++ b/src/datadogV1/model/model_widget_view_mode.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetViewMode { + #[serde(rename = "overall")] + OVERALL, + #[serde(rename = "component")] + COMPONENT, + #[serde(rename = "both")] + BOTH, +} + +impl ToString for WidgetViewMode { + fn to_string(&self) -> String { + match self { + Self::OVERALL => String::from("overall"), + Self::COMPONENT => String::from("component"), + Self::BOTH => String::from("both"), + } + } +} diff --git a/src/datadogV1/model/model_widget_viz_type.rs b/src/datadogV1/model/model_widget_viz_type.rs new file mode 100644 index 000000000..20e7558e3 --- /dev/null +++ b/src/datadogV1/model/model_widget_viz_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetVizType { + #[serde(rename = "timeseries")] + TIMESERIES, + #[serde(rename = "toplist")] + TOPLIST, +} + +impl ToString for WidgetVizType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES => String::from("timeseries"), + Self::TOPLIST => String::from("toplist"), + } + } +} diff --git a/src/datadogV2/api/api_apm_retention_filters.rs b/src/datadogV2/api/api_apm_retention_filters.rs index 34d0bd92c..bb4990f18 100644 --- a/src/datadogV2/api/api_apm_retention_filters.rs +++ b/src/datadogV2/api/api_apm_retention_filters.rs @@ -7,35 +7,35 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateApmRetentionFilterParams is a struct for passing parameters to the method [`CreateApmRetentionFilter`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateApmRetentionFilterParams { /// The definition of the new retention filter. pub body: crate::datadogV2::model::RetentionFilterCreateRequest, } /// DeleteApmRetentionFilterParams is a struct for passing parameters to the method [`DeleteApmRetentionFilter`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteApmRetentionFilterParams { /// The ID of the retention filter. pub filter_id: String, } /// GetApmRetentionFilterParams is a struct for passing parameters to the method [`GetApmRetentionFilter`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetApmRetentionFilterParams { /// The ID of the retention filter. pub filter_id: String, } /// ReorderApmRetentionFiltersParams is a struct for passing parameters to the method [`ReorderApmRetentionFilters`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ReorderApmRetentionFiltersParams { /// The list of retention filters in the new order. pub body: crate::datadogV2::model::ReorderRetentionFiltersRequest, } /// UpdateApmRetentionFilterParams is a struct for passing parameters to the method [`UpdateApmRetentionFilter`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateApmRetentionFilterParams { /// The ID of the retention filter. pub filter_id: String, diff --git a/src/datadogV2/api/api_audit.rs b/src/datadogV2/api/api_audit.rs index 91842c1be..26b74f02b 100644 --- a/src/datadogV2/api/api_audit.rs +++ b/src/datadogV2/api/api_audit.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListAuditLogsParams is a struct for passing parameters to the method [`ListAuditLogs`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListAuditLogsParams { /// Search query following Audit Logs syntax. pub filter_query: Option, @@ -24,7 +24,7 @@ pub struct ListAuditLogsParams { } /// SearchAuditLogsParams is a struct for passing parameters to the method [`SearchAuditLogs`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SearchAuditLogsParams { pub body: Option>, } diff --git a/src/datadogV2/api/api_auth_n_mappings.rs b/src/datadogV2/api/api_auth_n_mappings.rs new file mode 100644 index 000000000..0c2b93465 --- /dev/null +++ b/src/datadogV2/api/api_auth_n_mappings.rs @@ -0,0 +1,516 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateAuthNMappingParams is a struct for passing parameters to the method [`CreateAuthNMapping`] +#[derive(Clone, Debug)] +pub struct CreateAuthNMappingParams { + pub body: crate::datadogV2::model::AuthNMappingCreateRequest, +} + +/// DeleteAuthNMappingParams is a struct for passing parameters to the method [`DeleteAuthNMapping`] +#[derive(Clone, Debug)] +pub struct DeleteAuthNMappingParams { + /// The UUID of the AuthN Mapping. + pub authn_mapping_id: String, +} + +/// GetAuthNMappingParams is a struct for passing parameters to the method [`GetAuthNMapping`] +#[derive(Clone, Debug)] +pub struct GetAuthNMappingParams { + /// The UUID of the AuthN Mapping. + pub authn_mapping_id: String, +} + +/// ListAuthNMappingsParams is a struct for passing parameters to the method [`ListAuthNMappings`] +#[derive(Clone, Debug)] +pub struct ListAuthNMappingsParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// Sort AuthN Mappings depending on the given field. + pub sort: Option, + /// Filter all mappings by the given string. + pub filter: Option, +} + +/// UpdateAuthNMappingParams is a struct for passing parameters to the method [`UpdateAuthNMapping`] +#[derive(Clone, Debug)] +pub struct UpdateAuthNMappingParams { + /// The UUID of the AuthN Mapping. + pub authn_mapping_id: String, + pub body: crate::datadogV2::model::AuthNMappingUpdateRequest, +} + +/// CreateAuthNMappingError is a struct for typed errors of method [`CreateAuthNMapping`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateAuthNMappingError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteAuthNMappingError is a struct for typed errors of method [`DeleteAuthNMapping`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAuthNMappingError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetAuthNMappingError is a struct for typed errors of method [`GetAuthNMapping`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAuthNMappingError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListAuthNMappingsError is a struct for typed errors of method [`ListAuthNMappings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListAuthNMappingsError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateAuthNMappingError is a struct for typed errors of method [`UpdateAuthNMapping`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateAuthNMappingError { + Status400(Option), + Status403(Option), + Status404(Option), + Status409(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct AuthNMappingsAPI { + config: configuration::Configuration, +} + +impl Default for AuthNMappingsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl AuthNMappingsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create an AuthN Mapping. + pub async fn create_auth_n_mapping( + &self, + params: CreateAuthNMappingParams, + ) -> Result, Error> + { + match self.create_auth_n_mapping_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an AuthN Mapping. + pub async fn create_auth_n_mapping_with_http_info( + &self, + params: CreateAuthNMappingParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/authn_mappings", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an AuthN Mapping specified by AuthN Mapping UUID. + pub async fn delete_auth_n_mapping( + &self, + params: DeleteAuthNMappingParams, + ) -> Result, Error> { + match self.delete_auth_n_mapping_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an AuthN Mapping specified by AuthN Mapping UUID. + pub async fn delete_auth_n_mapping_with_http_info( + &self, + params: DeleteAuthNMappingParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let authn_mapping_id = params.authn_mapping_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/authn_mappings/{authn_mapping_id}", + local_configuration.base_path, + authn_mapping_id = urlencode(authn_mapping_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get an AuthN Mapping specified by the AuthN Mapping UUID. + pub async fn get_auth_n_mapping( + &self, + params: GetAuthNMappingParams, + ) -> Result, Error> + { + match self.get_auth_n_mapping_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get an AuthN Mapping specified by the AuthN Mapping UUID. + pub async fn get_auth_n_mapping_with_http_info( + &self, + params: GetAuthNMappingParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let authn_mapping_id = params.authn_mapping_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/authn_mappings/{authn_mapping_id}", + local_configuration.base_path, + authn_mapping_id = urlencode(authn_mapping_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List all AuthN Mappings in the org. + pub async fn list_auth_n_mappings( + &self, + params: ListAuthNMappingsParams, + ) -> Result, Error> + { + match self.list_auth_n_mappings_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List all AuthN Mappings in the org. + pub async fn list_auth_n_mappings_with_http_info( + &self, + params: ListAuthNMappingsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter = params.filter; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/authn_mappings", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit an AuthN Mapping. + pub async fn update_auth_n_mapping( + &self, + params: UpdateAuthNMappingParams, + ) -> Result, Error> + { + match self.update_auth_n_mapping_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit an AuthN Mapping. + pub async fn update_auth_n_mapping_with_http_info( + &self, + params: UpdateAuthNMappingParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let authn_mapping_id = params.authn_mapping_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/authn_mappings/{authn_mapping_id}", + local_configuration.base_path, + authn_mapping_id = urlencode(authn_mapping_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_ci_visibility_pipelines.rs b/src/datadogV2/api/api_ci_visibility_pipelines.rs new file mode 100644 index 000000000..7eecc81db --- /dev/null +++ b/src/datadogV2/api/api_ci_visibility_pipelines.rs @@ -0,0 +1,484 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// AggregateCIAppPipelineEventsParams is a struct for passing parameters to the method [`AggregateCIAppPipelineEvents`] +#[derive(Clone, Debug)] +pub struct AggregateCIAppPipelineEventsParams { + pub body: crate::datadogV2::model::CIAppPipelinesAggregateRequest, +} + +/// CreateCIAppPipelineEventParams is a struct for passing parameters to the method [`CreateCIAppPipelineEvent`] +#[derive(Clone, Debug)] +pub struct CreateCIAppPipelineEventParams { + pub body: crate::datadogV2::model::CIAppCreatePipelineEventRequest, +} + +/// ListCIAppPipelineEventsParams is a struct for passing parameters to the method [`ListCIAppPipelineEvents`] +#[derive(Clone, Debug)] +pub struct ListCIAppPipelineEventsParams { + /// Search query following log syntax. + pub filter_query: Option, + /// Minimum timestamp for requested events. + pub filter_from: Option, + /// Maximum timestamp for requested events. + pub filter_to: Option, + /// Order of events in results. + pub sort: Option, + /// List following results with a cursor provided in the previous query. + pub page_cursor: Option, + /// Maximum number of events in the response. + pub page_limit: Option, +} + +/// SearchCIAppPipelineEventsParams is a struct for passing parameters to the method [`SearchCIAppPipelineEvents`] +#[derive(Clone, Debug)] +pub struct SearchCIAppPipelineEventsParams { + pub body: Option>, +} + +/// AggregateCIAppPipelineEventsError is a struct for typed errors of method [`AggregateCIAppPipelineEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AggregateCIAppPipelineEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateCIAppPipelineEventError is a struct for typed errors of method [`CreateCIAppPipelineEvent`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateCIAppPipelineEventError { + Status400(Option), + Status401(Option), + Status403(Option), + Status408(Option), + Status413(Option), + Status429(Option), + Status500(Option), + Status503(Option), + UnknownValue(serde_json::Value), +} + +/// ListCIAppPipelineEventsError is a struct for typed errors of method [`ListCIAppPipelineEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCIAppPipelineEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SearchCIAppPipelineEventsError is a struct for typed errors of method [`SearchCIAppPipelineEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchCIAppPipelineEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct CiVisibilityPipelinesAPI { + config: configuration::Configuration, +} + +impl Default for CiVisibilityPipelinesAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl CiVisibilityPipelinesAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries. + pub async fn aggregate_ci_app_pipeline_events( + &self, + params: AggregateCIAppPipelineEventsParams, + ) -> Result< + Option, + Error, + > { + match self + .aggregate_ci_app_pipeline_events_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries. + pub async fn aggregate_ci_app_pipeline_events_with_http_info( + &self, + params: AggregateCIAppPipelineEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/ci/pipelines/analytics/aggregate", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::CIAppPipelinesAnalyticsAggregateResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/). + /// + /// Pipeline events can be submitted with a timestamp that is up to 18 hours in the past. + pub async fn create_ci_app_pipeline_event( + &self, + params: CreateCIAppPipelineEventParams, + ) -> Result< + Option>, + Error, + > { + match self + .create_ci_app_pipeline_event_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/). + /// + /// Pipeline events can be submitted with a timestamp that is up to 18 hours in the past. + pub async fn create_ci_app_pipeline_event_with_http_info( + &self, + params: CreateCIAppPipelineEventParams, + ) -> Result< + ResponseContent>, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/ci/pipeline", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option> = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to see your latest pipeline events. + pub async fn list_ci_app_pipeline_events( + &self, + params: ListCIAppPipelineEventsParams, + ) -> Result< + Option, + Error, + > { + match self + .list_ci_app_pipeline_events_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to see your latest pipeline events. + pub async fn list_ci_app_pipeline_events_with_http_info( + &self, + params: ListCIAppPipelineEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_query = params.filter_query; + let filter_from = params.filter_from; + let filter_to = params.filter_to; + let sort = params.sort; + let page_cursor = params.page_cursor; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/ci/pipelines/events", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_query { + local_req_builder = + local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_from { + local_req_builder = + local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_to { + local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to build complex events filtering and search. + pub async fn search_ci_app_pipeline_events( + &self, + params: SearchCIAppPipelineEventsParams, + ) -> Result< + Option, + Error, + > { + match self + .search_ci_app_pipeline_events_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to build complex events filtering and search. + pub async fn search_ci_app_pipeline_events_with_http_info( + &self, + params: SearchCIAppPipelineEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/ci/pipelines/events/search", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_ci_visibility_tests.rs b/src/datadogV2/api/api_ci_visibility_tests.rs new file mode 100644 index 000000000..0f67e3af2 --- /dev/null +++ b/src/datadogV2/api/api_ci_visibility_tests.rs @@ -0,0 +1,370 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// AggregateCIAppTestEventsParams is a struct for passing parameters to the method [`AggregateCIAppTestEvents`] +#[derive(Clone, Debug)] +pub struct AggregateCIAppTestEventsParams { + pub body: crate::datadogV2::model::CIAppTestsAggregateRequest, +} + +/// ListCIAppTestEventsParams is a struct for passing parameters to the method [`ListCIAppTestEvents`] +#[derive(Clone, Debug)] +pub struct ListCIAppTestEventsParams { + /// Search query following log syntax. + pub filter_query: Option, + /// Minimum timestamp for requested events. + pub filter_from: Option, + /// Maximum timestamp for requested events. + pub filter_to: Option, + /// Order of events in results. + pub sort: Option, + /// List following results with a cursor provided in the previous query. + pub page_cursor: Option, + /// Maximum number of events in the response. + pub page_limit: Option, +} + +/// SearchCIAppTestEventsParams is a struct for passing parameters to the method [`SearchCIAppTestEvents`] +#[derive(Clone, Debug)] +pub struct SearchCIAppTestEventsParams { + pub body: Option>, +} + +/// AggregateCIAppTestEventsError is a struct for typed errors of method [`AggregateCIAppTestEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AggregateCIAppTestEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListCIAppTestEventsError is a struct for typed errors of method [`ListCIAppTestEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCIAppTestEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SearchCIAppTestEventsError is a struct for typed errors of method [`SearchCIAppTestEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchCIAppTestEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct CiVisibilityTestsAPI { + config: configuration::Configuration, +} + +impl Default for CiVisibilityTestsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl CiVisibilityTestsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries. + pub async fn aggregate_ci_app_test_events( + &self, + params: AggregateCIAppTestEventsParams, + ) -> Result< + Option, + Error, + > { + match self + .aggregate_ci_app_test_events_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries. + pub async fn aggregate_ci_app_test_events_with_http_info( + &self, + params: AggregateCIAppTestEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/ci/tests/analytics/aggregate", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::CIAppTestsAnalyticsAggregateResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns CI Visibility test events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to see your latest test events. + pub async fn list_ci_app_test_events( + &self, + params: ListCIAppTestEventsParams, + ) -> Result< + Option, + Error, + > { + match self.list_ci_app_test_events_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns CI Visibility test events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to see your latest test events. + pub async fn list_ci_app_test_events_with_http_info( + &self, + params: ListCIAppTestEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_query = params.filter_query; + let filter_from = params.filter_from; + let filter_to = params.filter_to; + let sort = params.sort; + let page_cursor = params.page_cursor; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/ci/tests/events", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_query { + local_req_builder = + local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_from { + local_req_builder = + local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_to { + local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns CI Visibility test events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to build complex events filtering and search. + pub async fn search_ci_app_test_events( + &self, + params: SearchCIAppTestEventsParams, + ) -> Result< + Option, + Error, + > { + match self.search_ci_app_test_events_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns CI Visibility test events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/). + /// [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination). + /// + /// Use this endpoint to build complex events filtering and search. + pub async fn search_ci_app_test_events_with_http_info( + &self, + params: SearchCIAppTestEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/ci/tests/events/search", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_cloud_cost_management.rs b/src/datadogV2/api/api_cloud_cost_management.rs new file mode 100644 index 000000000..4eeb246c5 --- /dev/null +++ b/src/datadogV2/api/api_cloud_cost_management.rs @@ -0,0 +1,954 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateCostAWSCURConfigParams is a struct for passing parameters to the method [`CreateCostAWSCURConfig`] +#[derive(Clone, Debug)] +pub struct CreateCostAWSCURConfigParams { + pub body: crate::datadogV2::model::AwsCURConfigPostRequest, +} + +/// CreateCostAzureUCConfigsParams is a struct for passing parameters to the method [`CreateCostAzureUCConfigs`] +#[derive(Clone, Debug)] +pub struct CreateCostAzureUCConfigsParams { + pub body: crate::datadogV2::model::AzureUCConfigPostRequest, +} + +/// DeleteCostAWSCURConfigParams is a struct for passing parameters to the method [`DeleteCostAWSCURConfig`] +#[derive(Clone, Debug)] +pub struct DeleteCostAWSCURConfigParams { + /// Cloud Account id. + pub cloud_account_id: String, +} + +/// DeleteCostAzureUCConfigParams is a struct for passing parameters to the method [`DeleteCostAzureUCConfig`] +#[derive(Clone, Debug)] +pub struct DeleteCostAzureUCConfigParams { + /// Cloud Account id. + pub cloud_account_id: String, +} + +/// ListAWSRelatedAccountsParams is a struct for passing parameters to the method [`ListAWSRelatedAccounts`] +#[derive(Clone, Debug)] +pub struct ListAWSRelatedAccountsParams { + /// The ID of the management account to filter by. + pub filter_management_account_id: String, +} + +/// UpdateCostAWSCURConfigParams is a struct for passing parameters to the method [`UpdateCostAWSCURConfig`] +#[derive(Clone, Debug)] +pub struct UpdateCostAWSCURConfigParams { + /// Cloud Account id. + pub cloud_account_id: String, + pub body: crate::datadogV2::model::AwsCURConfigPatchRequest, +} + +/// UpdateCostAzureUCConfigsParams is a struct for passing parameters to the method [`UpdateCostAzureUCConfigs`] +#[derive(Clone, Debug)] +pub struct UpdateCostAzureUCConfigsParams { + /// Cloud Account id. + pub cloud_account_id: String, + pub body: crate::datadogV2::model::AzureUCConfigPatchRequest, +} + +/// CreateCostAWSCURConfigError is a struct for typed errors of method [`CreateCostAWSCURConfig`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateCostAWSCURConfigError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateCostAzureUCConfigsError is a struct for typed errors of method [`CreateCostAzureUCConfigs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateCostAzureUCConfigsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteCostAWSCURConfigError is a struct for typed errors of method [`DeleteCostAWSCURConfig`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteCostAWSCURConfigError { + Status400(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteCostAzureUCConfigError is a struct for typed errors of method [`DeleteCostAzureUCConfig`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteCostAzureUCConfigError { + Status400(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetCloudCostActivityError is a struct for typed errors of method [`GetCloudCostActivity`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCloudCostActivityError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListAWSRelatedAccountsError is a struct for typed errors of method [`ListAWSRelatedAccounts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListAWSRelatedAccountsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListCostAWSCURConfigsError is a struct for typed errors of method [`ListCostAWSCURConfigs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCostAWSCURConfigsError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListCostAzureUCConfigsError is a struct for typed errors of method [`ListCostAzureUCConfigs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCostAzureUCConfigsError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateCostAWSCURConfigError is a struct for typed errors of method [`UpdateCostAWSCURConfig`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateCostAWSCURConfigError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateCostAzureUCConfigsError is a struct for typed errors of method [`UpdateCostAzureUCConfigs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateCostAzureUCConfigsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct CloudCostManagementAPI { + config: configuration::Configuration, +} + +impl Default for CloudCostManagementAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl CloudCostManagementAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a Cloud Cost Management account for an AWS CUR config. + pub async fn create_cost_awscur_config( + &self, + params: CreateCostAWSCURConfigParams, + ) -> Result< + Option, + Error, + > { + match self.create_cost_awscur_config_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a Cloud Cost Management account for an AWS CUR config. + pub async fn create_cost_awscur_config_with_http_info( + &self, + params: CreateCostAWSCURConfigParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/aws_cur_config", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a Cloud Cost Management account for an Azure config. + pub async fn create_cost_azure_uc_configs( + &self, + params: CreateCostAzureUCConfigsParams, + ) -> Result< + Option, + Error, + > { + match self + .create_cost_azure_uc_configs_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a Cloud Cost Management account for an Azure config. + pub async fn create_cost_azure_uc_configs_with_http_info( + &self, + params: CreateCostAzureUCConfigsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/azure_uc_config", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Archive a Cloud Cost Management Account. + pub async fn delete_cost_awscur_config( + &self, + params: DeleteCostAWSCURConfigParams, + ) -> Result, Error> { + match self.delete_cost_awscur_config_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Archive a Cloud Cost Management Account. + pub async fn delete_cost_awscur_config_with_http_info( + &self, + params: DeleteCostAWSCURConfigParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let cloud_account_id = params.cloud_account_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/aws_cur_config/{cloud_account_id}", + local_configuration.base_path, + cloud_account_id = urlencode(cloud_account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Archive a Cloud Cost Management Account. + pub async fn delete_cost_azure_uc_config( + &self, + params: DeleteCostAzureUCConfigParams, + ) -> Result, Error> { + match self + .delete_cost_azure_uc_config_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Archive a Cloud Cost Management Account. + pub async fn delete_cost_azure_uc_config_with_http_info( + &self, + params: DeleteCostAzureUCConfigParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let cloud_account_id = params.cloud_account_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/azure_uc_config/{cloud_account_id}", + local_configuration.base_path, + cloud_account_id = urlencode(cloud_account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the Cloud Cost Management activity. + pub async fn get_cloud_cost_activity( + &self, + ) -> Result< + Option, + Error, + > { + match self.get_cloud_cost_activity_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the Cloud Cost Management activity. + pub async fn get_cloud_cost_activity_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/cost/enabled", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account. + pub async fn list_aws_related_accounts( + &self, + params: ListAWSRelatedAccountsParams, + ) -> Result< + Option, + Error, + > { + match self.list_aws_related_accounts_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account. + pub async fn list_aws_related_accounts_with_http_info( + &self, + params: ListAWSRelatedAccountsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_management_account_id = params.filter_management_account_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/aws_related_accounts", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + local_req_builder = local_req_builder.query(&[( + "filter[management_account_id]", + &filter_management_account_id.to_string(), + )]); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List the AWS CUR configs. + pub async fn list_cost_awscur_configs( + &self, + ) -> Result< + Option, + Error, + > { + match self.list_cost_awscur_configs_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List the AWS CUR configs. + pub async fn list_cost_awscur_configs_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/aws_cur_config", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List the Azure configs. + pub async fn list_cost_azure_uc_configs( + &self, + ) -> Result< + Option, + Error, + > { + match self.list_cost_azure_uc_configs_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List the Azure configs. + pub async fn list_cost_azure_uc_configs_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/azure_uc_config", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update the status of an AWS CUR config (active/archived). + pub async fn update_cost_awscur_config( + &self, + params: UpdateCostAWSCURConfigParams, + ) -> Result< + Option, + Error, + > { + match self.update_cost_awscur_config_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update the status of an AWS CUR config (active/archived). + pub async fn update_cost_awscur_config_with_http_info( + &self, + params: UpdateCostAWSCURConfigParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let cloud_account_id = params.cloud_account_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/aws_cur_config/{cloud_account_id}", + local_configuration.base_path, + cloud_account_id = urlencode(cloud_account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update the status of an Azure config (active/archived). + pub async fn update_cost_azure_uc_configs( + &self, + params: UpdateCostAzureUCConfigsParams, + ) -> Result< + Option, + Error, + > { + match self + .update_cost_azure_uc_configs_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update the status of an Azure config (active/archived). + pub async fn update_cost_azure_uc_configs_with_http_info( + &self, + params: UpdateCostAzureUCConfigsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let cloud_account_id = params.cloud_account_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost/azure_uc_config/{cloud_account_id}", + local_configuration.base_path, + cloud_account_id = urlencode(cloud_account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_cloud_workload_security.rs b/src/datadogV2/api/api_cloud_workload_security.rs index 506a70c04..ab5ede315 100644 --- a/src/datadogV2/api/api_cloud_workload_security.rs +++ b/src/datadogV2/api/api_cloud_workload_security.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`CreateCloudWorkloadSecurityAgentRule`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateCloudWorkloadSecurityAgentRuleParams { /// The definition of the new Agent rule. pub body: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateRequest, } /// DeleteCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`DeleteCloudWorkloadSecurityAgentRule`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteCloudWorkloadSecurityAgentRuleParams { /// The ID of the Agent rule. pub agent_rule_id: String, } /// GetCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`GetCloudWorkloadSecurityAgentRule`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetCloudWorkloadSecurityAgentRuleParams { /// The ID of the Agent rule. pub agent_rule_id: String, } /// UpdateCloudWorkloadSecurityAgentRuleParams is a struct for passing parameters to the method [`UpdateCloudWorkloadSecurityAgentRule`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateCloudWorkloadSecurityAgentRuleParams { /// The ID of the Agent rule. pub agent_rule_id: String, diff --git a/src/datadogV2/api/api_cloudflare_integration.rs b/src/datadogV2/api/api_cloudflare_integration.rs index 3480ede17..b5d121af9 100644 --- a/src/datadogV2/api/api_cloudflare_integration.rs +++ b/src/datadogV2/api/api_cloudflare_integration.rs @@ -7,27 +7,27 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateCloudflareAccountParams is a struct for passing parameters to the method [`CreateCloudflareAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateCloudflareAccountParams { pub body: crate::datadogV2::model::CloudflareAccountCreateRequest, } /// DeleteCloudflareAccountParams is a struct for passing parameters to the method [`DeleteCloudflareAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteCloudflareAccountParams { /// None pub account_id: String, } /// GetCloudflareAccountParams is a struct for passing parameters to the method [`GetCloudflareAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetCloudflareAccountParams { /// None pub account_id: String, } /// UpdateCloudflareAccountParams is a struct for passing parameters to the method [`UpdateCloudflareAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateCloudflareAccountParams { /// None pub account_id: String, diff --git a/src/datadogV2/api/api_confluent_cloud.rs b/src/datadogV2/api/api_confluent_cloud.rs index ed2b3d7aa..dd908e573 100644 --- a/src/datadogV2/api/api_confluent_cloud.rs +++ b/src/datadogV2/api/api_confluent_cloud.rs @@ -7,14 +7,14 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateConfluentAccountParams is a struct for passing parameters to the method [`CreateConfluentAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateConfluentAccountParams { /// Confluent payload pub body: crate::datadogV2::model::ConfluentAccountCreateRequest, } /// CreateConfluentResourceParams is a struct for passing parameters to the method [`CreateConfluentResource`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateConfluentResourceParams { /// Confluent Account id. pub account_id: String, @@ -23,14 +23,14 @@ pub struct CreateConfluentResourceParams { } /// DeleteConfluentAccountParams is a struct for passing parameters to the method [`DeleteConfluentAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteConfluentAccountParams { /// Confluent Account id. pub account_id: String, } /// DeleteConfluentResourceParams is a struct for passing parameters to the method [`DeleteConfluentResource`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteConfluentResourceParams { /// Confluent Account id. pub account_id: String, @@ -39,14 +39,14 @@ pub struct DeleteConfluentResourceParams { } /// GetConfluentAccountParams is a struct for passing parameters to the method [`GetConfluentAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetConfluentAccountParams { /// Confluent Account id. pub account_id: String, } /// GetConfluentResourceParams is a struct for passing parameters to the method [`GetConfluentResource`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetConfluentResourceParams { /// Confluent Account id. pub account_id: String, @@ -55,14 +55,14 @@ pub struct GetConfluentResourceParams { } /// ListConfluentResourceParams is a struct for passing parameters to the method [`ListConfluentResource`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListConfluentResourceParams { /// Confluent Account id. pub account_id: String, } /// UpdateConfluentAccountParams is a struct for passing parameters to the method [`UpdateConfluentAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateConfluentAccountParams { /// Confluent Account id. pub account_id: String, @@ -71,7 +71,7 @@ pub struct UpdateConfluentAccountParams { } /// UpdateConfluentResourceParams is a struct for passing parameters to the method [`UpdateConfluentResource`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateConfluentResourceParams { /// Confluent Account id. pub account_id: String, diff --git a/src/datadogV2/api/api_container_images.rs b/src/datadogV2/api/api_container_images.rs new file mode 100644 index 000000000..431f46aa0 --- /dev/null +++ b/src/datadogV2/api/api_container_images.rs @@ -0,0 +1,150 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// ListContainerImagesParams is a struct for passing parameters to the method [`ListContainerImages`] +#[derive(Clone, Debug)] +pub struct ListContainerImagesParams { + /// Comma-separated list of tags to filter Container Images by. + pub filter_tags: Option, + /// Comma-separated list of tags to group Container Images by. + pub group_by: Option, + /// Attribute to sort Container Images by. + pub sort: Option, + /// Maximum number of results returned. + pub page_size: Option, + /// String to query the next page of results. + /// This key is provided with each valid response from the API in `meta.pagination.next_cursor`. + pub page_cursor: Option, +} + +/// ListContainerImagesError is a struct for typed errors of method [`ListContainerImages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListContainerImagesError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct ContainerImagesAPI { + config: configuration::Configuration, +} + +impl Default for ContainerImagesAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl ContainerImagesAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Get all Container Images for your organization. + pub async fn list_container_images( + &self, + params: ListContainerImagesParams, + ) -> Result< + Option, + Error, + > { + match self.list_container_images_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all Container Images for your organization. + pub async fn list_container_images_with_http_info( + &self, + params: ListContainerImagesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_tags = params.filter_tags; + let group_by = params.group_by; + let sort = params.sort; + let page_size = params.page_size; + let page_cursor = params.page_cursor; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/container_images", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_tags { + local_req_builder = + local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + }; + if let Some(ref local_str) = group_by { + local_req_builder = local_req_builder.query(&[("group_by", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_containers.rs b/src/datadogV2/api/api_containers.rs new file mode 100644 index 000000000..6159959d6 --- /dev/null +++ b/src/datadogV2/api/api_containers.rs @@ -0,0 +1,148 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// ListContainersParams is a struct for passing parameters to the method [`ListContainers`] +#[derive(Clone, Debug)] +pub struct ListContainersParams { + /// Comma-separated list of tags to filter containers by. + pub filter_tags: Option, + /// Comma-separated list of tags to group containers by. + pub group_by: Option, + /// Attribute to sort containers by. + pub sort: Option, + /// Maximum number of results returned. + pub page_size: Option, + /// String to query the next page of results. + /// This key is provided with each valid response from the API in `meta.pagination.next_cursor`. + pub page_cursor: Option, +} + +/// ListContainersError is a struct for typed errors of method [`ListContainers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListContainersError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct ContainersAPI { + config: configuration::Configuration, +} + +impl Default for ContainersAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl ContainersAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Get all containers for your organization. + pub async fn list_containers( + &self, + params: ListContainersParams, + ) -> Result, Error> + { + match self.list_containers_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all containers for your organization. + pub async fn list_containers_with_http_info( + &self, + params: ListContainersParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_tags = params.filter_tags; + let group_by = params.group_by; + let sort = params.sort; + let page_size = params.page_size; + let page_cursor = params.page_cursor; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/containers", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_tags { + local_req_builder = + local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + }; + if let Some(ref local_str) = group_by { + local_req_builder = local_req_builder.query(&[("group_by", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_dashboard_lists.rs b/src/datadogV2/api/api_dashboard_lists.rs index 3b24654d9..324197cfe 100644 --- a/src/datadogV2/api/api_dashboard_lists.rs +++ b/src/datadogV2/api/api_dashboard_lists.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateDashboardListItemsParams is a struct for passing parameters to the method [`CreateDashboardListItems`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateDashboardListItemsParams { /// ID of the dashboard list to add items to. pub dashboard_list_id: i64, @@ -16,7 +16,7 @@ pub struct CreateDashboardListItemsParams { } /// DeleteDashboardListItemsParams is a struct for passing parameters to the method [`DeleteDashboardListItems`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteDashboardListItemsParams { /// ID of the dashboard list to delete items from. pub dashboard_list_id: i64, @@ -25,14 +25,14 @@ pub struct DeleteDashboardListItemsParams { } /// GetDashboardListItemsParams is a struct for passing parameters to the method [`GetDashboardListItems`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetDashboardListItemsParams { /// ID of the dashboard list to get items from. pub dashboard_list_id: i64, } /// UpdateDashboardListItemsParams is a struct for passing parameters to the method [`UpdateDashboardListItems`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateDashboardListItemsParams { /// ID of the dashboard list to update items from. pub dashboard_list_id: i64, diff --git a/src/datadogV2/api/api_dora_metrics.rs b/src/datadogV2/api/api_dora_metrics.rs new file mode 100644 index 000000000..2003c78d6 --- /dev/null +++ b/src/datadogV2/api/api_dora_metrics.rs @@ -0,0 +1,231 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateDORADeploymentParams is a struct for passing parameters to the method [`CreateDORADeployment`] +#[derive(Clone, Debug)] +pub struct CreateDORADeploymentParams { + pub body: crate::datadogV2::model::DORADeploymentRequest, +} + +/// CreateDORAIncidentParams is a struct for passing parameters to the method [`CreateDORAIncident`] +#[derive(Clone, Debug)] +pub struct CreateDORAIncidentParams { + pub body: crate::datadogV2::model::DORAIncidentRequest, +} + +/// CreateDORADeploymentError is a struct for typed errors of method [`CreateDORADeployment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateDORADeploymentError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateDORAIncidentError is a struct for typed errors of method [`CreateDORAIncident`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateDORAIncidentError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct DoraMetricsAPI { + config: configuration::Configuration, +} + +impl Default for DoraMetricsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl DoraMetricsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Use this API endpoint to provide data about deployments for DORA metrics. + /// + /// This is necessary for: + /// - Deployment Frequency + /// - Change Lead Time + /// - Change Failure Rate + pub async fn create_dora_deployment( + &self, + params: CreateDORADeploymentParams, + ) -> Result< + Option, + Error, + > { + match self.create_dora_deployment_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Use this API endpoint to provide data about deployments for DORA metrics. + /// + /// This is necessary for: + /// - Deployment Frequency + /// - Change Lead Time + /// - Change Failure Rate + pub async fn create_dora_deployment_with_http_info( + &self, + params: CreateDORADeploymentParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/dora/deployment", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Use this API endpoint to provide data about incidents for DORA metrics. + /// + /// This is necessary for: + /// - Change Failure Rate + /// - Time to Restore + pub async fn create_dora_incident( + &self, + params: CreateDORAIncidentParams, + ) -> Result, Error> + { + match self.create_dora_incident_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Use this API endpoint to provide data about incidents for DORA metrics. + /// + /// This is necessary for: + /// - Change Failure Rate + /// - Time to Restore + pub async fn create_dora_incident_with_http_info( + &self, + params: CreateDORAIncidentParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/dora/incident", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_downtimes.rs b/src/datadogV2/api/api_downtimes.rs new file mode 100644 index 000000000..1aca34d79 --- /dev/null +++ b/src/datadogV2/api/api_downtimes.rs @@ -0,0 +1,627 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CancelDowntimeParams is a struct for passing parameters to the method [`CancelDowntime`] +#[derive(Clone, Debug)] +pub struct CancelDowntimeParams { + /// ID of the downtime to cancel. + pub downtime_id: String, +} + +/// CreateDowntimeParams is a struct for passing parameters to the method [`CreateDowntime`] +#[derive(Clone, Debug)] +pub struct CreateDowntimeParams { + /// Schedule a downtime request body. + pub body: crate::datadogV2::model::DowntimeCreateRequest, +} + +/// GetDowntimeParams is a struct for passing parameters to the method [`GetDowntime`] +#[derive(Clone, Debug)] +pub struct GetDowntimeParams { + /// ID of the downtime to fetch. + pub downtime_id: String, + /// Comma-separated list of resource paths for related resources to include in the response. Supported resource + /// paths are `created_by` and `monitor`. + pub include: Option, +} + +/// ListDowntimesParams is a struct for passing parameters to the method [`ListDowntimes`] +#[derive(Clone, Debug)] +pub struct ListDowntimesParams { + /// Only return downtimes that are active when the request is made. + pub current_only: Option, + /// Comma-separated list of resource paths for related resources to include in the response. Supported resource + /// paths are `created_by` and `monitor`. + pub include: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, + /// Maximum number of downtimes in the response. + pub page_limit: Option, +} + +/// ListMonitorDowntimesParams is a struct for passing parameters to the method [`ListMonitorDowntimes`] +#[derive(Clone, Debug)] +pub struct ListMonitorDowntimesParams { + /// The id of the monitor. + pub monitor_id: i64, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, + /// Maximum number of downtimes in the response. + pub page_limit: Option, +} + +/// UpdateDowntimeParams is a struct for passing parameters to the method [`UpdateDowntime`] +#[derive(Clone, Debug)] +pub struct UpdateDowntimeParams { + /// ID of the downtime to update. + pub downtime_id: String, + /// Update a downtime request body. + pub body: crate::datadogV2::model::DowntimeUpdateRequest, +} + +/// CancelDowntimeError is a struct for typed errors of method [`CancelDowntime`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CancelDowntimeError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateDowntimeError is a struct for typed errors of method [`CreateDowntime`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateDowntimeError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetDowntimeError is a struct for typed errors of method [`GetDowntime`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetDowntimeError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListDowntimesError is a struct for typed errors of method [`ListDowntimes`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListDowntimesError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListMonitorDowntimesError is a struct for typed errors of method [`ListMonitorDowntimes`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMonitorDowntimesError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateDowntimeError is a struct for typed errors of method [`UpdateDowntime`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateDowntimeError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct DowntimesAPI { + config: configuration::Configuration, +} + +impl Default for DowntimesAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl DowntimesAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Cancel a downtime. + pub async fn cancel_downtime( + &self, + params: CancelDowntimeParams, + ) -> Result, Error> { + match self.cancel_downtime_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Cancel a downtime. + pub async fn cancel_downtime_with_http_info( + &self, + params: CancelDowntimeParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let downtime_id = params.downtime_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/downtime/{downtime_id}", + local_configuration.base_path, + downtime_id = urlencode(downtime_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Schedule a downtime. + pub async fn create_downtime( + &self, + params: CreateDowntimeParams, + ) -> Result, Error> { + match self.create_downtime_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Schedule a downtime. + pub async fn create_downtime_with_http_info( + &self, + params: CreateDowntimeParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/downtime", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get downtime detail by `downtime_id`. + pub async fn get_downtime( + &self, + params: GetDowntimeParams, + ) -> Result, Error> { + match self.get_downtime_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get downtime detail by `downtime_id`. + pub async fn get_downtime_with_http_info( + &self, + params: GetDowntimeParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let downtime_id = params.downtime_id; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/downtime/{downtime_id}", + local_configuration.base_path, + downtime_id = urlencode(downtime_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all scheduled downtimes. + pub async fn list_downtimes( + &self, + params: ListDowntimesParams, + ) -> Result, Error> + { + match self.list_downtimes_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all scheduled downtimes. + pub async fn list_downtimes_with_http_info( + &self, + params: ListDowntimesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let current_only = params.current_only; + let include = params.include; + let page_offset = params.page_offset; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/downtime", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = current_only { + local_req_builder = + local_req_builder.query(&[("current_only", &local_str.to_string())]); + }; + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all active downtimes for the specified monitor. + pub async fn list_monitor_downtimes( + &self, + params: ListMonitorDowntimesParams, + ) -> Result< + Option, + Error, + > { + match self.list_monitor_downtimes_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all active downtimes for the specified monitor. + pub async fn list_monitor_downtimes_with_http_info( + &self, + params: ListMonitorDowntimesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let monitor_id = params.monitor_id; + let page_offset = params.page_offset; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/monitor/{monitor_id}/downtime_matches", + local_configuration.base_path, + monitor_id = monitor_id + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a downtime by `downtime_id`. + pub async fn update_downtime( + &self, + params: UpdateDowntimeParams, + ) -> Result, Error> { + match self.update_downtime_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a downtime by `downtime_id`. + pub async fn update_downtime_with_http_info( + &self, + params: UpdateDowntimeParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let downtime_id = params.downtime_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/downtime/{downtime_id}", + local_configuration.base_path, + downtime_id = urlencode(downtime_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_events.rs b/src/datadogV2/api/api_events.rs index bf5d2a0c9..e88d22853 100644 --- a/src/datadogV2/api/api_events.rs +++ b/src/datadogV2/api/api_events.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListEventsParams is a struct for passing parameters to the method [`ListEvents`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListEventsParams { /// Search query following events syntax. pub filter_query: Option, @@ -24,7 +24,7 @@ pub struct ListEventsParams { } /// SearchEventsParams is a struct for passing parameters to the method [`SearchEvents`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SearchEventsParams { pub body: Option>, } diff --git a/src/datadogV2/api/api_fastly_integration.rs b/src/datadogV2/api/api_fastly_integration.rs index de317ed76..ab3d83f28 100644 --- a/src/datadogV2/api/api_fastly_integration.rs +++ b/src/datadogV2/api/api_fastly_integration.rs @@ -7,13 +7,13 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateFastlyAccountParams is a struct for passing parameters to the method [`CreateFastlyAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateFastlyAccountParams { pub body: crate::datadogV2::model::FastlyAccountCreateRequest, } /// CreateFastlyServiceParams is a struct for passing parameters to the method [`CreateFastlyService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateFastlyServiceParams { /// Fastly Account id. pub account_id: String, @@ -21,14 +21,14 @@ pub struct CreateFastlyServiceParams { } /// DeleteFastlyAccountParams is a struct for passing parameters to the method [`DeleteFastlyAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteFastlyAccountParams { /// Fastly Account id. pub account_id: String, } /// DeleteFastlyServiceParams is a struct for passing parameters to the method [`DeleteFastlyService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteFastlyServiceParams { /// Fastly Account id. pub account_id: String, @@ -37,14 +37,14 @@ pub struct DeleteFastlyServiceParams { } /// GetFastlyAccountParams is a struct for passing parameters to the method [`GetFastlyAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetFastlyAccountParams { /// Fastly Account id. pub account_id: String, } /// GetFastlyServiceParams is a struct for passing parameters to the method [`GetFastlyService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetFastlyServiceParams { /// Fastly Account id. pub account_id: String, @@ -53,14 +53,14 @@ pub struct GetFastlyServiceParams { } /// ListFastlyServicesParams is a struct for passing parameters to the method [`ListFastlyServices`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListFastlyServicesParams { /// Fastly Account id. pub account_id: String, } /// UpdateFastlyAccountParams is a struct for passing parameters to the method [`UpdateFastlyAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateFastlyAccountParams { /// Fastly Account id. pub account_id: String, @@ -68,7 +68,7 @@ pub struct UpdateFastlyAccountParams { } /// UpdateFastlyServiceParams is a struct for passing parameters to the method [`UpdateFastlyService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateFastlyServiceParams { /// Fastly Account id. pub account_id: String, diff --git a/src/datadogV2/api/api_gcp_integration.rs b/src/datadogV2/api/api_gcp_integration.rs index fc3cbd164..2ce07376c 100644 --- a/src/datadogV2/api/api_gcp_integration.rs +++ b/src/datadogV2/api/api_gcp_integration.rs @@ -7,27 +7,27 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateGCPSTSAccountParams is a struct for passing parameters to the method [`CreateGCPSTSAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateGCPSTSAccountParams { pub body: crate::datadogV2::model::GCPSTSServiceAccountCreateRequest, } /// DeleteGCPSTSAccountParams is a struct for passing parameters to the method [`DeleteGCPSTSAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteGCPSTSAccountParams { /// Your GCP STS enabled service account's unique ID. pub account_id: String, } /// MakeGCPSTSDelegateParams is a struct for passing parameters to the method [`MakeGCPSTSDelegate`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct MakeGCPSTSDelegateParams { /// Create a delegate service account within Datadog. pub body: Option>>, } /// UpdateGCPSTSAccountParams is a struct for passing parameters to the method [`UpdateGCPSTSAccount`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateGCPSTSAccountParams { /// Your GCP STS enabled service account's unique ID. pub account_id: String, diff --git a/src/datadogV2/api/api_incident_services.rs b/src/datadogV2/api/api_incident_services.rs new file mode 100644 index 000000000..82bc69c55 --- /dev/null +++ b/src/datadogV2/api/api_incident_services.rs @@ -0,0 +1,542 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateIncidentServiceParams is a struct for passing parameters to the method [`CreateIncidentService`] +#[derive(Clone, Debug)] +pub struct CreateIncidentServiceParams { + /// Incident Service Payload. + pub body: crate::datadogV2::model::IncidentServiceCreateRequest, +} + +/// DeleteIncidentServiceParams is a struct for passing parameters to the method [`DeleteIncidentService`] +#[derive(Clone, Debug)] +pub struct DeleteIncidentServiceParams { + /// The ID of the incident service. + pub service_id: String, +} + +/// GetIncidentServiceParams is a struct for passing parameters to the method [`GetIncidentService`] +#[derive(Clone, Debug)] +pub struct GetIncidentServiceParams { + /// The ID of the incident service. + pub service_id: String, + /// Specifies which types of related objects should be included in the response. + pub include: Option, +} + +/// ListIncidentServicesParams is a struct for passing parameters to the method [`ListIncidentServices`] +#[derive(Clone, Debug)] +pub struct ListIncidentServicesParams { + /// Specifies which types of related objects should be included in the response. + pub include: Option, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, + /// A search query that filters services by name. + pub filter: Option, +} + +/// UpdateIncidentServiceParams is a struct for passing parameters to the method [`UpdateIncidentService`] +#[derive(Clone, Debug)] +pub struct UpdateIncidentServiceParams { + /// The ID of the incident service. + pub service_id: String, + /// Incident Service Payload. + pub body: crate::datadogV2::model::IncidentServiceUpdateRequest, +} + +/// CreateIncidentServiceError is a struct for typed errors of method [`CreateIncidentService`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateIncidentServiceError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteIncidentServiceError is a struct for typed errors of method [`DeleteIncidentService`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteIncidentServiceError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetIncidentServiceError is a struct for typed errors of method [`GetIncidentService`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetIncidentServiceError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListIncidentServicesError is a struct for typed errors of method [`ListIncidentServices`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIncidentServicesError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateIncidentServiceError is a struct for typed errors of method [`UpdateIncidentService`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateIncidentServiceError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct IncidentServicesAPI { + config: configuration::Configuration, +} + +impl Default for IncidentServicesAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl IncidentServicesAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Creates a new incident service. + pub async fn create_incident_service( + &self, + params: CreateIncidentServiceParams, + ) -> Result< + Option, + Error, + > { + match self.create_incident_service_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Creates a new incident service. + pub async fn create_incident_service_with_http_info( + &self, + params: CreateIncidentServiceParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/services", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Deletes an existing incident service. + pub async fn delete_incident_service( + &self, + params: DeleteIncidentServiceParams, + ) -> Result, Error> { + match self.delete_incident_service_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Deletes an existing incident service. + pub async fn delete_incident_service_with_http_info( + &self, + params: DeleteIncidentServiceParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let service_id = params.service_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/services/{service_id}", + local_configuration.base_path, + service_id = urlencode(service_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get details of an incident service. If the `include[users]` query parameter is provided, + /// the included attribute will contain the users related to these incident services. + pub async fn get_incident_service( + &self, + params: GetIncidentServiceParams, + ) -> Result< + Option, + Error, + > { + match self.get_incident_service_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get details of an incident service. If the `include[users]` query parameter is provided, + /// the included attribute will contain the users related to these incident services. + pub async fn get_incident_service_with_http_info( + &self, + params: GetIncidentServiceParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let service_id = params.service_id; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/services/{service_id}", + local_configuration.base_path, + service_id = urlencode(service_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all incident services uploaded for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident services. + pub async fn list_incident_services( + &self, + params: ListIncidentServicesParams, + ) -> Result< + Option, + Error, + > { + match self.list_incident_services_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all incident services uploaded for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident services. + pub async fn list_incident_services_with_http_info( + &self, + params: ListIncidentServicesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let include = params.include; + let page_size = params.page_size; + let page_offset = params.page_offset; + let filter = params.filter; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/services", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update. + pub async fn update_incident_service( + &self, + params: UpdateIncidentServiceParams, + ) -> Result< + Option, + Error, + > { + match self.update_incident_service_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update. + pub async fn update_incident_service_with_http_info( + &self, + params: UpdateIncidentServiceParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let service_id = params.service_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/services/{service_id}", + local_configuration.base_path, + service_id = urlencode(service_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_incident_teams.rs b/src/datadogV2/api/api_incident_teams.rs new file mode 100644 index 000000000..5b83db14a --- /dev/null +++ b/src/datadogV2/api/api_incident_teams.rs @@ -0,0 +1,534 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateIncidentTeamParams is a struct for passing parameters to the method [`CreateIncidentTeam`] +#[derive(Clone, Debug)] +pub struct CreateIncidentTeamParams { + /// Incident Team Payload. + pub body: crate::datadogV2::model::IncidentTeamCreateRequest, +} + +/// DeleteIncidentTeamParams is a struct for passing parameters to the method [`DeleteIncidentTeam`] +#[derive(Clone, Debug)] +pub struct DeleteIncidentTeamParams { + /// The ID of the incident team. + pub team_id: String, +} + +/// GetIncidentTeamParams is a struct for passing parameters to the method [`GetIncidentTeam`] +#[derive(Clone, Debug)] +pub struct GetIncidentTeamParams { + /// The ID of the incident team. + pub team_id: String, + /// Specifies which types of related objects should be included in the response. + pub include: Option, +} + +/// ListIncidentTeamsParams is a struct for passing parameters to the method [`ListIncidentTeams`] +#[derive(Clone, Debug)] +pub struct ListIncidentTeamsParams { + /// Specifies which types of related objects should be included in the response. + pub include: Option, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, + /// A search query that filters teams by name. + pub filter: Option, +} + +/// UpdateIncidentTeamParams is a struct for passing parameters to the method [`UpdateIncidentTeam`] +#[derive(Clone, Debug)] +pub struct UpdateIncidentTeamParams { + /// The ID of the incident team. + pub team_id: String, + /// Incident Team Payload. + pub body: crate::datadogV2::model::IncidentTeamUpdateRequest, +} + +/// CreateIncidentTeamError is a struct for typed errors of method [`CreateIncidentTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateIncidentTeamError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteIncidentTeamError is a struct for typed errors of method [`DeleteIncidentTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteIncidentTeamError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetIncidentTeamError is a struct for typed errors of method [`GetIncidentTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetIncidentTeamError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListIncidentTeamsError is a struct for typed errors of method [`ListIncidentTeams`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIncidentTeamsError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateIncidentTeamError is a struct for typed errors of method [`UpdateIncidentTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateIncidentTeamError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct IncidentTeamsAPI { + config: configuration::Configuration, +} + +impl Default for IncidentTeamsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl IncidentTeamsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Creates a new incident team. + pub async fn create_incident_team( + &self, + params: CreateIncidentTeamParams, + ) -> Result, Error> + { + match self.create_incident_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Creates a new incident team. + pub async fn create_incident_team_with_http_info( + &self, + params: CreateIncidentTeamParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/teams", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Deletes an existing incident team. + pub async fn delete_incident_team( + &self, + params: DeleteIncidentTeamParams, + ) -> Result, Error> { + match self.delete_incident_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Deletes an existing incident team. + pub async fn delete_incident_team_with_http_info( + &self, + params: DeleteIncidentTeamParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/teams/{team_id}", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get details of an incident team. If the `include[users]` query parameter is provided, + /// the included attribute will contain the users related to these incident teams. + pub async fn get_incident_team( + &self, + params: GetIncidentTeamParams, + ) -> Result, Error> + { + match self.get_incident_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get details of an incident team. If the `include[users]` query parameter is provided, + /// the included attribute will contain the users related to these incident teams. + pub async fn get_incident_team_with_http_info( + &self, + params: GetIncidentTeamParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/teams/{team_id}", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. + pub async fn list_incident_teams( + &self, + params: ListIncidentTeamsParams, + ) -> Result, Error> + { + match self.list_incident_teams_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all incident teams for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident teams. + pub async fn list_incident_teams_with_http_info( + &self, + params: ListIncidentTeamsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let include = params.include; + let page_size = params.page_size; + let page_offset = params.page_offset; + let filter = params.filter; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/teams", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. + pub async fn update_incident_team( + &self, + params: UpdateIncidentTeamParams, + ) -> Result, Error> + { + match self.update_incident_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update. + pub async fn update_incident_team_with_http_info( + &self, + params: UpdateIncidentTeamParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/teams/{team_id}", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_incidents.rs b/src/datadogV2/api/api_incidents.rs new file mode 100644 index 000000000..88393953f --- /dev/null +++ b/src/datadogV2/api/api_incidents.rs @@ -0,0 +1,1934 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateIncidentParams is a struct for passing parameters to the method [`CreateIncident`] +#[derive(Clone, Debug)] +pub struct CreateIncidentParams { + /// Incident payload. + pub body: crate::datadogV2::model::IncidentCreateRequest, +} + +/// CreateIncidentIntegrationParams is a struct for passing parameters to the method [`CreateIncidentIntegration`] +#[derive(Clone, Debug)] +pub struct CreateIncidentIntegrationParams { + /// The UUID of the incident. + pub incident_id: String, + /// Incident integration metadata payload. + pub body: crate::datadogV2::model::IncidentIntegrationMetadataCreateRequest, +} + +/// CreateIncidentTodoParams is a struct for passing parameters to the method [`CreateIncidentTodo`] +#[derive(Clone, Debug)] +pub struct CreateIncidentTodoParams { + /// The UUID of the incident. + pub incident_id: String, + /// Incident todo payload. + pub body: crate::datadogV2::model::IncidentTodoCreateRequest, +} + +/// DeleteIncidentParams is a struct for passing parameters to the method [`DeleteIncident`] +#[derive(Clone, Debug)] +pub struct DeleteIncidentParams { + /// The UUID of the incident. + pub incident_id: String, +} + +/// DeleteIncidentIntegrationParams is a struct for passing parameters to the method [`DeleteIncidentIntegration`] +#[derive(Clone, Debug)] +pub struct DeleteIncidentIntegrationParams { + /// The UUID of the incident. + pub incident_id: String, + /// The UUID of the incident integration metadata. + pub integration_metadata_id: String, +} + +/// DeleteIncidentTodoParams is a struct for passing parameters to the method [`DeleteIncidentTodo`] +#[derive(Clone, Debug)] +pub struct DeleteIncidentTodoParams { + /// The UUID of the incident. + pub incident_id: String, + /// The UUID of the incident todo. + pub todo_id: String, +} + +/// GetIncidentParams is a struct for passing parameters to the method [`GetIncident`] +#[derive(Clone, Debug)] +pub struct GetIncidentParams { + /// The UUID of the incident. + pub incident_id: String, + /// Specifies which types of related objects should be included in the response. + pub include: Option>, +} + +/// GetIncidentIntegrationParams is a struct for passing parameters to the method [`GetIncidentIntegration`] +#[derive(Clone, Debug)] +pub struct GetIncidentIntegrationParams { + /// The UUID of the incident. + pub incident_id: String, + /// The UUID of the incident integration metadata. + pub integration_metadata_id: String, +} + +/// GetIncidentTodoParams is a struct for passing parameters to the method [`GetIncidentTodo`] +#[derive(Clone, Debug)] +pub struct GetIncidentTodoParams { + /// The UUID of the incident. + pub incident_id: String, + /// The UUID of the incident todo. + pub todo_id: String, +} + +/// ListIncidentAttachmentsParams is a struct for passing parameters to the method [`ListIncidentAttachments`] +#[derive(Clone, Debug)] +pub struct ListIncidentAttachmentsParams { + /// The UUID of the incident. + pub incident_id: String, + /// Specifies which types of related objects are included in the response. + pub include: Option>, + /// Specifies which types of attachments are included in the response. + pub filter_attachment_type: + Option>, +} + +/// ListIncidentIntegrationsParams is a struct for passing parameters to the method [`ListIncidentIntegrations`] +#[derive(Clone, Debug)] +pub struct ListIncidentIntegrationsParams { + /// The UUID of the incident. + pub incident_id: String, +} + +/// ListIncidentTodosParams is a struct for passing parameters to the method [`ListIncidentTodos`] +#[derive(Clone, Debug)] +pub struct ListIncidentTodosParams { + /// The UUID of the incident. + pub incident_id: String, +} + +/// ListIncidentsParams is a struct for passing parameters to the method [`ListIncidents`] +#[derive(Clone, Debug)] +pub struct ListIncidentsParams { + /// Specifies which types of related objects should be included in the response. + pub include: Option>, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, +} + +/// SearchIncidentsParams is a struct for passing parameters to the method [`SearchIncidents`] +#[derive(Clone, Debug)] +pub struct SearchIncidentsParams { + /// Specifies which incidents should be returned. The query can contain any number of incident facets + /// joined by `ANDs`, along with multiple values for each of those facets joined by `OR`s. For + /// example: `state:active AND severity:(SEV-2 OR SEV-1)`. + pub query: String, + /// Specifies which types of related objects should be included in the response. + pub include: Option, + /// Specifies the order of returned incidents. + pub sort: Option, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, +} + +/// UpdateIncidentParams is a struct for passing parameters to the method [`UpdateIncident`] +#[derive(Clone, Debug)] +pub struct UpdateIncidentParams { + /// The UUID of the incident. + pub incident_id: String, + /// Incident Payload. + pub body: crate::datadogV2::model::IncidentUpdateRequest, + /// Specifies which types of related objects should be included in the response. + pub include: Option>, +} + +/// UpdateIncidentAttachmentsParams is a struct for passing parameters to the method [`UpdateIncidentAttachments`] +#[derive(Clone, Debug)] +pub struct UpdateIncidentAttachmentsParams { + /// The UUID of the incident. + pub incident_id: String, + /// Incident Attachment Payload. + pub body: crate::datadogV2::model::IncidentAttachmentUpdateRequest, + /// Specifies which types of related objects are included in the response. + pub include: Option>, +} + +/// UpdateIncidentIntegrationParams is a struct for passing parameters to the method [`UpdateIncidentIntegration`] +#[derive(Clone, Debug)] +pub struct UpdateIncidentIntegrationParams { + /// The UUID of the incident. + pub incident_id: String, + /// The UUID of the incident integration metadata. + pub integration_metadata_id: String, + /// Incident integration metadata payload. + pub body: crate::datadogV2::model::IncidentIntegrationMetadataPatchRequest, +} + +/// UpdateIncidentTodoParams is a struct for passing parameters to the method [`UpdateIncidentTodo`] +#[derive(Clone, Debug)] +pub struct UpdateIncidentTodoParams { + /// The UUID of the incident. + pub incident_id: String, + /// The UUID of the incident todo. + pub todo_id: String, + /// Incident todo payload. + pub body: crate::datadogV2::model::IncidentTodoPatchRequest, +} + +/// CreateIncidentError is a struct for typed errors of method [`CreateIncident`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateIncidentError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateIncidentIntegrationError is a struct for typed errors of method [`CreateIncidentIntegration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateIncidentIntegrationError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateIncidentTodoError is a struct for typed errors of method [`CreateIncidentTodo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateIncidentTodoError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteIncidentError is a struct for typed errors of method [`DeleteIncident`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteIncidentError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteIncidentIntegrationError is a struct for typed errors of method [`DeleteIncidentIntegration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteIncidentIntegrationError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteIncidentTodoError is a struct for typed errors of method [`DeleteIncidentTodo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteIncidentTodoError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetIncidentError is a struct for typed errors of method [`GetIncident`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetIncidentError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetIncidentIntegrationError is a struct for typed errors of method [`GetIncidentIntegration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetIncidentIntegrationError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetIncidentTodoError is a struct for typed errors of method [`GetIncidentTodo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetIncidentTodoError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListIncidentAttachmentsError is a struct for typed errors of method [`ListIncidentAttachments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIncidentAttachmentsError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListIncidentIntegrationsError is a struct for typed errors of method [`ListIncidentIntegrations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIncidentIntegrationsError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListIncidentTodosError is a struct for typed errors of method [`ListIncidentTodos`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIncidentTodosError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListIncidentsError is a struct for typed errors of method [`ListIncidents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIncidentsError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SearchIncidentsError is a struct for typed errors of method [`SearchIncidents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchIncidentsError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateIncidentError is a struct for typed errors of method [`UpdateIncident`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateIncidentError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateIncidentAttachmentsError is a struct for typed errors of method [`UpdateIncidentAttachments`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateIncidentAttachmentsError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateIncidentIntegrationError is a struct for typed errors of method [`UpdateIncidentIntegration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateIncidentIntegrationError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateIncidentTodoError is a struct for typed errors of method [`UpdateIncidentTodo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateIncidentTodoError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct IncidentsAPI { + config: configuration::Configuration, +} + +impl Default for IncidentsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl IncidentsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create an incident. + pub async fn create_incident( + &self, + params: CreateIncidentParams, + ) -> Result, Error> { + match self.create_incident_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an incident. + pub async fn create_incident_with_http_info( + &self, + params: CreateIncidentParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/incidents", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create an incident integration metadata. + pub async fn create_incident_integration( + &self, + params: CreateIncidentIntegrationParams, + ) -> Result< + Option, + Error, + > { + match self + .create_incident_integration_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an incident integration metadata. + pub async fn create_incident_integration_with_http_info( + &self, + params: CreateIncidentIntegrationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/integrations", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create an incident todo. + pub async fn create_incident_todo( + &self, + params: CreateIncidentTodoParams, + ) -> Result, Error> + { + match self.create_incident_todo_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an incident todo. + pub async fn create_incident_todo_with_http_info( + &self, + params: CreateIncidentTodoParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/todos", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Deletes an existing incident from the users organization. + pub async fn delete_incident( + &self, + params: DeleteIncidentParams, + ) -> Result, Error> { + match self.delete_incident_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Deletes an existing incident from the users organization. + pub async fn delete_incident_with_http_info( + &self, + params: DeleteIncidentParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an incident integration metadata. + pub async fn delete_incident_integration( + &self, + params: DeleteIncidentIntegrationParams, + ) -> Result, Error> { + match self + .delete_incident_integration_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an incident integration metadata. + pub async fn delete_incident_integration_with_http_info( + &self, + params: DeleteIncidentIntegrationParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let integration_metadata_id = params.integration_metadata_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}", + local_configuration.base_path, incident_id= + urlencode(incident_id) + , integration_metadata_id= + urlencode(integration_metadata_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an incident todo. + pub async fn delete_incident_todo( + &self, + params: DeleteIncidentTodoParams, + ) -> Result, Error> { + match self.delete_incident_todo_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an incident todo. + pub async fn delete_incident_todo_with_http_info( + &self, + params: DeleteIncidentTodoParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let todo_id = params.todo_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}", + local_configuration.base_path, + incident_id = urlencode(incident_id), + todo_id = urlencode(todo_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the details of an incident by `incident_id`. + pub async fn get_incident( + &self, + params: GetIncidentParams, + ) -> Result, Error> { + match self.get_incident_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the details of an incident by `incident_id`. + pub async fn get_incident_with_http_info( + &self, + params: GetIncidentParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local) = include { + local_req_builder = local_req_builder.query(&[( + "include", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get incident integration metadata details. + pub async fn get_incident_integration( + &self, + params: GetIncidentIntegrationParams, + ) -> Result< + Option, + Error, + > { + match self.get_incident_integration_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get incident integration metadata details. + pub async fn get_incident_integration_with_http_info( + &self, + params: GetIncidentIntegrationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let integration_metadata_id = params.integration_metadata_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}", + local_configuration.base_path, incident_id= + urlencode(incident_id) + , integration_metadata_id= + urlencode(integration_metadata_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get incident todo details. + pub async fn get_incident_todo( + &self, + params: GetIncidentTodoParams, + ) -> Result, Error> + { + match self.get_incident_todo_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get incident todo details. + pub async fn get_incident_todo_with_http_info( + &self, + params: GetIncidentTodoParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let todo_id = params.todo_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}", + local_configuration.base_path, + incident_id = urlencode(incident_id), + todo_id = urlencode(todo_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all attachments for a given incident. + pub async fn list_incident_attachments( + &self, + params: ListIncidentAttachmentsParams, + ) -> Result< + Option, + Error, + > { + match self.list_incident_attachments_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all attachments for a given incident. + pub async fn list_incident_attachments_with_http_info( + &self, + params: ListIncidentAttachmentsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let include = params.include; + let filter_attachment_type = params.filter_attachment_type; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/attachments", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local) = include { + local_req_builder = local_req_builder.query(&[( + "include", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + if let Some(ref local) = filter_attachment_type { + local_req_builder = local_req_builder.query(&[( + "filter[attachment_type]", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all integration metadata for an incident. + pub async fn list_incident_integrations( + &self, + params: ListIncidentIntegrationsParams, + ) -> Result< + Option, + Error, + > { + match self.list_incident_integrations_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all integration metadata for an incident. + pub async fn list_incident_integrations_with_http_info( + &self, + params: ListIncidentIntegrationsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/integrations", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::IncidentIntegrationMetadataListResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all todos for an incident. + pub async fn list_incident_todos( + &self, + params: ListIncidentTodosParams, + ) -> Result< + Option, + Error, + > { + match self.list_incident_todos_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all todos for an incident. + pub async fn list_incident_todos_with_http_info( + &self, + params: ListIncidentTodosParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/todos", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all incidents for the user's organization. + pub async fn list_incidents( + &self, + params: ListIncidentsParams, + ) -> Result, Error> { + match self.list_incidents_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all incidents for the user's organization. + pub async fn list_incidents_with_http_info( + &self, + params: ListIncidentsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let include = params.include; + let page_size = params.page_size; + let page_offset = params.page_offset; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/incidents", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local) = include { + local_req_builder = local_req_builder.query(&[( + "include", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Search for incidents matching a certain query. + pub async fn search_incidents( + &self, + params: SearchIncidentsParams, + ) -> Result, Error> + { + match self.search_incidents_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Search for incidents matching a certain query. + pub async fn search_incidents_with_http_info( + &self, + params: SearchIncidentsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let query = params.query; + let include = params.include; + let sort = params.sort; + let page_size = params.page_size; + let page_offset = params.page_offset; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/incidents/search", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + local_req_builder = local_req_builder.query(&[("query", &query.to_string())]); + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Updates an incident. Provide only the attributes that should be updated as this request is a partial update. + pub async fn update_incident( + &self, + params: UpdateIncidentParams, + ) -> Result, Error> { + match self.update_incident_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Updates an incident. Provide only the attributes that should be updated as this request is a partial update. + pub async fn update_incident_with_http_info( + &self, + params: UpdateIncidentParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let body = params.body; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + if let Some(ref local) = include { + local_req_builder = local_req_builder.query(&[( + "include", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// The bulk update endpoint for creating, updating, and deleting attachments for a given incident. + pub async fn update_incident_attachments( + &self, + params: UpdateIncidentAttachmentsParams, + ) -> Result< + Option, + Error, + > { + match self + .update_incident_attachments_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// The bulk update endpoint for creating, updating, and deleting attachments for a given incident. + pub async fn update_incident_attachments_with_http_info( + &self, + params: UpdateIncidentAttachmentsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let body = params.body; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/attachments", + local_configuration.base_path, + incident_id = urlencode(incident_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + if let Some(ref local) = include { + local_req_builder = local_req_builder.query(&[( + "include", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update an existing incident integration metadata. + pub async fn update_incident_integration( + &self, + params: UpdateIncidentIntegrationParams, + ) -> Result< + Option, + Error, + > { + match self + .update_incident_integration_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update an existing incident integration metadata. + pub async fn update_incident_integration_with_http_info( + &self, + params: UpdateIncidentIntegrationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let integration_metadata_id = params.integration_metadata_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}", + local_configuration.base_path, incident_id= + urlencode(incident_id) + , integration_metadata_id= + urlencode(integration_metadata_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update an incident todo. + pub async fn update_incident_todo( + &self, + params: UpdateIncidentTodoParams, + ) -> Result, Error> + { + match self.update_incident_todo_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update an incident todo. + pub async fn update_incident_todo_with_http_info( + &self, + params: UpdateIncidentTodoParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let incident_id = params.incident_id; + let todo_id = params.todo_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}", + local_configuration.base_path, + incident_id = urlencode(incident_id), + todo_id = urlencode(todo_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_ip_allowlist.rs b/src/datadogV2/api/api_ip_allowlist.rs index cee13ada9..5cd9a6167 100644 --- a/src/datadogV2/api/api_ip_allowlist.rs +++ b/src/datadogV2/api/api_ip_allowlist.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// UpdateIPAllowlistParams is a struct for passing parameters to the method [`UpdateIPAllowlist`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateIPAllowlistParams { pub body: crate::datadogV2::model::IPAllowlistUpdateRequest, } diff --git a/src/datadogV2/api/api_key_management.rs b/src/datadogV2/api/api_key_management.rs new file mode 100644 index 000000000..277f997b7 --- /dev/null +++ b/src/datadogV2/api/api_key_management.rs @@ -0,0 +1,1519 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateAPIKeyParams is a struct for passing parameters to the method [`CreateAPIKey`] +#[derive(Clone, Debug)] +pub struct CreateAPIKeyParams { + pub body: crate::datadogV2::model::APIKeyCreateRequest, +} + +/// CreateCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`CreateCurrentUserApplicationKey`] +#[derive(Clone, Debug)] +pub struct CreateCurrentUserApplicationKeyParams { + pub body: crate::datadogV2::model::ApplicationKeyCreateRequest, +} + +/// DeleteAPIKeyParams is a struct for passing parameters to the method [`DeleteAPIKey`] +#[derive(Clone, Debug)] +pub struct DeleteAPIKeyParams { + /// The ID of the API key. + pub api_key_id: String, +} + +/// DeleteApplicationKeyParams is a struct for passing parameters to the method [`DeleteApplicationKey`] +#[derive(Clone, Debug)] +pub struct DeleteApplicationKeyParams { + /// The ID of the application key. + pub app_key_id: String, +} + +/// DeleteCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`DeleteCurrentUserApplicationKey`] +#[derive(Clone, Debug)] +pub struct DeleteCurrentUserApplicationKeyParams { + /// The ID of the application key. + pub app_key_id: String, +} + +/// GetAPIKeyParams is a struct for passing parameters to the method [`GetAPIKey`] +#[derive(Clone, Debug)] +pub struct GetAPIKeyParams { + /// The ID of the API key. + pub api_key_id: String, + /// Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. + pub include: Option, +} + +/// GetApplicationKeyParams is a struct for passing parameters to the method [`GetApplicationKey`] +#[derive(Clone, Debug)] +pub struct GetApplicationKeyParams { + /// The ID of the application key. + pub app_key_id: String, + /// Resource path for related resources to include in the response. Only `owned_by` is supported. + pub include: Option, +} + +/// GetCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`GetCurrentUserApplicationKey`] +#[derive(Clone, Debug)] +pub struct GetCurrentUserApplicationKeyParams { + /// The ID of the application key. + pub app_key_id: String, +} + +/// ListAPIKeysParams is a struct for passing parameters to the method [`ListAPIKeys`] +#[derive(Clone, Debug)] +pub struct ListAPIKeysParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// API key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub sort: Option, + /// Filter API keys by the specified string. + pub filter: Option, + /// Only include API keys created on or after the specified date. + pub filter_created_at_start: Option, + /// Only include API keys created on or before the specified date. + pub filter_created_at_end: Option, + /// Only include API keys modified on or after the specified date. + pub filter_modified_at_start: Option, + /// Only include API keys modified on or before the specified date. + pub filter_modified_at_end: Option, + /// Comma separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `modified_by`. + pub include: Option, + /// Filter API keys by remote config read enabled status. + pub filter_remote_config_read_enabled: Option, + /// Filter API keys by category. + pub filter_category: Option, +} + +/// ListApplicationKeysParams is a struct for passing parameters to the method [`ListApplicationKeys`] +#[derive(Clone, Debug)] +pub struct ListApplicationKeysParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// Application key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub sort: Option, + /// Filter application keys by the specified string. + pub filter: Option, + /// Only include application keys created on or after the specified date. + pub filter_created_at_start: Option, + /// Only include application keys created on or before the specified date. + pub filter_created_at_end: Option, + /// Resource path for related resources to include in the response. Only `owned_by` is supported. + pub include: Option, +} + +/// ListCurrentUserApplicationKeysParams is a struct for passing parameters to the method [`ListCurrentUserApplicationKeys`] +#[derive(Clone, Debug)] +pub struct ListCurrentUserApplicationKeysParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// Application key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub sort: Option, + /// Filter application keys by the specified string. + pub filter: Option, + /// Only include application keys created on or after the specified date. + pub filter_created_at_start: Option, + /// Only include application keys created on or before the specified date. + pub filter_created_at_end: Option, + /// Resource path for related resources to include in the response. Only `owned_by` is supported. + pub include: Option, +} + +/// UpdateAPIKeyParams is a struct for passing parameters to the method [`UpdateAPIKey`] +#[derive(Clone, Debug)] +pub struct UpdateAPIKeyParams { + /// The ID of the API key. + pub api_key_id: String, + pub body: crate::datadogV2::model::APIKeyUpdateRequest, +} + +/// UpdateApplicationKeyParams is a struct for passing parameters to the method [`UpdateApplicationKey`] +#[derive(Clone, Debug)] +pub struct UpdateApplicationKeyParams { + /// The ID of the application key. + pub app_key_id: String, + pub body: crate::datadogV2::model::ApplicationKeyUpdateRequest, +} + +/// UpdateCurrentUserApplicationKeyParams is a struct for passing parameters to the method [`UpdateCurrentUserApplicationKey`] +#[derive(Clone, Debug)] +pub struct UpdateCurrentUserApplicationKeyParams { + /// The ID of the application key. + pub app_key_id: String, + pub body: crate::datadogV2::model::ApplicationKeyUpdateRequest, +} + +/// CreateAPIKeyError is a struct for typed errors of method [`CreateAPIKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateAPIKeyError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateCurrentUserApplicationKeyError is a struct for typed errors of method [`CreateCurrentUserApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateCurrentUserApplicationKeyError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteAPIKeyError is a struct for typed errors of method [`DeleteAPIKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAPIKeyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteApplicationKeyError is a struct for typed errors of method [`DeleteApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteApplicationKeyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteCurrentUserApplicationKeyError is a struct for typed errors of method [`DeleteCurrentUserApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteCurrentUserApplicationKeyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetAPIKeyError is a struct for typed errors of method [`GetAPIKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAPIKeyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetApplicationKeyError is a struct for typed errors of method [`GetApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationKeyError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetCurrentUserApplicationKeyError is a struct for typed errors of method [`GetCurrentUserApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetCurrentUserApplicationKeyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListAPIKeysError is a struct for typed errors of method [`ListAPIKeys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListAPIKeysError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListApplicationKeysError is a struct for typed errors of method [`ListApplicationKeys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListApplicationKeysError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListCurrentUserApplicationKeysError is a struct for typed errors of method [`ListCurrentUserApplicationKeys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListCurrentUserApplicationKeysError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateAPIKeyError is a struct for typed errors of method [`UpdateAPIKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateAPIKeyError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateApplicationKeyError is a struct for typed errors of method [`UpdateApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationKeyError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateCurrentUserApplicationKeyError is a struct for typed errors of method [`UpdateCurrentUserApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateCurrentUserApplicationKeyError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct KeyManagementAPI { + config: configuration::Configuration, +} + +impl Default for KeyManagementAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl KeyManagementAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create an API key. + pub async fn create_api_key( + &self, + params: CreateAPIKeyParams, + ) -> Result, Error> { + match self.create_api_key_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an API key. + pub async fn create_api_key_with_http_info( + &self, + params: CreateAPIKeyParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/api_keys", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create an application key for current user + pub async fn create_current_user_application_key( + &self, + params: CreateCurrentUserApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self + .create_current_user_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an application key for current user + pub async fn create_current_user_application_key_with_http_info( + &self, + params: CreateCurrentUserApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/current_user/application_keys", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an API key. + pub async fn delete_api_key( + &self, + params: DeleteAPIKeyParams, + ) -> Result, Error> { + match self.delete_api_key_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an API key. + pub async fn delete_api_key_with_http_info( + &self, + params: DeleteAPIKeyParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let api_key_id = params.api_key_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/api_keys/{api_key_id}", + local_configuration.base_path, + api_key_id = urlencode(api_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an application key + pub async fn delete_application_key( + &self, + params: DeleteApplicationKeyParams, + ) -> Result, Error> { + match self.delete_application_key_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an application key + pub async fn delete_application_key_with_http_info( + &self, + params: DeleteApplicationKeyParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let app_key_id = params.app_key_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/application_keys/{app_key_id}", + local_configuration.base_path, + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an application key owned by current user + pub async fn delete_current_user_application_key( + &self, + params: DeleteCurrentUserApplicationKeyParams, + ) -> Result, Error> { + match self + .delete_current_user_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an application key owned by current user + pub async fn delete_current_user_application_key_with_http_info( + &self, + params: DeleteCurrentUserApplicationKeyParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let app_key_id = params.app_key_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/current_user/application_keys/{app_key_id}", + local_configuration.base_path, + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get an API key. + pub async fn get_api_key( + &self, + params: GetAPIKeyParams, + ) -> Result, Error> { + match self.get_api_key_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get an API key. + pub async fn get_api_key_with_http_info( + &self, + params: GetAPIKeyParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let api_key_id = params.api_key_id; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/api_keys/{api_key_id}", + local_configuration.base_path, + api_key_id = urlencode(api_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get an application key for your org. + pub async fn get_application_key( + &self, + params: GetApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self.get_application_key_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get an application key for your org. + pub async fn get_application_key_with_http_info( + &self, + params: GetApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let app_key_id = params.app_key_id; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/application_keys/{app_key_id}", + local_configuration.base_path, + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get an application key owned by current user + pub async fn get_current_user_application_key( + &self, + params: GetCurrentUserApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self + .get_current_user_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get an application key owned by current user + pub async fn get_current_user_application_key_with_http_info( + &self, + params: GetCurrentUserApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let app_key_id = params.app_key_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/current_user/application_keys/{app_key_id}", + local_configuration.base_path, + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List all API keys available for your account. + pub async fn list_api_keys( + &self, + params: ListAPIKeysParams, + ) -> Result, Error> { + match self.list_api_keys_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List all API keys available for your account. + pub async fn list_api_keys_with_http_info( + &self, + params: ListAPIKeysParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter = params.filter; + let filter_created_at_start = params.filter_created_at_start; + let filter_created_at_end = params.filter_created_at_end; + let filter_modified_at_start = params.filter_modified_at_start; + let filter_modified_at_end = params.filter_modified_at_end; + let include = params.include; + let filter_remote_config_read_enabled = params.filter_remote_config_read_enabled; + let filter_category = params.filter_category; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/api_keys", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_start { + local_req_builder = + local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_end { + local_req_builder = + local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_modified_at_start { + local_req_builder = + local_req_builder.query(&[("filter[modified_at][start]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_modified_at_end { + local_req_builder = + local_req_builder.query(&[("filter[modified_at][end]", &local_str.to_string())]); + }; + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_remote_config_read_enabled { + local_req_builder = local_req_builder + .query(&[("filter[remote_config_read_enabled]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_category { + local_req_builder = + local_req_builder.query(&[("filter[category]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List all application keys available for your org + pub async fn list_application_keys( + &self, + params: ListApplicationKeysParams, + ) -> Result< + Option, + Error, + > { + match self.list_application_keys_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List all application keys available for your org + pub async fn list_application_keys_with_http_info( + &self, + params: ListApplicationKeysParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter = params.filter; + let filter_created_at_start = params.filter_created_at_start; + let filter_created_at_end = params.filter_created_at_end; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/application_keys", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_start { + local_req_builder = + local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_end { + local_req_builder = + local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + }; + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List all application keys available for current user + pub async fn list_current_user_application_keys( + &self, + params: ListCurrentUserApplicationKeysParams, + ) -> Result< + Option, + Error, + > { + match self + .list_current_user_application_keys_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List all application keys available for current user + pub async fn list_current_user_application_keys_with_http_info( + &self, + params: ListCurrentUserApplicationKeysParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter = params.filter; + let filter_created_at_start = params.filter_created_at_start; + let filter_created_at_end = params.filter_created_at_end; + let include = params.include; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/current_user/application_keys", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_start { + local_req_builder = + local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_end { + local_req_builder = + local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + }; + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update an API key. + pub async fn update_api_key( + &self, + params: UpdateAPIKeyParams, + ) -> Result, Error> { + match self.update_api_key_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update an API key. + pub async fn update_api_key_with_http_info( + &self, + params: UpdateAPIKeyParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let api_key_id = params.api_key_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/api_keys/{api_key_id}", + local_configuration.base_path, + api_key_id = urlencode(api_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit an application key + pub async fn update_application_key( + &self, + params: UpdateApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self.update_application_key_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit an application key + pub async fn update_application_key_with_http_info( + &self, + params: UpdateApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let app_key_id = params.app_key_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/application_keys/{app_key_id}", + local_configuration.base_path, + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit an application key owned by current user + pub async fn update_current_user_application_key( + &self, + params: UpdateCurrentUserApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self + .update_current_user_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit an application key owned by current user + pub async fn update_current_user_application_key_with_http_info( + &self, + params: UpdateCurrentUserApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let app_key_id = params.app_key_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/current_user/application_keys/{app_key_id}", + local_configuration.base_path, + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_logs.rs b/src/datadogV2/api/api_logs.rs index a7bea4b2f..596aa88f5 100644 --- a/src/datadogV2/api/api_logs.rs +++ b/src/datadogV2/api/api_logs.rs @@ -6,8 +6,42 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; +/// AggregateLogsParams is a struct for passing parameters to the method [`AggregateLogs`] +#[derive(Clone, Debug)] +pub struct AggregateLogsParams { + pub body: crate::datadogV2::model::LogsAggregateRequest, +} + +/// ListLogsParams is a struct for passing parameters to the method [`ListLogs`] +#[derive(Clone, Debug)] +pub struct ListLogsParams { + pub body: Option>, +} + +/// ListLogsGetParams is a struct for passing parameters to the method [`ListLogsGet`] +#[derive(Clone, Debug)] +pub struct ListLogsGetParams { + /// Search query following logs syntax. + pub filter_query: Option, + /// For customers with multiple indexes, the indexes to search. + /// Defaults to '*' which means all indexes + pub filter_indexes: Option>, + /// Minimum timestamp for requested logs. + pub filter_from: Option, + /// Maximum timestamp for requested logs. + pub filter_to: Option, + /// Specifies the storage type to be used + pub filter_storage_tier: Option, + /// Order of logs in results. + pub sort: Option, + /// List following results with a cursor provided in the previous query. + pub page_cursor: Option, + /// Maximum number of logs in the response. + pub page_limit: Option, +} + /// SubmitLogParams is a struct for passing parameters to the method [`SubmitLog`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SubmitLogParams { /// Log to send (JSON format). pub body: Vec, @@ -17,6 +51,36 @@ pub struct SubmitLogParams { pub ddtags: Option, } +/// AggregateLogsError is a struct for typed errors of method [`AggregateLogs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AggregateLogsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListLogsError is a struct for typed errors of method [`ListLogs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListLogsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListLogsGetError is a struct for typed errors of method [`ListLogsGet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListLogsGetError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + /// SubmitLogError is a struct for typed errors of method [`SubmitLog`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -53,6 +117,315 @@ impl LogsAPI { Self { config } } + /// The API endpoint to aggregate events into buckets and compute metrics and timeseries. + pub async fn aggregate_logs( + &self, + params: AggregateLogsParams, + ) -> Result, Error> + { + match self.aggregate_logs_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// The API endpoint to aggregate events into buckets and compute metrics and timeseries. + pub async fn aggregate_logs_with_http_info( + &self, + params: AggregateLogsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/analytics/aggregate", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns logs that match a log search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to build complex logs filtering and search. + /// + /// **If you are considering archiving logs for your organization, + /// consider use of the Datadog archive capabilities instead of the log list API. + /// See [Datadog Logs Archive documentation][2].** + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination + /// [2]: https://docs.datadoghq.com/logs/archives + pub async fn list_logs( + &self, + params: ListLogsParams, + ) -> Result, Error> { + match self.list_logs_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns logs that match a log search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to build complex logs filtering and search. + /// + /// **If you are considering archiving logs for your organization, + /// consider use of the Datadog archive capabilities instead of the log list API. + /// See [Datadog Logs Archive documentation][2].** + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination + /// [2]: https://docs.datadoghq.com/logs/archives + pub async fn list_logs_with_http_info( + &self, + params: ListLogsParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/events/search", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns logs that match a log search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to see your latest logs. + /// + /// **If you are considering archiving logs for your organization, + /// consider use of the Datadog archive capabilities instead of the log list API. + /// See [Datadog Logs Archive documentation][2].** + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination + /// [2]: https://docs.datadoghq.com/logs/archives + pub async fn list_logs_get( + &self, + params: ListLogsGetParams, + ) -> Result, Error> { + match self.list_logs_get_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns logs that match a log search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to see your latest logs. + /// + /// **If you are considering archiving logs for your organization, + /// consider use of the Datadog archive capabilities instead of the log list API. + /// See [Datadog Logs Archive documentation][2].** + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination + /// [2]: https://docs.datadoghq.com/logs/archives + pub async fn list_logs_get_with_http_info( + &self, + params: ListLogsGetParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_query = params.filter_query; + let filter_indexes = params.filter_indexes; + let filter_from = params.filter_from; + let filter_to = params.filter_to; + let filter_storage_tier = params.filter_storage_tier; + let sort = params.sort; + let page_cursor = params.page_cursor; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/logs/events", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_query { + local_req_builder = + local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + }; + if let Some(ref local) = filter_indexes { + local_req_builder = local_req_builder.query(&[( + "filter[indexes]", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + if let Some(ref local_str) = filter_from { + local_req_builder = + local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_to { + local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_storage_tier { + local_req_builder = + local_req_builder.query(&[("filter[storage_tier]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + /// Send your logs to your Datadog platform over HTTP. Limits per HTTP request are: /// /// - Maximum content size per payload (uncompressed): 5MB diff --git a/src/datadogV2/api/api_logs_archives.rs b/src/datadogV2/api/api_logs_archives.rs new file mode 100644 index 000000000..cc3ae48a8 --- /dev/null +++ b/src/datadogV2/api/api_logs_archives.rs @@ -0,0 +1,958 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// AddReadRoleToArchiveParams is a struct for passing parameters to the method [`AddReadRoleToArchive`] +#[derive(Clone, Debug)] +pub struct AddReadRoleToArchiveParams { + /// The ID of the archive. + pub archive_id: String, + pub body: crate::datadogV2::model::RelationshipToRole, +} + +/// CreateLogsArchiveParams is a struct for passing parameters to the method [`CreateLogsArchive`] +#[derive(Clone, Debug)] +pub struct CreateLogsArchiveParams { + /// The definition of the new archive. + pub body: crate::datadogV2::model::LogsArchiveCreateRequest, +} + +/// DeleteLogsArchiveParams is a struct for passing parameters to the method [`DeleteLogsArchive`] +#[derive(Clone, Debug)] +pub struct DeleteLogsArchiveParams { + /// The ID of the archive. + pub archive_id: String, +} + +/// GetLogsArchiveParams is a struct for passing parameters to the method [`GetLogsArchive`] +#[derive(Clone, Debug)] +pub struct GetLogsArchiveParams { + /// The ID of the archive. + pub archive_id: String, +} + +/// ListArchiveReadRolesParams is a struct for passing parameters to the method [`ListArchiveReadRoles`] +#[derive(Clone, Debug)] +pub struct ListArchiveReadRolesParams { + /// The ID of the archive. + pub archive_id: String, +} + +/// RemoveRoleFromArchiveParams is a struct for passing parameters to the method [`RemoveRoleFromArchive`] +#[derive(Clone, Debug)] +pub struct RemoveRoleFromArchiveParams { + /// The ID of the archive. + pub archive_id: String, + pub body: crate::datadogV2::model::RelationshipToRole, +} + +/// UpdateLogsArchiveParams is a struct for passing parameters to the method [`UpdateLogsArchive`] +#[derive(Clone, Debug)] +pub struct UpdateLogsArchiveParams { + /// The ID of the archive. + pub archive_id: String, + /// New definition of the archive. + pub body: crate::datadogV2::model::LogsArchiveCreateRequest, +} + +/// UpdateLogsArchiveOrderParams is a struct for passing parameters to the method [`UpdateLogsArchiveOrder`] +#[derive(Clone, Debug)] +pub struct UpdateLogsArchiveOrderParams { + /// An object containing the new ordered list of archive IDs. + pub body: crate::datadogV2::model::LogsArchiveOrder, +} + +/// AddReadRoleToArchiveError is a struct for typed errors of method [`AddReadRoleToArchive`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddReadRoleToArchiveError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateLogsArchiveError is a struct for typed errors of method [`CreateLogsArchive`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLogsArchiveError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteLogsArchiveError is a struct for typed errors of method [`DeleteLogsArchive`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteLogsArchiveError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetLogsArchiveError is a struct for typed errors of method [`GetLogsArchive`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLogsArchiveError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetLogsArchiveOrderError is a struct for typed errors of method [`GetLogsArchiveOrder`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLogsArchiveOrderError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListArchiveReadRolesError is a struct for typed errors of method [`ListArchiveReadRoles`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListArchiveReadRolesError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListLogsArchivesError is a struct for typed errors of method [`ListLogsArchives`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListLogsArchivesError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// RemoveRoleFromArchiveError is a struct for typed errors of method [`RemoveRoleFromArchive`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RemoveRoleFromArchiveError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateLogsArchiveError is a struct for typed errors of method [`UpdateLogsArchive`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateLogsArchiveError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateLogsArchiveOrderError is a struct for typed errors of method [`UpdateLogsArchiveOrder`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateLogsArchiveOrderError { + Status400(Option), + Status403(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct LogsArchivesAPI { + config: configuration::Configuration, +} + +impl Default for LogsArchivesAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl LogsArchivesAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Adds a read role to an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) + pub async fn add_read_role_to_archive( + &self, + params: AddReadRoleToArchiveParams, + ) -> Result, Error> { + match self.add_read_role_to_archive_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Adds a read role to an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) + pub async fn add_read_role_to_archive_with_http_info( + &self, + params: AddReadRoleToArchiveParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let archive_id = params.archive_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives/{archive_id}/readers", + local_configuration.base_path, + archive_id = urlencode(archive_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create an archive in your organization. + pub async fn create_logs_archive( + &self, + params: CreateLogsArchiveParams, + ) -> Result, Error> { + match self.create_logs_archive_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an archive in your organization. + pub async fn create_logs_archive_with_http_info( + &self, + params: CreateLogsArchiveParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a given archive from your organization. + pub async fn delete_logs_archive( + &self, + params: DeleteLogsArchiveParams, + ) -> Result, Error> { + match self.delete_logs_archive_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a given archive from your organization. + pub async fn delete_logs_archive_with_http_info( + &self, + params: DeleteLogsArchiveParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let archive_id = params.archive_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives/{archive_id}", + local_configuration.base_path, + archive_id = urlencode(archive_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a specific archive from your organization. + pub async fn get_logs_archive( + &self, + params: GetLogsArchiveParams, + ) -> Result, Error> { + match self.get_logs_archive_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a specific archive from your organization. + pub async fn get_logs_archive_with_http_info( + &self, + params: GetLogsArchiveParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let archive_id = params.archive_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives/{archive_id}", + local_configuration.base_path, + archive_id = urlencode(archive_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the current order of your archives. + /// This endpoint takes no JSON arguments. + pub async fn get_logs_archive_order( + &self, + ) -> Result, Error> + { + match self.get_logs_archive_order_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the current order of your archives. + /// This endpoint takes no JSON arguments. + pub async fn get_logs_archive_order_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archive-order", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns all read roles a given archive is restricted to. + pub async fn list_archive_read_roles( + &self, + params: ListArchiveReadRolesParams, + ) -> Result, Error> + { + match self.list_archive_read_roles_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns all read roles a given archive is restricted to. + pub async fn list_archive_read_roles_with_http_info( + &self, + params: ListArchiveReadRolesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let archive_id = params.archive_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives/{archive_id}/readers", + local_configuration.base_path, + archive_id = urlencode(archive_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the list of configured logs archives with their definitions. + pub async fn list_logs_archives( + &self, + ) -> Result, Error> { + match self.list_logs_archives_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the list of configured logs archives with their definitions. + pub async fn list_logs_archives_with_http_info( + &self, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Removes a role from an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) + pub async fn remove_role_from_archive( + &self, + params: RemoveRoleFromArchiveParams, + ) -> Result, Error> { + match self.remove_role_from_archive_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Removes a role from an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) + pub async fn remove_role_from_archive_with_http_info( + &self, + params: RemoveRoleFromArchiveParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let archive_id = params.archive_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives/{archive_id}/readers", + local_configuration.base_path, + archive_id = urlencode(archive_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a given archive configuration. + /// + /// **Note**: Using this method updates your archive configuration by **replacing** + /// your current configuration with the new one sent to your Datadog organization. + pub async fn update_logs_archive( + &self, + params: UpdateLogsArchiveParams, + ) -> Result, Error> { + match self.update_logs_archive_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a given archive configuration. + /// + /// **Note**: Using this method updates your archive configuration by **replacing** + /// your current configuration with the new one sent to your Datadog organization. + pub async fn update_logs_archive_with_http_info( + &self, + params: UpdateLogsArchiveParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let archive_id = params.archive_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archives/{archive_id}", + local_configuration.base_path, + archive_id = urlencode(archive_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update the order of your archives. Since logs are processed sequentially, reordering an archive may change + /// the structure and content of the data processed by other archives. + /// + /// **Note**: Using the `PUT` method updates your archive's order by replacing the current order + /// with the new one. + pub async fn update_logs_archive_order( + &self, + params: UpdateLogsArchiveOrderParams, + ) -> Result, Error> + { + match self.update_logs_archive_order_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update the order of your archives. Since logs are processed sequentially, reordering an archive may change + /// the structure and content of the data processed by other archives. + /// + /// **Note**: Using the `PUT` method updates your archive's order by replacing the current order + /// with the new one. + pub async fn update_logs_archive_order_with_http_info( + &self, + params: UpdateLogsArchiveOrderParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/logs/config/archive-order", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_logs_metrics.rs b/src/datadogV2/api/api_logs_metrics.rs index 9a96b1da4..5504b702b 100644 --- a/src/datadogV2/api/api_logs_metrics.rs +++ b/src/datadogV2/api/api_logs_metrics.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateLogsMetricParams is a struct for passing parameters to the method [`CreateLogsMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateLogsMetricParams { /// The definition of the new log-based metric. pub body: crate::datadogV2::model::LogsMetricCreateRequest, } /// DeleteLogsMetricParams is a struct for passing parameters to the method [`DeleteLogsMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteLogsMetricParams { /// The name of the log-based metric. pub metric_id: String, } /// GetLogsMetricParams is a struct for passing parameters to the method [`GetLogsMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetLogsMetricParams { /// The name of the log-based metric. pub metric_id: String, } /// UpdateLogsMetricParams is a struct for passing parameters to the method [`UpdateLogsMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateLogsMetricParams { /// The name of the log-based metric. pub metric_id: String, diff --git a/src/datadogV2/api/api_metrics.rs b/src/datadogV2/api/api_metrics.rs index 7394ca7d2..0d077c7fb 100644 --- a/src/datadogV2/api/api_metrics.rs +++ b/src/datadogV2/api/api_metrics.rs @@ -6,45 +6,1365 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; +/// CreateBulkTagsMetricsConfigurationParams is a struct for passing parameters to the method [`CreateBulkTagsMetricsConfiguration`] +#[derive(Clone, Debug)] +pub struct CreateBulkTagsMetricsConfigurationParams { + pub body: crate::datadogV2::model::MetricBulkTagConfigCreateRequest, +} + +/// CreateTagConfigurationParams is a struct for passing parameters to the method [`CreateTagConfiguration`] +#[derive(Clone, Debug)] +pub struct CreateTagConfigurationParams { + /// The name of the metric. + pub metric_name: String, + pub body: crate::datadogV2::model::MetricTagConfigurationCreateRequest, +} + +/// DeleteBulkTagsMetricsConfigurationParams is a struct for passing parameters to the method [`DeleteBulkTagsMetricsConfiguration`] +#[derive(Clone, Debug)] +pub struct DeleteBulkTagsMetricsConfigurationParams { + pub body: crate::datadogV2::model::MetricBulkTagConfigDeleteRequest, +} + +/// DeleteTagConfigurationParams is a struct for passing parameters to the method [`DeleteTagConfiguration`] +#[derive(Clone, Debug)] +pub struct DeleteTagConfigurationParams { + /// The name of the metric. + pub metric_name: String, +} + +/// EstimateMetricsOutputSeriesParams is a struct for passing parameters to the method [`EstimateMetricsOutputSeries`] +#[derive(Clone, Debug)] +pub struct EstimateMetricsOutputSeriesParams { + /// The name of the metric. + pub metric_name: String, + /// Filtered tag keys that the metric is configured to query with. + pub filter_groups: Option, + /// The number of hours of look back (from now) to estimate cardinality with. + pub filter_hours_ago: Option, + /// The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9. + pub filter_num_aggregations: Option, + /// A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators. + pub filter_pct: Option, + /// A window, in hours, from the look back to estimate cardinality with. + pub filter_timespan_h: Option, +} + +/// ListActiveMetricConfigurationsParams is a struct for passing parameters to the method [`ListActiveMetricConfigurations`] +#[derive(Clone, Debug)] +pub struct ListActiveMetricConfigurationsParams { + /// The name of the metric. + pub metric_name: String, + /// The number of seconds of look back (from now). + /// Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum value is 2,630,000 (1 month). + pub window_seconds: Option, +} + +/// ListTagConfigurationByNameParams is a struct for passing parameters to the method [`ListTagConfigurationByName`] +#[derive(Clone, Debug)] +pub struct ListTagConfigurationByNameParams { + /// The name of the metric. + pub metric_name: String, +} + +/// ListTagConfigurationsParams is a struct for passing parameters to the method [`ListTagConfigurations`] +#[derive(Clone, Debug)] +pub struct ListTagConfigurationsParams { + /// Filter custom metrics that have configured tags. + pub filter_configured: Option, + /// Filter tag configurations by configured tags. + pub filter_tags_configured: Option, + /// Filter metrics by metric type. + pub filter_metric_type: Option, + /// Filter distributions with additional percentile + /// aggregations enabled or disabled. + pub filter_include_percentiles: Option, + /// (Beta) Filter custom metrics that have or have not been queried in the specified window[seconds]. + /// If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied. + pub filter_queried: Option, + /// Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. + /// Can only be combined with the filter[queried] filter. + pub filter_tags: Option, + /// The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. + /// Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days). + pub window_seconds: Option, +} + +/// ListTagsByMetricNameParams is a struct for passing parameters to the method [`ListTagsByMetricName`] +#[derive(Clone, Debug)] +pub struct ListTagsByMetricNameParams { + /// The name of the metric. + pub metric_name: String, +} + +/// ListVolumesByMetricNameParams is a struct for passing parameters to the method [`ListVolumesByMetricName`] +#[derive(Clone, Debug)] +pub struct ListVolumesByMetricNameParams { + /// The name of the metric. + pub metric_name: String, +} + +/// QueryScalarDataParams is a struct for passing parameters to the method [`QueryScalarData`] +#[derive(Clone, Debug)] +pub struct QueryScalarDataParams { + pub body: crate::datadogV2::model::ScalarFormulaQueryRequest, +} + +/// QueryTimeseriesDataParams is a struct for passing parameters to the method [`QueryTimeseriesData`] +#[derive(Clone, Debug)] +pub struct QueryTimeseriesDataParams { + pub body: crate::datadogV2::model::TimeseriesFormulaQueryRequest, +} + /// SubmitMetricsParams is a struct for passing parameters to the method [`SubmitMetrics`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SubmitMetricsParams { pub body: crate::datadogV2::model::MetricPayload, /// HTTP header used to compress the media-type. pub content_encoding: Option, } -/// SubmitMetricsError is a struct for typed errors of method [`SubmitMetrics`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SubmitMetricsError { - Status400(Option), - Status403(Option), - Status408(Option), - Status413(Option), - Status429(Option), - UnknownValue(serde_json::Value), -} +/// UpdateTagConfigurationParams is a struct for passing parameters to the method [`UpdateTagConfiguration`] +#[derive(Clone, Debug)] +pub struct UpdateTagConfigurationParams { + /// The name of the metric. + pub metric_name: String, + pub body: crate::datadogV2::model::MetricTagConfigurationUpdateRequest, +} + +/// CreateBulkTagsMetricsConfigurationError is a struct for typed errors of method [`CreateBulkTagsMetricsConfiguration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateBulkTagsMetricsConfigurationError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateTagConfigurationError is a struct for typed errors of method [`CreateTagConfiguration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateTagConfigurationError { + Status400(Option), + Status403(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteBulkTagsMetricsConfigurationError is a struct for typed errors of method [`DeleteBulkTagsMetricsConfiguration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteBulkTagsMetricsConfigurationError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteTagConfigurationError is a struct for typed errors of method [`DeleteTagConfiguration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteTagConfigurationError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// EstimateMetricsOutputSeriesError is a struct for typed errors of method [`EstimateMetricsOutputSeries`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EstimateMetricsOutputSeriesError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListActiveMetricConfigurationsError is a struct for typed errors of method [`ListActiveMetricConfigurations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListActiveMetricConfigurationsError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListTagConfigurationByNameError is a struct for typed errors of method [`ListTagConfigurationByName`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListTagConfigurationByNameError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListTagConfigurationsError is a struct for typed errors of method [`ListTagConfigurations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListTagConfigurationsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListTagsByMetricNameError is a struct for typed errors of method [`ListTagsByMetricName`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListTagsByMetricNameError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListVolumesByMetricNameError is a struct for typed errors of method [`ListVolumesByMetricName`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListVolumesByMetricNameError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// QueryScalarDataError is a struct for typed errors of method [`QueryScalarData`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum QueryScalarDataError { + Status400(Option), + Status401(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// QueryTimeseriesDataError is a struct for typed errors of method [`QueryTimeseriesData`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum QueryTimeseriesDataError { + Status400(Option), + Status401(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SubmitMetricsError is a struct for typed errors of method [`SubmitMetrics`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SubmitMetricsError { + Status400(Option), + Status403(Option), + Status408(Option), + Status413(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateTagConfigurationError is a struct for typed errors of method [`UpdateTagConfiguration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateTagConfigurationError { + Status400(Option), + Status403(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct MetricsAPI { + config: configuration::Configuration, +} + +impl Default for MetricsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl MetricsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. + /// Metrics are selected by passing a metric name prefix. Use the Delete method of this API path to remove tag configurations. + /// Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. + /// If multiple calls include the same metric, the last configuration applied (not by submit order) is used, do not + /// expect deterministic ordering of concurrent calls. The `exclude_tags_mode` value will set all metrics that match the prefix to + /// the same exclusion state, metric tag configurations do not support mixed inclusion and exclusion for tags on the same metric. + /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. + pub async fn create_bulk_tags_metrics_configuration( + &self, + params: CreateBulkTagsMetricsConfigurationParams, + ) -> Result< + Option, + Error, + > { + match self + .create_bulk_tags_metrics_configuration_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. + /// Metrics are selected by passing a metric name prefix. Use the Delete method of this API path to remove tag configurations. + /// Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. + /// If multiple calls include the same metric, the last configuration applied (not by submit order) is used, do not + /// expect deterministic ordering of concurrent calls. The `exclude_tags_mode` value will set all metrics that match the prefix to + /// the same exclusion state, metric tag configurations do not support mixed inclusion and exclusion for tags on the same metric. + /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. + pub async fn create_bulk_tags_metrics_configuration_with_http_info( + &self, + params: CreateBulkTagsMetricsConfigurationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/config/bulk-tags", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric. + /// Optionally, include percentile aggregations on any distribution metric or configure custom aggregations + /// on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed + /// from an allow-list to a deny-list, and tags in the defined list will not be queryable. + /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. + pub async fn create_tag_configuration( + &self, + params: CreateTagConfigurationParams, + ) -> Result< + Option, + Error, + > { + match self.create_tag_configuration_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric. + /// Optionally, include percentile aggregations on any distribution metric or configure custom aggregations + /// on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed + /// from an allow-list to a deny-list, and tags in the defined list will not be queryable. + /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. + pub async fn create_tag_configuration_with_http_info( + &self, + params: CreateTagConfigurationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let metric_name = params.metric_name; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/tags", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. + /// Metrics are selected by passing a metric name prefix. + /// Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. + /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. + pub async fn delete_bulk_tags_metrics_configuration( + &self, + params: DeleteBulkTagsMetricsConfigurationParams, + ) -> Result< + Option, + Error, + > { + match self + .delete_bulk_tags_metrics_configuration_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. + /// Metrics are selected by passing a metric name prefix. + /// Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. + /// Can only be used with application keys of users with the `Manage Tags for Metrics` permission. + pub async fn delete_bulk_tags_metrics_configuration_with_http_info( + &self, + params: DeleteBulkTagsMetricsConfigurationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/config/bulk-tags", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Deletes a metric's tag configuration. Can only be used with application + /// keys from users with the `Manage Tags for Metrics` permission. + pub async fn delete_tag_configuration( + &self, + params: DeleteTagConfigurationParams, + ) -> Result, Error> { + match self.delete_tag_configuration_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Deletes a metric's tag configuration. Can only be used with application + /// keys from users with the `Manage Tags for Metrics` permission. + pub async fn delete_tag_configuration_with_http_info( + &self, + params: DeleteTagConfigurationParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let metric_name = params.metric_name; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/tags", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™. + pub async fn estimate_metrics_output_series( + &self, + params: EstimateMetricsOutputSeriesParams, + ) -> Result< + Option, + Error, + > { + match self + .estimate_metrics_output_series_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™. + pub async fn estimate_metrics_output_series_with_http_info( + &self, + params: EstimateMetricsOutputSeriesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let metric_name = params.metric_name; + let filter_groups = params.filter_groups; + let filter_hours_ago = params.filter_hours_ago; + let filter_num_aggregations = params.filter_num_aggregations; + let filter_pct = params.filter_pct; + let filter_timespan_h = params.filter_timespan_h; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/estimate", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_groups { + local_req_builder = + local_req_builder.query(&[("filter[groups]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_hours_ago { + local_req_builder = + local_req_builder.query(&[("filter[hours_ago]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_num_aggregations { + local_req_builder = + local_req_builder.query(&[("filter[num_aggregations]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_pct { + local_req_builder = local_req_builder.query(&[("filter[pct]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_timespan_h { + local_req_builder = + local_req_builder.query(&[("filter[timespan_h]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List tags and aggregations that are actively queried on dashboards and monitors for a given metric name. + pub async fn list_active_metric_configurations( + &self, + params: ListActiveMetricConfigurationsParams, + ) -> Result< + Option, + Error, + > { + match self + .list_active_metric_configurations_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List tags and aggregations that are actively queried on dashboards and monitors for a given metric name. + pub async fn list_active_metric_configurations_with_http_info( + &self, + params: ListActiveMetricConfigurationsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let metric_name = params.metric_name; + let window_seconds = params.window_seconds; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/active-configurations", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = window_seconds { + local_req_builder = + local_req_builder.query(&[("window[seconds]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::MetricSuggestedTagsAndAggregationsResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns the tag configuration for the given metric name. + pub async fn list_tag_configuration_by_name( + &self, + params: ListTagConfigurationByNameParams, + ) -> Result< + Option, + Error, + > { + match self + .list_tag_configuration_by_name_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns the tag configuration for the given metric name. + pub async fn list_tag_configuration_by_name_with_http_info( + &self, + params: ListTagConfigurationByNameParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let metric_name = params.metric_name; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/tags", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns all metrics that can be configured in the Metrics Summary page or with Metrics without Limits™ (matching additional filters if specified). + pub async fn list_tag_configurations( + &self, + params: ListTagConfigurationsParams, + ) -> Result< + Option, + Error, + > { + match self.list_tag_configurations_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns all metrics that can be configured in the Metrics Summary page or with Metrics without Limits™ (matching additional filters if specified). + pub async fn list_tag_configurations_with_http_info( + &self, + params: ListTagConfigurationsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_configured = params.filter_configured; + let filter_tags_configured = params.filter_tags_configured; + let filter_metric_type = params.filter_metric_type; + let filter_include_percentiles = params.filter_include_percentiles; + let filter_queried = params.filter_queried; + let filter_tags = params.filter_tags; + let window_seconds = params.window_seconds; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/metrics", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_configured { + local_req_builder = + local_req_builder.query(&[("filter[configured]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_tags_configured { + local_req_builder = + local_req_builder.query(&[("filter[tags_configured]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_metric_type { + local_req_builder = + local_req_builder.query(&[("filter[metric_type]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_include_percentiles { + local_req_builder = + local_req_builder.query(&[("filter[include_percentiles]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_queried { + local_req_builder = + local_req_builder.query(&[("filter[queried]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_tags { + local_req_builder = + local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + }; + if let Some(ref local_str) = window_seconds { + local_req_builder = + local_req_builder.query(&[("window[seconds]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::MetricsAndMetricTagConfigurationsResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// View indexed tag key-value pairs for a given metric name. + pub async fn list_tags_by_metric_name( + &self, + params: ListTagsByMetricNameParams, + ) -> Result< + Option, + Error, + > { + match self.list_tags_by_metric_name_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// View indexed tag key-value pairs for a given metric name. + pub async fn list_tags_by_metric_name_with_http_info( + &self, + params: ListTagsByMetricNameParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let metric_name = params.metric_name; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/all-tags", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// View distinct metrics volumes for the given metric name. + /// + /// Custom metrics generated in-app from other products will return `null` for ingested volumes. + pub async fn list_volumes_by_metric_name( + &self, + params: ListVolumesByMetricNameParams, + ) -> Result< + Option, + Error, + > { + match self + .list_volumes_by_metric_name_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// View distinct metrics volumes for the given metric name. + /// + /// Custom metrics generated in-app from other products will return `null` for ingested volumes. + pub async fn list_volumes_by_metric_name_with_http_info( + &self, + params: ListVolumesByMetricNameParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; -#[derive(Debug, Clone)] -pub struct MetricsAPI { - config: configuration::Configuration, -} + // unbox and build parameters + let metric_name = params.metric_name; -impl Default for MetricsAPI { - fn default() -> Self { - Self { - config: configuration::Configuration::new(), + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/volumes", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) } } -} -impl MetricsAPI { - pub fn new() -> Self { - Self::default() + /// Query scalar values (as seen on Query Value, Table, and Toplist widgets). + /// Multiple data sources are supported with the ability to + /// process the data using formulas and functions. + pub async fn query_scalar_data( + &self, + params: QueryScalarDataParams, + ) -> Result< + Option, + Error, + > { + match self.query_scalar_data_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } } - pub fn with_config(config: configuration::Configuration) -> Self { - Self { config } + + /// Query scalar values (as seen on Query Value, Table, and Toplist widgets). + /// Multiple data sources are supported with the ability to + /// process the data using formulas and functions. + pub async fn query_scalar_data_with_http_info( + &self, + params: QueryScalarDataParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/query/scalar", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Query timeseries data across various data sources and + /// process the data by applying formulas and functions. + pub async fn query_timeseries_data( + &self, + params: QueryTimeseriesDataParams, + ) -> Result< + Option, + Error, + > { + match self.query_timeseries_data_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Query timeseries data across various data sources and + /// process the data by applying formulas and functions. + pub async fn query_timeseries_data_with_http_info( + &self, + params: QueryTimeseriesDataParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/query/timeseries", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } } /// The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. @@ -148,4 +1468,97 @@ impl MetricsAPI { Err(Error::ResponseError(local_error)) } } + + /// Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations + /// of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed + /// from an allow-list to a deny-list, and tags in the defined list will not be queryable. + /// Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires + /// a tag configuration to be created first. + pub async fn update_tag_configuration( + &self, + params: UpdateTagConfigurationParams, + ) -> Result< + Option, + Error, + > { + match self.update_tag_configuration_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations + /// of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed + /// from an allow-list to a deny-list, and tags in the defined list will not be queryable. + /// Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires + /// a tag configuration to be created first. + pub async fn update_tag_configuration_with_http_info( + &self, + params: UpdateTagConfigurationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let metric_name = params.metric_name; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/metrics/{metric_name}/tags", + local_configuration.base_path, + metric_name = urlencode(metric_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } } diff --git a/src/datadogV2/api/api_monitors.rs b/src/datadogV2/api/api_monitors.rs new file mode 100644 index 000000000..8e7c6fd24 --- /dev/null +++ b/src/datadogV2/api/api_monitors.rs @@ -0,0 +1,500 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateMonitorConfigPolicyParams is a struct for passing parameters to the method [`CreateMonitorConfigPolicy`] +#[derive(Clone, Debug)] +pub struct CreateMonitorConfigPolicyParams { + /// Create a monitor configuration policy request body. + pub body: crate::datadogV2::model::MonitorConfigPolicyCreateRequest, +} + +/// DeleteMonitorConfigPolicyParams is a struct for passing parameters to the method [`DeleteMonitorConfigPolicy`] +#[derive(Clone, Debug)] +pub struct DeleteMonitorConfigPolicyParams { + /// ID of the monitor configuration policy. + pub policy_id: String, +} + +/// GetMonitorConfigPolicyParams is a struct for passing parameters to the method [`GetMonitorConfigPolicy`] +#[derive(Clone, Debug)] +pub struct GetMonitorConfigPolicyParams { + /// ID of the monitor configuration policy. + pub policy_id: String, +} + +/// UpdateMonitorConfigPolicyParams is a struct for passing parameters to the method [`UpdateMonitorConfigPolicy`] +#[derive(Clone, Debug)] +pub struct UpdateMonitorConfigPolicyParams { + /// ID of the monitor configuration policy. + pub policy_id: String, + /// Description of the update. + pub body: crate::datadogV2::model::MonitorConfigPolicyEditRequest, +} + +/// CreateMonitorConfigPolicyError is a struct for typed errors of method [`CreateMonitorConfigPolicy`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateMonitorConfigPolicyError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteMonitorConfigPolicyError is a struct for typed errors of method [`DeleteMonitorConfigPolicy`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteMonitorConfigPolicyError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetMonitorConfigPolicyError is a struct for typed errors of method [`GetMonitorConfigPolicy`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMonitorConfigPolicyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListMonitorConfigPoliciesError is a struct for typed errors of method [`ListMonitorConfigPolicies`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMonitorConfigPoliciesError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateMonitorConfigPolicyError is a struct for typed errors of method [`UpdateMonitorConfigPolicy`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMonitorConfigPolicyError { + Status403(Option), + Status404(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct MonitorsAPI { + config: configuration::Configuration, +} + +impl Default for MonitorsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl MonitorsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a monitor configuration policy. + pub async fn create_monitor_config_policy( + &self, + params: CreateMonitorConfigPolicyParams, + ) -> Result< + Option, + Error, + > { + match self + .create_monitor_config_policy_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a monitor configuration policy. + pub async fn create_monitor_config_policy_with_http_info( + &self, + params: CreateMonitorConfigPolicyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/monitor/policy", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a monitor configuration policy. + pub async fn delete_monitor_config_policy( + &self, + params: DeleteMonitorConfigPolicyParams, + ) -> Result, Error> { + match self + .delete_monitor_config_policy_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a monitor configuration policy. + pub async fn delete_monitor_config_policy_with_http_info( + &self, + params: DeleteMonitorConfigPolicyParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let policy_id = params.policy_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/monitor/policy/{policy_id}", + local_configuration.base_path, + policy_id = urlencode(policy_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a monitor configuration policy by `policy_id`. + pub async fn get_monitor_config_policy( + &self, + params: GetMonitorConfigPolicyParams, + ) -> Result< + Option, + Error, + > { + match self.get_monitor_config_policy_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a monitor configuration policy by `policy_id`. + pub async fn get_monitor_config_policy_with_http_info( + &self, + params: GetMonitorConfigPolicyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let policy_id = params.policy_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/monitor/policy/{policy_id}", + local_configuration.base_path, + policy_id = urlencode(policy_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all monitor configuration policies. + pub async fn list_monitor_config_policies( + &self, + ) -> Result< + Option, + Error, + > { + match self.list_monitor_config_policies_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all monitor configuration policies. + pub async fn list_monitor_config_policies_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/monitor/policy", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit a monitor configuration policy. + pub async fn update_monitor_config_policy( + &self, + params: UpdateMonitorConfigPolicyParams, + ) -> Result< + Option, + Error, + > { + match self + .update_monitor_config_policy_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit a monitor configuration policy. + pub async fn update_monitor_config_policy_with_http_info( + &self, + params: UpdateMonitorConfigPolicyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let policy_id = params.policy_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/monitor/policy/{policy_id}", + local_configuration.base_path, + policy_id = urlencode(policy_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_okta_integration.rs b/src/datadogV2/api/api_okta_integration.rs new file mode 100644 index 000000000..3db0253f5 --- /dev/null +++ b/src/datadogV2/api/api_okta_integration.rs @@ -0,0 +1,491 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateOktaAccountParams is a struct for passing parameters to the method [`CreateOktaAccount`] +#[derive(Clone, Debug)] +pub struct CreateOktaAccountParams { + pub body: crate::datadogV2::model::OktaAccountRequest, +} + +/// DeleteOktaAccountParams is a struct for passing parameters to the method [`DeleteOktaAccount`] +#[derive(Clone, Debug)] +pub struct DeleteOktaAccountParams { + /// None + pub account_id: String, +} + +/// GetOktaAccountParams is a struct for passing parameters to the method [`GetOktaAccount`] +#[derive(Clone, Debug)] +pub struct GetOktaAccountParams { + /// None + pub account_id: String, +} + +/// UpdateOktaAccountParams is a struct for passing parameters to the method [`UpdateOktaAccount`] +#[derive(Clone, Debug)] +pub struct UpdateOktaAccountParams { + /// None + pub account_id: String, + pub body: crate::datadogV2::model::OktaAccountUpdateRequest, +} + +/// CreateOktaAccountError is a struct for typed errors of method [`CreateOktaAccount`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOktaAccountError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteOktaAccountError is a struct for typed errors of method [`DeleteOktaAccount`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOktaAccountError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetOktaAccountError is a struct for typed errors of method [`GetOktaAccount`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOktaAccountError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListOktaAccountsError is a struct for typed errors of method [`ListOktaAccounts`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListOktaAccountsError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateOktaAccountError is a struct for typed errors of method [`UpdateOktaAccount`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateOktaAccountError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct OktaIntegrationAPI { + config: configuration::Configuration, +} + +impl Default for OktaIntegrationAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl OktaIntegrationAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create an Okta account. + pub async fn create_okta_account( + &self, + params: CreateOktaAccountParams, + ) -> Result, Error> + { + match self.create_okta_account_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an Okta account. + pub async fn create_okta_account_with_http_info( + &self, + params: CreateOktaAccountParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/integrations/okta/accounts", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an Okta account. + pub async fn delete_okta_account( + &self, + params: DeleteOktaAccountParams, + ) -> Result, Error> { + match self.delete_okta_account_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an Okta account. + pub async fn delete_okta_account_with_http_info( + &self, + params: DeleteOktaAccountParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let account_id = params.account_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/integrations/okta/accounts/{account_id}", + local_configuration.base_path, + account_id = urlencode(account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get an Okta account. + pub async fn get_okta_account( + &self, + params: GetOktaAccountParams, + ) -> Result, Error> + { + match self.get_okta_account_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get an Okta account. + pub async fn get_okta_account_with_http_info( + &self, + params: GetOktaAccountParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let account_id = params.account_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/integrations/okta/accounts/{account_id}", + local_configuration.base_path, + account_id = urlencode(account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List Okta accounts. + pub async fn list_okta_accounts( + &self, + ) -> Result, Error> + { + match self.list_okta_accounts_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List Okta accounts. + pub async fn list_okta_accounts_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/integrations/okta/accounts", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update an Okta account. + pub async fn update_okta_account( + &self, + params: UpdateOktaAccountParams, + ) -> Result, Error> + { + match self.update_okta_account_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update an Okta account. + pub async fn update_okta_account_with_http_info( + &self, + params: UpdateOktaAccountParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let account_id = params.account_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/integrations/okta/accounts/{account_id}", + local_configuration.base_path, + account_id = urlencode(account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_opsgenie_integration.rs b/src/datadogV2/api/api_opsgenie_integration.rs index 8d21b312f..7c707a2a7 100644 --- a/src/datadogV2/api/api_opsgenie_integration.rs +++ b/src/datadogV2/api/api_opsgenie_integration.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateOpsgenieServiceParams is a struct for passing parameters to the method [`CreateOpsgenieService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateOpsgenieServiceParams { /// Opsgenie service payload pub body: crate::datadogV2::model::OpsgenieServiceCreateRequest, } /// DeleteOpsgenieServiceParams is a struct for passing parameters to the method [`DeleteOpsgenieService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteOpsgenieServiceParams { /// The UUID of the service. pub integration_service_id: String, } /// GetOpsgenieServiceParams is a struct for passing parameters to the method [`GetOpsgenieService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetOpsgenieServiceParams { /// The UUID of the service. pub integration_service_id: String, } /// UpdateOpsgenieServiceParams is a struct for passing parameters to the method [`UpdateOpsgenieService`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateOpsgenieServiceParams { /// The UUID of the service. pub integration_service_id: String, diff --git a/src/datadogV2/api/api_organizations.rs b/src/datadogV2/api/api_organizations.rs index b8dbb8e97..6841e832e 100644 --- a/src/datadogV2/api/api_organizations.rs +++ b/src/datadogV2/api/api_organizations.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// UploadIdPMetadataParams is a struct for passing parameters to the method [`UploadIdPMetadata`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UploadIdPMetadataParams { /// The IdP metadata XML file pub idp_file: Option>, diff --git a/src/datadogV2/api/api_powerpack.rs b/src/datadogV2/api/api_powerpack.rs new file mode 100644 index 000000000..e29d6a1cc --- /dev/null +++ b/src/datadogV2/api/api_powerpack.rs @@ -0,0 +1,494 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreatePowerpackParams is a struct for passing parameters to the method [`CreatePowerpack`] +#[derive(Clone, Debug)] +pub struct CreatePowerpackParams { + /// Create a powerpack request body. + pub body: crate::datadogV2::model::Powerpack, +} + +/// DeletePowerpackParams is a struct for passing parameters to the method [`DeletePowerpack`] +#[derive(Clone, Debug)] +pub struct DeletePowerpackParams { + /// Powerpack id + pub powerpack_id: String, +} + +/// GetPowerpackParams is a struct for passing parameters to the method [`GetPowerpack`] +#[derive(Clone, Debug)] +pub struct GetPowerpackParams { + /// ID of the powerpack. + pub powerpack_id: String, +} + +/// ListPowerpacksParams is a struct for passing parameters to the method [`ListPowerpacks`] +#[derive(Clone, Debug)] +pub struct ListPowerpacksParams { + /// Maximum number of powerpacks in the response. + pub page_limit: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, +} + +/// UpdatePowerpackParams is a struct for passing parameters to the method [`UpdatePowerpack`] +#[derive(Clone, Debug)] +pub struct UpdatePowerpackParams { + /// ID of the powerpack. + pub powerpack_id: String, + /// Update a powerpack request body. + pub body: crate::datadogV2::model::Powerpack, +} + +/// CreatePowerpackError is a struct for typed errors of method [`CreatePowerpack`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreatePowerpackError { + Status400(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeletePowerpackError is a struct for typed errors of method [`DeletePowerpack`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePowerpackError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetPowerpackError is a struct for typed errors of method [`GetPowerpack`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPowerpackError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListPowerpacksError is a struct for typed errors of method [`ListPowerpacks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPowerpacksError { + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdatePowerpackError is a struct for typed errors of method [`UpdatePowerpack`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePowerpackError { + Status400(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct PowerpackAPI { + config: configuration::Configuration, +} + +impl Default for PowerpackAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl PowerpackAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a powerpack. + pub async fn create_powerpack( + &self, + params: CreatePowerpackParams, + ) -> Result, Error> + { + match self.create_powerpack_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a powerpack. + pub async fn create_powerpack_with_http_info( + &self, + params: CreatePowerpackParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/powerpacks", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a powerpack. + pub async fn delete_powerpack( + &self, + params: DeletePowerpackParams, + ) -> Result, Error> { + match self.delete_powerpack_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a powerpack. + pub async fn delete_powerpack_with_http_info( + &self, + params: DeletePowerpackParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let powerpack_id = params.powerpack_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/powerpacks/{powerpack_id}", + local_configuration.base_path, + powerpack_id = urlencode(powerpack_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a powerpack. + pub async fn get_powerpack( + &self, + params: GetPowerpackParams, + ) -> Result, Error> { + match self.get_powerpack_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a powerpack. + pub async fn get_powerpack_with_http_info( + &self, + params: GetPowerpackParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let powerpack_id = params.powerpack_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/powerpacks/{powerpack_id}", + local_configuration.base_path, + powerpack_id = urlencode(powerpack_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a list of all powerpacks. + pub async fn list_powerpacks( + &self, + params: ListPowerpacksParams, + ) -> Result, Error> + { + match self.list_powerpacks_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a list of all powerpacks. + pub async fn list_powerpacks_with_http_info( + &self, + params: ListPowerpacksParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_limit = params.page_limit; + let page_offset = params.page_offset; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/powerpacks", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a powerpack. + pub async fn update_powerpack( + &self, + params: UpdatePowerpackParams, + ) -> Result, Error> + { + match self.update_powerpack_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a powerpack. + pub async fn update_powerpack_with_http_info( + &self, + params: UpdatePowerpackParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let powerpack_id = params.powerpack_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/powerpacks/{powerpack_id}", + local_configuration.base_path, + powerpack_id = urlencode(powerpack_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_processes.rs b/src/datadogV2/api/api_processes.rs index 2ef60a13f..941c51c5a 100644 --- a/src/datadogV2/api/api_processes.rs +++ b/src/datadogV2/api/api_processes.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// ListProcessesParams is a struct for passing parameters to the method [`ListProcesses`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListProcessesParams { /// String to search processes by. pub search: Option, diff --git a/src/datadogV2/api/api_restriction_policies.rs b/src/datadogV2/api/api_restriction_policies.rs index d70c07986..e048b7be7 100644 --- a/src/datadogV2/api/api_restriction_policies.rs +++ b/src/datadogV2/api/api_restriction_policies.rs @@ -7,21 +7,21 @@ use reqwest; use serde::{Deserialize, Serialize}; /// DeleteRestrictionPolicyParams is a struct for passing parameters to the method [`DeleteRestrictionPolicy`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteRestrictionPolicyParams { /// Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`. pub resource_id: String, } /// GetRestrictionPolicyParams is a struct for passing parameters to the method [`GetRestrictionPolicy`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetRestrictionPolicyParams { /// Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`. pub resource_id: String, } /// UpdateRestrictionPolicyParams is a struct for passing parameters to the method [`UpdateRestrictionPolicy`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateRestrictionPolicyParams { /// Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`. pub resource_id: String, diff --git a/src/datadogV2/api/api_roles.rs b/src/datadogV2/api/api_roles.rs index 4c07010f8..0ee70ae70 100644 --- a/src/datadogV2/api/api_roles.rs +++ b/src/datadogV2/api/api_roles.rs @@ -6,6 +6,179 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; +/// AddPermissionToRoleParams is a struct for passing parameters to the method [`AddPermissionToRole`] +#[derive(Clone, Debug)] +pub struct AddPermissionToRoleParams { + /// The unique identifier of the role. + pub role_id: String, + pub body: crate::datadogV2::model::RelationshipToPermission, +} + +/// AddUserToRoleParams is a struct for passing parameters to the method [`AddUserToRole`] +#[derive(Clone, Debug)] +pub struct AddUserToRoleParams { + /// The unique identifier of the role. + pub role_id: String, + pub body: crate::datadogV2::model::RelationshipToUser, +} + +/// CloneRoleParams is a struct for passing parameters to the method [`CloneRole`] +#[derive(Clone, Debug)] +pub struct CloneRoleParams { + /// The unique identifier of the role. + pub role_id: String, + pub body: crate::datadogV2::model::RoleCloneRequest, +} + +/// CreateRoleParams is a struct for passing parameters to the method [`CreateRole`] +#[derive(Clone, Debug)] +pub struct CreateRoleParams { + pub body: crate::datadogV2::model::RoleCreateRequest, +} + +/// DeleteRoleParams is a struct for passing parameters to the method [`DeleteRole`] +#[derive(Clone, Debug)] +pub struct DeleteRoleParams { + /// The unique identifier of the role. + pub role_id: String, +} + +/// GetRoleParams is a struct for passing parameters to the method [`GetRole`] +#[derive(Clone, Debug)] +pub struct GetRoleParams { + /// The unique identifier of the role. + pub role_id: String, +} + +/// ListRolePermissionsParams is a struct for passing parameters to the method [`ListRolePermissions`] +#[derive(Clone, Debug)] +pub struct ListRolePermissionsParams { + /// The unique identifier of the role. + pub role_id: String, +} + +/// ListRoleUsersParams is a struct for passing parameters to the method [`ListRoleUsers`] +#[derive(Clone, Debug)] +pub struct ListRoleUsersParams { + /// The unique identifier of the role. + pub role_id: String, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// User attribute to order results by. Sort order is **ascending** by default. + /// Sort order is **descending** if the field is prefixed by a negative sign, + /// for example `sort=-name`. Options: `name`, `email`, `status`. + pub sort: Option, + /// Filter all users by the given string. Defaults to no filtering. + pub filter: Option, +} + +/// ListRolesParams is a struct for passing parameters to the method [`ListRoles`] +#[derive(Clone, Debug)] +pub struct ListRolesParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// Sort roles depending on the given field. Sort order is **ascending** by default. + /// Sort order is **descending** if the field is prefixed by a negative sign, for example: + /// `sort=-name`. + pub sort: Option, + /// Filter all roles by the given string. + pub filter: Option, + /// Filter all roles by the given list of role IDs. + pub filter_id: Option, +} + +/// RemovePermissionFromRoleParams is a struct for passing parameters to the method [`RemovePermissionFromRole`] +#[derive(Clone, Debug)] +pub struct RemovePermissionFromRoleParams { + /// The unique identifier of the role. + pub role_id: String, + pub body: crate::datadogV2::model::RelationshipToPermission, +} + +/// RemoveUserFromRoleParams is a struct for passing parameters to the method [`RemoveUserFromRole`] +#[derive(Clone, Debug)] +pub struct RemoveUserFromRoleParams { + /// The unique identifier of the role. + pub role_id: String, + pub body: crate::datadogV2::model::RelationshipToUser, +} + +/// UpdateRoleParams is a struct for passing parameters to the method [`UpdateRole`] +#[derive(Clone, Debug)] +pub struct UpdateRoleParams { + /// The unique identifier of the role. + pub role_id: String, + pub body: crate::datadogV2::model::RoleUpdateRequest, +} + +/// AddPermissionToRoleError is a struct for typed errors of method [`AddPermissionToRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddPermissionToRoleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// AddUserToRoleError is a struct for typed errors of method [`AddUserToRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddUserToRoleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CloneRoleError is a struct for typed errors of method [`CloneRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CloneRoleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateRoleError is a struct for typed errors of method [`CreateRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateRoleError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteRoleError is a struct for typed errors of method [`DeleteRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteRoleError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetRoleError is a struct for typed errors of method [`GetRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetRoleError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + /// ListPermissionsError is a struct for typed errors of method [`ListPermissions`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -16,6 +189,69 @@ pub enum ListPermissionsError { UnknownValue(serde_json::Value), } +/// ListRolePermissionsError is a struct for typed errors of method [`ListRolePermissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListRolePermissionsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListRoleUsersError is a struct for typed errors of method [`ListRoleUsers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListRoleUsersError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListRolesError is a struct for typed errors of method [`ListRoles`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListRolesError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// RemovePermissionFromRoleError is a struct for typed errors of method [`RemovePermissionFromRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RemovePermissionFromRoleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// RemoveUserFromRoleError is a struct for typed errors of method [`RemoveUserFromRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RemoveUserFromRoleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateRoleError is a struct for typed errors of method [`UpdateRole`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateRoleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + #[derive(Debug, Clone)] pub struct RolesAPI { config: configuration::Configuration, @@ -37,33 +273,41 @@ impl RolesAPI { Self { config } } - /// Returns a list of all permissions, including name, description, and ID. - pub async fn list_permissions( + /// Adds a permission to a role. + pub async fn add_permission_to_role( &self, - ) -> Result, Error> + params: AddPermissionToRoleParams, + ) -> Result, Error> { - match self.list_permissions_with_http_info().await { + match self.add_permission_to_role_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } } - /// Returns a list of all permissions, including name, description, and ID. - pub async fn list_permissions_with_http_info( + /// Adds a permission to a role. + pub async fn add_permission_to_role_with_http_info( &self, + params: AddPermissionToRoleParams, ) -> Result< ResponseContent, - Error, + Error, > { let local_configuration = &self.config; // unbox and build parameters + let role_id = params.role_id; + let body = params.body; let local_client = &local_configuration.client; - let local_uri_str = format!("{}/api/v2/permissions", local_configuration.base_path); + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}/permissions", + local_configuration.base_path, + role_id = urlencode(role_id) + ); let mut local_req_builder = - local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); // build user agent if let Some(ref local_user_agent) = local_configuration.user_agent { @@ -79,6 +323,13 @@ impl RolesAPI { local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); }; + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + let local_req = local_req_builder.build()?; let local_resp = local_client.execute(local_req).await?; @@ -94,8 +345,949 @@ impl RolesAPI { entity: local_entity, }) } else { - let local_entity: Option = + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Adds a user to a role. + pub async fn add_user_to_role( + &self, + params: AddUserToRoleParams, + ) -> Result, Error> { + match self.add_user_to_role_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Adds a user to a role. + pub async fn add_user_to_role_with_http_info( + &self, + params: AddUserToRoleParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}/users", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Clone an existing role + pub async fn clone_role( + &self, + params: CloneRoleParams, + ) -> Result, Error> { + match self.clone_role_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Clone an existing role + pub async fn clone_role_with_http_info( + &self, + params: CloneRoleParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}/clone", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a new role for your organization. + pub async fn create_role( + &self, + params: CreateRoleParams, + ) -> Result, Error> { + match self.create_role_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a new role for your organization. + pub async fn create_role_with_http_info( + &self, + params: CreateRoleParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/roles", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Disables a role. + pub async fn delete_role( + &self, + params: DeleteRoleParams, + ) -> Result, Error> { + match self.delete_role_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Disables a role. + pub async fn delete_role_with_http_info( + &self, + params: DeleteRoleParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a role in the organization specified by the role’s `role_id`. + pub async fn get_role( + &self, + params: GetRoleParams, + ) -> Result, Error> { + match self.get_role_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a role in the organization specified by the role’s `role_id`. + pub async fn get_role_with_http_info( + &self, + params: GetRoleParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns a list of all permissions, including name, description, and ID. + pub async fn list_permissions( + &self, + ) -> Result, Error> + { + match self.list_permissions_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns a list of all permissions, including name, description, and ID. + pub async fn list_permissions_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/permissions", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns a list of all permissions for a single role. + pub async fn list_role_permissions( + &self, + params: ListRolePermissionsParams, + ) -> Result, Error> + { + match self.list_role_permissions_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns a list of all permissions for a single role. + pub async fn list_role_permissions_with_http_info( + &self, + params: ListRolePermissionsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}/permissions", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Gets all users of a role. + pub async fn list_role_users( + &self, + params: ListRoleUsersParams, + ) -> Result, Error> { + match self.list_role_users_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Gets all users of a role. + pub async fn list_role_users_with_http_info( + &self, + params: ListRoleUsersParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter = params.filter; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}/users", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns all roles, including their names and their unique identifiers. + pub async fn list_roles( + &self, + params: ListRolesParams, + ) -> Result, Error> { + match self.list_roles_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns all roles, including their names and their unique identifiers. + pub async fn list_roles_with_http_info( + &self, + params: ListRolesParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter = params.filter; + let filter_id = params.filter_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/roles", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_id { + local_req_builder = local_req_builder.query(&[("filter[id]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Removes a permission from a role. + pub async fn remove_permission_from_role( + &self, + params: RemovePermissionFromRoleParams, + ) -> Result< + Option, + Error, + > { + match self + .remove_permission_from_role_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Removes a permission from a role. + pub async fn remove_permission_from_role_with_http_info( + &self, + params: RemovePermissionFromRoleParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}/permissions", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Removes a user from a role. + pub async fn remove_user_from_role( + &self, + params: RemoveUserFromRoleParams, + ) -> Result, Error> + { + match self.remove_user_from_role_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Removes a user from a role. + pub async fn remove_user_from_role_with_http_info( + &self, + params: RemoveUserFromRoleParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}/users", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit a role. Can only be used with application keys belonging to administrators. + pub async fn update_role( + &self, + params: UpdateRoleParams, + ) -> Result, Error> { + match self.update_role_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit a role. Can only be used with application keys belonging to administrators. + pub async fn update_role_with_http_info( + &self, + params: UpdateRoleParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let role_id = params.role_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/roles/{role_id}", + local_configuration.base_path, + role_id = urlencode(role_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); let local_error = ResponseContent { status: local_status, content: local_content, diff --git a/src/datadogV2/api/api_rum.rs b/src/datadogV2/api/api_rum.rs new file mode 100644 index 000000000..637077969 --- /dev/null +++ b/src/datadogV2/api/api_rum.rs @@ -0,0 +1,822 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// AggregateRUMEventsParams is a struct for passing parameters to the method [`AggregateRUMEvents`] +#[derive(Clone, Debug)] +pub struct AggregateRUMEventsParams { + pub body: crate::datadogV2::model::RUMAggregateRequest, +} + +/// CreateRUMApplicationParams is a struct for passing parameters to the method [`CreateRUMApplication`] +#[derive(Clone, Debug)] +pub struct CreateRUMApplicationParams { + pub body: crate::datadogV2::model::RUMApplicationCreateRequest, +} + +/// DeleteRUMApplicationParams is a struct for passing parameters to the method [`DeleteRUMApplication`] +#[derive(Clone, Debug)] +pub struct DeleteRUMApplicationParams { + /// RUM application ID. + pub id: String, +} + +/// GetRUMApplicationParams is a struct for passing parameters to the method [`GetRUMApplication`] +#[derive(Clone, Debug)] +pub struct GetRUMApplicationParams { + /// RUM application ID. + pub id: String, +} + +/// ListRUMEventsParams is a struct for passing parameters to the method [`ListRUMEvents`] +#[derive(Clone, Debug)] +pub struct ListRUMEventsParams { + /// Search query following RUM syntax. + pub filter_query: Option, + /// Minimum timestamp for requested events. + pub filter_from: Option, + /// Maximum timestamp for requested events. + pub filter_to: Option, + /// Order of events in results. + pub sort: Option, + /// List following results with a cursor provided in the previous query. + pub page_cursor: Option, + /// Maximum number of events in the response. + pub page_limit: Option, +} + +/// SearchRUMEventsParams is a struct for passing parameters to the method [`SearchRUMEvents`] +#[derive(Clone, Debug)] +pub struct SearchRUMEventsParams { + pub body: crate::datadogV2::model::RUMSearchEventsRequest, +} + +/// UpdateRUMApplicationParams is a struct for passing parameters to the method [`UpdateRUMApplication`] +#[derive(Clone, Debug)] +pub struct UpdateRUMApplicationParams { + /// RUM application ID. + pub id: String, + pub body: crate::datadogV2::model::RUMApplicationUpdateRequest, +} + +/// AggregateRUMEventsError is a struct for typed errors of method [`AggregateRUMEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AggregateRUMEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateRUMApplicationError is a struct for typed errors of method [`CreateRUMApplication`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateRUMApplicationError { + Status400(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteRUMApplicationError is a struct for typed errors of method [`DeleteRUMApplication`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteRUMApplicationError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetRUMApplicationError is a struct for typed errors of method [`GetRUMApplication`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetRUMApplicationError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetRUMApplicationsError is a struct for typed errors of method [`GetRUMApplications`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetRUMApplicationsError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListRUMEventsError is a struct for typed errors of method [`ListRUMEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListRUMEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SearchRUMEventsError is a struct for typed errors of method [`SearchRUMEvents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchRUMEventsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateRUMApplicationError is a struct for typed errors of method [`UpdateRUMApplication`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateRUMApplicationError { + Status400(Option), + Status404(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct RumAPI { + config: configuration::Configuration, +} + +impl Default for RumAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl RumAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. + pub async fn aggregate_rum_events( + &self, + params: AggregateRUMEventsParams, + ) -> Result< + Option, + Error, + > { + match self.aggregate_rum_events_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. + pub async fn aggregate_rum_events_with_http_info( + &self, + params: AggregateRUMEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/rum/analytics/aggregate", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a new RUM application in your organization. + pub async fn create_rum_application( + &self, + params: CreateRUMApplicationParams, + ) -> Result< + Option, + Error, + > { + match self.create_rum_application_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a new RUM application in your organization. + pub async fn create_rum_application_with_http_info( + &self, + params: CreateRUMApplicationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/rum/applications", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an existing RUM application in your organization. + pub async fn delete_rum_application( + &self, + params: DeleteRUMApplicationParams, + ) -> Result, Error> { + match self.delete_rum_application_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an existing RUM application in your organization. + pub async fn delete_rum_application_with_http_info( + &self, + params: DeleteRUMApplicationParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let id = params.id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/rum/applications/{id}", + local_configuration.base_path, + id = urlencode(id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the RUM application with given ID in your organization. + pub async fn get_rum_application( + &self, + params: GetRUMApplicationParams, + ) -> Result< + Option, + Error, + > { + match self.get_rum_application_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the RUM application with given ID in your organization. + pub async fn get_rum_application_with_http_info( + &self, + params: GetRUMApplicationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let id = params.id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/rum/applications/{id}", + local_configuration.base_path, + id = urlencode(id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List all the RUM applications in your organization. + pub async fn get_rum_applications( + &self, + ) -> Result< + Option, + Error, + > { + match self.get_rum_applications_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List all the RUM applications in your organization. + pub async fn get_rum_applications_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/rum/applications", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns events that match a RUM search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to see your latest RUM events. + /// + /// [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + pub async fn list_rum_events( + &self, + params: ListRUMEventsParams, + ) -> Result, Error> { + match self.list_rum_events_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns events that match a RUM search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to see your latest RUM events. + /// + /// [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + pub async fn list_rum_events_with_http_info( + &self, + params: ListRUMEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_query = params.filter_query; + let filter_from = params.filter_from; + let filter_to = params.filter_to; + let sort = params.sort; + let page_cursor = params.page_cursor; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/rum/events", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_query { + local_req_builder = + local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_from { + local_req_builder = + local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_to { + local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns RUM events that match a RUM search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to build complex RUM events filtering and search. + /// + /// [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + pub async fn search_rum_events( + &self, + params: SearchRUMEventsParams, + ) -> Result, Error> + { + match self.search_rum_events_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns RUM events that match a RUM search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to build complex RUM events filtering and search. + /// + /// [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + pub async fn search_rum_events_with_http_info( + &self, + params: SearchRUMEventsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/rum/events/search", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update the RUM application with given ID in your organization. + pub async fn update_rum_application( + &self, + params: UpdateRUMApplicationParams, + ) -> Result< + Option, + Error, + > { + match self.update_rum_application_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update the RUM application with given ID in your organization. + pub async fn update_rum_application_with_http_info( + &self, + params: UpdateRUMApplicationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let id = params.id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/rum/applications/{id}", + local_configuration.base_path, + id = urlencode(id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_security_monitoring.rs b/src/datadogV2/api/api_security_monitoring.rs index e98283d42..da07301af 100644 --- a/src/datadogV2/api/api_security_monitoring.rs +++ b/src/datadogV2/api/api_security_monitoring.rs @@ -6,8 +6,62 @@ use crate::datadog::*; use reqwest; use serde::{Deserialize, Serialize}; +/// CreateSecurityFilterParams is a struct for passing parameters to the method [`CreateSecurityFilter`] +#[derive(Clone, Debug)] +pub struct CreateSecurityFilterParams { + /// The definition of the new security filter. + pub body: crate::datadogV2::model::SecurityFilterCreateRequest, +} + +/// CreateSecurityMonitoringRuleParams is a struct for passing parameters to the method [`CreateSecurityMonitoringRule`] +#[derive(Clone, Debug)] +pub struct CreateSecurityMonitoringRuleParams { + pub body: crate::datadogV2::model::SecurityMonitoringRuleCreatePayload, +} + +/// DeleteSecurityFilterParams is a struct for passing parameters to the method [`DeleteSecurityFilter`] +#[derive(Clone, Debug)] +pub struct DeleteSecurityFilterParams { + /// The ID of the security filter. + pub security_filter_id: String, +} + +/// DeleteSecurityMonitoringRuleParams is a struct for passing parameters to the method [`DeleteSecurityMonitoringRule`] +#[derive(Clone, Debug)] +pub struct DeleteSecurityMonitoringRuleParams { + /// The ID of the rule. + pub rule_id: String, +} + +/// EditSecurityMonitoringSignalAssigneeParams is a struct for passing parameters to the method [`EditSecurityMonitoringSignalAssignee`] +#[derive(Clone, Debug)] +pub struct EditSecurityMonitoringSignalAssigneeParams { + /// The ID of the signal. + pub signal_id: String, + /// Attributes describing the signal update. + pub body: crate::datadogV2::model::SecurityMonitoringSignalAssigneeUpdateRequest, +} + +/// EditSecurityMonitoringSignalIncidentsParams is a struct for passing parameters to the method [`EditSecurityMonitoringSignalIncidents`] +#[derive(Clone, Debug)] +pub struct EditSecurityMonitoringSignalIncidentsParams { + /// The ID of the signal. + pub signal_id: String, + /// Attributes describing the signal update. + pub body: crate::datadogV2::model::SecurityMonitoringSignalIncidentsUpdateRequest, +} + +/// EditSecurityMonitoringSignalStateParams is a struct for passing parameters to the method [`EditSecurityMonitoringSignalState`] +#[derive(Clone, Debug)] +pub struct EditSecurityMonitoringSignalStateParams { + /// The ID of the signal. + pub signal_id: String, + /// Attributes describing the signal update. + pub body: crate::datadogV2::model::SecurityMonitoringSignalStateUpdateRequest, +} + /// GetFindingParams is a struct for passing parameters to the method [`GetFinding`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetFindingParams { /// The ID of the finding. pub finding_id: String, @@ -15,8 +69,29 @@ pub struct GetFindingParams { pub snapshot_timestamp: Option, } +/// GetSecurityFilterParams is a struct for passing parameters to the method [`GetSecurityFilter`] +#[derive(Clone, Debug)] +pub struct GetSecurityFilterParams { + /// The ID of the security filter. + pub security_filter_id: String, +} + +/// GetSecurityMonitoringRuleParams is a struct for passing parameters to the method [`GetSecurityMonitoringRule`] +#[derive(Clone, Debug)] +pub struct GetSecurityMonitoringRuleParams { + /// The ID of the rule. + pub rule_id: String, +} + +/// GetSecurityMonitoringSignalParams is a struct for passing parameters to the method [`GetSecurityMonitoringSignal`] +#[derive(Clone, Debug)] +pub struct GetSecurityMonitoringSignalParams { + /// The ID of the signal. + pub signal_id: String, +} + /// ListFindingsParams is a struct for passing parameters to the method [`ListFindings`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct ListFindingsParams { /// Limit the number of findings returned. Must be <= 1000. pub page_limit: Option, @@ -44,16 +119,144 @@ pub struct ListFindingsParams { pub filter_status: Option, } -/// UpdateFindingParams is a struct for passing parameters to the method [`UpdateFinding`] -#[derive(Clone, Debug, Default)] -pub struct UpdateFindingParams { - /// The ID of the finding. - pub finding_id: String, - /// To mute or unmute a finding, the request body should include at least two attributes: `muted` and `reason`. The allowed reasons depend on whether the finding is being muted or unmuted: - /// - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. - /// - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`. +/// ListSecurityMonitoringRulesParams is a struct for passing parameters to the method [`ListSecurityMonitoringRules`] +#[derive(Clone, Debug)] +pub struct ListSecurityMonitoringRulesParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, +} + +/// ListSecurityMonitoringSignalsParams is a struct for passing parameters to the method [`ListSecurityMonitoringSignals`] +#[derive(Clone, Debug)] +pub struct ListSecurityMonitoringSignalsParams { + /// The search query for security signals. + pub filter_query: Option, + /// The minimum timestamp for requested security signals. + pub filter_from: Option, + /// The maximum timestamp for requested security signals. + pub filter_to: Option, + /// The order of the security signals in results. + pub sort: Option, + /// A list of results using the cursor provided in the previous query. + pub page_cursor: Option, + /// The maximum number of security signals in the response. + pub page_limit: Option, +} + +/// MuteFindingsParams is a struct for passing parameters to the method [`MuteFindings`] +#[derive(Clone, Debug)] +pub struct MuteFindingsParams { + /// ### Attributes + /// + /// All findings are updated with the same attributes. The request body must include at least two attributes: `muted` and `reason`. + /// The allowed reasons depend on whether the finding is being muted or unmuted: + /// - To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `ACCEPTED_RISK`, `OTHER`. + /// - To unmute a finding : `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`. /// - pub body: crate::datadogV2::model::MuteFindingRequest, + /// ### Meta + /// + /// The request body must include a list of the finding IDs to be updated. + /// + pub body: crate::datadogV2::model::BulkMuteFindingsRequest, +} + +/// SearchSecurityMonitoringSignalsParams is a struct for passing parameters to the method [`SearchSecurityMonitoringSignals`] +#[derive(Clone, Debug)] +pub struct SearchSecurityMonitoringSignalsParams { + pub body: Option>, +} + +/// UpdateSecurityFilterParams is a struct for passing parameters to the method [`UpdateSecurityFilter`] +#[derive(Clone, Debug)] +pub struct UpdateSecurityFilterParams { + /// The ID of the security filter. + pub security_filter_id: String, + /// New definition of the security filter. + pub body: crate::datadogV2::model::SecurityFilterUpdateRequest, +} + +/// UpdateSecurityMonitoringRuleParams is a struct for passing parameters to the method [`UpdateSecurityMonitoringRule`] +#[derive(Clone, Debug)] +pub struct UpdateSecurityMonitoringRuleParams { + /// The ID of the rule. + pub rule_id: String, + pub body: crate::datadogV2::model::SecurityMonitoringRuleUpdatePayload, +} + +/// CreateSecurityFilterError is a struct for typed errors of method [`CreateSecurityFilter`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateSecurityFilterError { + Status400(Option), + Status403(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateSecurityMonitoringRuleError is a struct for typed errors of method [`CreateSecurityMonitoringRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateSecurityMonitoringRuleError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteSecurityFilterError is a struct for typed errors of method [`DeleteSecurityFilter`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteSecurityFilterError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteSecurityMonitoringRuleError is a struct for typed errors of method [`DeleteSecurityMonitoringRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteSecurityMonitoringRuleError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// EditSecurityMonitoringSignalAssigneeError is a struct for typed errors of method [`EditSecurityMonitoringSignalAssignee`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditSecurityMonitoringSignalAssigneeError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// EditSecurityMonitoringSignalIncidentsError is a struct for typed errors of method [`EditSecurityMonitoringSignalIncidents`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditSecurityMonitoringSignalIncidentsError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// EditSecurityMonitoringSignalStateError is a struct for typed errors of method [`EditSecurityMonitoringSignalState`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditSecurityMonitoringSignalStateError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), } /// GetFindingError is a struct for typed errors of method [`GetFinding`] @@ -67,6 +270,34 @@ pub enum GetFindingError { UnknownValue(serde_json::Value), } +/// GetSecurityFilterError is a struct for typed errors of method [`GetSecurityFilter`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSecurityFilterError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetSecurityMonitoringRuleError is a struct for typed errors of method [`GetSecurityMonitoringRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSecurityMonitoringRuleError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetSecurityMonitoringSignalError is a struct for typed errors of method [`GetSecurityMonitoringSignal`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSecurityMonitoringSignalError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + /// ListFindingsError is a struct for typed errors of method [`ListFindings`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -78,19 +309,80 @@ pub enum ListFindingsError { UnknownValue(serde_json::Value), } -/// UpdateFindingError is a struct for typed errors of method [`UpdateFinding`] +/// ListSecurityFiltersError is a struct for typed errors of method [`ListSecurityFilters`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListSecurityFiltersError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListSecurityMonitoringRulesError is a struct for typed errors of method [`ListSecurityMonitoringRules`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListSecurityMonitoringRulesError { + Status400(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListSecurityMonitoringSignalsError is a struct for typed errors of method [`ListSecurityMonitoringSignals`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum UpdateFindingError { +pub enum ListSecurityMonitoringSignalsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// MuteFindingsError is a struct for typed errors of method [`MuteFindings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MuteFindingsError { Status400(Option), Status403(Option), Status404(Option), - Status409(Option), Status422(Option), Status429(Option), UnknownValue(serde_json::Value), } +/// SearchSecurityMonitoringSignalsError is a struct for typed errors of method [`SearchSecurityMonitoringSignals`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchSecurityMonitoringSignalsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateSecurityFilterError is a struct for typed errors of method [`UpdateSecurityFilter`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateSecurityFilterError { + Status400(Option), + Status403(Option), + Status404(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateSecurityMonitoringRuleError is a struct for typed errors of method [`UpdateSecurityMonitoringRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateSecurityMonitoringRuleError { + Status400(Option), + Status401(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + #[derive(Debug, Clone)] pub struct SecurityMonitoringAPI { config: configuration::Configuration, @@ -112,43 +404,47 @@ impl SecurityMonitoringAPI { Self { config } } - /// Returns a single finding with message and resource configuration. - pub async fn get_finding( + /// Create a security filter. + /// + /// See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) + /// for more examples. + pub async fn create_security_filter( &self, - params: GetFindingParams, - ) -> Result, Error> { - match self.get_finding_with_http_info(params).await { + params: CreateSecurityFilterParams, + ) -> Result< + Option, + Error, + > { + match self.create_security_filter_with_http_info(params).await { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } } - /// Returns a single finding with message and resource configuration. - pub async fn get_finding_with_http_info( + /// Create a security filter. + /// + /// See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) + /// for more examples. + pub async fn create_security_filter_with_http_info( &self, - params: GetFindingParams, - ) -> Result, Error> - { + params: CreateSecurityFilterParams, + ) -> Result< + ResponseContent, + Error, + > { let local_configuration = &self.config; // unbox and build parameters - let finding_id = params.finding_id; - let snapshot_timestamp = params.snapshot_timestamp; + let body = params.body; let local_client = &local_configuration.client; let local_uri_str = format!( - "{}/api/v2/posture_management/findings/{finding_id}", - local_configuration.base_path, - finding_id = urlencode(finding_id) + "{}/api/v2/security_monitoring/configuration/security_filters", + local_configuration.base_path ); let mut local_req_builder = - local_client.request(reqwest::Method::GET, local_uri_str.as_str()); - - if let Some(ref local_str) = snapshot_timestamp { - local_req_builder = - local_req_builder.query(&[("snapshot_timestamp", &local_str.to_string())]); - }; + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); // build user agent if let Some(ref local_user_agent) = local_configuration.user_agent { @@ -164,6 +460,13 @@ impl SecurityMonitoringAPI { local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); }; + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + let local_req = local_req_builder.build()?; let local_resp = local_client.execute(local_req).await?; @@ -171,7 +474,7 @@ impl SecurityMonitoringAPI { let local_content = local_resp.text().await?; if !local_status.is_client_error() && !local_status.is_server_error() { - let local_entity: Option = + let local_entity: Option = serde_json::from_str(&local_content).ok(); Ok(ResponseContent { status: local_status, @@ -179,7 +482,8 @@ impl SecurityMonitoringAPI { entity: local_entity, }) } else { - let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_entity: Option = + serde_json::from_str(&local_content).ok(); let local_error = ResponseContent { status: local_status, content: local_content, @@ -189,159 +493,1495 @@ impl SecurityMonitoringAPI { } } - /// Get a list of CSPM findings. - /// - /// ### Filtering - /// - /// Filters can be applied by appending query parameters to the URL. - /// - /// - Using a single filter: `?filter[attribute_key]=attribute_value` - /// - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...` - /// - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2` - /// - /// Here, `attribute_key` can be any of the filter keys described further below. - /// - /// Query parameters of type `integer` support comparison operators (`>`, `>=`, `<`, `<=`). This is particularly useful when filtering by `evaluation_changed_at` or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`. - /// - /// You can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` to filter for any non-AWS resources. - /// - /// The operator must come after the equal sign. For example, to filter with the `>=` operator, add the operator after the equal sign: `filter[evaluation_changed_at]=>=1678809373257`. - /// - /// Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed. - /// - /// ### Response - /// - /// The response includes an array of finding objects, pagination metadata, and a count of items that match the query. - /// - /// Each finding object contains the following: - /// - /// - The finding ID that can be used in a `GetFinding` request to retrieve the full finding details. - /// - Core attributes, including status, evaluation, high-level resource details, muted state, and rule details. - /// - `evaluation_changed_at` and `resource_discovery_date` time stamps. - /// - An array of associated tags. - /// - pub async fn list_findings( + /// Create a detection rule. + pub async fn create_security_monitoring_rule( &self, - params: ListFindingsParams, - ) -> Result, Error> - { - match self.list_findings_with_http_info(params).await { + params: CreateSecurityMonitoringRuleParams, + ) -> Result< + Option, + Error, + > { + match self + .create_security_monitoring_rule_with_http_info(params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } } - /// Get a list of CSPM findings. - /// - /// ### Filtering - /// - /// Filters can be applied by appending query parameters to the URL. - /// - /// - Using a single filter: `?filter[attribute_key]=attribute_value` - /// - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...` - /// - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2` - /// - /// Here, `attribute_key` can be any of the filter keys described further below. - /// - /// Query parameters of type `integer` support comparison operators (`>`, `>=`, `<`, `<=`). This is particularly useful when filtering by `evaluation_changed_at` or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`. - /// - /// You can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` to filter for any non-AWS resources. - /// - /// The operator must come after the equal sign. For example, to filter with the `>=` operator, add the operator after the equal sign: `filter[evaluation_changed_at]=>=1678809373257`. - /// - /// Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed. - /// - /// ### Response - /// - /// The response includes an array of finding objects, pagination metadata, and a count of items that match the query. - /// - /// Each finding object contains the following: - /// - /// - The finding ID that can be used in a `GetFinding` request to retrieve the full finding details. - /// - Core attributes, including status, evaluation, high-level resource details, muted state, and rule details. - /// - `evaluation_changed_at` and `resource_discovery_date` time stamps. - /// - An array of associated tags. - /// - pub async fn list_findings_with_http_info( + /// Create a detection rule. + pub async fn create_security_monitoring_rule_with_http_info( &self, - params: ListFindingsParams, + params: CreateSecurityMonitoringRuleParams, ) -> Result< - ResponseContent, - Error, + ResponseContent, + Error, > { let local_configuration = &self.config; // unbox and build parameters - let page_limit = params.page_limit; - let snapshot_timestamp = params.snapshot_timestamp; - let page_cursor = params.page_cursor; - let filter_tags = params.filter_tags; - let filter_evaluation_changed_at = params.filter_evaluation_changed_at; - let filter_muted = params.filter_muted; - let filter_rule_id = params.filter_rule_id; - let filter_rule_name = params.filter_rule_name; - let filter_resource_type = params.filter_resource_type; - let filter_discovery_timestamp = params.filter_discovery_timestamp; - let filter_evaluation = params.filter_evaluation; - let filter_status = params.filter_status; + let body = params.body; let local_client = &local_configuration.client; let local_uri_str = format!( - "{}/api/v2/posture_management/findings", + "{}/api/v2/security_monitoring/rules", local_configuration.base_path ); let mut local_req_builder = - local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); - if let Some(ref local_str) = page_limit { - local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); - }; - if let Some(ref local_str) = snapshot_timestamp { + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { local_req_builder = - local_req_builder.query(&[("snapshot_timestamp", &local_str.to_string())]); + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a specific security filter. + pub async fn delete_security_filter( + &self, + params: DeleteSecurityFilterParams, + ) -> Result, Error> { + match self.delete_security_filter_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a specific security filter. + pub async fn delete_security_filter_with_http_info( + &self, + params: DeleteSecurityFilterParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let security_filter_id = params.security_filter_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}", + local_configuration.base_path, + security_filter_id = urlencode(security_filter_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an existing rule. Default rules cannot be deleted. + pub async fn delete_security_monitoring_rule( + &self, + params: DeleteSecurityMonitoringRuleParams, + ) -> Result, Error> { + match self + .delete_security_monitoring_rule_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an existing rule. Default rules cannot be deleted. + pub async fn delete_security_monitoring_rule_with_http_info( + &self, + params: DeleteSecurityMonitoringRuleParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let rule_id = params.rule_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/rules/{rule_id}", + local_configuration.base_path, + rule_id = urlencode(rule_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Modify the triage assignee of a security signal. + pub async fn edit_security_monitoring_signal_assignee( + &self, + params: EditSecurityMonitoringSignalAssigneeParams, + ) -> Result< + Option, + Error, + > { + match self + .edit_security_monitoring_signal_assignee_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Modify the triage assignee of a security signal. + pub async fn edit_security_monitoring_signal_assignee_with_http_info( + &self, + params: EditSecurityMonitoringSignalAssigneeParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let signal_id = params.signal_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/signals/{signal_id}/assignee", + local_configuration.base_path, + signal_id = urlencode(signal_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SecurityMonitoringSignalTriageUpdateResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Change the related incidents for a security signal. + pub async fn edit_security_monitoring_signal_incidents( + &self, + params: EditSecurityMonitoringSignalIncidentsParams, + ) -> Result< + Option, + Error, + > { + match self + .edit_security_monitoring_signal_incidents_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Change the related incidents for a security signal. + pub async fn edit_security_monitoring_signal_incidents_with_http_info( + &self, + params: EditSecurityMonitoringSignalIncidentsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let signal_id = params.signal_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/signals/{signal_id}/incidents", + local_configuration.base_path, + signal_id = urlencode(signal_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SecurityMonitoringSignalTriageUpdateResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Change the triage state of a security signal. + pub async fn edit_security_monitoring_signal_state( + &self, + params: EditSecurityMonitoringSignalStateParams, + ) -> Result< + Option, + Error, + > { + match self + .edit_security_monitoring_signal_state_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Change the triage state of a security signal. + pub async fn edit_security_monitoring_signal_state_with_http_info( + &self, + params: EditSecurityMonitoringSignalStateParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let signal_id = params.signal_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/signals/{signal_id}/state", + local_configuration.base_path, + signal_id = urlencode(signal_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SecurityMonitoringSignalTriageUpdateResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns a single finding with message and resource configuration. + pub async fn get_finding( + &self, + params: GetFindingParams, + ) -> Result, Error> { + match self.get_finding_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns a single finding with message and resource configuration. + pub async fn get_finding_with_http_info( + &self, + params: GetFindingParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let finding_id = params.finding_id; + let snapshot_timestamp = params.snapshot_timestamp; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/posture_management/findings/{finding_id}", + local_configuration.base_path, + finding_id = urlencode(finding_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = snapshot_timestamp { + local_req_builder = + local_req_builder.query(&[("snapshot_timestamp", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the details of a specific security filter. + /// + /// See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) + /// for more examples. + pub async fn get_security_filter( + &self, + params: GetSecurityFilterParams, + ) -> Result< + Option, + Error, + > { + match self.get_security_filter_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the details of a specific security filter. + /// + /// See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) + /// for more examples. + pub async fn get_security_filter_with_http_info( + &self, + params: GetSecurityFilterParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let security_filter_id = params.security_filter_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}", + local_configuration.base_path, + security_filter_id = urlencode(security_filter_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a rule's details. + pub async fn get_security_monitoring_rule( + &self, + params: GetSecurityMonitoringRuleParams, + ) -> Result< + Option, + Error, + > { + match self + .get_security_monitoring_rule_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a rule's details. + pub async fn get_security_monitoring_rule_with_http_info( + &self, + params: GetSecurityMonitoringRuleParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let rule_id = params.rule_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/rules/{rule_id}", + local_configuration.base_path, + rule_id = urlencode(rule_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a signal's details. + pub async fn get_security_monitoring_signal( + &self, + params: GetSecurityMonitoringSignalParams, + ) -> Result< + Option, + Error, + > { + match self + .get_security_monitoring_signal_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a signal's details. + pub async fn get_security_monitoring_signal_with_http_info( + &self, + params: GetSecurityMonitoringSignalParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let signal_id = params.signal_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/signals/{signal_id}", + local_configuration.base_path, + signal_id = urlencode(signal_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a list of CSPM findings. + /// + /// ### Filtering + /// + /// Filters can be applied by appending query parameters to the URL. + /// + /// - Using a single filter: `?filter[attribute_key]=attribute_value` + /// - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...` + /// - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2` + /// + /// Here, `attribute_key` can be any of the filter keys described further below. + /// + /// Query parameters of type `integer` support comparison operators (`>`, `>=`, `<`, `<=`). This is particularly useful when filtering by `evaluation_changed_at` or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`. + /// + /// You can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` to filter for any non-AWS resources. + /// + /// The operator must come after the equal sign. For example, to filter with the `>=` operator, add the operator after the equal sign: `filter[evaluation_changed_at]=>=1678809373257`. + /// + /// Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed. + /// + /// ### Response + /// + /// The response includes an array of finding objects, pagination metadata, and a count of items that match the query. + /// + /// Each finding object contains the following: + /// + /// - The finding ID that can be used in a `GetFinding` request to retrieve the full finding details. + /// - Core attributes, including status, evaluation, high-level resource details, muted state, and rule details. + /// - `evaluation_changed_at` and `resource_discovery_date` time stamps. + /// - An array of associated tags. + /// + pub async fn list_findings( + &self, + params: ListFindingsParams, + ) -> Result, Error> + { + match self.list_findings_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a list of CSPM findings. + /// + /// ### Filtering + /// + /// Filters can be applied by appending query parameters to the URL. + /// + /// - Using a single filter: `?filter[attribute_key]=attribute_value` + /// - Chaining filters: `?filter[attribute_key]=attribute_value&filter[attribute_key]=attribute_value...` + /// - Filtering on tags: `?filter[tags]=tag_key:tag_value&filter[tags]=tag_key_2:tag_value_2` + /// + /// Here, `attribute_key` can be any of the filter keys described further below. + /// + /// Query parameters of type `integer` support comparison operators (`>`, `>=`, `<`, `<=`). This is particularly useful when filtering by `evaluation_changed_at` or `resource_discovery_timestamp`. For example: `?filter[evaluation_changed_at]=>20123123121`. + /// + /// You can also use the negation operator on strings. For example, use `filter[resource_type]=-aws*` to filter for any non-AWS resources. + /// + /// The operator must come after the equal sign. For example, to filter with the `>=` operator, add the operator after the equal sign: `filter[evaluation_changed_at]=>=1678809373257`. + /// + /// Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed. + /// + /// ### Response + /// + /// The response includes an array of finding objects, pagination metadata, and a count of items that match the query. + /// + /// Each finding object contains the following: + /// + /// - The finding ID that can be used in a `GetFinding` request to retrieve the full finding details. + /// - Core attributes, including status, evaluation, high-level resource details, muted state, and rule details. + /// - `evaluation_changed_at` and `resource_discovery_date` time stamps. + /// - An array of associated tags. + /// + pub async fn list_findings_with_http_info( + &self, + params: ListFindingsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_limit = params.page_limit; + let snapshot_timestamp = params.snapshot_timestamp; + let page_cursor = params.page_cursor; + let filter_tags = params.filter_tags; + let filter_evaluation_changed_at = params.filter_evaluation_changed_at; + let filter_muted = params.filter_muted; + let filter_rule_id = params.filter_rule_id; + let filter_rule_name = params.filter_rule_name; + let filter_resource_type = params.filter_resource_type; + let filter_discovery_timestamp = params.filter_discovery_timestamp; + let filter_evaluation = params.filter_evaluation; + let filter_status = params.filter_status; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/posture_management/findings", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + if let Some(ref local_str) = snapshot_timestamp { + local_req_builder = + local_req_builder.query(&[("snapshot_timestamp", &local_str.to_string())]); }; if let Some(ref local_str) = page_cursor { local_req_builder = - local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_tags { + local_req_builder = + local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_evaluation_changed_at { + local_req_builder = local_req_builder + .query(&[("filter[evaluation_changed_at]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_muted { + local_req_builder = + local_req_builder.query(&[("filter[muted]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_id { + local_req_builder = + local_req_builder.query(&[("filter[rule_id]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_name { + local_req_builder = + local_req_builder.query(&[("filter[rule_name]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_resource_type { + local_req_builder = + local_req_builder.query(&[("filter[resource_type]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_discovery_timestamp { + local_req_builder = + local_req_builder.query(&[("filter[discovery_timestamp]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_evaluation { + local_req_builder = + local_req_builder.query(&[("filter[evaluation]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_status { + local_req_builder = + local_req_builder.query(&[("filter[status]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the list of configured security filters with their definitions. + pub async fn list_security_filters( + &self, + ) -> Result< + Option, + Error, + > { + match self.list_security_filters_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the list of configured security filters with their definitions. + pub async fn list_security_filters_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/configuration/security_filters", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List rules. + pub async fn list_security_monitoring_rules( + &self, + params: ListSecurityMonitoringRulesParams, + ) -> Result< + Option, + Error, + > { + match self + .list_security_monitoring_rules_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List rules. + pub async fn list_security_monitoring_rules_with_http_info( + &self, + params: ListSecurityMonitoringRulesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/rules", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// The list endpoint returns security signals that match a search query. + /// Both this endpoint and the POST endpoint can be used interchangeably when listing + /// security signals. + pub async fn list_security_monitoring_signals( + &self, + params: ListSecurityMonitoringSignalsParams, + ) -> Result< + Option, + Error, + > { + match self + .list_security_monitoring_signals_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// The list endpoint returns security signals that match a search query. + /// Both this endpoint and the POST endpoint can be used interchangeably when listing + /// security signals. + pub async fn list_security_monitoring_signals_with_http_info( + &self, + params: ListSecurityMonitoringSignalsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_query = params.filter_query; + let filter_from = params.filter_from; + let filter_to = params.filter_to; + let sort = params.sort; + let page_cursor = params.page_cursor; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/signals", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_query { + local_req_builder = + local_req_builder.query(&[("filter[query]", &local_str.to_string())]); }; - if let Some(ref local_str) = filter_tags { + if let Some(ref local_str) = filter_from { local_req_builder = - local_req_builder.query(&[("filter[tags]", &local_str.to_string())]); + local_req_builder.query(&[("filter[from]", &local_str.to_string())]); }; - if let Some(ref local_str) = filter_evaluation_changed_at { - local_req_builder = local_req_builder - .query(&[("filter[evaluation_changed_at]", &local_str.to_string())]); + if let Some(ref local_str) = filter_to { + local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); }; - if let Some(ref local_str) = filter_muted { - local_req_builder = - local_req_builder.query(&[("filter[muted]", &local_str.to_string())]); + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); }; - if let Some(ref local_str) = filter_rule_id { + if let Some(ref local_str) = page_cursor { local_req_builder = - local_req_builder.query(&[("filter[rule_id]", &local_str.to_string())]); + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); }; - if let Some(ref local_str) = filter_rule_name { - local_req_builder = - local_req_builder.query(&[("filter[rule_name]", &local_str.to_string())]); + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); }; - if let Some(ref local_str) = filter_resource_type { + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { local_req_builder = - local_req_builder.query(&[("filter[resource_type]", &local_str.to_string())]); + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); }; - if let Some(ref local_str) = filter_discovery_timestamp { - local_req_builder = - local_req_builder.query(&[("filter[discovery_timestamp]", &local_str.to_string())]); + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); }; - if let Some(ref local_str) = filter_evaluation { + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SecurityMonitoringSignalsListResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Mute or unmute findings. + pub async fn mute_findings( + &self, + params: MuteFindingsParams, + ) -> Result, Error> + { + match self.mute_findings_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Mute or unmute findings. + pub async fn mute_findings_with_http_info( + &self, + params: MuteFindingsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/posture_management/findings", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { local_req_builder = - local_req_builder.query(&[("filter[evaluation]", &local_str.to_string())]); + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); }; - if let Some(ref local_str) = filter_status { + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns security signals that match a search query. + /// Both this endpoint and the GET endpoint can be used interchangeably for listing + /// security signals. + pub async fn search_security_monitoring_signals( + &self, + params: SearchSecurityMonitoringSignalsParams, + ) -> Result< + Option, + Error, + > { + match self + .search_security_monitoring_signals_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns security signals that match a search query. + /// Both this endpoint and the GET endpoint can be used interchangeably for listing + /// security signals. + pub async fn search_security_monitoring_signals_with_http_info( + &self, + params: SearchSecurityMonitoringSignalsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/signals/search", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { local_req_builder = - local_req_builder.query(&[("filter[status]", &local_str.to_string())]); + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); }; + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SecurityMonitoringSignalsListResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a specific security filter. + /// Returns the security filter object when the request is successful. + pub async fn update_security_filter( + &self, + params: UpdateSecurityFilterParams, + ) -> Result< + Option, + Error, + > { + match self.update_security_filter_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a specific security filter. + /// Returns the security filter object when the request is successful. + pub async fn update_security_filter_with_http_info( + &self, + params: UpdateSecurityFilterParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let security_filter_id = params.security_filter_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}", + local_configuration.base_path, + security_filter_id = urlencode(security_filter_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + // build user agent if let Some(ref local_user_agent) = local_configuration.user_agent { local_req_builder = @@ -356,6 +1996,13 @@ impl SecurityMonitoringAPI { local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); }; + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + let local_req = local_req_builder.build()?; let local_resp = local_client.execute(local_req).await?; @@ -363,7 +2010,7 @@ impl SecurityMonitoringAPI { let local_content = local_resp.text().await?; if !local_status.is_client_error() && !local_status.is_server_error() { - let local_entity: Option = + let local_entity: Option = serde_json::from_str(&local_content).ok(); Ok(ResponseContent { status: local_status, @@ -371,7 +2018,8 @@ impl SecurityMonitoringAPI { entity: local_entity, }) } else { - let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_entity: Option = + serde_json::from_str(&local_content).ok(); let local_error = ResponseContent { status: local_status, content: local_content, @@ -381,43 +2029,50 @@ impl SecurityMonitoringAPI { } } - /// Mute or unmute a specific finding. - /// The API returns the updated finding object when the request is successful. - pub async fn update_finding( + /// Update an existing rule. When updating `cases`, `queries` or `options`, the whole field + /// must be included. For example, when modifying a query all queries must be included. + /// Default rules can only be updated to be enabled and to change notifications. + pub async fn update_security_monitoring_rule( &self, - params: UpdateFindingParams, - ) -> Result, Error> - { - match self.update_finding_with_http_info(params).await { + params: UpdateSecurityMonitoringRuleParams, + ) -> Result< + Option, + Error, + > { + match self + .update_security_monitoring_rule_with_http_info(params) + .await + { Ok(response_content) => Ok(response_content.entity), Err(err) => Err(err), } } - /// Mute or unmute a specific finding. - /// The API returns the updated finding object when the request is successful. - pub async fn update_finding_with_http_info( + /// Update an existing rule. When updating `cases`, `queries` or `options`, the whole field + /// must be included. For example, when modifying a query all queries must be included. + /// Default rules can only be updated to be enabled and to change notifications. + pub async fn update_security_monitoring_rule_with_http_info( &self, - params: UpdateFindingParams, + params: UpdateSecurityMonitoringRuleParams, ) -> Result< - ResponseContent, - Error, + ResponseContent, + Error, > { let local_configuration = &self.config; // unbox and build parameters - let finding_id = params.finding_id; + let rule_id = params.rule_id; let body = params.body; let local_client = &local_configuration.client; let local_uri_str = format!( - "{}/api/v2/posture_management/findings/{finding_id}", + "{}/api/v2/security_monitoring/rules/{rule_id}", local_configuration.base_path, - finding_id = urlencode(finding_id) + rule_id = urlencode(rule_id) ); let mut local_req_builder = - local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); // build user agent if let Some(ref local_user_agent) = local_configuration.user_agent { @@ -447,7 +2102,7 @@ impl SecurityMonitoringAPI { let local_content = local_resp.text().await?; if !local_status.is_client_error() && !local_status.is_server_error() { - let local_entity: Option = + let local_entity: Option = serde_json::from_str(&local_content).ok(); Ok(ResponseContent { status: local_status, @@ -455,7 +2110,7 @@ impl SecurityMonitoringAPI { entity: local_entity, }) } else { - let local_entity: Option = + let local_entity: Option = serde_json::from_str(&local_content).ok(); let local_error = ResponseContent { status: local_status, diff --git a/src/datadogV2/api/api_sensitive_data_scanner.rs b/src/datadogV2/api/api_sensitive_data_scanner.rs new file mode 100644 index 000000000..d6c505ff6 --- /dev/null +++ b/src/datadogV2/api/api_sensitive_data_scanner.rs @@ -0,0 +1,945 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateScanningGroupParams is a struct for passing parameters to the method [`CreateScanningGroup`] +#[derive(Clone, Debug)] +pub struct CreateScanningGroupParams { + pub body: crate::datadogV2::model::SensitiveDataScannerGroupCreateRequest, +} + +/// CreateScanningRuleParams is a struct for passing parameters to the method [`CreateScanningRule`] +#[derive(Clone, Debug)] +pub struct CreateScanningRuleParams { + pub body: crate::datadogV2::model::SensitiveDataScannerRuleCreateRequest, +} + +/// DeleteScanningGroupParams is a struct for passing parameters to the method [`DeleteScanningGroup`] +#[derive(Clone, Debug)] +pub struct DeleteScanningGroupParams { + /// The ID of a group of rules. + pub group_id: String, + pub body: crate::datadogV2::model::SensitiveDataScannerGroupDeleteRequest, +} + +/// DeleteScanningRuleParams is a struct for passing parameters to the method [`DeleteScanningRule`] +#[derive(Clone, Debug)] +pub struct DeleteScanningRuleParams { + /// The ID of the rule. + pub rule_id: String, + pub body: crate::datadogV2::model::SensitiveDataScannerRuleDeleteRequest, +} + +/// ReorderScanningGroupsParams is a struct for passing parameters to the method [`ReorderScanningGroups`] +#[derive(Clone, Debug)] +pub struct ReorderScanningGroupsParams { + pub body: crate::datadogV2::model::SensitiveDataScannerConfigRequest, +} + +/// UpdateScanningGroupParams is a struct for passing parameters to the method [`UpdateScanningGroup`] +#[derive(Clone, Debug)] +pub struct UpdateScanningGroupParams { + /// The ID of a group of rules. + pub group_id: String, + pub body: crate::datadogV2::model::SensitiveDataScannerGroupUpdateRequest, +} + +/// UpdateScanningRuleParams is a struct for passing parameters to the method [`UpdateScanningRule`] +#[derive(Clone, Debug)] +pub struct UpdateScanningRuleParams { + /// The ID of the rule. + pub rule_id: String, + pub body: crate::datadogV2::model::SensitiveDataScannerRuleUpdateRequest, +} + +/// CreateScanningGroupError is a struct for typed errors of method [`CreateScanningGroup`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateScanningGroupError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateScanningRuleError is a struct for typed errors of method [`CreateScanningRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateScanningRuleError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteScanningGroupError is a struct for typed errors of method [`DeleteScanningGroup`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteScanningGroupError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteScanningRuleError is a struct for typed errors of method [`DeleteScanningRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteScanningRuleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListScanningGroupsError is a struct for typed errors of method [`ListScanningGroups`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListScanningGroupsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListStandardPatternsError is a struct for typed errors of method [`ListStandardPatterns`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListStandardPatternsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ReorderScanningGroupsError is a struct for typed errors of method [`ReorderScanningGroups`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ReorderScanningGroupsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateScanningGroupError is a struct for typed errors of method [`UpdateScanningGroup`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateScanningGroupError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateScanningRuleError is a struct for typed errors of method [`UpdateScanningRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateScanningRuleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct SensitiveDataScannerAPI { + config: configuration::Configuration, +} + +impl Default for SensitiveDataScannerAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl SensitiveDataScannerAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a scanning group. + /// The request MAY include a configuration relationship. + /// A rules relationship can be omitted entirely, but if it is included it MUST be + /// null or an empty array (rules cannot be created at the same time). + /// The new group will be ordered last within the configuration. + pub async fn create_scanning_group( + &self, + params: CreateScanningGroupParams, + ) -> Result< + Option, + Error, + > { + match self.create_scanning_group_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a scanning group. + /// The request MAY include a configuration relationship. + /// A rules relationship can be omitted entirely, but if it is included it MUST be + /// null or an empty array (rules cannot be created at the same time). + /// The new group will be ordered last within the configuration. + pub async fn create_scanning_group_with_http_info( + &self, + params: CreateScanningGroupParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config/groups", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerCreateGroupResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create a scanning rule in a sensitive data scanner group, ordered last. + /// The posted rule MUST include a group relationship. + /// It MUST include either a standard_pattern relationship or a regex attribute, but not both. + /// If included_attributes is empty or missing, we will scan all attributes except + /// excluded_attributes. If both are missing, we will scan the whole event. + pub async fn create_scanning_rule( + &self, + params: CreateScanningRuleParams, + ) -> Result< + Option, + Error, + > { + match self.create_scanning_rule_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a scanning rule in a sensitive data scanner group, ordered last. + /// The posted rule MUST include a group relationship. + /// It MUST include either a standard_pattern relationship or a regex attribute, but not both. + /// If included_attributes is empty or missing, we will scan all attributes except + /// excluded_attributes. If both are missing, we will scan the whole event. + pub async fn create_scanning_rule_with_http_info( + &self, + params: CreateScanningRuleParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config/rules", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerCreateRuleResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a given group. + pub async fn delete_scanning_group( + &self, + params: DeleteScanningGroupParams, + ) -> Result< + Option, + Error, + > { + match self.delete_scanning_group_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a given group. + pub async fn delete_scanning_group_with_http_info( + &self, + params: DeleteScanningGroupParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let group_id = params.group_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config/groups/{group_id}", + local_configuration.base_path, + group_id = urlencode(group_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerGroupDeleteResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a given rule. + pub async fn delete_scanning_rule( + &self, + params: DeleteScanningRuleParams, + ) -> Result< + Option, + Error, + > { + match self.delete_scanning_rule_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a given rule. + pub async fn delete_scanning_rule_with_http_info( + &self, + params: DeleteScanningRuleParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let rule_id = params.rule_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config/rules/{rule_id}", + local_configuration.base_path, + rule_id = urlencode(rule_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerRuleDeleteResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List all the Scanning groups in your organization. + pub async fn list_scanning_groups( + &self, + ) -> Result< + Option, + Error, + > { + match self.list_scanning_groups_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List all the Scanning groups in your organization. + pub async fn list_scanning_groups_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerGetConfigResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns all standard patterns. + pub async fn list_standard_patterns( + &self, + ) -> Result< + Option, + Error, + > { + match self.list_standard_patterns_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns all standard patterns. + pub async fn list_standard_patterns_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config/standard-patterns", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerStandardPatternsResponseData, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Reorder the list of groups. + pub async fn reorder_scanning_groups( + &self, + params: ReorderScanningGroupsParams, + ) -> Result< + Option, + Error, + > { + match self.reorder_scanning_groups_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Reorder the list of groups. + pub async fn reorder_scanning_groups_with_http_info( + &self, + params: ReorderScanningGroupsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerReorderGroupsResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a group, including the order of the rules. + /// Rules within the group are reordered by including a rules relationship. If the rules + /// relationship is present, its data section MUST contain linkages for all of the rules + /// currently in the group, and MUST NOT contain any others. + pub async fn update_scanning_group( + &self, + params: UpdateScanningGroupParams, + ) -> Result< + Option, + Error, + > { + match self.update_scanning_group_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a group, including the order of the rules. + /// Rules within the group are reordered by including a rules relationship. If the rules + /// relationship is present, its data section MUST contain linkages for all of the rules + /// currently in the group, and MUST NOT contain any others. + pub async fn update_scanning_group_with_http_info( + &self, + params: UpdateScanningGroupParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let group_id = params.group_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config/groups/{group_id}", + local_configuration.base_path, + group_id = urlencode(group_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerGroupUpdateResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a scanning rule. + /// The request body MUST NOT include a standard_pattern relationship, as that relationship + /// is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern + /// relationship will also result in an error. + pub async fn update_scanning_rule( + &self, + params: UpdateScanningRuleParams, + ) -> Result< + Option, + Error, + > { + match self.update_scanning_rule_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a scanning rule. + /// The request body MUST NOT include a standard_pattern relationship, as that relationship + /// is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern + /// relationship will also result in an error. + pub async fn update_scanning_rule_with_http_info( + &self, + params: UpdateScanningRuleParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let rule_id = params.rule_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/sensitive-data-scanner/config/rules/{rule_id}", + local_configuration.base_path, + rule_id = urlencode(rule_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option< + crate::datadogV2::model::SensitiveDataScannerRuleUpdateResponse, + > = serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_service_accounts.rs b/src/datadogV2/api/api_service_accounts.rs new file mode 100644 index 000000000..e601ada72 --- /dev/null +++ b/src/datadogV2/api/api_service_accounts.rs @@ -0,0 +1,674 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateServiceAccountParams is a struct for passing parameters to the method [`CreateServiceAccount`] +#[derive(Clone, Debug)] +pub struct CreateServiceAccountParams { + pub body: crate::datadogV2::model::ServiceAccountCreateRequest, +} + +/// CreateServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`CreateServiceAccountApplicationKey`] +#[derive(Clone, Debug)] +pub struct CreateServiceAccountApplicationKeyParams { + /// The ID of the service account. + pub service_account_id: String, + pub body: crate::datadogV2::model::ApplicationKeyCreateRequest, +} + +/// DeleteServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`DeleteServiceAccountApplicationKey`] +#[derive(Clone, Debug)] +pub struct DeleteServiceAccountApplicationKeyParams { + /// The ID of the service account. + pub service_account_id: String, + /// The ID of the application key. + pub app_key_id: String, +} + +/// GetServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`GetServiceAccountApplicationKey`] +#[derive(Clone, Debug)] +pub struct GetServiceAccountApplicationKeyParams { + /// The ID of the service account. + pub service_account_id: String, + /// The ID of the application key. + pub app_key_id: String, +} + +/// ListServiceAccountApplicationKeysParams is a struct for passing parameters to the method [`ListServiceAccountApplicationKeys`] +#[derive(Clone, Debug)] +pub struct ListServiceAccountApplicationKeysParams { + /// The ID of the service account. + pub service_account_id: String, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// Application key attribute used to sort results. Sort order is ascending + /// by default. In order to specify a descending sort, prefix the + /// attribute with a minus sign. + pub sort: Option, + /// Filter application keys by the specified string. + pub filter: Option, + /// Only include application keys created on or after the specified date. + pub filter_created_at_start: Option, + /// Only include application keys created on or before the specified date. + pub filter_created_at_end: Option, +} + +/// UpdateServiceAccountApplicationKeyParams is a struct for passing parameters to the method [`UpdateServiceAccountApplicationKey`] +#[derive(Clone, Debug)] +pub struct UpdateServiceAccountApplicationKeyParams { + /// The ID of the service account. + pub service_account_id: String, + /// The ID of the application key. + pub app_key_id: String, + pub body: crate::datadogV2::model::ApplicationKeyUpdateRequest, +} + +/// CreateServiceAccountError is a struct for typed errors of method [`CreateServiceAccount`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateServiceAccountError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateServiceAccountApplicationKeyError is a struct for typed errors of method [`CreateServiceAccountApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateServiceAccountApplicationKeyError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteServiceAccountApplicationKeyError is a struct for typed errors of method [`DeleteServiceAccountApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteServiceAccountApplicationKeyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetServiceAccountApplicationKeyError is a struct for typed errors of method [`GetServiceAccountApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetServiceAccountApplicationKeyError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListServiceAccountApplicationKeysError is a struct for typed errors of method [`ListServiceAccountApplicationKeys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListServiceAccountApplicationKeysError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateServiceAccountApplicationKeyError is a struct for typed errors of method [`UpdateServiceAccountApplicationKey`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateServiceAccountApplicationKeyError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct ServiceAccountsAPI { + config: configuration::Configuration, +} + +impl Default for ServiceAccountsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl ServiceAccountsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a service account for your organization. + pub async fn create_service_account( + &self, + params: CreateServiceAccountParams, + ) -> Result, Error> + { + match self.create_service_account_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a service account for your organization. + pub async fn create_service_account_with_http_info( + &self, + params: CreateServiceAccountParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/service_accounts", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Create an application key for this service account. + pub async fn create_service_account_application_key( + &self, + params: CreateServiceAccountApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self + .create_service_account_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create an application key for this service account. + pub async fn create_service_account_application_key_with_http_info( + &self, + params: CreateServiceAccountApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let service_account_id = params.service_account_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/service_accounts/{service_account_id}/application_keys", + local_configuration.base_path, + service_account_id = urlencode(service_account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete an application key owned by this service account. + pub async fn delete_service_account_application_key( + &self, + params: DeleteServiceAccountApplicationKeyParams, + ) -> Result, Error> { + match self + .delete_service_account_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete an application key owned by this service account. + pub async fn delete_service_account_application_key_with_http_info( + &self, + params: DeleteServiceAccountApplicationKeyParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let service_account_id = params.service_account_id; + let app_key_id = params.app_key_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}", + local_configuration.base_path, + service_account_id = urlencode(service_account_id), + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get an application key owned by this service account. + pub async fn get_service_account_application_key( + &self, + params: GetServiceAccountApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self + .get_service_account_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get an application key owned by this service account. + pub async fn get_service_account_application_key_with_http_info( + &self, + params: GetServiceAccountApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let service_account_id = params.service_account_id; + let app_key_id = params.app_key_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}", + local_configuration.base_path, + service_account_id = urlencode(service_account_id), + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List all application keys available for this service account. + pub async fn list_service_account_application_keys( + &self, + params: ListServiceAccountApplicationKeysParams, + ) -> Result< + Option, + Error, + > { + match self + .list_service_account_application_keys_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List all application keys available for this service account. + pub async fn list_service_account_application_keys_with_http_info( + &self, + params: ListServiceAccountApplicationKeysParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let service_account_id = params.service_account_id; + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter = params.filter; + let filter_created_at_start = params.filter_created_at_start; + let filter_created_at_end = params.filter_created_at_end; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/service_accounts/{service_account_id}/application_keys", + local_configuration.base_path, + service_account_id = urlencode(service_account_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_start { + local_req_builder = + local_req_builder.query(&[("filter[created_at][start]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_created_at_end { + local_req_builder = + local_req_builder.query(&[("filter[created_at][end]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit an application key owned by this service account. + pub async fn update_service_account_application_key( + &self, + params: UpdateServiceAccountApplicationKeyParams, + ) -> Result< + Option, + Error, + > { + match self + .update_service_account_application_key_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit an application key owned by this service account. + pub async fn update_service_account_application_key_with_http_info( + &self, + params: UpdateServiceAccountApplicationKeyParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let service_account_id = params.service_account_id; + let app_key_id = params.app_key_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}", + local_configuration.base_path, + service_account_id = urlencode(service_account_id), + app_key_id = urlencode(app_key_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_service_definition.rs b/src/datadogV2/api/api_service_definition.rs new file mode 100644 index 000000000..b5509d526 --- /dev/null +++ b/src/datadogV2/api/api_service_definition.rs @@ -0,0 +1,434 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateOrUpdateServiceDefinitionsParams is a struct for passing parameters to the method [`CreateOrUpdateServiceDefinitions`] +#[derive(Clone, Debug)] +pub struct CreateOrUpdateServiceDefinitionsParams { + /// Service Definition YAML/JSON. + pub body: crate::datadogV2::model::ServiceDefinitionsCreateRequest, +} + +/// DeleteServiceDefinitionParams is a struct for passing parameters to the method [`DeleteServiceDefinition`] +#[derive(Clone, Debug)] +pub struct DeleteServiceDefinitionParams { + /// The name of the service. + pub service_name: String, +} + +/// GetServiceDefinitionParams is a struct for passing parameters to the method [`GetServiceDefinition`] +#[derive(Clone, Debug)] +pub struct GetServiceDefinitionParams { + /// The name of the service. + pub service_name: String, + /// The schema version desired in the response. + pub schema_version: Option, +} + +/// ListServiceDefinitionsParams is a struct for passing parameters to the method [`ListServiceDefinitions`] +#[derive(Clone, Debug)] +pub struct ListServiceDefinitionsParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// The schema version desired in the response. + pub schema_version: Option, +} + +/// CreateOrUpdateServiceDefinitionsError is a struct for typed errors of method [`CreateOrUpdateServiceDefinitions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOrUpdateServiceDefinitionsError { + Status400(Option), + Status403(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteServiceDefinitionError is a struct for typed errors of method [`DeleteServiceDefinition`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteServiceDefinitionError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetServiceDefinitionError is a struct for typed errors of method [`GetServiceDefinition`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetServiceDefinitionError { + Status400(Option), + Status403(Option), + Status404(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListServiceDefinitionsError is a struct for typed errors of method [`ListServiceDefinitions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListServiceDefinitionsError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct ServiceDefinitionAPI { + config: configuration::Configuration, +} + +impl Default for ServiceDefinitionAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl ServiceDefinitionAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create or update service definition in the Datadog Service Catalog. + pub async fn create_or_update_service_definitions( + &self, + params: CreateOrUpdateServiceDefinitionsParams, + ) -> Result< + Option, + Error, + > { + match self + .create_or_update_service_definitions_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create or update service definition in the Datadog Service Catalog. + pub async fn create_or_update_service_definitions_with_http_info( + &self, + params: CreateOrUpdateServiceDefinitionsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/services/definitions", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Delete a single service definition in the Datadog Service Catalog. + pub async fn delete_service_definition( + &self, + params: DeleteServiceDefinitionParams, + ) -> Result, Error> { + match self.delete_service_definition_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Delete a single service definition in the Datadog Service Catalog. + pub async fn delete_service_definition_with_http_info( + &self, + params: DeleteServiceDefinitionParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let service_name = params.service_name; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/services/definitions/{service_name}", + local_configuration.base_path, + service_name = urlencode(service_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a single service definition from the Datadog Service Catalog. + pub async fn get_service_definition( + &self, + params: GetServiceDefinitionParams, + ) -> Result< + Option, + Error, + > { + match self.get_service_definition_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a single service definition from the Datadog Service Catalog. + pub async fn get_service_definition_with_http_info( + &self, + params: GetServiceDefinitionParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let service_name = params.service_name; + let schema_version = params.schema_version; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/services/definitions/{service_name}", + local_configuration.base_path, + service_name = urlencode(service_name) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = schema_version { + local_req_builder = + local_req_builder.query(&[("schema_version", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a list of all service definitions from the Datadog Service Catalog. + pub async fn list_service_definitions( + &self, + params: ListServiceDefinitionsParams, + ) -> Result< + Option, + Error, + > { + match self.list_service_definitions_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a list of all service definitions from the Datadog Service Catalog. + pub async fn list_service_definitions_with_http_info( + &self, + params: ListServiceDefinitionsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + let schema_version = params.schema_version; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/services/definitions", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = schema_version { + local_req_builder = + local_req_builder.query(&[("schema_version", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_service_scorecards.rs b/src/datadogV2/api/api_service_scorecards.rs new file mode 100644 index 000000000..f1d5727d3 --- /dev/null +++ b/src/datadogV2/api/api_service_scorecards.rs @@ -0,0 +1,625 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateScorecardOutcomesBatchParams is a struct for passing parameters to the method [`CreateScorecardOutcomesBatch`] +#[derive(Clone, Debug)] +pub struct CreateScorecardOutcomesBatchParams { + /// Set of scorecard outcomes. + pub body: crate::datadogV2::model::OutcomesBatchRequest, +} + +/// CreateScorecardRuleParams is a struct for passing parameters to the method [`CreateScorecardRule`] +#[derive(Clone, Debug)] +pub struct CreateScorecardRuleParams { + /// Rule attributes. + pub body: crate::datadogV2::model::CreateRuleRequest, +} + +/// DeleteScorecardRuleParams is a struct for passing parameters to the method [`DeleteScorecardRule`] +#[derive(Clone, Debug)] +pub struct DeleteScorecardRuleParams { + /// The ID of the rule/scorecard. + pub rule_id: String, +} + +/// ListScorecardOutcomesParams is a struct for passing parameters to the method [`ListScorecardOutcomes`] +#[derive(Clone, Debug)] +pub struct ListScorecardOutcomesParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, + /// Include related rule details in the response. + pub include: Option, + /// Return only specified values in the outcome attributes. + pub fields_outcome: Option, + /// Return only specified values in the included rule details. + pub fields_rule: Option, + /// Filter the outcomes on a specific service name. + pub filter_outcome_service_name: Option, + /// Filter the outcomes by a specific state. + pub filter_outcome_state: Option, + /// Filter outcomes on whether a rule is enabled/disabled. + pub filter_rule_enabled: Option, + /// Filter outcomes based on rule ID. + pub filter_rule_id: Option, + /// Filter outcomes based on rule name. + pub filter_rule_name: Option, +} + +/// ListScorecardRulesParams is a struct for passing parameters to the method [`ListScorecardRules`] +#[derive(Clone, Debug)] +pub struct ListScorecardRulesParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific offset to use as the beginning of the returned page. + pub page_offset: Option, + /// Include related scorecard details in the response. + pub include: Option, + /// Filter the rules on a rule ID. + pub filter_rule_id: Option, + /// Filter for enabled rules only. + pub filter_rule_enabled: Option, + /// Filter for custom rules only. + pub filter_rule_custom: Option, + /// Filter rules on the rule name. + pub filter_rule_name: Option, + /// Filter rules on the rule description. + pub filter_rule_description: Option, + /// Return only specific fields in the response for rule attributes. + pub fields_rule: Option, + /// Return only specific fields in the included response for scorecard attributes. + pub fields_scorecard: Option, +} + +/// CreateScorecardOutcomesBatchError is a struct for typed errors of method [`CreateScorecardOutcomesBatch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateScorecardOutcomesBatchError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateScorecardRuleError is a struct for typed errors of method [`CreateScorecardRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateScorecardRuleError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteScorecardRuleError is a struct for typed errors of method [`DeleteScorecardRule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteScorecardRuleError { + Status400(Option), + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListScorecardOutcomesError is a struct for typed errors of method [`ListScorecardOutcomes`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListScorecardOutcomesError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListScorecardRulesError is a struct for typed errors of method [`ListScorecardRules`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListScorecardRulesError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct ServiceScorecardsAPI { + config: configuration::Configuration, +} + +impl Default for ServiceScorecardsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl ServiceScorecardsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Sets multiple service-rule outcomes in a single batched request. + pub async fn create_scorecard_outcomes_batch( + &self, + params: CreateScorecardOutcomesBatchParams, + ) -> Result< + Option, + Error, + > { + match self + .create_scorecard_outcomes_batch_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Sets multiple service-rule outcomes in a single batched request. + pub async fn create_scorecard_outcomes_batch_with_http_info( + &self, + params: CreateScorecardOutcomesBatchParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/scorecard/outcomes/batch", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Creates a new rule. + pub async fn create_scorecard_rule( + &self, + params: CreateScorecardRuleParams, + ) -> Result, Error> + { + match self.create_scorecard_rule_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Creates a new rule. + pub async fn create_scorecard_rule_with_http_info( + &self, + params: CreateScorecardRuleParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/scorecard/rules", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Deletes a single rule. + pub async fn delete_scorecard_rule( + &self, + params: DeleteScorecardRuleParams, + ) -> Result, Error> { + match self.delete_scorecard_rule_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Deletes a single rule. + pub async fn delete_scorecard_rule_with_http_info( + &self, + params: DeleteScorecardRuleParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let rule_id = params.rule_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/scorecard/rules/{rule_id}", + local_configuration.base_path, + rule_id = urlencode(rule_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Fetches all rule outcomes. + pub async fn list_scorecard_outcomes( + &self, + params: ListScorecardOutcomesParams, + ) -> Result, Error> + { + match self.list_scorecard_outcomes_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Fetches all rule outcomes. + pub async fn list_scorecard_outcomes_with_http_info( + &self, + params: ListScorecardOutcomesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_offset = params.page_offset; + let include = params.include; + let fields_outcome = params.fields_outcome; + let fields_rule = params.fields_rule; + let filter_outcome_service_name = params.filter_outcome_service_name; + let filter_outcome_state = params.filter_outcome_state; + let filter_rule_enabled = params.filter_rule_enabled; + let filter_rule_id = params.filter_rule_id; + let filter_rule_name = params.filter_rule_name; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/scorecard/outcomes", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + if let Some(ref local_str) = fields_outcome { + local_req_builder = + local_req_builder.query(&[("fields[outcome]", &local_str.to_string())]); + }; + if let Some(ref local_str) = fields_rule { + local_req_builder = + local_req_builder.query(&[("fields[rule]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_outcome_service_name { + local_req_builder = local_req_builder + .query(&[("filter[outcome][service_name]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_outcome_state { + local_req_builder = + local_req_builder.query(&[("filter[outcome][state]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_enabled { + local_req_builder = + local_req_builder.query(&[("filter[rule][enabled]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_id { + local_req_builder = + local_req_builder.query(&[("filter[rule][id]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_name { + local_req_builder = + local_req_builder.query(&[("filter[rule][name]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Fetch all rules. + pub async fn list_scorecard_rules( + &self, + params: ListScorecardRulesParams, + ) -> Result, Error> + { + match self.list_scorecard_rules_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Fetch all rules. + pub async fn list_scorecard_rules_with_http_info( + &self, + params: ListScorecardRulesParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_offset = params.page_offset; + let include = params.include; + let filter_rule_id = params.filter_rule_id; + let filter_rule_enabled = params.filter_rule_enabled; + let filter_rule_custom = params.filter_rule_custom; + let filter_rule_name = params.filter_rule_name; + let filter_rule_description = params.filter_rule_description; + let fields_rule = params.fields_rule; + let fields_scorecard = params.fields_scorecard; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/scorecard/rules", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_offset { + local_req_builder = + local_req_builder.query(&[("page[offset]", &local_str.to_string())]); + }; + if let Some(ref local_str) = include { + local_req_builder = local_req_builder.query(&[("include", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_id { + local_req_builder = + local_req_builder.query(&[("filter[rule][id]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_enabled { + local_req_builder = + local_req_builder.query(&[("filter[rule][enabled]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_custom { + local_req_builder = + local_req_builder.query(&[("filter[rule][custom]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_name { + local_req_builder = + local_req_builder.query(&[("filter[rule][name]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_rule_description { + local_req_builder = + local_req_builder.query(&[("filter[rule][description]", &local_str.to_string())]); + }; + if let Some(ref local_str) = fields_rule { + local_req_builder = + local_req_builder.query(&[("fields[rule]", &local_str.to_string())]); + }; + if let Some(ref local_str) = fields_scorecard { + local_req_builder = + local_req_builder.query(&[("fields[scorecard]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_spans.rs b/src/datadogV2/api/api_spans.rs new file mode 100644 index 000000000..3a3ed6204 --- /dev/null +++ b/src/datadogV2/api/api_spans.rs @@ -0,0 +1,368 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// AggregateSpansParams is a struct for passing parameters to the method [`AggregateSpans`] +#[derive(Clone, Debug)] +pub struct AggregateSpansParams { + pub body: crate::datadogV2::model::SpansAggregateRequest, +} + +/// ListSpansParams is a struct for passing parameters to the method [`ListSpans`] +#[derive(Clone, Debug)] +pub struct ListSpansParams { + pub body: crate::datadogV2::model::SpansListRequest, +} + +/// ListSpansGetParams is a struct for passing parameters to the method [`ListSpansGet`] +#[derive(Clone, Debug)] +pub struct ListSpansGetParams { + /// Search query following spans syntax. + pub filter_query: Option, + /// Minimum timestamp for requested spans. Supports date-time ISO8601, date math, and regular timestamps (milliseconds). + pub filter_from: Option, + /// Maximum timestamp for requested spans. Supports date-time ISO8601, date math, and regular timestamps (milliseconds). + pub filter_to: Option, + /// Order of spans in results. + pub sort: Option, + /// List following results with a cursor provided in the previous query. + pub page_cursor: Option, + /// Maximum number of spans in the response. + pub page_limit: Option, +} + +/// AggregateSpansError is a struct for typed errors of method [`AggregateSpans`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AggregateSpansError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListSpansError is a struct for typed errors of method [`ListSpans`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListSpansError { + Status400(Option), + Status403(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListSpansGetError is a struct for typed errors of method [`ListSpansGet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListSpansGetError { + Status400(Option), + Status403(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct SpansAPI { + config: configuration::Configuration, +} + +impl Default for SpansAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl SpansAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// The API endpoint to aggregate spans into buckets and compute metrics and timeseries. + /// This endpoint is rate limited to `300` requests per hour. + pub async fn aggregate_spans( + &self, + params: AggregateSpansParams, + ) -> Result, Error> + { + match self.aggregate_spans_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// The API endpoint to aggregate spans into buckets and compute metrics and timeseries. + /// This endpoint is rate limited to `300` requests per hour. + pub async fn aggregate_spans_with_http_info( + &self, + params: AggregateSpansParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/spans/analytics/aggregate", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns spans that match a span search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to build complex spans filtering and search. + /// This endpoint is rate limited to `300` requests per hour. + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api + pub async fn list_spans( + &self, + params: ListSpansParams, + ) -> Result, Error> { + match self.list_spans_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns spans that match a span search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to build complex spans filtering and search. + /// This endpoint is rate limited to `300` requests per hour. + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api + pub async fn list_spans_with_http_info( + &self, + params: ListSpansParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/spans/events/search", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// List endpoint returns spans that match a span search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to see your latest spans. + /// This endpoint is rate limited to `300` requests per hour. + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api + pub async fn list_spans_get( + &self, + params: ListSpansGetParams, + ) -> Result, Error> { + match self.list_spans_get_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// List endpoint returns spans that match a span search query. + /// [Results are paginated][1]. + /// + /// Use this endpoint to see your latest spans. + /// This endpoint is rate limited to `300` requests per hour. + /// + /// [1]: /logs/guide/collect-multiple-logs-with-pagination?tab=v2api + pub async fn list_spans_get_with_http_info( + &self, + params: ListSpansGetParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let filter_query = params.filter_query; + let filter_from = params.filter_from; + let filter_to = params.filter_to; + let sort = params.sort; + let page_cursor = params.page_cursor; + let page_limit = params.page_limit; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/spans/events", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = filter_query { + local_req_builder = + local_req_builder.query(&[("filter[query]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_from { + local_req_builder = + local_req_builder.query(&[("filter[from]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_to { + local_req_builder = local_req_builder.query(&[("filter[to]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_cursor { + local_req_builder = + local_req_builder.query(&[("page[cursor]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_limit { + local_req_builder = local_req_builder.query(&[("page[limit]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_spans_metrics.rs b/src/datadogV2/api/api_spans_metrics.rs index 96867fb22..203f42fe6 100644 --- a/src/datadogV2/api/api_spans_metrics.rs +++ b/src/datadogV2/api/api_spans_metrics.rs @@ -7,28 +7,28 @@ use reqwest; use serde::{Deserialize, Serialize}; /// CreateSpansMetricParams is a struct for passing parameters to the method [`CreateSpansMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct CreateSpansMetricParams { /// The definition of the new span-based metric. pub body: crate::datadogV2::model::SpansMetricCreateRequest, } /// DeleteSpansMetricParams is a struct for passing parameters to the method [`DeleteSpansMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct DeleteSpansMetricParams { /// The name of the span-based metric. pub metric_id: String, } /// GetSpansMetricParams is a struct for passing parameters to the method [`GetSpansMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetSpansMetricParams { /// The name of the span-based metric. pub metric_id: String, } /// UpdateSpansMetricParams is a struct for passing parameters to the method [`UpdateSpansMetric`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct UpdateSpansMetricParams { /// The name of the span-based metric. pub metric_id: String, diff --git a/src/datadogV2/api/api_synthetics.rs b/src/datadogV2/api/api_synthetics.rs index 0c359b549..de26878c1 100644 --- a/src/datadogV2/api/api_synthetics.rs +++ b/src/datadogV2/api/api_synthetics.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// SetOnDemandConcurrencyCapParams is a struct for passing parameters to the method [`SetOnDemandConcurrencyCap`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct SetOnDemandConcurrencyCapParams { /// . pub body: crate::datadogV2::model::OnDemandConcurrencyCapAttributes, diff --git a/src/datadogV2/api/api_teams.rs b/src/datadogV2/api/api_teams.rs new file mode 100644 index 000000000..d2424f4d8 --- /dev/null +++ b/src/datadogV2/api/api_teams.rs @@ -0,0 +1,1726 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateTeamParams is a struct for passing parameters to the method [`CreateTeam`] +#[derive(Clone, Debug)] +pub struct CreateTeamParams { + pub body: crate::datadogV2::model::TeamCreateRequest, +} + +/// CreateTeamLinkParams is a struct for passing parameters to the method [`CreateTeamLink`] +#[derive(Clone, Debug)] +pub struct CreateTeamLinkParams { + /// None + pub team_id: String, + pub body: crate::datadogV2::model::TeamLinkCreateRequest, +} + +/// CreateTeamMembershipParams is a struct for passing parameters to the method [`CreateTeamMembership`] +#[derive(Clone, Debug)] +pub struct CreateTeamMembershipParams { + /// None + pub team_id: String, + pub body: crate::datadogV2::model::UserTeamRequest, +} + +/// DeleteTeamParams is a struct for passing parameters to the method [`DeleteTeam`] +#[derive(Clone, Debug)] +pub struct DeleteTeamParams { + /// None + pub team_id: String, +} + +/// DeleteTeamLinkParams is a struct for passing parameters to the method [`DeleteTeamLink`] +#[derive(Clone, Debug)] +pub struct DeleteTeamLinkParams { + /// None + pub team_id: String, + /// None + pub link_id: String, +} + +/// DeleteTeamMembershipParams is a struct for passing parameters to the method [`DeleteTeamMembership`] +#[derive(Clone, Debug)] +pub struct DeleteTeamMembershipParams { + /// None + pub team_id: String, + /// None + pub user_id: String, +} + +/// GetTeamParams is a struct for passing parameters to the method [`GetTeam`] +#[derive(Clone, Debug)] +pub struct GetTeamParams { + /// None + pub team_id: String, +} + +/// GetTeamLinkParams is a struct for passing parameters to the method [`GetTeamLink`] +#[derive(Clone, Debug)] +pub struct GetTeamLinkParams { + /// None + pub team_id: String, + /// None + pub link_id: String, +} + +/// GetTeamLinksParams is a struct for passing parameters to the method [`GetTeamLinks`] +#[derive(Clone, Debug)] +pub struct GetTeamLinksParams { + /// None + pub team_id: String, +} + +/// GetTeamMembershipsParams is a struct for passing parameters to the method [`GetTeamMemberships`] +#[derive(Clone, Debug)] +pub struct GetTeamMembershipsParams { + /// None + pub team_id: String, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// Specifies the order of returned team memberships + pub sort: Option, + /// Search query, can be user email or name + pub filter_keyword: Option, +} + +/// GetTeamPermissionSettingsParams is a struct for passing parameters to the method [`GetTeamPermissionSettings`] +#[derive(Clone, Debug)] +pub struct GetTeamPermissionSettingsParams { + /// None + pub team_id: String, +} + +/// GetUserMembershipsParams is a struct for passing parameters to the method [`GetUserMemberships`] +#[derive(Clone, Debug)] +pub struct GetUserMembershipsParams { + /// None + pub user_uuid: String, +} + +/// ListTeamsParams is a struct for passing parameters to the method [`ListTeams`] +#[derive(Clone, Debug)] +pub struct ListTeamsParams { + /// Specific page number to return. + pub page_number: Option, + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specifies the order of the returned teams + pub sort: Option, + /// Included related resources optionally requested. Allowed enum values: `team_links, user_team_permissions` + pub include: Option>, + /// Search query. Can be team name, team handle, or email of team member + pub filter_keyword: Option, + /// When true, only returns teams the current user belongs to + pub filter_me: Option, + /// List of fields that need to be fetched. + pub fields_team: Option>, +} + +/// UpdateTeamParams is a struct for passing parameters to the method [`UpdateTeam`] +#[derive(Clone, Debug)] +pub struct UpdateTeamParams { + /// None + pub team_id: String, + pub body: crate::datadogV2::model::TeamUpdateRequest, +} + +/// UpdateTeamLinkParams is a struct for passing parameters to the method [`UpdateTeamLink`] +#[derive(Clone, Debug)] +pub struct UpdateTeamLinkParams { + /// None + pub team_id: String, + /// None + pub link_id: String, + pub body: crate::datadogV2::model::TeamLinkCreateRequest, +} + +/// UpdateTeamMembershipParams is a struct for passing parameters to the method [`UpdateTeamMembership`] +#[derive(Clone, Debug)] +pub struct UpdateTeamMembershipParams { + /// None + pub team_id: String, + /// None + pub user_id: String, + pub body: crate::datadogV2::model::UserTeamUpdateRequest, +} + +/// UpdateTeamPermissionSettingParams is a struct for passing parameters to the method [`UpdateTeamPermissionSetting`] +#[derive(Clone, Debug)] +pub struct UpdateTeamPermissionSettingParams { + /// None + pub team_id: String, + /// None + pub action: String, + pub body: crate::datadogV2::model::TeamPermissionSettingUpdateRequest, +} + +/// CreateTeamError is a struct for typed errors of method [`CreateTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateTeamError { + Status403(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateTeamLinkError is a struct for typed errors of method [`CreateTeamLink`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateTeamLinkError { + Status403(Option), + Status404(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// CreateTeamMembershipError is a struct for typed errors of method [`CreateTeamMembership`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateTeamMembershipError { + Status403(Option), + Status404(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteTeamError is a struct for typed errors of method [`DeleteTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteTeamError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteTeamLinkError is a struct for typed errors of method [`DeleteTeamLink`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteTeamLinkError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DeleteTeamMembershipError is a struct for typed errors of method [`DeleteTeamMembership`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteTeamMembershipError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetTeamError is a struct for typed errors of method [`GetTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetTeamLinkError is a struct for typed errors of method [`GetTeamLink`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamLinkError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetTeamLinksError is a struct for typed errors of method [`GetTeamLinks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamLinksError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetTeamMembershipsError is a struct for typed errors of method [`GetTeamMemberships`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamMembershipsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetTeamPermissionSettingsError is a struct for typed errors of method [`GetTeamPermissionSettings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetTeamPermissionSettingsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetUserMembershipsError is a struct for typed errors of method [`GetUserMemberships`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserMembershipsError { + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListTeamsError is a struct for typed errors of method [`ListTeams`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListTeamsError { + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateTeamError is a struct for typed errors of method [`UpdateTeam`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateTeamError { + Status400(Option), + Status403(Option), + Status404(Option), + Status409(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateTeamLinkError is a struct for typed errors of method [`UpdateTeamLink`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateTeamLinkError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateTeamMembershipError is a struct for typed errors of method [`UpdateTeamMembership`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateTeamMembershipError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateTeamPermissionSettingError is a struct for typed errors of method [`UpdateTeamPermissionSetting`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateTeamPermissionSettingError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct TeamsAPI { + config: configuration::Configuration, +} + +impl Default for TeamsAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl TeamsAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a new team. + /// User IDs passed through the `users` relationship field are added to the team. + pub async fn create_team( + &self, + params: CreateTeamParams, + ) -> Result, Error> { + match self.create_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a new team. + /// User IDs passed through the `users` relationship field are added to the team. + pub async fn create_team_with_http_info( + &self, + params: CreateTeamParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/team", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Add a new link to a team. + pub async fn create_team_link( + &self, + params: CreateTeamLinkParams, + ) -> Result, Error> { + match self.create_team_link_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Add a new link to a team. + pub async fn create_team_link_with_http_info( + &self, + params: CreateTeamLinkParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/links", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Add a user to a team. + pub async fn create_team_membership( + &self, + params: CreateTeamMembershipParams, + ) -> Result, Error> + { + match self.create_team_membership_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Add a user to a team. + pub async fn create_team_membership_with_http_info( + &self, + params: CreateTeamMembershipParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/memberships", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Remove a team using the team's `id`. + pub async fn delete_team( + &self, + params: DeleteTeamParams, + ) -> Result, Error> { + match self.delete_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Remove a team using the team's `id`. + pub async fn delete_team_with_http_info( + &self, + params: DeleteTeamParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Remove a link from a team. + pub async fn delete_team_link( + &self, + params: DeleteTeamLinkParams, + ) -> Result, Error> { + match self.delete_team_link_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Remove a link from a team. + pub async fn delete_team_link_with_http_info( + &self, + params: DeleteTeamLinkParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let link_id = params.link_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/links/{link_id}", + local_configuration.base_path, + team_id = urlencode(team_id), + link_id = urlencode(link_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Remove a user from a team. + pub async fn delete_team_membership( + &self, + params: DeleteTeamMembershipParams, + ) -> Result, Error> { + match self.delete_team_membership_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Remove a user from a team. + pub async fn delete_team_membership_with_http_info( + &self, + params: DeleteTeamMembershipParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let user_id = params.user_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/memberships/{user_id}", + local_configuration.base_path, + team_id = urlencode(team_id), + user_id = urlencode(user_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a single team using the team's `id`. + pub async fn get_team( + &self, + params: GetTeamParams, + ) -> Result, Error> { + match self.get_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a single team using the team's `id`. + pub async fn get_team_with_http_info( + &self, + params: GetTeamParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a single link for a team. + pub async fn get_team_link( + &self, + params: GetTeamLinkParams, + ) -> Result, Error> { + match self.get_team_link_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a single link for a team. + pub async fn get_team_link_with_http_info( + &self, + params: GetTeamLinkParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let link_id = params.link_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/links/{link_id}", + local_configuration.base_path, + team_id = urlencode(team_id), + link_id = urlencode(link_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all links for a given team. + pub async fn get_team_links( + &self, + params: GetTeamLinksParams, + ) -> Result, Error> { + match self.get_team_links_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all links for a given team. + pub async fn get_team_links_with_http_info( + &self, + params: GetTeamLinksParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/links", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a paginated list of members for a team + pub async fn get_team_memberships( + &self, + params: GetTeamMembershipsParams, + ) -> Result, Error> + { + match self.get_team_memberships_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a paginated list of members for a team + pub async fn get_team_memberships_with_http_info( + &self, + params: GetTeamMembershipsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let filter_keyword = params.filter_keyword; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/memberships", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_keyword { + local_req_builder = + local_req_builder.query(&[("filter[keyword]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all permission settings for a given team. + pub async fn get_team_permission_settings( + &self, + params: GetTeamPermissionSettingsParams, + ) -> Result< + Option, + Error, + > { + match self + .get_team_permission_settings_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all permission settings for a given team. + pub async fn get_team_permission_settings_with_http_info( + &self, + params: GetTeamPermissionSettingsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/permission-settings", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a list of memberships for a user + pub async fn get_user_memberships( + &self, + params: GetUserMembershipsParams, + ) -> Result, Error> + { + match self.get_user_memberships_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a list of memberships for a user + pub async fn get_user_memberships_with_http_info( + &self, + params: GetUserMembershipsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let user_uuid = params.user_uuid; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/users/{user_uuid}/memberships", + local_configuration.base_path, + user_uuid = urlencode(user_uuid) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get all teams. + /// Can be used to search for teams using the `filter[keyword]` and `filter[me]` query parameters. + pub async fn list_teams( + &self, + params: ListTeamsParams, + ) -> Result, Error> { + match self.list_teams_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get all teams. + /// Can be used to search for teams using the `filter[keyword]` and `filter[me]` query parameters. + pub async fn list_teams_with_http_info( + &self, + params: ListTeamsParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let page_number = params.page_number; + let page_size = params.page_size; + let sort = params.sort; + let include = params.include; + let filter_keyword = params.filter_keyword; + let filter_me = params.filter_me; + let fields_team = params.fields_team; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/team", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local) = include { + local_req_builder = local_req_builder.query(&[( + "include", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + if let Some(ref local_str) = filter_keyword { + local_req_builder = + local_req_builder.query(&[("filter[keyword]", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_me { + local_req_builder = local_req_builder.query(&[("filter[me]", &local_str.to_string())]); + }; + if let Some(ref local) = fields_team { + local_req_builder = local_req_builder.query(&[( + "fields[team]", + &local + .into_iter() + .map(|p| p.to_string()) + .collect::>() + .join(",") + .to_string(), + )]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a team using the team's `id`. + /// If the `team_links` relationship is present, the associated links are updated to be in the order they appear in the array, and any existing team links not present are removed. + pub async fn update_team( + &self, + params: UpdateTeamParams, + ) -> Result, Error> { + match self.update_team_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a team using the team's `id`. + /// If the `team_links` relationship is present, the associated links are updated to be in the order they appear in the array, and any existing team links not present are removed. + pub async fn update_team_with_http_info( + &self, + params: UpdateTeamParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}", + local_configuration.base_path, + team_id = urlencode(team_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a team link. + pub async fn update_team_link( + &self, + params: UpdateTeamLinkParams, + ) -> Result, Error> { + match self.update_team_link_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a team link. + pub async fn update_team_link_with_http_info( + &self, + params: UpdateTeamLinkParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let link_id = params.link_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/links/{link_id}", + local_configuration.base_path, + team_id = urlencode(team_id), + link_id = urlencode(link_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a user's membership attributes on a team. + pub async fn update_team_membership( + &self, + params: UpdateTeamMembershipParams, + ) -> Result, Error> + { + match self.update_team_membership_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a user's membership attributes on a team. + pub async fn update_team_membership_with_http_info( + &self, + params: UpdateTeamMembershipParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let user_id = params.user_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/memberships/{user_id}", + local_configuration.base_path, + team_id = urlencode(team_id), + user_id = urlencode(user_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Update a team permission setting for a given team. + pub async fn update_team_permission_setting( + &self, + params: UpdateTeamPermissionSettingParams, + ) -> Result< + Option, + Error, + > { + match self + .update_team_permission_setting_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Update a team permission setting for a given team. + pub async fn update_team_permission_setting_with_http_info( + &self, + params: UpdateTeamPermissionSettingParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let team_id = params.team_id; + let action = params.action; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/team/{team_id}/permission-settings/{action}", + local_configuration.base_path, + team_id = urlencode(team_id), + action = urlencode(action) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PUT, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/api_usage_metering.rs b/src/datadogV2/api/api_usage_metering.rs index 5186c55e9..8280c174a 100644 --- a/src/datadogV2/api/api_usage_metering.rs +++ b/src/datadogV2/api/api_usage_metering.rs @@ -7,7 +7,7 @@ use reqwest; use serde::{Deserialize, Serialize}; /// GetCostByOrgParams is a struct for passing parameters to the method [`GetCostByOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetCostByOrgParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. pub start_month: String, @@ -16,7 +16,7 @@ pub struct GetCostByOrgParams { } /// GetEstimatedCostByOrgParams is a struct for passing parameters to the method [`GetEstimatedCostByOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetEstimatedCostByOrgParams { /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. pub view: Option, @@ -31,7 +31,7 @@ pub struct GetEstimatedCostByOrgParams { } /// GetHistoricalCostByOrgParams is a struct for passing parameters to the method [`GetHistoricalCostByOrg`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetHistoricalCostByOrgParams { /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. pub start_month: String, @@ -42,7 +42,7 @@ pub struct GetHistoricalCostByOrgParams { } /// GetHourlyUsageParams is a struct for passing parameters to the method [`GetHourlyUsage`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetHourlyUsageParams { /// Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. pub filter_timestamp_start: String, @@ -71,8 +71,41 @@ pub struct GetHourlyUsageParams { pub page_next_record_id: Option, } +/// GetMonthlyCostAttributionParams is a struct for passing parameters to the method [`GetMonthlyCostAttribution`] +#[derive(Clone, Debug)] +pub struct GetMonthlyCostAttributionParams { + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning in this month. + pub start_month: String, + /// Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. + pub end_month: String, + /// Comma-separated list specifying cost types (e.g., `_on_demand_cost`, `_committed_cost`, `_total_cost`) and the + /// proportions (`_percentage_in_org`, `_percentage_in_account`). Use `*` to retrieve all fields. + /// Example: `infra_host_on_demand_cost,infra_host_percentage_in_account` + /// To obtain the complete list of active billing dimensions that can be used to replace + /// `` in the field names, make a request to the [Get active billing dimensions API](https://docs.datadoghq.com/api/latest/usage-metering/#get-active-billing-dimensions-for-cost-attribution). + pub fields: String, + /// The direction to sort by: `[desc, asc]`. + pub sort_direction: Option, + /// The billing dimension to sort by. Always sorted by total cost. Example: `infra_host`. + pub sort_name: Option, + /// Comma separated list of tag keys used to group cost. If no value is provided the cost will not be broken down by tags. + /// To see which tags are available, look for the value of `tag_config_source` in the API response. + pub tag_breakdown_keys: Option, + /// List following results with a next_record_id provided in the previous query. + pub next_record_id: Option, + /// Include child org cost in the response. Defaults to `true`. + pub include_descendants: Option, +} + +/// GetProjectedCostParams is a struct for passing parameters to the method [`GetProjectedCost`] +#[derive(Clone, Debug)] +pub struct GetProjectedCostParams { + /// String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are `summary` and `sub-org`. Defaults to `summary`. + pub view: Option, +} + /// GetUsageApplicationSecurityMonitoringParams is a struct for passing parameters to the method [`GetUsageApplicationSecurityMonitoring`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageApplicationSecurityMonitoringParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -82,7 +115,7 @@ pub struct GetUsageApplicationSecurityMonitoringParams { } /// GetUsageLambdaTracedInvocationsParams is a struct for passing parameters to the method [`GetUsageLambdaTracedInvocations`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageLambdaTracedInvocationsParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -92,7 +125,7 @@ pub struct GetUsageLambdaTracedInvocationsParams { } /// GetUsageObservabilityPipelinesParams is a struct for passing parameters to the method [`GetUsageObservabilityPipelines`] -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct GetUsageObservabilityPipelinesParams { /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. pub start_hr: String, @@ -101,6 +134,16 @@ pub struct GetUsageObservabilityPipelinesParams { pub end_hr: Option, } +/// GetActiveBillingDimensionsError is a struct for typed errors of method [`GetActiveBillingDimensions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetActiveBillingDimensionsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + /// GetCostByOrgError is a struct for typed errors of method [`GetCostByOrg`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -141,6 +184,26 @@ pub enum GetHourlyUsageError { UnknownValue(serde_json::Value), } +/// GetMonthlyCostAttributionError is a struct for typed errors of method [`GetMonthlyCostAttribution`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMonthlyCostAttributionError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetProjectedCostError is a struct for typed errors of method [`GetProjectedCost`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetProjectedCostError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + /// GetUsageApplicationSecurityMonitoringError is a struct for typed errors of method [`GetUsageApplicationSecurityMonitoring`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -192,6 +255,79 @@ impl UsageMeteringAPI { Self { config } } + /// Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 17th of the following month. + pub async fn get_active_billing_dimensions( + &self, + ) -> Result< + Option, + Error, + > { + match self.get_active_billing_dimensions_with_http_info().await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 17th of the following month. + pub async fn get_active_billing_dimensions_with_http_info( + &self, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost_by_tag/active_billing_dimensions", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + /// Get cost across multi-org account. /// Cost by org data for a given month becomes available no later than the 16th of the following month. /// **Note:** This endpoint has been deprecated. Please use the new endpoint @@ -574,6 +710,223 @@ impl UsageMeteringAPI { } } + /// Get monthly cost attribution by tag across multi-org and single root-org accounts. + /// Cost Attribution data for a given month becomes available no later than the 17th of the following month. + /// This API endpoint is paginated. To make sure you receive all records, check if the value of `next_record_id` is + /// set in the response. If it is, make another request and pass `next_record_id` as a parameter. + /// Pseudo code example: + /// ``` + /// response := GetMonthlyCostAttribution(start_month, end_month) + /// cursor := response.metadata.pagination.next_record_id + /// WHILE cursor != null BEGIN + /// sleep(5 seconds) # Avoid running into rate limit + /// response := GetMonthlyCostAttribution(start_month, end_month, next_record_id=cursor) + /// cursor := response.metadata.pagination.next_record_id + /// END + /// ``` + pub async fn get_monthly_cost_attribution( + &self, + params: GetMonthlyCostAttributionParams, + ) -> Result< + Option, + Error, + > { + match self + .get_monthly_cost_attribution_with_http_info(params) + .await + { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get monthly cost attribution by tag across multi-org and single root-org accounts. + /// Cost Attribution data for a given month becomes available no later than the 17th of the following month. + /// This API endpoint is paginated. To make sure you receive all records, check if the value of `next_record_id` is + /// set in the response. If it is, make another request and pass `next_record_id` as a parameter. + /// Pseudo code example: + /// ``` + /// response := GetMonthlyCostAttribution(start_month, end_month) + /// cursor := response.metadata.pagination.next_record_id + /// WHILE cursor != null BEGIN + /// sleep(5 seconds) # Avoid running into rate limit + /// response := GetMonthlyCostAttribution(start_month, end_month, next_record_id=cursor) + /// cursor := response.metadata.pagination.next_record_id + /// END + /// ``` + pub async fn get_monthly_cost_attribution_with_http_info( + &self, + params: GetMonthlyCostAttributionParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let start_month = params.start_month; + let end_month = params.end_month; + let fields = params.fields; + let sort_direction = params.sort_direction; + let sort_name = params.sort_name; + let tag_breakdown_keys = params.tag_breakdown_keys; + let next_record_id = params.next_record_id; + let include_descendants = params.include_descendants; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/cost_by_tag/monthly_cost_attribution", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + local_req_builder = local_req_builder.query(&[("start_month", &start_month.to_string())]); + local_req_builder = local_req_builder.query(&[("end_month", &end_month.to_string())]); + local_req_builder = local_req_builder.query(&[("fields", &fields.to_string())]); + if let Some(ref local_str) = sort_direction { + local_req_builder = + local_req_builder.query(&[("sort_direction", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort_name { + local_req_builder = local_req_builder.query(&[("sort_name", &local_str.to_string())]); + }; + if let Some(ref local_str) = tag_breakdown_keys { + local_req_builder = + local_req_builder.query(&[("tag_breakdown_keys", &local_str.to_string())]); + }; + if let Some(ref local_str) = next_record_id { + local_req_builder = + local_req_builder.query(&[("next_record_id", &local_str.to_string())]); + }; + if let Some(ref local_str) = include_descendants { + local_req_builder = + local_req_builder.query(&[("include_descendants", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get projected cost across multi-org and single root-org accounts. + /// Projected cost data is only available for the current month and becomes available around the 12th of the month. + /// This endpoint requires the usage_read authorization scope. + pub async fn get_projected_cost( + &self, + params: GetProjectedCostParams, + ) -> Result, Error> + { + match self.get_projected_cost_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get projected cost across multi-org and single root-org accounts. + /// Projected cost data is only available for the current month and becomes available around the 12th of the month. + /// This endpoint requires the usage_read authorization scope. + pub async fn get_projected_cost_with_http_info( + &self, + params: GetProjectedCostParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let view = params.view; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/usage/projected_cost", + local_configuration.base_path + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = view { + local_req_builder = local_req_builder.query(&[("view", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + /// Get hourly usage for application security . /// **Note:** hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family) pub async fn get_usage_application_security_monitoring( diff --git a/src/datadogV2/api/api_users.rs b/src/datadogV2/api/api_users.rs new file mode 100644 index 000000000..8ec46c8cf --- /dev/null +++ b/src/datadogV2/api/api_users.rs @@ -0,0 +1,895 @@ +// 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. + +use crate::datadog::*; +use reqwest; +use serde::{Deserialize, Serialize}; + +/// CreateUserParams is a struct for passing parameters to the method [`CreateUser`] +#[derive(Clone, Debug)] +pub struct CreateUserParams { + pub body: crate::datadogV2::model::UserCreateRequest, +} + +/// DisableUserParams is a struct for passing parameters to the method [`DisableUser`] +#[derive(Clone, Debug)] +pub struct DisableUserParams { + /// The ID of the user. + pub user_id: String, +} + +/// GetInvitationParams is a struct for passing parameters to the method [`GetInvitation`] +#[derive(Clone, Debug)] +pub struct GetInvitationParams { + /// The UUID of the user invitation. + pub user_invitation_uuid: String, +} + +/// GetUserParams is a struct for passing parameters to the method [`GetUser`] +#[derive(Clone, Debug)] +pub struct GetUserParams { + /// The ID of the user. + pub user_id: String, +} + +/// ListUserOrganizationsParams is a struct for passing parameters to the method [`ListUserOrganizations`] +#[derive(Clone, Debug)] +pub struct ListUserOrganizationsParams { + /// The ID of the user. + pub user_id: String, +} + +/// ListUserPermissionsParams is a struct for passing parameters to the method [`ListUserPermissions`] +#[derive(Clone, Debug)] +pub struct ListUserPermissionsParams { + /// The ID of the user. + pub user_id: String, +} + +/// ListUsersParams is a struct for passing parameters to the method [`ListUsers`] +#[derive(Clone, Debug)] +pub struct ListUsersParams { + /// Size for a given page. The maximum allowed value is 100. + pub page_size: Option, + /// Specific page number to return. + pub page_number: Option, + /// User attribute to order results by. Sort order is ascending by default. + /// Sort order is descending if the field + /// is prefixed by a negative sign, for example `sort=-name`. Options: `name`, + /// `modified_at`, `user_count`. + pub sort: Option, + /// Direction of sort. Options: `asc`, `desc`. + pub sort_dir: Option, + /// Filter all users by the given string. Defaults to no filtering. + pub filter: Option, + /// Filter on status attribute. + /// Comma separated list, with possible values `Active`, `Pending`, and `Disabled`. + /// Defaults to no filtering. + pub filter_status: Option, +} + +/// SendInvitationsParams is a struct for passing parameters to the method [`SendInvitations`] +#[derive(Clone, Debug)] +pub struct SendInvitationsParams { + pub body: crate::datadogV2::model::UserInvitationsRequest, +} + +/// UpdateUserParams is a struct for passing parameters to the method [`UpdateUser`] +#[derive(Clone, Debug)] +pub struct UpdateUserParams { + /// The ID of the user. + pub user_id: String, + pub body: crate::datadogV2::model::UserUpdateRequest, +} + +/// CreateUserError is a struct for typed errors of method [`CreateUser`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUserError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// DisableUserError is a struct for typed errors of method [`DisableUser`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DisableUserError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetInvitationError is a struct for typed errors of method [`GetInvitation`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetInvitationError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// GetUserError is a struct for typed errors of method [`GetUser`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListUserOrganizationsError is a struct for typed errors of method [`ListUserOrganizations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListUserOrganizationsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListUserPermissionsError is a struct for typed errors of method [`ListUserPermissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListUserPermissionsError { + Status403(Option), + Status404(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// ListUsersError is a struct for typed errors of method [`ListUsers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListUsersError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// SendInvitationsError is a struct for typed errors of method [`SendInvitations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SendInvitationsError { + Status400(Option), + Status403(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +/// UpdateUserError is a struct for typed errors of method [`UpdateUser`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateUserError { + Status400(Option), + Status403(Option), + Status404(Option), + Status422(Option), + Status429(Option), + UnknownValue(serde_json::Value), +} + +#[derive(Debug, Clone)] +pub struct UsersAPI { + config: configuration::Configuration, +} + +impl Default for UsersAPI { + fn default() -> Self { + Self { + config: configuration::Configuration::new(), + } + } +} + +impl UsersAPI { + pub fn new() -> Self { + Self::default() + } + pub fn with_config(config: configuration::Configuration) -> Self { + Self { config } + } + + /// Create a user for your organization. + pub async fn create_user( + &self, + params: CreateUserParams, + ) -> Result, Error> { + match self.create_user_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Create a user for your organization. + pub async fn create_user_with_http_info( + &self, + params: CreateUserParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/users", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Disable a user. Can only be used with an application key belonging + /// to an administrator user. + pub async fn disable_user( + &self, + params: DisableUserParams, + ) -> Result, Error> { + match self.disable_user_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Disable a user. Can only be used with an application key belonging + /// to an administrator user. + pub async fn disable_user_with_http_info( + &self, + params: DisableUserParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let user_id = params.user_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/users/{user_id}", + local_configuration.base_path, + user_id = urlencode(user_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::DELETE, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: None, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Returns a single user invitation by its UUID. + pub async fn get_invitation( + &self, + params: GetInvitationParams, + ) -> Result, Error> + { + match self.get_invitation_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Returns a single user invitation by its UUID. + pub async fn get_invitation_with_http_info( + &self, + params: GetInvitationParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let user_invitation_uuid = params.user_invitation_uuid; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/user_invitations/{user_invitation_uuid}", + local_configuration.base_path, + user_invitation_uuid = urlencode(user_invitation_uuid) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a user in the organization specified by the user’s `user_id`. + pub async fn get_user( + &self, + params: GetUserParams, + ) -> Result, Error> { + match self.get_user_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a user in the organization specified by the user’s `user_id`. + pub async fn get_user_with_http_info( + &self, + params: GetUserParams, + ) -> Result, Error> { + let local_configuration = &self.config; + + // unbox and build parameters + let user_id = params.user_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/users/{user_id}", + local_configuration.base_path, + user_id = urlencode(user_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a user organization. Returns the user information and all organizations + /// joined by this user. + pub async fn list_user_organizations( + &self, + params: ListUserOrganizationsParams, + ) -> Result, Error> + { + match self.list_user_organizations_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a user organization. Returns the user information and all organizations + /// joined by this user. + pub async fn list_user_organizations_with_http_info( + &self, + params: ListUserOrganizationsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let user_id = params.user_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/users/{user_id}/orgs", + local_configuration.base_path, + user_id = urlencode(user_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get a user permission set. Returns a list of the user’s permissions + /// granted by the associated user's roles. + pub async fn list_user_permissions( + &self, + params: ListUserPermissionsParams, + ) -> Result, Error> + { + match self.list_user_permissions_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get a user permission set. Returns a list of the user’s permissions + /// granted by the associated user's roles. + pub async fn list_user_permissions_with_http_info( + &self, + params: ListUserPermissionsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let user_id = params.user_id; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/users/{user_id}/permissions", + local_configuration.base_path, + user_id = urlencode(user_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Get the list of all users in the organization. This list includes + /// all users even if they are deactivated or unverified. + pub async fn list_users( + &self, + params: ListUsersParams, + ) -> Result, Error> { + match self.list_users_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Get the list of all users in the organization. This list includes + /// all users even if they are deactivated or unverified. + pub async fn list_users_with_http_info( + &self, + params: ListUsersParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let page_size = params.page_size; + let page_number = params.page_number; + let sort = params.sort; + let sort_dir = params.sort_dir; + let filter = params.filter; + let filter_status = params.filter_status; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/users", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::GET, local_uri_str.as_str()); + + if let Some(ref local_str) = page_size { + local_req_builder = local_req_builder.query(&[("page[size]", &local_str.to_string())]); + }; + if let Some(ref local_str) = page_number { + local_req_builder = + local_req_builder.query(&[("page[number]", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort { + local_req_builder = local_req_builder.query(&[("sort", &local_str.to_string())]); + }; + if let Some(ref local_str) = sort_dir { + local_req_builder = local_req_builder.query(&[("sort_dir", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter { + local_req_builder = local_req_builder.query(&[("filter", &local_str.to_string())]); + }; + if let Some(ref local_str) = filter_status { + local_req_builder = + local_req_builder.query(&[("filter[status]", &local_str.to_string())]); + }; + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Sends emails to one or more users inviting them to join the organization. + pub async fn send_invitations( + &self, + params: SendInvitationsParams, + ) -> Result, Error> + { + match self.send_invitations_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Sends emails to one or more users inviting them to join the organization. + pub async fn send_invitations_with_http_info( + &self, + params: SendInvitationsParams, + ) -> Result< + ResponseContent, + Error, + > { + let local_configuration = &self.config; + + // unbox and build parameters + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!("{}/api/v2/user_invitations", local_configuration.base_path); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } + + /// Edit a user. Can only be used with an application key belonging + /// to an administrator user. + pub async fn update_user( + &self, + params: UpdateUserParams, + ) -> Result, Error> { + match self.update_user_with_http_info(params).await { + Ok(response_content) => Ok(response_content.entity), + Err(err) => Err(err), + } + } + + /// Edit a user. Can only be used with an application key belonging + /// to an administrator user. + pub async fn update_user_with_http_info( + &self, + params: UpdateUserParams, + ) -> Result, Error> + { + let local_configuration = &self.config; + + // unbox and build parameters + let user_id = params.user_id; + let body = params.body; + + let local_client = &local_configuration.client; + + let local_uri_str = format!( + "{}/api/v2/users/{user_id}", + local_configuration.base_path, + user_id = urlencode(user_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::PATCH, local_uri_str.as_str()); + + // build user agent + if let Some(ref local_user_agent) = local_configuration.user_agent { + local_req_builder = + local_req_builder.header(reqwest::header::USER_AGENT, local_user_agent.clone()); + } + + // build auth + if let Some(ref local_apikey) = local_configuration.api_key_auth { + local_req_builder = local_req_builder.header("DD-API-KEY", local_apikey); + }; + if let Some(ref local_apikey) = local_configuration.app_key_auth { + local_req_builder = local_req_builder.header("DD-APPLICATION-KEY", local_apikey); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, DDFormatter); + if body.serialize(&mut ser).is_ok() { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + + let local_req = local_req_builder.build()?; + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + + if !local_status.is_client_error() && !local_status.is_server_error() { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + Ok(ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }) + } else { + let local_entity: Option = serde_json::from_str(&local_content).ok(); + let local_error = ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(Error::ResponseError(local_error)) + } + } +} diff --git a/src/datadogV2/api/mod.rs b/src/datadogV2/api/mod.rs index 58cfe84f4..ce2c5b32b 100644 --- a/src/datadogV2/api/mod.rs +++ b/src/datadogV2/api/mod.rs @@ -4,23 +4,47 @@ pub mod api_apm_retention_filters; pub mod api_audit; +pub mod api_auth_n_mappings; +pub mod api_ci_visibility_pipelines; +pub mod api_ci_visibility_tests; +pub mod api_cloud_cost_management; pub mod api_cloud_workload_security; pub mod api_cloudflare_integration; pub mod api_confluent_cloud; +pub mod api_container_images; +pub mod api_containers; pub mod api_dashboard_lists; +pub mod api_dora_metrics; +pub mod api_downtimes; pub mod api_events; pub mod api_fastly_integration; pub mod api_gcp_integration; +pub mod api_incident_services; +pub mod api_incident_teams; +pub mod api_incidents; pub mod api_ip_allowlist; +pub mod api_key_management; pub mod api_logs; +pub mod api_logs_archives; pub mod api_logs_metrics; pub mod api_metrics; +pub mod api_monitors; +pub mod api_okta_integration; pub mod api_opsgenie_integration; pub mod api_organizations; +pub mod api_powerpack; pub mod api_processes; pub mod api_restriction_policies; pub mod api_roles; +pub mod api_rum; pub mod api_security_monitoring; +pub mod api_sensitive_data_scanner; +pub mod api_service_accounts; +pub mod api_service_definition; +pub mod api_service_scorecards; +pub mod api_spans; pub mod api_spans_metrics; pub mod api_synthetics; +pub mod api_teams; pub mod api_usage_metering; +pub mod api_users; diff --git a/src/datadogV2/model/mod.rs b/src/datadogV2/model/mod.rs index 9735ed8da..ce96eefed 100644 --- a/src/datadogV2/model/mod.rs +++ b/src/datadogV2/model/mod.rs @@ -2,6 +2,72 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2019-Present Datadog, Inc. +pub mod model_api_keys_sort; +pub use self::model_api_keys_sort::APIKeysSort; +pub mod model_api_keys_response; +pub use self::model_api_keys_response::APIKeysResponse; +pub mod model_partial_api_key; +pub use self::model_partial_api_key::PartialAPIKey; +pub mod model_partial_api_key_attributes; +pub use self::model_partial_api_key_attributes::PartialAPIKeyAttributes; +pub mod model_api_key_relationships; +pub use self::model_api_key_relationships::APIKeyRelationships; +pub mod model_relationship_to_user; +pub use self::model_relationship_to_user::RelationshipToUser; +pub mod model_relationship_to_user_data; +pub use self::model_relationship_to_user_data::RelationshipToUserData; +pub mod model_users_type; +pub use self::model_users_type::UsersType; +pub mod model_api_keys_type; +pub use self::model_api_keys_type::APIKeysType; +pub mod model_user; +pub use self::model_user::User; +pub mod model_user_attributes; +pub use self::model_user_attributes::UserAttributes; +pub mod model_user_response_relationships; +pub use self::model_user_response_relationships::UserResponseRelationships; +pub mod model_relationship_to_organization; +pub use self::model_relationship_to_organization::RelationshipToOrganization; +pub mod model_relationship_to_organization_data; +pub use self::model_relationship_to_organization_data::RelationshipToOrganizationData; +pub mod model_organizations_type; +pub use self::model_organizations_type::OrganizationsType; +pub mod model_relationship_to_organizations; +pub use self::model_relationship_to_organizations::RelationshipToOrganizations; +pub mod model_relationship_to_users; +pub use self::model_relationship_to_users::RelationshipToUsers; +pub mod model_relationship_to_roles; +pub use self::model_relationship_to_roles::RelationshipToRoles; +pub mod model_relationship_to_role_data; +pub use self::model_relationship_to_role_data::RelationshipToRoleData; +pub mod model_roles_type; +pub use self::model_roles_type::RolesType; +pub mod model_api_key_response_included_item; +pub use self::model_api_key_response_included_item::APIKeyResponseIncludedItem; +pub mod model_api_keys_response_meta; +pub use self::model_api_keys_response_meta::APIKeysResponseMeta; +pub mod model_api_keys_response_meta_page; +pub use self::model_api_keys_response_meta_page::APIKeysResponseMetaPage; +pub mod model_api_error_response; +pub use self::model_api_error_response::APIErrorResponse; +pub mod model_api_key_create_request; +pub use self::model_api_key_create_request::APIKeyCreateRequest; +pub mod model_api_key_create_data; +pub use self::model_api_key_create_data::APIKeyCreateData; +pub mod model_api_key_create_attributes; +pub use self::model_api_key_create_attributes::APIKeyCreateAttributes; +pub mod model_api_key_response; +pub use self::model_api_key_response::APIKeyResponse; +pub mod model_full_api_key; +pub use self::model_full_api_key::FullAPIKey; +pub mod model_full_api_key_attributes; +pub use self::model_full_api_key_attributes::FullAPIKeyAttributes; +pub mod model_api_key_update_request; +pub use self::model_api_key_update_request::APIKeyUpdateRequest; +pub mod model_api_key_update_data; +pub use self::model_api_key_update_data::APIKeyUpdateData; +pub mod model_api_key_update_attributes; +pub use self::model_api_key_update_attributes::APIKeyUpdateAttributes; pub mod model_spans_metrics_response; pub use self::model_spans_metrics_response::SpansMetricsResponse; pub mod model_spans_metric_response_data; @@ -18,8 +84,6 @@ pub mod model_spans_metric_response_group_by; pub use self::model_spans_metric_response_group_by::SpansMetricResponseGroupBy; pub mod model_spans_metric_type; pub use self::model_spans_metric_type::SpansMetricType; -pub mod model_api_error_response; -pub use self::model_api_error_response::APIErrorResponse; pub mod model_spans_metric_create_request; pub use self::model_spans_metric_create_request::SpansMetricCreateRequest; pub mod model_spans_metric_create_data; @@ -78,6 +142,48 @@ pub mod model_retention_filter_update_request; pub use self::model_retention_filter_update_request::RetentionFilterUpdateRequest; pub mod model_retention_filter_update_data; pub use self::model_retention_filter_update_data::RetentionFilterUpdateData; +pub mod model_application_keys_sort; +pub use self::model_application_keys_sort::ApplicationKeysSort; +pub mod model_list_application_keys_response; +pub use self::model_list_application_keys_response::ListApplicationKeysResponse; +pub mod model_partial_application_key; +pub use self::model_partial_application_key::PartialApplicationKey; +pub mod model_partial_application_key_attributes; +pub use self::model_partial_application_key_attributes::PartialApplicationKeyAttributes; +pub mod model_application_key_relationships; +pub use self::model_application_key_relationships::ApplicationKeyRelationships; +pub mod model_application_keys_type; +pub use self::model_application_keys_type::ApplicationKeysType; +pub mod model_role; +pub use self::model_role::Role; +pub mod model_role_attributes; +pub use self::model_role_attributes::RoleAttributes; +pub mod model_role_response_relationships; +pub use self::model_role_response_relationships::RoleResponseRelationships; +pub mod model_relationship_to_permissions; +pub use self::model_relationship_to_permissions::RelationshipToPermissions; +pub mod model_relationship_to_permission_data; +pub use self::model_relationship_to_permission_data::RelationshipToPermissionData; +pub mod model_permissions_type; +pub use self::model_permissions_type::PermissionsType; +pub mod model_application_key_response_included_item; +pub use self::model_application_key_response_included_item::ApplicationKeyResponseIncludedItem; +pub mod model_application_key_response_meta; +pub use self::model_application_key_response_meta::ApplicationKeyResponseMeta; +pub mod model_application_key_response_meta_page; +pub use self::model_application_key_response_meta_page::ApplicationKeyResponseMetaPage; +pub mod model_application_key_response; +pub use self::model_application_key_response::ApplicationKeyResponse; +pub mod model_full_application_key; +pub use self::model_full_application_key::FullApplicationKey; +pub mod model_full_application_key_attributes; +pub use self::model_full_application_key_attributes::FullApplicationKeyAttributes; +pub mod model_application_key_update_request; +pub use self::model_application_key_update_request::ApplicationKeyUpdateRequest; +pub mod model_application_key_update_data; +pub use self::model_application_key_update_data::ApplicationKeyUpdateData; +pub mod model_application_key_update_attributes; +pub use self::model_application_key_update_attributes::ApplicationKeyUpdateAttributes; pub mod model_audit_logs_sort; pub use self::model_audit_logs_sort::AuditLogsSort; pub mod model_audit_logs_events_response; @@ -106,6 +212,360 @@ pub mod model_audit_logs_query_options; pub use self::model_audit_logs_query_options::AuditLogsQueryOptions; pub mod model_audit_logs_query_page_options; pub use self::model_audit_logs_query_page_options::AuditLogsQueryPageOptions; +pub mod model_auth_n_mappings_sort; +pub use self::model_auth_n_mappings_sort::AuthNMappingsSort; +pub mod model_auth_n_mappings_response; +pub use self::model_auth_n_mappings_response::AuthNMappingsResponse; +pub mod model_auth_n_mapping; +pub use self::model_auth_n_mapping::AuthNMapping; +pub mod model_auth_n_mapping_attributes; +pub use self::model_auth_n_mapping_attributes::AuthNMappingAttributes; +pub mod model_auth_n_mapping_relationships; +pub use self::model_auth_n_mapping_relationships::AuthNMappingRelationships; +pub mod model_relationship_to_role; +pub use self::model_relationship_to_role::RelationshipToRole; +pub mod model_relationship_to_saml_assertion_attribute; +pub use self::model_relationship_to_saml_assertion_attribute::RelationshipToSAMLAssertionAttribute; +pub mod model_relationship_to_saml_assertion_attribute_data; +pub use self::model_relationship_to_saml_assertion_attribute_data::RelationshipToSAMLAssertionAttributeData; +pub mod model_saml_assertion_attributes_type; +pub use self::model_saml_assertion_attributes_type::SAMLAssertionAttributesType; +pub mod model_auth_n_mappings_type; +pub use self::model_auth_n_mappings_type::AuthNMappingsType; +pub mod model_saml_assertion_attribute; +pub use self::model_saml_assertion_attribute::SAMLAssertionAttribute; +pub mod model_saml_assertion_attribute_attributes; +pub use self::model_saml_assertion_attribute_attributes::SAMLAssertionAttributeAttributes; +pub mod model_auth_n_mapping_included; +pub use self::model_auth_n_mapping_included::AuthNMappingIncluded; +pub mod model_response_meta_attributes; +pub use self::model_response_meta_attributes::ResponseMetaAttributes; +pub mod model_pagination; +pub use self::model_pagination::Pagination; +pub mod model_auth_n_mapping_create_request; +pub use self::model_auth_n_mapping_create_request::AuthNMappingCreateRequest; +pub mod model_auth_n_mapping_create_data; +pub use self::model_auth_n_mapping_create_data::AuthNMappingCreateData; +pub mod model_auth_n_mapping_create_attributes; +pub use self::model_auth_n_mapping_create_attributes::AuthNMappingCreateAttributes; +pub mod model_auth_n_mapping_create_relationships; +pub use self::model_auth_n_mapping_create_relationships::AuthNMappingCreateRelationships; +pub mod model_auth_n_mapping_response; +pub use self::model_auth_n_mapping_response::AuthNMappingResponse; +pub mod model_auth_n_mapping_update_request; +pub use self::model_auth_n_mapping_update_request::AuthNMappingUpdateRequest; +pub mod model_auth_n_mapping_update_data; +pub use self::model_auth_n_mapping_update_data::AuthNMappingUpdateData; +pub mod model_auth_n_mapping_update_attributes; +pub use self::model_auth_n_mapping_update_attributes::AuthNMappingUpdateAttributes; +pub mod model_auth_n_mapping_update_relationships; +pub use self::model_auth_n_mapping_update_relationships::AuthNMappingUpdateRelationships; +pub mod model_ci_app_create_pipeline_event_request; +pub use self::model_ci_app_create_pipeline_event_request::CIAppCreatePipelineEventRequest; +pub mod model_ci_app_create_pipeline_event_request_data; +pub use self::model_ci_app_create_pipeline_event_request_data::CIAppCreatePipelineEventRequestData; +pub mod model_ci_app_create_pipeline_event_request_attributes; +pub use self::model_ci_app_create_pipeline_event_request_attributes::CIAppCreatePipelineEventRequestAttributes; +pub mod model_ci_app_pipeline_event_pipeline; +pub use self::model_ci_app_pipeline_event_pipeline::CIAppPipelineEventPipeline; +pub mod model_ci_app_ci_error; +pub use self::model_ci_app_ci_error::CIAppCIError; +pub mod model_ci_app_ci_error_domain; +pub use self::model_ci_app_ci_error_domain::CIAppCIErrorDomain; +pub mod model_ci_app_git_info; +pub use self::model_ci_app_git_info::CIAppGitInfo; +pub mod model_ci_app_pipeline_event_pipeline_level; +pub use self::model_ci_app_pipeline_event_pipeline_level::CIAppPipelineEventPipelineLevel; +pub mod model_ci_app_host_info; +pub use self::model_ci_app_host_info::CIAppHostInfo; +pub mod model_ci_app_pipeline_event_parent_pipeline; +pub use self::model_ci_app_pipeline_event_parent_pipeline::CIAppPipelineEventParentPipeline; +pub mod model_ci_app_pipeline_event_previous_pipeline; +pub use self::model_ci_app_pipeline_event_previous_pipeline::CIAppPipelineEventPreviousPipeline; +pub mod model_ci_app_pipeline_event_pipeline_status; +pub use self::model_ci_app_pipeline_event_pipeline_status::CIAppPipelineEventPipelineStatus; +pub mod model_ci_app_pipeline_event_stage; +pub use self::model_ci_app_pipeline_event_stage::CIAppPipelineEventStage; +pub mod model_ci_app_pipeline_event_stage_level; +pub use self::model_ci_app_pipeline_event_stage_level::CIAppPipelineEventStageLevel; +pub mod model_ci_app_pipeline_event_stage_status; +pub use self::model_ci_app_pipeline_event_stage_status::CIAppPipelineEventStageStatus; +pub mod model_ci_app_pipeline_event_job; +pub use self::model_ci_app_pipeline_event_job::CIAppPipelineEventJob; +pub mod model_ci_app_pipeline_event_job_level; +pub use self::model_ci_app_pipeline_event_job_level::CIAppPipelineEventJobLevel; +pub mod model_ci_app_pipeline_event_job_status; +pub use self::model_ci_app_pipeline_event_job_status::CIAppPipelineEventJobStatus; +pub mod model_ci_app_pipeline_event_step; +pub use self::model_ci_app_pipeline_event_step::CIAppPipelineEventStep; +pub mod model_ci_app_pipeline_event_step_level; +pub use self::model_ci_app_pipeline_event_step_level::CIAppPipelineEventStepLevel; +pub mod model_ci_app_pipeline_event_step_status; +pub use self::model_ci_app_pipeline_event_step_status::CIAppPipelineEventStepStatus; +pub mod model_ci_app_create_pipeline_event_request_attributes_resource; +pub use self::model_ci_app_create_pipeline_event_request_attributes_resource::CIAppCreatePipelineEventRequestAttributesResource; +pub mod model_ci_app_create_pipeline_event_request_data_type; +pub use self::model_ci_app_create_pipeline_event_request_data_type::CIAppCreatePipelineEventRequestDataType; +pub mod model_httpci_app_errors; +pub use self::model_httpci_app_errors::HTTPCIAppErrors; +pub mod model_httpci_app_error; +pub use self::model_httpci_app_error::HTTPCIAppError; +pub mod model_ci_app_pipelines_aggregate_request; +pub use self::model_ci_app_pipelines_aggregate_request::CIAppPipelinesAggregateRequest; +pub mod model_ci_app_compute; +pub use self::model_ci_app_compute::CIAppCompute; +pub mod model_ci_app_aggregation_function; +pub use self::model_ci_app_aggregation_function::CIAppAggregationFunction; +pub mod model_ci_app_compute_type; +pub use self::model_ci_app_compute_type::CIAppComputeType; +pub mod model_ci_app_pipelines_query_filter; +pub use self::model_ci_app_pipelines_query_filter::CIAppPipelinesQueryFilter; +pub mod model_ci_app_pipelines_group_by; +pub use self::model_ci_app_pipelines_group_by::CIAppPipelinesGroupBy; +pub mod model_ci_app_group_by_histogram; +pub use self::model_ci_app_group_by_histogram::CIAppGroupByHistogram; +pub mod model_ci_app_group_by_missing; +pub use self::model_ci_app_group_by_missing::CIAppGroupByMissing; +pub mod model_ci_app_aggregate_sort; +pub use self::model_ci_app_aggregate_sort::CIAppAggregateSort; +pub mod model_ci_app_sort_order; +pub use self::model_ci_app_sort_order::CIAppSortOrder; +pub mod model_ci_app_aggregate_sort_type; +pub use self::model_ci_app_aggregate_sort_type::CIAppAggregateSortType; +pub mod model_ci_app_group_by_total; +pub use self::model_ci_app_group_by_total::CIAppGroupByTotal; +pub mod model_ci_app_query_options; +pub use self::model_ci_app_query_options::CIAppQueryOptions; +pub mod model_ci_app_pipelines_analytics_aggregate_response; +pub use self::model_ci_app_pipelines_analytics_aggregate_response::CIAppPipelinesAnalyticsAggregateResponse; +pub mod model_ci_app_pipelines_aggregation_buckets_response; +pub use self::model_ci_app_pipelines_aggregation_buckets_response::CIAppPipelinesAggregationBucketsResponse; +pub mod model_ci_app_pipelines_bucket_response; +pub use self::model_ci_app_pipelines_bucket_response::CIAppPipelinesBucketResponse; +pub mod model_ci_app_aggregate_bucket_value_timeseries; +pub use self::model_ci_app_aggregate_bucket_value_timeseries::CIAppAggregateBucketValueTimeseries; +pub mod model_ci_app_aggregate_bucket_value_timeseries_point; +pub use self::model_ci_app_aggregate_bucket_value_timeseries_point::CIAppAggregateBucketValueTimeseriesPoint; +pub mod model_ci_app_aggregate_bucket_value; +pub use self::model_ci_app_aggregate_bucket_value::CIAppAggregateBucketValue; +pub mod model_ci_app_response_links; +pub use self::model_ci_app_response_links::CIAppResponseLinks; +pub mod model_ci_app_response_metadata; +pub use self::model_ci_app_response_metadata::CIAppResponseMetadata; +pub mod model_ci_app_response_status; +pub use self::model_ci_app_response_status::CIAppResponseStatus; +pub mod model_ci_app_warning; +pub use self::model_ci_app_warning::CIAppWarning; +pub mod model_ci_app_sort; +pub use self::model_ci_app_sort::CIAppSort; +pub mod model_ci_app_pipeline_events_response; +pub use self::model_ci_app_pipeline_events_response::CIAppPipelineEventsResponse; +pub mod model_ci_app_pipeline_event; +pub use self::model_ci_app_pipeline_event::CIAppPipelineEvent; +pub mod model_ci_app_pipeline_event_attributes; +pub use self::model_ci_app_pipeline_event_attributes::CIAppPipelineEventAttributes; +pub mod model_ci_app_pipeline_level; +pub use self::model_ci_app_pipeline_level::CIAppPipelineLevel; +pub mod model_ci_app_pipeline_event_type_name; +pub use self::model_ci_app_pipeline_event_type_name::CIAppPipelineEventTypeName; +pub mod model_ci_app_response_metadata_with_pagination; +pub use self::model_ci_app_response_metadata_with_pagination::CIAppResponseMetadataWithPagination; +pub mod model_ci_app_response_page; +pub use self::model_ci_app_response_page::CIAppResponsePage; +pub mod model_ci_app_pipeline_events_request; +pub use self::model_ci_app_pipeline_events_request::CIAppPipelineEventsRequest; +pub mod model_ci_app_query_page_options; +pub use self::model_ci_app_query_page_options::CIAppQueryPageOptions; +pub mod model_ci_app_tests_aggregate_request; +pub use self::model_ci_app_tests_aggregate_request::CIAppTestsAggregateRequest; +pub mod model_ci_app_tests_query_filter; +pub use self::model_ci_app_tests_query_filter::CIAppTestsQueryFilter; +pub mod model_ci_app_tests_group_by; +pub use self::model_ci_app_tests_group_by::CIAppTestsGroupBy; +pub mod model_ci_app_tests_analytics_aggregate_response; +pub use self::model_ci_app_tests_analytics_aggregate_response::CIAppTestsAnalyticsAggregateResponse; +pub mod model_ci_app_tests_aggregation_buckets_response; +pub use self::model_ci_app_tests_aggregation_buckets_response::CIAppTestsAggregationBucketsResponse; +pub mod model_ci_app_tests_bucket_response; +pub use self::model_ci_app_tests_bucket_response::CIAppTestsBucketResponse; +pub mod model_ci_app_test_events_response; +pub use self::model_ci_app_test_events_response::CIAppTestEventsResponse; +pub mod model_ci_app_test_event; +pub use self::model_ci_app_test_event::CIAppTestEvent; +pub mod model_ci_app_event_attributes; +pub use self::model_ci_app_event_attributes::CIAppEventAttributes; +pub mod model_ci_app_test_level; +pub use self::model_ci_app_test_level::CIAppTestLevel; +pub mod model_ci_app_test_event_type_name; +pub use self::model_ci_app_test_event_type_name::CIAppTestEventTypeName; +pub mod model_ci_app_test_events_request; +pub use self::model_ci_app_test_events_request::CIAppTestEventsRequest; +pub mod model_container_images_response; +pub use self::model_container_images_response::ContainerImagesResponse; +pub mod model_container_image; +pub use self::model_container_image::ContainerImage; +pub mod model_container_image_attributes; +pub use self::model_container_image_attributes::ContainerImageAttributes; +pub mod model_container_image_flavor; +pub use self::model_container_image_flavor::ContainerImageFlavor; +pub mod model_container_image_vulnerabilities; +pub use self::model_container_image_vulnerabilities::ContainerImageVulnerabilities; +pub mod model_container_image_type; +pub use self::model_container_image_type::ContainerImageType; +pub mod model_container_image_group; +pub use self::model_container_image_group::ContainerImageGroup; +pub mod model_container_image_group_attributes; +pub use self::model_container_image_group_attributes::ContainerImageGroupAttributes; +pub mod model_container_image_group_relationships; +pub use self::model_container_image_group_relationships::ContainerImageGroupRelationships; +pub mod model_container_image_group_images_relationships_link; +pub use self::model_container_image_group_images_relationships_link::ContainerImageGroupImagesRelationshipsLink; +pub mod model_container_image_group_relationships_links; +pub use self::model_container_image_group_relationships_links::ContainerImageGroupRelationshipsLinks; +pub mod model_container_image_group_type; +pub use self::model_container_image_group_type::ContainerImageGroupType; +pub mod model_container_image_item; +pub use self::model_container_image_item::ContainerImageItem; +pub mod model_container_images_response_links; +pub use self::model_container_images_response_links::ContainerImagesResponseLinks; +pub mod model_container_image_meta; +pub use self::model_container_image_meta::ContainerImageMeta; +pub mod model_container_image_meta_page; +pub use self::model_container_image_meta_page::ContainerImageMetaPage; +pub mod model_container_image_meta_page_type; +pub use self::model_container_image_meta_page_type::ContainerImageMetaPageType; +pub mod model_containers_response; +pub use self::model_containers_response::ContainersResponse; +pub mod model_container; +pub use self::model_container::Container; +pub mod model_container_attributes; +pub use self::model_container_attributes::ContainerAttributes; +pub mod model_container_type; +pub use self::model_container_type::ContainerType; +pub mod model_container_group; +pub use self::model_container_group::ContainerGroup; +pub mod model_container_group_attributes; +pub use self::model_container_group_attributes::ContainerGroupAttributes; +pub mod model_container_group_relationships; +pub use self::model_container_group_relationships::ContainerGroupRelationships; +pub mod model_container_group_relationships_link; +pub use self::model_container_group_relationships_link::ContainerGroupRelationshipsLink; +pub mod model_container_group_relationships_links; +pub use self::model_container_group_relationships_links::ContainerGroupRelationshipsLinks; +pub mod model_container_group_type; +pub use self::model_container_group_type::ContainerGroupType; +pub mod model_container_item; +pub use self::model_container_item::ContainerItem; +pub mod model_containers_response_links; +pub use self::model_containers_response_links::ContainersResponseLinks; +pub mod model_container_meta; +pub use self::model_container_meta::ContainerMeta; +pub mod model_container_meta_page; +pub use self::model_container_meta_page::ContainerMetaPage; +pub mod model_container_meta_page_type; +pub use self::model_container_meta_page_type::ContainerMetaPageType; +pub mod model_aws_cur_configs_response; +pub use self::model_aws_cur_configs_response::AwsCURConfigsResponse; +pub mod model_aws_cur_config; +pub use self::model_aws_cur_config::AwsCURConfig; +pub mod model_aws_cur_config_attributes; +pub use self::model_aws_cur_config_attributes::AwsCURConfigAttributes; +pub mod model_aws_cur_config_type; +pub use self::model_aws_cur_config_type::AwsCURConfigType; +pub mod model_aws_cur_config_post_request; +pub use self::model_aws_cur_config_post_request::AwsCURConfigPostRequest; +pub mod model_aws_cur_config_post_data; +pub use self::model_aws_cur_config_post_data::AwsCURConfigPostData; +pub mod model_aws_cur_config_post_request_attributes; +pub use self::model_aws_cur_config_post_request_attributes::AwsCURConfigPostRequestAttributes; +pub mod model_aws_cur_config_post_request_type; +pub use self::model_aws_cur_config_post_request_type::AwsCURConfigPostRequestType; +pub mod model_aws_cur_config_response; +pub use self::model_aws_cur_config_response::AwsCURConfigResponse; +pub mod model_aws_cur_config_patch_request; +pub use self::model_aws_cur_config_patch_request::AwsCURConfigPatchRequest; +pub mod model_aws_cur_config_patch_data; +pub use self::model_aws_cur_config_patch_data::AwsCURConfigPatchData; +pub mod model_aws_cur_config_patch_request_attributes; +pub use self::model_aws_cur_config_patch_request_attributes::AwsCURConfigPatchRequestAttributes; +pub mod model_aws_cur_config_patch_request_type; +pub use self::model_aws_cur_config_patch_request_type::AwsCURConfigPatchRequestType; +pub mod model_aws_related_accounts_response; +pub use self::model_aws_related_accounts_response::AWSRelatedAccountsResponse; +pub mod model_aws_related_account; +pub use self::model_aws_related_account::AWSRelatedAccount; +pub mod model_aws_related_account_attributes; +pub use self::model_aws_related_account_attributes::AWSRelatedAccountAttributes; +pub mod model_aws_related_account_type; +pub use self::model_aws_related_account_type::AWSRelatedAccountType; +pub mod model_azure_uc_configs_response; +pub use self::model_azure_uc_configs_response::AzureUCConfigsResponse; +pub mod model_azure_uc_config_pair; +pub use self::model_azure_uc_config_pair::AzureUCConfigPair; +pub mod model_azure_uc_config_pair_attributes; +pub use self::model_azure_uc_config_pair_attributes::AzureUCConfigPairAttributes; +pub mod model_azure_uc_config; +pub use self::model_azure_uc_config::AzureUCConfig; +pub mod model_azure_uc_config_pair_type; +pub use self::model_azure_uc_config_pair_type::AzureUCConfigPairType; +pub mod model_azure_uc_config_post_request; +pub use self::model_azure_uc_config_post_request::AzureUCConfigPostRequest; +pub mod model_azure_uc_config_post_data; +pub use self::model_azure_uc_config_post_data::AzureUCConfigPostData; +pub mod model_azure_uc_config_post_request_attributes; +pub use self::model_azure_uc_config_post_request_attributes::AzureUCConfigPostRequestAttributes; +pub mod model_bill_config; +pub use self::model_bill_config::BillConfig; +pub mod model_azure_uc_config_post_request_type; +pub use self::model_azure_uc_config_post_request_type::AzureUCConfigPostRequestType; +pub mod model_azure_uc_config_pairs_response; +pub use self::model_azure_uc_config_pairs_response::AzureUCConfigPairsResponse; +pub mod model_azure_uc_config_patch_request; +pub use self::model_azure_uc_config_patch_request::AzureUCConfigPatchRequest; +pub mod model_azure_uc_config_patch_data; +pub use self::model_azure_uc_config_patch_data::AzureUCConfigPatchData; +pub mod model_azure_uc_config_patch_request_attributes; +pub use self::model_azure_uc_config_patch_request_attributes::AzureUCConfigPatchRequestAttributes; +pub mod model_azure_uc_config_patch_request_type; +pub use self::model_azure_uc_config_patch_request_type::AzureUCConfigPatchRequestType; +pub mod model_cloud_cost_activity_response; +pub use self::model_cloud_cost_activity_response::CloudCostActivityResponse; +pub mod model_cloud_cost_activity; +pub use self::model_cloud_cost_activity::CloudCostActivity; +pub mod model_cloud_cost_activity_attributes; +pub use self::model_cloud_cost_activity_attributes::CloudCostActivityAttributes; +pub mod model_cloud_cost_activity_type; +pub use self::model_cloud_cost_activity_type::CloudCostActivityType; +pub mod model_active_billing_dimensions_response; +pub use self::model_active_billing_dimensions_response::ActiveBillingDimensionsResponse; +pub mod model_active_billing_dimensions_body; +pub use self::model_active_billing_dimensions_body::ActiveBillingDimensionsBody; +pub mod model_active_billing_dimensions_attributes; +pub use self::model_active_billing_dimensions_attributes::ActiveBillingDimensionsAttributes; +pub mod model_active_billing_dimensions_type; +pub use self::model_active_billing_dimensions_type::ActiveBillingDimensionsType; +pub mod model_sort_direction; +pub use self::model_sort_direction::SortDirection; +pub mod model_monthly_cost_attribution_response; +pub use self::model_monthly_cost_attribution_response::MonthlyCostAttributionResponse; +pub mod model_monthly_cost_attribution_body; +pub use self::model_monthly_cost_attribution_body::MonthlyCostAttributionBody; +pub mod model_monthly_cost_attribution_attributes; +pub use self::model_monthly_cost_attribution_attributes::MonthlyCostAttributionAttributes; +pub mod model_cost_attribution_type; +pub use self::model_cost_attribution_type::CostAttributionType; +pub mod model_monthly_cost_attribution_meta; +pub use self::model_monthly_cost_attribution_meta::MonthlyCostAttributionMeta; +pub mod model_cost_attribution_aggregates_body; +pub use self::model_cost_attribution_aggregates_body::CostAttributionAggregatesBody; +pub mod model_monthly_cost_attribution_pagination; +pub use self::model_monthly_cost_attribution_pagination::MonthlyCostAttributionPagination; +pub mod model_application_key_create_request; +pub use self::model_application_key_create_request::ApplicationKeyCreateRequest; +pub mod model_application_key_create_data; +pub use self::model_application_key_create_data::ApplicationKeyCreateData; +pub mod model_application_key_create_attributes; +pub use self::model_application_key_create_attributes::ApplicationKeyCreateAttributes; pub mod model_dashboard_list_delete_items_request; pub use self::model_dashboard_list_delete_items_request::DashboardListDeleteItemsRequest; pub mod model_dashboard_list_item_request; @@ -130,6 +590,114 @@ pub mod model_dashboard_list_update_items_request; pub use self::model_dashboard_list_update_items_request::DashboardListUpdateItemsRequest; pub mod model_dashboard_list_update_items_response; pub use self::model_dashboard_list_update_items_response::DashboardListUpdateItemsResponse; +pub mod model_dora_deployment_request; +pub use self::model_dora_deployment_request::DORADeploymentRequest; +pub mod model_dora_deployment_request_data; +pub use self::model_dora_deployment_request_data::DORADeploymentRequestData; +pub mod model_dora_deployment_request_attributes; +pub use self::model_dora_deployment_request_attributes::DORADeploymentRequestAttributes; +pub mod model_dora_git_info; +pub use self::model_dora_git_info::DORAGitInfo; +pub mod model_dora_deployment_response; +pub use self::model_dora_deployment_response::DORADeploymentResponse; +pub mod model_dora_deployment_response_data; +pub use self::model_dora_deployment_response_data::DORADeploymentResponseData; +pub mod model_dora_deployment_type; +pub use self::model_dora_deployment_type::DORADeploymentType; +pub mod model_jsonapi_error_response; +pub use self::model_jsonapi_error_response::JSONAPIErrorResponse; +pub mod model_jsonapi_error_item; +pub use self::model_jsonapi_error_item::JSONAPIErrorItem; +pub mod model_dora_incident_request; +pub use self::model_dora_incident_request::DORAIncidentRequest; +pub mod model_dora_incident_request_data; +pub use self::model_dora_incident_request_data::DORAIncidentRequestData; +pub mod model_dora_incident_request_attributes; +pub use self::model_dora_incident_request_attributes::DORAIncidentRequestAttributes; +pub mod model_dora_incident_response; +pub use self::model_dora_incident_response::DORAIncidentResponse; +pub mod model_dora_incident_response_data; +pub use self::model_dora_incident_response_data::DORAIncidentResponseData; +pub mod model_dora_incident_type; +pub use self::model_dora_incident_type::DORAIncidentType; +pub mod model_list_downtimes_response; +pub use self::model_list_downtimes_response::ListDowntimesResponse; +pub mod model_downtime_response_data; +pub use self::model_downtime_response_data::DowntimeResponseData; +pub mod model_downtime_response_attributes; +pub use self::model_downtime_response_attributes::DowntimeResponseAttributes; +pub mod model_downtime_monitor_identifier_id; +pub use self::model_downtime_monitor_identifier_id::DowntimeMonitorIdentifierId; +pub mod model_downtime_monitor_identifier_tags; +pub use self::model_downtime_monitor_identifier_tags::DowntimeMonitorIdentifierTags; +pub mod model_downtime_monitor_identifier; +pub use self::model_downtime_monitor_identifier::DowntimeMonitorIdentifier; +pub mod model_downtime_notify_end_state_types; +pub use self::model_downtime_notify_end_state_types::DowntimeNotifyEndStateTypes; +pub mod model_downtime_notify_end_state_actions; +pub use self::model_downtime_notify_end_state_actions::DowntimeNotifyEndStateActions; +pub mod model_downtime_schedule_recurrences_response; +pub use self::model_downtime_schedule_recurrences_response::DowntimeScheduleRecurrencesResponse; +pub mod model_downtime_schedule_current_downtime_response; +pub use self::model_downtime_schedule_current_downtime_response::DowntimeScheduleCurrentDowntimeResponse; +pub mod model_downtime_schedule_recurrence_response; +pub use self::model_downtime_schedule_recurrence_response::DowntimeScheduleRecurrenceResponse; +pub mod model_downtime_schedule_one_time_response; +pub use self::model_downtime_schedule_one_time_response::DowntimeScheduleOneTimeResponse; +pub mod model_downtime_schedule_response; +pub use self::model_downtime_schedule_response::DowntimeScheduleResponse; +pub mod model_downtime_status; +pub use self::model_downtime_status::DowntimeStatus; +pub mod model_downtime_relationships; +pub use self::model_downtime_relationships::DowntimeRelationships; +pub mod model_downtime_relationships_created_by; +pub use self::model_downtime_relationships_created_by::DowntimeRelationshipsCreatedBy; +pub mod model_downtime_relationships_created_by_data; +pub use self::model_downtime_relationships_created_by_data::DowntimeRelationshipsCreatedByData; +pub mod model_downtime_relationships_monitor; +pub use self::model_downtime_relationships_monitor::DowntimeRelationshipsMonitor; +pub mod model_downtime_relationships_monitor_data; +pub use self::model_downtime_relationships_monitor_data::DowntimeRelationshipsMonitorData; +pub mod model_downtime_included_monitor_type; +pub use self::model_downtime_included_monitor_type::DowntimeIncludedMonitorType; +pub mod model_downtime_resource_type; +pub use self::model_downtime_resource_type::DowntimeResourceType; +pub mod model_downtime_monitor_included_item; +pub use self::model_downtime_monitor_included_item::DowntimeMonitorIncludedItem; +pub mod model_downtime_monitor_included_attributes; +pub use self::model_downtime_monitor_included_attributes::DowntimeMonitorIncludedAttributes; +pub mod model_downtime_response_included_item; +pub use self::model_downtime_response_included_item::DowntimeResponseIncludedItem; +pub mod model_downtime_meta; +pub use self::model_downtime_meta::DowntimeMeta; +pub mod model_downtime_meta_page; +pub use self::model_downtime_meta_page::DowntimeMetaPage; +pub mod model_downtime_create_request; +pub use self::model_downtime_create_request::DowntimeCreateRequest; +pub mod model_downtime_create_request_data; +pub use self::model_downtime_create_request_data::DowntimeCreateRequestData; +pub mod model_downtime_create_request_attributes; +pub use self::model_downtime_create_request_attributes::DowntimeCreateRequestAttributes; +pub mod model_downtime_schedule_recurrences_create_request; +pub use self::model_downtime_schedule_recurrences_create_request::DowntimeScheduleRecurrencesCreateRequest; +pub mod model_downtime_schedule_recurrence_create_update_request; +pub use self::model_downtime_schedule_recurrence_create_update_request::DowntimeScheduleRecurrenceCreateUpdateRequest; +pub mod model_downtime_schedule_one_time_create_update_request; +pub use self::model_downtime_schedule_one_time_create_update_request::DowntimeScheduleOneTimeCreateUpdateRequest; +pub mod model_downtime_schedule_create_request; +pub use self::model_downtime_schedule_create_request::DowntimeScheduleCreateRequest; +pub mod model_downtime_response; +pub use self::model_downtime_response::DowntimeResponse; +pub mod model_downtime_update_request; +pub use self::model_downtime_update_request::DowntimeUpdateRequest; +pub mod model_downtime_update_request_data; +pub use self::model_downtime_update_request_data::DowntimeUpdateRequestData; +pub mod model_downtime_update_request_attributes; +pub use self::model_downtime_update_request_attributes::DowntimeUpdateRequestAttributes; +pub mod model_downtime_schedule_recurrences_update_request; +pub use self::model_downtime_schedule_recurrences_update_request::DowntimeScheduleRecurrencesUpdateRequest; +pub mod model_downtime_schedule_update_request; +pub use self::model_downtime_schedule_update_request::DowntimeScheduleUpdateRequest; pub mod model_events_sort; pub use self::model_events_sort::EventsSort; pub mod model_events_list_response; @@ -166,6 +734,224 @@ pub mod model_events_query_options; pub use self::model_events_query_options::EventsQueryOptions; pub mod model_events_request_page; pub use self::model_events_request_page::EventsRequestPage; +pub mod model_incident_related_object; +pub use self::model_incident_related_object::IncidentRelatedObject; +pub mod model_incidents_response; +pub use self::model_incidents_response::IncidentsResponse; +pub mod model_incident_response_data; +pub use self::model_incident_response_data::IncidentResponseData; +pub mod model_incident_response_attributes; +pub use self::model_incident_response_attributes::IncidentResponseAttributes; +pub mod model_incident_field_attributes_single_value; +pub use self::model_incident_field_attributes_single_value::IncidentFieldAttributesSingleValue; +pub mod model_incident_field_attributes_single_value_type; +pub use self::model_incident_field_attributes_single_value_type::IncidentFieldAttributesSingleValueType; +pub mod model_incident_field_attributes_multiple_value; +pub use self::model_incident_field_attributes_multiple_value::IncidentFieldAttributesMultipleValue; +pub mod model_incident_field_attributes_value_type; +pub use self::model_incident_field_attributes_value_type::IncidentFieldAttributesValueType; +pub mod model_incident_field_attributes; +pub use self::model_incident_field_attributes::IncidentFieldAttributes; +pub mod model_incident_non_datadog_creator; +pub use self::model_incident_non_datadog_creator::IncidentNonDatadogCreator; +pub mod model_incident_notification_handle; +pub use self::model_incident_notification_handle::IncidentNotificationHandle; +pub mod model_incident_severity; +pub use self::model_incident_severity::IncidentSeverity; +pub mod model_incident_response_relationships; +pub use self::model_incident_response_relationships::IncidentResponseRelationships; +pub mod model_relationship_to_incident_attachment; +pub use self::model_relationship_to_incident_attachment::RelationshipToIncidentAttachment; +pub mod model_relationship_to_incident_attachment_data; +pub use self::model_relationship_to_incident_attachment_data::RelationshipToIncidentAttachmentData; +pub mod model_incident_attachment_type; +pub use self::model_incident_attachment_type::IncidentAttachmentType; +pub mod model_nullable_relationship_to_user; +pub use self::model_nullable_relationship_to_user::NullableRelationshipToUser; +pub mod model_nullable_relationship_to_user_data; +pub use self::model_nullable_relationship_to_user_data::NullableRelationshipToUserData; +pub mod model_relationship_to_incident_impacts; +pub use self::model_relationship_to_incident_impacts::RelationshipToIncidentImpacts; +pub mod model_relationship_to_incident_impact_data; +pub use self::model_relationship_to_incident_impact_data::RelationshipToIncidentImpactData; +pub mod model_incident_impacts_type; +pub use self::model_incident_impacts_type::IncidentImpactsType; +pub mod model_relationship_to_incident_integration_metadatas; +pub use self::model_relationship_to_incident_integration_metadatas::RelationshipToIncidentIntegrationMetadatas; +pub mod model_relationship_to_incident_integration_metadata_data; +pub use self::model_relationship_to_incident_integration_metadata_data::RelationshipToIncidentIntegrationMetadataData; +pub mod model_incident_integration_metadata_type; +pub use self::model_incident_integration_metadata_type::IncidentIntegrationMetadataType; +pub mod model_relationship_to_incident_responders; +pub use self::model_relationship_to_incident_responders::RelationshipToIncidentResponders; +pub mod model_relationship_to_incident_responder_data; +pub use self::model_relationship_to_incident_responder_data::RelationshipToIncidentResponderData; +pub mod model_incident_responders_type; +pub use self::model_incident_responders_type::IncidentRespondersType; +pub mod model_relationship_to_incident_user_defined_fields; +pub use self::model_relationship_to_incident_user_defined_fields::RelationshipToIncidentUserDefinedFields; +pub mod model_relationship_to_incident_user_defined_field_data; +pub use self::model_relationship_to_incident_user_defined_field_data::RelationshipToIncidentUserDefinedFieldData; +pub mod model_incident_user_defined_field_type; +pub use self::model_incident_user_defined_field_type::IncidentUserDefinedFieldType; +pub mod model_incident_type; +pub use self::model_incident_type::IncidentType; +pub mod model_incident_attachment_data; +pub use self::model_incident_attachment_data::IncidentAttachmentData; +pub mod model_incident_attachment_postmortem_attributes; +pub use self::model_incident_attachment_postmortem_attributes::IncidentAttachmentPostmortemAttributes; +pub mod model_incident_attachments_postmortem_attributes_attachment_object; +pub use self::model_incident_attachments_postmortem_attributes_attachment_object::IncidentAttachmentsPostmortemAttributesAttachmentObject; +pub mod model_incident_attachment_postmortem_attachment_type; +pub use self::model_incident_attachment_postmortem_attachment_type::IncidentAttachmentPostmortemAttachmentType; +pub mod model_incident_attachment_link_attributes; +pub use self::model_incident_attachment_link_attributes::IncidentAttachmentLinkAttributes; +pub mod model_incident_attachment_link_attributes_attachment_object; +pub use self::model_incident_attachment_link_attributes_attachment_object::IncidentAttachmentLinkAttributesAttachmentObject; +pub mod model_incident_attachment_link_attachment_type; +pub use self::model_incident_attachment_link_attachment_type::IncidentAttachmentLinkAttachmentType; +pub mod model_incident_attachment_attributes; +pub use self::model_incident_attachment_attributes::IncidentAttachmentAttributes; +pub mod model_incident_attachment_relationships; +pub use self::model_incident_attachment_relationships::IncidentAttachmentRelationships; +pub mod model_incident_response_included_item; +pub use self::model_incident_response_included_item::IncidentResponseIncludedItem; +pub mod model_incident_response_meta; +pub use self::model_incident_response_meta::IncidentResponseMeta; +pub mod model_incident_response_meta_pagination; +pub use self::model_incident_response_meta_pagination::IncidentResponseMetaPagination; +pub mod model_incident_create_request; +pub use self::model_incident_create_request::IncidentCreateRequest; +pub mod model_incident_create_data; +pub use self::model_incident_create_data::IncidentCreateData; +pub mod model_incident_create_attributes; +pub use self::model_incident_create_attributes::IncidentCreateAttributes; +pub mod model_incident_timeline_cell_markdown_create_attributes; +pub use self::model_incident_timeline_cell_markdown_create_attributes::IncidentTimelineCellMarkdownCreateAttributes; +pub mod model_incident_timeline_cell_markdown_content_type; +pub use self::model_incident_timeline_cell_markdown_content_type::IncidentTimelineCellMarkdownContentType; +pub mod model_incident_timeline_cell_markdown_create_attributes_content; +pub use self::model_incident_timeline_cell_markdown_create_attributes_content::IncidentTimelineCellMarkdownCreateAttributesContent; +pub mod model_incident_timeline_cell_create_attributes; +pub use self::model_incident_timeline_cell_create_attributes::IncidentTimelineCellCreateAttributes; +pub mod model_incident_create_relationships; +pub use self::model_incident_create_relationships::IncidentCreateRelationships; +pub mod model_incident_response; +pub use self::model_incident_response::IncidentResponse; +pub mod model_incident_search_sort_order; +pub use self::model_incident_search_sort_order::IncidentSearchSortOrder; +pub mod model_incident_search_response; +pub use self::model_incident_search_response::IncidentSearchResponse; +pub mod model_incident_search_response_data; +pub use self::model_incident_search_response_data::IncidentSearchResponseData; +pub mod model_incident_search_response_attributes; +pub use self::model_incident_search_response_attributes::IncidentSearchResponseAttributes; +pub mod model_incident_search_response_facets_data; +pub use self::model_incident_search_response_facets_data::IncidentSearchResponseFacetsData; +pub mod model_incident_search_response_user_facet_data; +pub use self::model_incident_search_response_user_facet_data::IncidentSearchResponseUserFacetData; +pub mod model_incident_search_response_property_field_facet_data; +pub use self::model_incident_search_response_property_field_facet_data::IncidentSearchResponsePropertyFieldFacetData; +pub mod model_incident_search_response_numeric_facet_data_aggregates; +pub use self::model_incident_search_response_numeric_facet_data_aggregates::IncidentSearchResponseNumericFacetDataAggregates; +pub mod model_incident_search_response_field_facet_data; +pub use self::model_incident_search_response_field_facet_data::IncidentSearchResponseFieldFacetData; +pub mod model_incident_search_response_numeric_facet_data; +pub use self::model_incident_search_response_numeric_facet_data::IncidentSearchResponseNumericFacetData; +pub mod model_incident_search_response_incidents_data; +pub use self::model_incident_search_response_incidents_data::IncidentSearchResponseIncidentsData; +pub mod model_incident_search_results_type; +pub use self::model_incident_search_results_type::IncidentSearchResultsType; +pub mod model_incident_search_response_meta; +pub use self::model_incident_search_response_meta::IncidentSearchResponseMeta; +pub mod model_incident_update_request; +pub use self::model_incident_update_request::IncidentUpdateRequest; +pub mod model_incident_update_data; +pub use self::model_incident_update_data::IncidentUpdateData; +pub mod model_incident_update_attributes; +pub use self::model_incident_update_attributes::IncidentUpdateAttributes; +pub mod model_incident_update_relationships; +pub use self::model_incident_update_relationships::IncidentUpdateRelationships; +pub mod model_relationship_to_incident_postmortem; +pub use self::model_relationship_to_incident_postmortem::RelationshipToIncidentPostmortem; +pub mod model_relationship_to_incident_postmortem_data; +pub use self::model_relationship_to_incident_postmortem_data::RelationshipToIncidentPostmortemData; +pub mod model_incident_postmortem_type; +pub use self::model_incident_postmortem_type::IncidentPostmortemType; +pub mod model_incident_attachment_related_object; +pub use self::model_incident_attachment_related_object::IncidentAttachmentRelatedObject; +pub mod model_incident_attachment_attachment_type; +pub use self::model_incident_attachment_attachment_type::IncidentAttachmentAttachmentType; +pub mod model_incident_attachments_response; +pub use self::model_incident_attachments_response::IncidentAttachmentsResponse; +pub mod model_incident_attachments_response_included_item; +pub use self::model_incident_attachments_response_included_item::IncidentAttachmentsResponseIncludedItem; +pub mod model_incident_attachment_update_request; +pub use self::model_incident_attachment_update_request::IncidentAttachmentUpdateRequest; +pub mod model_incident_attachment_update_data; +pub use self::model_incident_attachment_update_data::IncidentAttachmentUpdateData; +pub mod model_incident_attachment_update_attributes; +pub use self::model_incident_attachment_update_attributes::IncidentAttachmentUpdateAttributes; +pub mod model_incident_attachment_update_response; +pub use self::model_incident_attachment_update_response::IncidentAttachmentUpdateResponse; +pub mod model_incident_integration_metadata_list_response; +pub use self::model_incident_integration_metadata_list_response::IncidentIntegrationMetadataListResponse; +pub mod model_incident_integration_metadata_response_data; +pub use self::model_incident_integration_metadata_response_data::IncidentIntegrationMetadataResponseData; +pub mod model_incident_integration_metadata_attributes; +pub use self::model_incident_integration_metadata_attributes::IncidentIntegrationMetadataAttributes; +pub mod model_slack_integration_metadata; +pub use self::model_slack_integration_metadata::SlackIntegrationMetadata; +pub mod model_slack_integration_metadata_channel_item; +pub use self::model_slack_integration_metadata_channel_item::SlackIntegrationMetadataChannelItem; +pub mod model_jira_integration_metadata; +pub use self::model_jira_integration_metadata::JiraIntegrationMetadata; +pub mod model_jira_integration_metadata_issues_item; +pub use self::model_jira_integration_metadata_issues_item::JiraIntegrationMetadataIssuesItem; +pub mod model_incident_integration_metadata_metadata; +pub use self::model_incident_integration_metadata_metadata::IncidentIntegrationMetadataMetadata; +pub mod model_incident_integration_relationships; +pub use self::model_incident_integration_relationships::IncidentIntegrationRelationships; +pub mod model_incident_integration_metadata_response_included_item; +pub use self::model_incident_integration_metadata_response_included_item::IncidentIntegrationMetadataResponseIncludedItem; +pub mod model_incident_integration_metadata_create_request; +pub use self::model_incident_integration_metadata_create_request::IncidentIntegrationMetadataCreateRequest; +pub mod model_incident_integration_metadata_create_data; +pub use self::model_incident_integration_metadata_create_data::IncidentIntegrationMetadataCreateData; +pub mod model_incident_integration_metadata_response; +pub use self::model_incident_integration_metadata_response::IncidentIntegrationMetadataResponse; +pub mod model_incident_integration_metadata_patch_request; +pub use self::model_incident_integration_metadata_patch_request::IncidentIntegrationMetadataPatchRequest; +pub mod model_incident_integration_metadata_patch_data; +pub use self::model_incident_integration_metadata_patch_data::IncidentIntegrationMetadataPatchData; +pub mod model_incident_todo_list_response; +pub use self::model_incident_todo_list_response::IncidentTodoListResponse; +pub mod model_incident_todo_response_data; +pub use self::model_incident_todo_response_data::IncidentTodoResponseData; +pub mod model_incident_todo_attributes; +pub use self::model_incident_todo_attributes::IncidentTodoAttributes; +pub mod model_incident_todo_anonymous_assignee; +pub use self::model_incident_todo_anonymous_assignee::IncidentTodoAnonymousAssignee; +pub mod model_incident_todo_anonymous_assignee_source; +pub use self::model_incident_todo_anonymous_assignee_source::IncidentTodoAnonymousAssigneeSource; +pub mod model_incident_todo_assignee; +pub use self::model_incident_todo_assignee::IncidentTodoAssignee; +pub mod model_incident_todo_relationships; +pub use self::model_incident_todo_relationships::IncidentTodoRelationships; +pub mod model_incident_todo_type; +pub use self::model_incident_todo_type::IncidentTodoType; +pub mod model_incident_todo_response_included_item; +pub use self::model_incident_todo_response_included_item::IncidentTodoResponseIncludedItem; +pub mod model_incident_todo_create_request; +pub use self::model_incident_todo_create_request::IncidentTodoCreateRequest; +pub mod model_incident_todo_create_data; +pub use self::model_incident_todo_create_data::IncidentTodoCreateData; +pub mod model_incident_todo_response; +pub use self::model_incident_todo_response::IncidentTodoResponse; +pub mod model_incident_todo_patch_request; +pub use self::model_incident_todo_patch_request::IncidentTodoPatchRequest; +pub mod model_incident_todo_patch_data; +pub use self::model_incident_todo_patch_data::IncidentTodoPatchData; pub mod model_gcpsts_service_accounts_response; pub use self::model_gcpsts_service_accounts_response::GCPSTSServiceAccountsResponse; pub mod model_gcpsts_service_account; @@ -316,6 +1102,26 @@ pub mod model_fastly_service_type; pub use self::model_fastly_service_type::FastlyServiceType; pub mod model_fastly_service_request; pub use self::model_fastly_service_request::FastlyServiceRequest; +pub mod model_okta_accounts_response; +pub use self::model_okta_accounts_response::OktaAccountsResponse; +pub mod model_okta_account_response_data; +pub use self::model_okta_account_response_data::OktaAccountResponseData; +pub mod model_okta_account_attributes; +pub use self::model_okta_account_attributes::OktaAccountAttributes; +pub mod model_okta_account_type; +pub use self::model_okta_account_type::OktaAccountType; +pub mod model_okta_account_request; +pub use self::model_okta_account_request::OktaAccountRequest; +pub mod model_okta_account; +pub use self::model_okta_account::OktaAccount; +pub mod model_okta_account_response; +pub use self::model_okta_account_response::OktaAccountResponse; +pub mod model_okta_account_update_request; +pub use self::model_okta_account_update_request::OktaAccountUpdateRequest; +pub mod model_okta_account_update_request_data; +pub use self::model_okta_account_update_request_data::OktaAccountUpdateRequestData; +pub mod model_okta_account_update_request_attributes; +pub use self::model_okta_account_update_request_attributes::OktaAccountUpdateRequestAttributes; pub mod model_ip_allowlist_response; pub use self::model_ip_allowlist_response::IPAllowlistResponse; pub mod model_ip_allowlist_data; @@ -342,6 +1148,104 @@ pub mod model_http_log_errors; pub use self::model_http_log_errors::HTTPLogErrors; pub mod model_http_log_error; pub use self::model_http_log_error::HTTPLogError; +pub mod model_logs_aggregate_request; +pub use self::model_logs_aggregate_request::LogsAggregateRequest; +pub mod model_logs_compute; +pub use self::model_logs_compute::LogsCompute; +pub mod model_logs_aggregation_function; +pub use self::model_logs_aggregation_function::LogsAggregationFunction; +pub mod model_logs_compute_type; +pub use self::model_logs_compute_type::LogsComputeType; +pub mod model_logs_query_filter; +pub use self::model_logs_query_filter::LogsQueryFilter; +pub mod model_logs_storage_tier; +pub use self::model_logs_storage_tier::LogsStorageTier; +pub mod model_logs_group_by; +pub use self::model_logs_group_by::LogsGroupBy; +pub mod model_logs_group_by_histogram; +pub use self::model_logs_group_by_histogram::LogsGroupByHistogram; +pub mod model_logs_group_by_missing; +pub use self::model_logs_group_by_missing::LogsGroupByMissing; +pub mod model_logs_aggregate_sort; +pub use self::model_logs_aggregate_sort::LogsAggregateSort; +pub mod model_logs_sort_order; +pub use self::model_logs_sort_order::LogsSortOrder; +pub mod model_logs_aggregate_sort_type; +pub use self::model_logs_aggregate_sort_type::LogsAggregateSortType; +pub mod model_logs_group_by_total; +pub use self::model_logs_group_by_total::LogsGroupByTotal; +pub mod model_logs_query_options; +pub use self::model_logs_query_options::LogsQueryOptions; +pub mod model_logs_aggregate_request_page; +pub use self::model_logs_aggregate_request_page::LogsAggregateRequestPage; +pub mod model_logs_aggregate_response; +pub use self::model_logs_aggregate_response::LogsAggregateResponse; +pub mod model_logs_aggregate_response_data; +pub use self::model_logs_aggregate_response_data::LogsAggregateResponseData; +pub mod model_logs_aggregate_bucket; +pub use self::model_logs_aggregate_bucket::LogsAggregateBucket; +pub mod model_logs_aggregate_bucket_value_timeseries; +pub use self::model_logs_aggregate_bucket_value_timeseries::LogsAggregateBucketValueTimeseries; +pub mod model_logs_aggregate_bucket_value_timeseries_point; +pub use self::model_logs_aggregate_bucket_value_timeseries_point::LogsAggregateBucketValueTimeseriesPoint; +pub mod model_logs_aggregate_bucket_value; +pub use self::model_logs_aggregate_bucket_value::LogsAggregateBucketValue; +pub mod model_logs_response_metadata; +pub use self::model_logs_response_metadata::LogsResponseMetadata; +pub mod model_logs_response_metadata_page; +pub use self::model_logs_response_metadata_page::LogsResponseMetadataPage; +pub mod model_logs_aggregate_response_status; +pub use self::model_logs_aggregate_response_status::LogsAggregateResponseStatus; +pub mod model_logs_warning; +pub use self::model_logs_warning::LogsWarning; +pub mod model_logs_archive_order; +pub use self::model_logs_archive_order::LogsArchiveOrder; +pub mod model_logs_archive_order_definition; +pub use self::model_logs_archive_order_definition::LogsArchiveOrderDefinition; +pub mod model_logs_archive_order_attributes; +pub use self::model_logs_archive_order_attributes::LogsArchiveOrderAttributes; +pub mod model_logs_archive_order_definition_type; +pub use self::model_logs_archive_order_definition_type::LogsArchiveOrderDefinitionType; +pub mod model_logs_archives; +pub use self::model_logs_archives::LogsArchives; +pub mod model_logs_archive_definition; +pub use self::model_logs_archive_definition::LogsArchiveDefinition; +pub mod model_logs_archive_attributes; +pub use self::model_logs_archive_attributes::LogsArchiveAttributes; +pub mod model_logs_archive_destination_azure; +pub use self::model_logs_archive_destination_azure::LogsArchiveDestinationAzure; +pub mod model_logs_archive_integration_azure; +pub use self::model_logs_archive_integration_azure::LogsArchiveIntegrationAzure; +pub mod model_logs_archive_destination_azure_type; +pub use self::model_logs_archive_destination_azure_type::LogsArchiveDestinationAzureType; +pub mod model_logs_archive_destination_gcs; +pub use self::model_logs_archive_destination_gcs::LogsArchiveDestinationGCS; +pub mod model_logs_archive_integration_gcs; +pub use self::model_logs_archive_integration_gcs::LogsArchiveIntegrationGCS; +pub mod model_logs_archive_destination_gcs_type; +pub use self::model_logs_archive_destination_gcs_type::LogsArchiveDestinationGCSType; +pub mod model_logs_archive_destination_s3; +pub use self::model_logs_archive_destination_s3::LogsArchiveDestinationS3; +pub mod model_logs_archive_integration_s3; +pub use self::model_logs_archive_integration_s3::LogsArchiveIntegrationS3; +pub mod model_logs_archive_destination_s3_type; +pub use self::model_logs_archive_destination_s3_type::LogsArchiveDestinationS3Type; +pub mod model_logs_archive_destination; +pub use self::model_logs_archive_destination::LogsArchiveDestination; +pub mod model_logs_archive_state; +pub use self::model_logs_archive_state::LogsArchiveState; +pub mod model_logs_archive_create_request; +pub use self::model_logs_archive_create_request::LogsArchiveCreateRequest; +pub mod model_logs_archive_create_request_definition; +pub use self::model_logs_archive_create_request_definition::LogsArchiveCreateRequestDefinition; +pub mod model_logs_archive_create_request_attributes; +pub use self::model_logs_archive_create_request_attributes::LogsArchiveCreateRequestAttributes; +pub mod model_logs_archive_create_request_destination; +pub use self::model_logs_archive_create_request_destination::LogsArchiveCreateRequestDestination; +pub mod model_logs_archive; +pub use self::model_logs_archive::LogsArchive; +pub mod model_roles_response; +pub use self::model_roles_response::RolesResponse; pub mod model_logs_metrics_response; pub use self::model_logs_metrics_response::LogsMetricsResponse; pub mod model_logs_metric_response_data; @@ -382,14 +1286,164 @@ pub mod model_logs_metric_update_attributes; pub use self::model_logs_metric_update_attributes::LogsMetricUpdateAttributes; pub mod model_logs_metric_update_compute; pub use self::model_logs_metric_update_compute::LogsMetricUpdateCompute; +pub mod model_logs_sort; +pub use self::model_logs_sort::LogsSort; +pub mod model_logs_list_response; +pub use self::model_logs_list_response::LogsListResponse; +pub mod model_log; +pub use self::model_log::Log; +pub mod model_log_attributes; +pub use self::model_log_attributes::LogAttributes; +pub mod model_log_type; +pub use self::model_log_type::LogType; +pub mod model_logs_list_response_links; +pub use self::model_logs_list_response_links::LogsListResponseLinks; +pub mod model_logs_list_request; +pub use self::model_logs_list_request::LogsListRequest; +pub mod model_logs_list_request_page; +pub use self::model_logs_list_request_page::LogsListRequestPage; +pub mod model_metric_tag_configuration_metric_types; +pub use self::model_metric_tag_configuration_metric_types::MetricTagConfigurationMetricTypes; +pub mod model_metrics_and_metric_tag_configurations_response; +pub use self::model_metrics_and_metric_tag_configurations_response::MetricsAndMetricTagConfigurationsResponse; +pub mod model_metric; +pub use self::model_metric::Metric; +pub mod model_metric_type; +pub use self::model_metric_type::MetricType; +pub mod model_metric_tag_configuration; +pub use self::model_metric_tag_configuration::MetricTagConfiguration; +pub mod model_metric_tag_configuration_attributes; +pub use self::model_metric_tag_configuration_attributes::MetricTagConfigurationAttributes; +pub mod model_metric_custom_aggregation; +pub use self::model_metric_custom_aggregation::MetricCustomAggregation; +pub mod model_metric_custom_space_aggregation; +pub use self::model_metric_custom_space_aggregation::MetricCustomSpaceAggregation; +pub mod model_metric_custom_time_aggregation; +pub use self::model_metric_custom_time_aggregation::MetricCustomTimeAggregation; +pub mod model_metric_tag_configuration_type; +pub use self::model_metric_tag_configuration_type::MetricTagConfigurationType; +pub mod model_metrics_and_metric_tag_configurations; +pub use self::model_metrics_and_metric_tag_configurations::MetricsAndMetricTagConfigurations; +pub mod model_metric_bulk_tag_config_delete_request; +pub use self::model_metric_bulk_tag_config_delete_request::MetricBulkTagConfigDeleteRequest; +pub mod model_metric_bulk_tag_config_delete; +pub use self::model_metric_bulk_tag_config_delete::MetricBulkTagConfigDelete; +pub mod model_metric_bulk_tag_config_delete_attributes; +pub use self::model_metric_bulk_tag_config_delete_attributes::MetricBulkTagConfigDeleteAttributes; +pub mod model_metric_bulk_configure_tags_type; +pub use self::model_metric_bulk_configure_tags_type::MetricBulkConfigureTagsType; +pub mod model_metric_bulk_tag_config_response; +pub use self::model_metric_bulk_tag_config_response::MetricBulkTagConfigResponse; +pub mod model_metric_bulk_tag_config_status; +pub use self::model_metric_bulk_tag_config_status::MetricBulkTagConfigStatus; +pub mod model_metric_bulk_tag_config_status_attributes; +pub use self::model_metric_bulk_tag_config_status_attributes::MetricBulkTagConfigStatusAttributes; +pub mod model_metric_bulk_tag_config_create_request; +pub use self::model_metric_bulk_tag_config_create_request::MetricBulkTagConfigCreateRequest; +pub mod model_metric_bulk_tag_config_create; +pub use self::model_metric_bulk_tag_config_create::MetricBulkTagConfigCreate; +pub mod model_metric_bulk_tag_config_create_attributes; +pub use self::model_metric_bulk_tag_config_create_attributes::MetricBulkTagConfigCreateAttributes; +pub mod model_metric_suggested_tags_and_aggregations_response; +pub use self::model_metric_suggested_tags_and_aggregations_response::MetricSuggestedTagsAndAggregationsResponse; +pub mod model_metric_suggested_tags_and_aggregations; +pub use self::model_metric_suggested_tags_and_aggregations::MetricSuggestedTagsAndAggregations; +pub mod model_metric_suggested_tags_attributes; +pub use self::model_metric_suggested_tags_attributes::MetricSuggestedTagsAttributes; +pub mod model_metric_active_configuration_type; +pub use self::model_metric_active_configuration_type::MetricActiveConfigurationType; +pub mod model_metric_all_tags_response; +pub use self::model_metric_all_tags_response::MetricAllTagsResponse; +pub mod model_metric_all_tags; +pub use self::model_metric_all_tags::MetricAllTags; +pub mod model_metric_all_tags_attributes; +pub use self::model_metric_all_tags_attributes::MetricAllTagsAttributes; +pub mod model_metric_estimate_response; +pub use self::model_metric_estimate_response::MetricEstimateResponse; +pub mod model_metric_estimate; +pub use self::model_metric_estimate::MetricEstimate; +pub mod model_metric_estimate_attributes; +pub use self::model_metric_estimate_attributes::MetricEstimateAttributes; +pub mod model_metric_estimate_type; +pub use self::model_metric_estimate_type::MetricEstimateType; +pub mod model_metric_estimate_resource_type; +pub use self::model_metric_estimate_resource_type::MetricEstimateResourceType; +pub mod model_metric_tag_configuration_response; +pub use self::model_metric_tag_configuration_response::MetricTagConfigurationResponse; +pub mod model_metric_tag_configuration_update_request; +pub use self::model_metric_tag_configuration_update_request::MetricTagConfigurationUpdateRequest; +pub mod model_metric_tag_configuration_update_data; +pub use self::model_metric_tag_configuration_update_data::MetricTagConfigurationUpdateData; +pub mod model_metric_tag_configuration_update_attributes; +pub use self::model_metric_tag_configuration_update_attributes::MetricTagConfigurationUpdateAttributes; +pub mod model_metric_tag_configuration_create_request; +pub use self::model_metric_tag_configuration_create_request::MetricTagConfigurationCreateRequest; +pub mod model_metric_tag_configuration_create_data; +pub use self::model_metric_tag_configuration_create_data::MetricTagConfigurationCreateData; +pub mod model_metric_tag_configuration_create_attributes; +pub use self::model_metric_tag_configuration_create_attributes::MetricTagConfigurationCreateAttributes; +pub mod model_metric_volumes_response; +pub use self::model_metric_volumes_response::MetricVolumesResponse; +pub mod model_metric_distinct_volume; +pub use self::model_metric_distinct_volume::MetricDistinctVolume; +pub mod model_metric_distinct_volume_attributes; +pub use self::model_metric_distinct_volume_attributes::MetricDistinctVolumeAttributes; +pub mod model_metric_distinct_volume_type; +pub use self::model_metric_distinct_volume_type::MetricDistinctVolumeType; +pub mod model_metric_ingested_indexed_volume; +pub use self::model_metric_ingested_indexed_volume::MetricIngestedIndexedVolume; +pub mod model_metric_ingested_indexed_volume_attributes; +pub use self::model_metric_ingested_indexed_volume_attributes::MetricIngestedIndexedVolumeAttributes; +pub mod model_metric_ingested_indexed_volume_type; +pub use self::model_metric_ingested_indexed_volume_type::MetricIngestedIndexedVolumeType; +pub mod model_metric_volumes; +pub use self::model_metric_volumes::MetricVolumes; +pub mod model_monitor_config_policy_list_response; +pub use self::model_monitor_config_policy_list_response::MonitorConfigPolicyListResponse; +pub mod model_monitor_config_policy_response_data; +pub use self::model_monitor_config_policy_response_data::MonitorConfigPolicyResponseData; +pub mod model_monitor_config_policy_attribute_response; +pub use self::model_monitor_config_policy_attribute_response::MonitorConfigPolicyAttributeResponse; +pub mod model_monitor_config_policy_tag_policy; +pub use self::model_monitor_config_policy_tag_policy::MonitorConfigPolicyTagPolicy; +pub mod model_monitor_config_policy_policy; +pub use self::model_monitor_config_policy_policy::MonitorConfigPolicyPolicy; +pub mod model_monitor_config_policy_type; +pub use self::model_monitor_config_policy_type::MonitorConfigPolicyType; +pub mod model_monitor_config_policy_resource_type; +pub use self::model_monitor_config_policy_resource_type::MonitorConfigPolicyResourceType; +pub mod model_monitor_config_policy_create_request; +pub use self::model_monitor_config_policy_create_request::MonitorConfigPolicyCreateRequest; +pub mod model_monitor_config_policy_create_data; +pub use self::model_monitor_config_policy_create_data::MonitorConfigPolicyCreateData; +pub mod model_monitor_config_policy_attribute_create_request; +pub use self::model_monitor_config_policy_attribute_create_request::MonitorConfigPolicyAttributeCreateRequest; +pub mod model_monitor_config_policy_tag_policy_create_request; +pub use self::model_monitor_config_policy_tag_policy_create_request::MonitorConfigPolicyTagPolicyCreateRequest; +pub mod model_monitor_config_policy_policy_create_request; +pub use self::model_monitor_config_policy_policy_create_request::MonitorConfigPolicyPolicyCreateRequest; +pub mod model_monitor_config_policy_response; +pub use self::model_monitor_config_policy_response::MonitorConfigPolicyResponse; +pub mod model_monitor_config_policy_edit_request; +pub use self::model_monitor_config_policy_edit_request::MonitorConfigPolicyEditRequest; +pub mod model_monitor_config_policy_edit_data; +pub use self::model_monitor_config_policy_edit_data::MonitorConfigPolicyEditData; +pub mod model_monitor_config_policy_attribute_edit_request; +pub use self::model_monitor_config_policy_attribute_edit_request::MonitorConfigPolicyAttributeEditRequest; +pub mod model_monitor_downtime_match_response; +pub use self::model_monitor_downtime_match_response::MonitorDowntimeMatchResponse; +pub mod model_monitor_downtime_match_response_data; +pub use self::model_monitor_downtime_match_response_data::MonitorDowntimeMatchResponseData; +pub mod model_monitor_downtime_match_response_attributes; +pub use self::model_monitor_downtime_match_response_attributes::MonitorDowntimeMatchResponseAttributes; +pub mod model_monitor_downtime_match_resource_type; +pub use self::model_monitor_downtime_match_resource_type::MonitorDowntimeMatchResourceType; pub mod model_permissions_response; pub use self::model_permissions_response::PermissionsResponse; pub mod model_permission; pub use self::model_permission::Permission; pub mod model_permission_attributes; pub use self::model_permission_attributes::PermissionAttributes; -pub mod model_permissions_type; -pub use self::model_permissions_type::PermissionsType; pub mod model_finding_evaluation; pub use self::model_finding_evaluation::FindingEvaluation; pub mod model_finding_status; @@ -412,10 +1466,22 @@ pub mod model_list_findings_meta; pub use self::model_list_findings_meta::ListFindingsMeta; pub mod model_list_findings_page; pub use self::model_list_findings_page::ListFindingsPage; -pub mod model_jsonapi_error_response; -pub use self::model_jsonapi_error_response::JSONAPIErrorResponse; -pub mod model_jsonapi_error_item; -pub use self::model_jsonapi_error_item::JSONAPIErrorItem; +pub mod model_bulk_mute_findings_request; +pub use self::model_bulk_mute_findings_request::BulkMuteFindingsRequest; +pub mod model_bulk_mute_findings_request_data; +pub use self::model_bulk_mute_findings_request_data::BulkMuteFindingsRequestData; +pub mod model_bulk_mute_findings_request_attributes; +pub use self::model_bulk_mute_findings_request_attributes::BulkMuteFindingsRequestAttributes; +pub mod model_bulk_mute_findings_request_properties; +pub use self::model_bulk_mute_findings_request_properties::BulkMuteFindingsRequestProperties; +pub mod model_bulk_mute_findings_request_meta; +pub use self::model_bulk_mute_findings_request_meta::BulkMuteFindingsRequestMeta; +pub mod model_bulk_mute_findings_request_meta_findings; +pub use self::model_bulk_mute_findings_request_meta_findings::BulkMuteFindingsRequestMetaFindings; +pub mod model_bulk_mute_findings_response; +pub use self::model_bulk_mute_findings_response::BulkMuteFindingsResponse; +pub mod model_bulk_mute_findings_response_data; +pub use self::model_bulk_mute_findings_response_data::BulkMuteFindingsResponseData; pub mod model_get_finding_response; pub use self::model_get_finding_response::GetFindingResponse; pub mod model_detailed_finding; @@ -424,22 +1490,38 @@ pub mod model_detailed_finding_attributes; pub use self::model_detailed_finding_attributes::DetailedFindingAttributes; pub mod model_detailed_finding_type; pub use self::model_detailed_finding_type::DetailedFindingType; -pub mod model_mute_finding_request; -pub use self::model_mute_finding_request::MuteFindingRequest; -pub mod model_mute_finding_request_data; -pub use self::model_mute_finding_request_data::MuteFindingRequestData; -pub mod model_mute_finding_request_attributes; -pub use self::model_mute_finding_request_attributes::MuteFindingRequestAttributes; -pub mod model_mute_finding_request_properties; -pub use self::model_mute_finding_request_properties::MuteFindingRequestProperties; -pub mod model_mute_finding_response; -pub use self::model_mute_finding_response::MuteFindingResponse; -pub mod model_mute_finding_response_data; -pub use self::model_mute_finding_response_data::MuteFindingResponseData; -pub mod model_mute_finding_response_attributes; -pub use self::model_mute_finding_response_attributes::MuteFindingResponseAttributes; -pub mod model_mute_finding_response_properties; -pub use self::model_mute_finding_response_properties::MuteFindingResponseProperties; +pub mod model_list_powerpacks_response; +pub use self::model_list_powerpacks_response::ListPowerpacksResponse; +pub mod model_powerpack_data; +pub use self::model_powerpack_data::PowerpackData; +pub mod model_powerpack_attributes; +pub use self::model_powerpack_attributes::PowerpackAttributes; +pub mod model_powerpack_group_widget; +pub use self::model_powerpack_group_widget::PowerpackGroupWidget; +pub mod model_powerpack_group_widget_definition; +pub use self::model_powerpack_group_widget_definition::PowerpackGroupWidgetDefinition; +pub mod model_powerpack_inner_widgets; +pub use self::model_powerpack_inner_widgets::PowerpackInnerWidgets; +pub mod model_powerpack_inner_widget_layout; +pub use self::model_powerpack_inner_widget_layout::PowerpackInnerWidgetLayout; +pub mod model_powerpack_group_widget_layout; +pub use self::model_powerpack_group_widget_layout::PowerpackGroupWidgetLayout; +pub mod model_widget_live_span; +pub use self::model_widget_live_span::WidgetLiveSpan; +pub mod model_powerpack_template_variable; +pub use self::model_powerpack_template_variable::PowerpackTemplateVariable; +pub mod model_powerpack_relationships; +pub use self::model_powerpack_relationships::PowerpackRelationships; +pub mod model_powerpack_response_links; +pub use self::model_powerpack_response_links::PowerpackResponseLinks; +pub mod model_powerpacks_response_meta; +pub use self::model_powerpacks_response_meta::PowerpacksResponseMeta; +pub mod model_powerpacks_response_meta_pagination; +pub use self::model_powerpacks_response_meta_pagination::PowerpacksResponseMetaPagination; +pub mod model_powerpack; +pub use self::model_powerpack::Powerpack; +pub mod model_powerpack_response; +pub use self::model_powerpack_response::PowerpackResponse; pub mod model_process_summaries_response; pub use self::model_process_summaries_response::ProcessSummariesResponse; pub mod model_process_summary; @@ -452,6 +1534,90 @@ pub mod model_process_summaries_meta; pub use self::model_process_summaries_meta::ProcessSummariesMeta; pub mod model_process_summaries_meta_page; pub use self::model_process_summaries_meta_page::ProcessSummariesMetaPage; +pub mod model_scalar_formula_query_request; +pub use self::model_scalar_formula_query_request::ScalarFormulaQueryRequest; +pub mod model_scalar_formula_request; +pub use self::model_scalar_formula_request::ScalarFormulaRequest; +pub mod model_scalar_formula_request_attributes; +pub use self::model_scalar_formula_request_attributes::ScalarFormulaRequestAttributes; +pub mod model_query_formula; +pub use self::model_query_formula::QueryFormula; +pub mod model_formula_limit; +pub use self::model_formula_limit::FormulaLimit; +pub mod model_query_sort_order; +pub use self::model_query_sort_order::QuerySortOrder; +pub mod model_metrics_scalar_query; +pub use self::model_metrics_scalar_query::MetricsScalarQuery; +pub mod model_metrics_aggregator; +pub use self::model_metrics_aggregator::MetricsAggregator; +pub mod model_metrics_data_source; +pub use self::model_metrics_data_source::MetricsDataSource; +pub mod model_events_scalar_query; +pub use self::model_events_scalar_query::EventsScalarQuery; +pub mod model_events_compute; +pub use self::model_events_compute::EventsCompute; +pub mod model_events_aggregation; +pub use self::model_events_aggregation::EventsAggregation; +pub mod model_events_data_source; +pub use self::model_events_data_source::EventsDataSource; +pub mod model_events_group_by; +pub use self::model_events_group_by::EventsGroupBy; +pub mod model_events_group_by_sort; +pub use self::model_events_group_by_sort::EventsGroupBySort; +pub mod model_events_sort_type; +pub use self::model_events_sort_type::EventsSortType; +pub mod model_events_search; +pub use self::model_events_search::EventsSearch; +pub mod model_scalar_query; +pub use self::model_scalar_query::ScalarQuery; +pub mod model_scalar_formula_request_type; +pub use self::model_scalar_formula_request_type::ScalarFormulaRequestType; +pub mod model_scalar_formula_query_response; +pub use self::model_scalar_formula_query_response::ScalarFormulaQueryResponse; +pub mod model_scalar_response; +pub use self::model_scalar_response::ScalarResponse; +pub mod model_scalar_formula_response_atrributes; +pub use self::model_scalar_formula_response_atrributes::ScalarFormulaResponseAtrributes; +pub mod model_group_scalar_column; +pub use self::model_group_scalar_column::GroupScalarColumn; +pub mod model_scalar_column_type_group; +pub use self::model_scalar_column_type_group::ScalarColumnTypeGroup; +pub mod model_data_scalar_column; +pub use self::model_data_scalar_column::DataScalarColumn; +pub mod model_scalar_meta; +pub use self::model_scalar_meta::ScalarMeta; +pub mod model_unit; +pub use self::model_unit::Unit; +pub mod model_scalar_column_type_number; +pub use self::model_scalar_column_type_number::ScalarColumnTypeNumber; +pub mod model_scalar_column; +pub use self::model_scalar_column::ScalarColumn; +pub mod model_scalar_formula_response_type; +pub use self::model_scalar_formula_response_type::ScalarFormulaResponseType; +pub mod model_timeseries_formula_query_request; +pub use self::model_timeseries_formula_query_request::TimeseriesFormulaQueryRequest; +pub mod model_timeseries_formula_request; +pub use self::model_timeseries_formula_request::TimeseriesFormulaRequest; +pub mod model_timeseries_formula_request_attributes; +pub use self::model_timeseries_formula_request_attributes::TimeseriesFormulaRequestAttributes; +pub mod model_metrics_timeseries_query; +pub use self::model_metrics_timeseries_query::MetricsTimeseriesQuery; +pub mod model_events_timeseries_query; +pub use self::model_events_timeseries_query::EventsTimeseriesQuery; +pub mod model_timeseries_query; +pub use self::model_timeseries_query::TimeseriesQuery; +pub mod model_timeseries_formula_request_type; +pub use self::model_timeseries_formula_request_type::TimeseriesFormulaRequestType; +pub mod model_timeseries_formula_query_response; +pub use self::model_timeseries_formula_query_response::TimeseriesFormulaQueryResponse; +pub mod model_timeseries_response; +pub use self::model_timeseries_response::TimeseriesResponse; +pub mod model_timeseries_response_attributes; +pub use self::model_timeseries_response_attributes::TimeseriesResponseAttributes; +pub mod model_timeseries_response_series; +pub use self::model_timeseries_response_series::TimeseriesResponseSeries; +pub mod model_timeseries_formula_response_type; +pub use self::model_timeseries_formula_response_type::TimeseriesFormulaResponseType; pub mod model_restriction_policy_response; pub use self::model_restriction_policy_response::RestrictionPolicyResponse; pub mod model_restriction_policy; @@ -464,8 +1630,206 @@ pub mod model_restriction_policy_type; pub use self::model_restriction_policy_type::RestrictionPolicyType; pub mod model_restriction_policy_update_request; pub use self::model_restriction_policy_update_request::RestrictionPolicyUpdateRequest; +pub mod model_roles_sort; +pub use self::model_roles_sort::RolesSort; +pub mod model_role_create_request; +pub use self::model_role_create_request::RoleCreateRequest; +pub mod model_role_create_data; +pub use self::model_role_create_data::RoleCreateData; +pub mod model_role_create_attributes; +pub use self::model_role_create_attributes::RoleCreateAttributes; +pub mod model_role_relationships; +pub use self::model_role_relationships::RoleRelationships; +pub mod model_role_create_response; +pub use self::model_role_create_response::RoleCreateResponse; +pub mod model_role_create_response_data; +pub use self::model_role_create_response_data::RoleCreateResponseData; +pub mod model_role_response; +pub use self::model_role_response::RoleResponse; +pub mod model_role_update_request; +pub use self::model_role_update_request::RoleUpdateRequest; +pub mod model_role_update_data; +pub use self::model_role_update_data::RoleUpdateData; +pub mod model_role_update_attributes; +pub use self::model_role_update_attributes::RoleUpdateAttributes; +pub mod model_role_update_response; +pub use self::model_role_update_response::RoleUpdateResponse; +pub mod model_role_update_response_data; +pub use self::model_role_update_response_data::RoleUpdateResponseData; +pub mod model_role_clone_request; +pub use self::model_role_clone_request::RoleCloneRequest; +pub mod model_role_clone; +pub use self::model_role_clone::RoleClone; +pub mod model_role_clone_attributes; +pub use self::model_role_clone_attributes::RoleCloneAttributes; +pub mod model_relationship_to_permission; +pub use self::model_relationship_to_permission::RelationshipToPermission; +pub mod model_users_response; +pub use self::model_users_response::UsersResponse; +pub mod model_organization; +pub use self::model_organization::Organization; +pub mod model_organization_attributes; +pub use self::model_organization_attributes::OrganizationAttributes; +pub mod model_user_response_included_item; +pub use self::model_user_response_included_item::UserResponseIncludedItem; +pub mod model_rum_aggregate_request; +pub use self::model_rum_aggregate_request::RUMAggregateRequest; +pub mod model_rum_compute; +pub use self::model_rum_compute::RUMCompute; +pub mod model_rum_aggregation_function; +pub use self::model_rum_aggregation_function::RUMAggregationFunction; +pub mod model_rum_compute_type; +pub use self::model_rum_compute_type::RUMComputeType; +pub mod model_rum_query_filter; +pub use self::model_rum_query_filter::RUMQueryFilter; +pub mod model_rum_group_by; +pub use self::model_rum_group_by::RUMGroupBy; +pub mod model_rum_group_by_histogram; +pub use self::model_rum_group_by_histogram::RUMGroupByHistogram; +pub mod model_rum_group_by_missing; +pub use self::model_rum_group_by_missing::RUMGroupByMissing; +pub mod model_rum_aggregate_sort; +pub use self::model_rum_aggregate_sort::RUMAggregateSort; +pub mod model_rum_sort_order; +pub use self::model_rum_sort_order::RUMSortOrder; +pub mod model_rum_aggregate_sort_type; +pub use self::model_rum_aggregate_sort_type::RUMAggregateSortType; +pub mod model_rum_group_by_total; +pub use self::model_rum_group_by_total::RUMGroupByTotal; +pub mod model_rum_query_options; +pub use self::model_rum_query_options::RUMQueryOptions; +pub mod model_rum_query_page_options; +pub use self::model_rum_query_page_options::RUMQueryPageOptions; +pub mod model_rum_analytics_aggregate_response; +pub use self::model_rum_analytics_aggregate_response::RUMAnalyticsAggregateResponse; +pub mod model_rum_aggregation_buckets_response; +pub use self::model_rum_aggregation_buckets_response::RUMAggregationBucketsResponse; +pub mod model_rum_bucket_response; +pub use self::model_rum_bucket_response::RUMBucketResponse; +pub mod model_rum_aggregate_bucket_value_timeseries; +pub use self::model_rum_aggregate_bucket_value_timeseries::RUMAggregateBucketValueTimeseries; +pub mod model_rum_aggregate_bucket_value_timeseries_point; +pub use self::model_rum_aggregate_bucket_value_timeseries_point::RUMAggregateBucketValueTimeseriesPoint; +pub mod model_rum_aggregate_bucket_value; +pub use self::model_rum_aggregate_bucket_value::RUMAggregateBucketValue; +pub mod model_rum_response_links; +pub use self::model_rum_response_links::RUMResponseLinks; +pub mod model_rum_response_metadata; +pub use self::model_rum_response_metadata::RUMResponseMetadata; +pub mod model_rum_response_page; +pub use self::model_rum_response_page::RUMResponsePage; +pub mod model_rum_response_status; +pub use self::model_rum_response_status::RUMResponseStatus; +pub mod model_rum_warning; +pub use self::model_rum_warning::RUMWarning; +pub mod model_rum_applications_response; +pub use self::model_rum_applications_response::RUMApplicationsResponse; +pub mod model_rum_application_list; +pub use self::model_rum_application_list::RUMApplicationList; +pub mod model_rum_application_list_attributes; +pub use self::model_rum_application_list_attributes::RUMApplicationListAttributes; +pub mod model_rum_application_list_type; +pub use self::model_rum_application_list_type::RUMApplicationListType; +pub mod model_rum_application_create_request; +pub use self::model_rum_application_create_request::RUMApplicationCreateRequest; +pub mod model_rum_application_create; +pub use self::model_rum_application_create::RUMApplicationCreate; +pub mod model_rum_application_create_attributes; +pub use self::model_rum_application_create_attributes::RUMApplicationCreateAttributes; +pub mod model_rum_application_create_type; +pub use self::model_rum_application_create_type::RUMApplicationCreateType; +pub mod model_rum_application_response; +pub use self::model_rum_application_response::RUMApplicationResponse; +pub mod model_rum_application; +pub use self::model_rum_application::RUMApplication; +pub mod model_rum_application_attributes; +pub use self::model_rum_application_attributes::RUMApplicationAttributes; +pub mod model_rum_application_type; +pub use self::model_rum_application_type::RUMApplicationType; +pub mod model_rum_application_update_request; +pub use self::model_rum_application_update_request::RUMApplicationUpdateRequest; +pub mod model_rum_application_update; +pub use self::model_rum_application_update::RUMApplicationUpdate; +pub mod model_rum_application_update_attributes; +pub use self::model_rum_application_update_attributes::RUMApplicationUpdateAttributes; +pub mod model_rum_application_update_type; +pub use self::model_rum_application_update_type::RUMApplicationUpdateType; +pub mod model_rum_sort; +pub use self::model_rum_sort::RUMSort; +pub mod model_rum_events_response; +pub use self::model_rum_events_response::RUMEventsResponse; +pub mod model_rum_event; +pub use self::model_rum_event::RUMEvent; +pub mod model_rum_event_attributes; +pub use self::model_rum_event_attributes::RUMEventAttributes; +pub mod model_rum_event_type; +pub use self::model_rum_event_type::RUMEventType; +pub mod model_rum_search_events_request; +pub use self::model_rum_search_events_request::RUMSearchEventsRequest; pub mod model_id_p_metadata_form_data; pub use self::model_id_p_metadata_form_data::IdPMetadataFormData; +pub mod model_outcomes_response; +pub use self::model_outcomes_response::OutcomesResponse; +pub mod model_outcomes_response_data_item; +pub use self::model_outcomes_response_data_item::OutcomesResponseDataItem; +pub mod model_outcomes_batch_response_attributes; +pub use self::model_outcomes_batch_response_attributes::OutcomesBatchResponseAttributes; +pub mod model_state; +pub use self::model_state::State; +pub mod model_rule_outcome_relationships; +pub use self::model_rule_outcome_relationships::RuleOutcomeRelationships; +pub mod model_relationship_to_outcome; +pub use self::model_relationship_to_outcome::RelationshipToOutcome; +pub mod model_relationship_to_outcome_data; +pub use self::model_relationship_to_outcome_data::RelationshipToOutcomeData; +pub mod model_rule_type; +pub use self::model_rule_type::RuleType; +pub mod model_outcome_type; +pub use self::model_outcome_type::OutcomeType; +pub mod model_outcomes_response_included_item; +pub use self::model_outcomes_response_included_item::OutcomesResponseIncludedItem; +pub mod model_outcomes_response_included_rule_attributes; +pub use self::model_outcomes_response_included_rule_attributes::OutcomesResponseIncludedRuleAttributes; +pub mod model_outcomes_response_links; +pub use self::model_outcomes_response_links::OutcomesResponseLinks; +pub mod model_outcomes_batch_request; +pub use self::model_outcomes_batch_request::OutcomesBatchRequest; +pub mod model_outcomes_batch_request_data; +pub use self::model_outcomes_batch_request_data::OutcomesBatchRequestData; +pub mod model_outcomes_batch_attributes; +pub use self::model_outcomes_batch_attributes::OutcomesBatchAttributes; +pub mod model_outcomes_batch_request_item; +pub use self::model_outcomes_batch_request_item::OutcomesBatchRequestItem; +pub mod model_outcomes_batch_type; +pub use self::model_outcomes_batch_type::OutcomesBatchType; +pub mod model_outcomes_batch_response; +pub use self::model_outcomes_batch_response::OutcomesBatchResponse; +pub mod model_outcomes_batch_response_meta; +pub use self::model_outcomes_batch_response_meta::OutcomesBatchResponseMeta; +pub mod model_list_rules_response; +pub use self::model_list_rules_response::ListRulesResponse; +pub mod model_list_rules_response_data_item; +pub use self::model_list_rules_response_data_item::ListRulesResponseDataItem; +pub mod model_rule_attributes; +pub use self::model_rule_attributes::RuleAttributes; +pub mod model_relationship_to_rule; +pub use self::model_relationship_to_rule::RelationshipToRule; +pub mod model_relationship_to_rule_data; +pub use self::model_relationship_to_rule_data::RelationshipToRuleData; +pub mod model_relationship_to_rule_data_object; +pub use self::model_relationship_to_rule_data_object::RelationshipToRuleDataObject; +pub mod model_scorecard_type; +pub use self::model_scorecard_type::ScorecardType; +pub mod model_list_rules_response_links; +pub use self::model_list_rules_response_links::ListRulesResponseLinks; +pub mod model_create_rule_request; +pub use self::model_create_rule_request::CreateRuleRequest; +pub mod model_create_rule_request_data; +pub use self::model_create_rule_request_data::CreateRuleRequestData; +pub mod model_create_rule_response; +pub use self::model_create_rule_response::CreateRuleResponse; +pub mod model_create_rule_response_data; +pub use self::model_create_rule_response_data::CreateRuleResponseData; pub mod model_cloud_workload_security_agent_rules_list_response; pub use self::model_cloud_workload_security_agent_rules_list_response::CloudWorkloadSecurityAgentRulesListResponse; pub mod model_cloud_workload_security_agent_rule_data; @@ -492,6 +1856,288 @@ pub mod model_cloud_workload_security_agent_rule_update_data; pub use self::model_cloud_workload_security_agent_rule_update_data::CloudWorkloadSecurityAgentRuleUpdateData; pub mod model_cloud_workload_security_agent_rule_update_attributes; pub use self::model_cloud_workload_security_agent_rule_update_attributes::CloudWorkloadSecurityAgentRuleUpdateAttributes; +pub mod model_security_filters_response; +pub use self::model_security_filters_response::SecurityFiltersResponse; +pub mod model_security_filter; +pub use self::model_security_filter::SecurityFilter; +pub mod model_security_filter_attributes; +pub use self::model_security_filter_attributes::SecurityFilterAttributes; +pub mod model_security_filter_exclusion_filter_response; +pub use self::model_security_filter_exclusion_filter_response::SecurityFilterExclusionFilterResponse; +pub mod model_security_filter_filtered_data_type; +pub use self::model_security_filter_filtered_data_type::SecurityFilterFilteredDataType; +pub mod model_security_filter_type; +pub use self::model_security_filter_type::SecurityFilterType; +pub mod model_security_filter_meta; +pub use self::model_security_filter_meta::SecurityFilterMeta; +pub mod model_security_filter_create_request; +pub use self::model_security_filter_create_request::SecurityFilterCreateRequest; +pub mod model_security_filter_create_data; +pub use self::model_security_filter_create_data::SecurityFilterCreateData; +pub mod model_security_filter_create_attributes; +pub use self::model_security_filter_create_attributes::SecurityFilterCreateAttributes; +pub mod model_security_filter_exclusion_filter; +pub use self::model_security_filter_exclusion_filter::SecurityFilterExclusionFilter; +pub mod model_security_filter_response; +pub use self::model_security_filter_response::SecurityFilterResponse; +pub mod model_security_filter_update_request; +pub use self::model_security_filter_update_request::SecurityFilterUpdateRequest; +pub mod model_security_filter_update_data; +pub use self::model_security_filter_update_data::SecurityFilterUpdateData; +pub mod model_security_filter_update_attributes; +pub use self::model_security_filter_update_attributes::SecurityFilterUpdateAttributes; +pub mod model_security_monitoring_list_rules_response; +pub use self::model_security_monitoring_list_rules_response::SecurityMonitoringListRulesResponse; +pub mod model_security_monitoring_standard_rule_response; +pub use self::model_security_monitoring_standard_rule_response::SecurityMonitoringStandardRuleResponse; +pub mod model_security_monitoring_rule_case; +pub use self::model_security_monitoring_rule_case::SecurityMonitoringRuleCase; +pub mod model_security_monitoring_rule_severity; +pub use self::model_security_monitoring_rule_severity::SecurityMonitoringRuleSeverity; +pub mod model_cloud_configuration_rule_compliance_signal_options; +pub use self::model_cloud_configuration_rule_compliance_signal_options::CloudConfigurationRuleComplianceSignalOptions; +pub mod model_security_monitoring_filter; +pub use self::model_security_monitoring_filter::SecurityMonitoringFilter; +pub mod model_security_monitoring_filter_action; +pub use self::model_security_monitoring_filter_action::SecurityMonitoringFilterAction; +pub mod model_security_monitoring_rule_options; +pub use self::model_security_monitoring_rule_options::SecurityMonitoringRuleOptions; +pub mod model_cloud_configuration_compliance_rule_options; +pub use self::model_cloud_configuration_compliance_rule_options::CloudConfigurationComplianceRuleOptions; +pub mod model_cloud_configuration_rego_rule; +pub use self::model_cloud_configuration_rego_rule::CloudConfigurationRegoRule; +pub mod model_security_monitoring_rule_detection_method; +pub use self::model_security_monitoring_rule_detection_method::SecurityMonitoringRuleDetectionMethod; +pub mod model_security_monitoring_rule_evaluation_window; +pub use self::model_security_monitoring_rule_evaluation_window::SecurityMonitoringRuleEvaluationWindow; +pub mod model_security_monitoring_rule_hardcoded_evaluator_type; +pub use self::model_security_monitoring_rule_hardcoded_evaluator_type::SecurityMonitoringRuleHardcodedEvaluatorType; +pub mod model_security_monitoring_rule_impossible_travel_options; +pub use self::model_security_monitoring_rule_impossible_travel_options::SecurityMonitoringRuleImpossibleTravelOptions; +pub mod model_security_monitoring_rule_keep_alive; +pub use self::model_security_monitoring_rule_keep_alive::SecurityMonitoringRuleKeepAlive; +pub mod model_security_monitoring_rule_max_signal_duration; +pub use self::model_security_monitoring_rule_max_signal_duration::SecurityMonitoringRuleMaxSignalDuration; +pub mod model_security_monitoring_rule_new_value_options; +pub use self::model_security_monitoring_rule_new_value_options::SecurityMonitoringRuleNewValueOptions; +pub mod model_security_monitoring_rule_new_value_options_forget_after; +pub use self::model_security_monitoring_rule_new_value_options_forget_after::SecurityMonitoringRuleNewValueOptionsForgetAfter; +pub mod model_security_monitoring_rule_new_value_options_learning_duration; +pub use self::model_security_monitoring_rule_new_value_options_learning_duration::SecurityMonitoringRuleNewValueOptionsLearningDuration; +pub mod model_security_monitoring_rule_new_value_options_learning_method; +pub use self::model_security_monitoring_rule_new_value_options_learning_method::SecurityMonitoringRuleNewValueOptionsLearningMethod; +pub mod model_security_monitoring_rule_new_value_options_learning_threshold; +pub use self::model_security_monitoring_rule_new_value_options_learning_threshold::SecurityMonitoringRuleNewValueOptionsLearningThreshold; +pub mod model_security_monitoring_rule_third_party_options; +pub use self::model_security_monitoring_rule_third_party_options::SecurityMonitoringRuleThirdPartyOptions; +pub mod model_security_monitoring_third_party_root_query; +pub use self::model_security_monitoring_third_party_root_query::SecurityMonitoringThirdPartyRootQuery; +pub mod model_security_monitoring_standard_rule_query; +pub use self::model_security_monitoring_standard_rule_query::SecurityMonitoringStandardRuleQuery; +pub mod model_security_monitoring_rule_query_aggregation; +pub use self::model_security_monitoring_rule_query_aggregation::SecurityMonitoringRuleQueryAggregation; +pub mod model_security_monitoring_third_party_rule_case; +pub use self::model_security_monitoring_third_party_rule_case::SecurityMonitoringThirdPartyRuleCase; +pub mod model_security_monitoring_rule_type_read; +pub use self::model_security_monitoring_rule_type_read::SecurityMonitoringRuleTypeRead; +pub mod model_security_monitoring_signal_rule_response; +pub use self::model_security_monitoring_signal_rule_response::SecurityMonitoringSignalRuleResponse; +pub mod model_security_monitoring_signal_rule_response_query; +pub use self::model_security_monitoring_signal_rule_response_query::SecurityMonitoringSignalRuleResponseQuery; +pub mod model_security_monitoring_signal_rule_type; +pub use self::model_security_monitoring_signal_rule_type::SecurityMonitoringSignalRuleType; +pub mod model_security_monitoring_rule_response; +pub use self::model_security_monitoring_rule_response::SecurityMonitoringRuleResponse; +pub mod model_security_monitoring_standard_rule_create_payload; +pub use self::model_security_monitoring_standard_rule_create_payload::SecurityMonitoringStandardRuleCreatePayload; +pub mod model_security_monitoring_rule_case_create; +pub use self::model_security_monitoring_rule_case_create::SecurityMonitoringRuleCaseCreate; +pub mod model_security_monitoring_third_party_rule_case_create; +pub use self::model_security_monitoring_third_party_rule_case_create::SecurityMonitoringThirdPartyRuleCaseCreate; +pub mod model_security_monitoring_rule_type_create; +pub use self::model_security_monitoring_rule_type_create::SecurityMonitoringRuleTypeCreate; +pub mod model_security_monitoring_signal_rule_create_payload; +pub use self::model_security_monitoring_signal_rule_create_payload::SecurityMonitoringSignalRuleCreatePayload; +pub mod model_security_monitoring_signal_rule_query; +pub use self::model_security_monitoring_signal_rule_query::SecurityMonitoringSignalRuleQuery; +pub mod model_cloud_configuration_rule_create_payload; +pub use self::model_cloud_configuration_rule_create_payload::CloudConfigurationRuleCreatePayload; +pub mod model_cloud_configuration_rule_case_create; +pub use self::model_cloud_configuration_rule_case_create::CloudConfigurationRuleCaseCreate; +pub mod model_cloud_configuration_rule_options; +pub use self::model_cloud_configuration_rule_options::CloudConfigurationRuleOptions; +pub mod model_cloud_configuration_rule_type; +pub use self::model_cloud_configuration_rule_type::CloudConfigurationRuleType; +pub mod model_security_monitoring_rule_create_payload; +pub use self::model_security_monitoring_rule_create_payload::SecurityMonitoringRuleCreatePayload; +pub mod model_security_monitoring_rule_update_payload; +pub use self::model_security_monitoring_rule_update_payload::SecurityMonitoringRuleUpdatePayload; +pub mod model_security_monitoring_rule_query; +pub use self::model_security_monitoring_rule_query::SecurityMonitoringRuleQuery; +pub mod model_security_monitoring_signals_sort; +pub use self::model_security_monitoring_signals_sort::SecurityMonitoringSignalsSort; +pub mod model_security_monitoring_signals_list_response; +pub use self::model_security_monitoring_signals_list_response::SecurityMonitoringSignalsListResponse; +pub mod model_security_monitoring_signal; +pub use self::model_security_monitoring_signal::SecurityMonitoringSignal; +pub mod model_security_monitoring_signal_attributes; +pub use self::model_security_monitoring_signal_attributes::SecurityMonitoringSignalAttributes; +pub mod model_security_monitoring_signal_type; +pub use self::model_security_monitoring_signal_type::SecurityMonitoringSignalType; +pub mod model_security_monitoring_signals_list_response_links; +pub use self::model_security_monitoring_signals_list_response_links::SecurityMonitoringSignalsListResponseLinks; +pub mod model_security_monitoring_signals_list_response_meta; +pub use self::model_security_monitoring_signals_list_response_meta::SecurityMonitoringSignalsListResponseMeta; +pub mod model_security_monitoring_signals_list_response_meta_page; +pub use self::model_security_monitoring_signals_list_response_meta_page::SecurityMonitoringSignalsListResponseMetaPage; +pub mod model_security_monitoring_signal_list_request; +pub use self::model_security_monitoring_signal_list_request::SecurityMonitoringSignalListRequest; +pub mod model_security_monitoring_signal_list_request_filter; +pub use self::model_security_monitoring_signal_list_request_filter::SecurityMonitoringSignalListRequestFilter; +pub mod model_security_monitoring_signal_list_request_page; +pub use self::model_security_monitoring_signal_list_request_page::SecurityMonitoringSignalListRequestPage; +pub mod model_security_monitoring_signal_response; +pub use self::model_security_monitoring_signal_response::SecurityMonitoringSignalResponse; +pub mod model_security_monitoring_signal_assignee_update_request; +pub use self::model_security_monitoring_signal_assignee_update_request::SecurityMonitoringSignalAssigneeUpdateRequest; +pub mod model_security_monitoring_signal_assignee_update_data; +pub use self::model_security_monitoring_signal_assignee_update_data::SecurityMonitoringSignalAssigneeUpdateData; +pub mod model_security_monitoring_signal_assignee_update_attributes; +pub use self::model_security_monitoring_signal_assignee_update_attributes::SecurityMonitoringSignalAssigneeUpdateAttributes; +pub mod model_security_monitoring_triage_user; +pub use self::model_security_monitoring_triage_user::SecurityMonitoringTriageUser; +pub mod model_security_monitoring_signal_triage_update_response; +pub use self::model_security_monitoring_signal_triage_update_response::SecurityMonitoringSignalTriageUpdateResponse; +pub mod model_security_monitoring_signal_triage_update_data; +pub use self::model_security_monitoring_signal_triage_update_data::SecurityMonitoringSignalTriageUpdateData; +pub mod model_security_monitoring_signal_triage_attributes; +pub use self::model_security_monitoring_signal_triage_attributes::SecurityMonitoringSignalTriageAttributes; +pub mod model_security_monitoring_signal_archive_reason; +pub use self::model_security_monitoring_signal_archive_reason::SecurityMonitoringSignalArchiveReason; +pub mod model_security_monitoring_signal_state; +pub use self::model_security_monitoring_signal_state::SecurityMonitoringSignalState; +pub mod model_security_monitoring_signal_metadata_type; +pub use self::model_security_monitoring_signal_metadata_type::SecurityMonitoringSignalMetadataType; +pub mod model_security_monitoring_signal_incidents_update_request; +pub use self::model_security_monitoring_signal_incidents_update_request::SecurityMonitoringSignalIncidentsUpdateRequest; +pub mod model_security_monitoring_signal_incidents_update_data; +pub use self::model_security_monitoring_signal_incidents_update_data::SecurityMonitoringSignalIncidentsUpdateData; +pub mod model_security_monitoring_signal_incidents_update_attributes; +pub use self::model_security_monitoring_signal_incidents_update_attributes::SecurityMonitoringSignalIncidentsUpdateAttributes; +pub mod model_security_monitoring_signal_state_update_request; +pub use self::model_security_monitoring_signal_state_update_request::SecurityMonitoringSignalStateUpdateRequest; +pub mod model_security_monitoring_signal_state_update_data; +pub use self::model_security_monitoring_signal_state_update_data::SecurityMonitoringSignalStateUpdateData; +pub mod model_security_monitoring_signal_state_update_attributes; +pub use self::model_security_monitoring_signal_state_update_attributes::SecurityMonitoringSignalStateUpdateAttributes; +pub mod model_sensitive_data_scanner_get_config_response; +pub use self::model_sensitive_data_scanner_get_config_response::SensitiveDataScannerGetConfigResponse; +pub mod model_sensitive_data_scanner_get_config_response_data; +pub use self::model_sensitive_data_scanner_get_config_response_data::SensitiveDataScannerGetConfigResponseData; +pub mod model_sensitive_data_scanner_configuration_relationships; +pub use self::model_sensitive_data_scanner_configuration_relationships::SensitiveDataScannerConfigurationRelationships; +pub mod model_sensitive_data_scanner_group_list; +pub use self::model_sensitive_data_scanner_group_list::SensitiveDataScannerGroupList; +pub mod model_sensitive_data_scanner_group_item; +pub use self::model_sensitive_data_scanner_group_item::SensitiveDataScannerGroupItem; +pub mod model_sensitive_data_scanner_group_type; +pub use self::model_sensitive_data_scanner_group_type::SensitiveDataScannerGroupType; +pub mod model_sensitive_data_scanner_configuration_type; +pub use self::model_sensitive_data_scanner_configuration_type::SensitiveDataScannerConfigurationType; +pub mod model_sensitive_data_scanner_rule_included_item; +pub use self::model_sensitive_data_scanner_rule_included_item::SensitiveDataScannerRuleIncludedItem; +pub mod model_sensitive_data_scanner_rule_attributes; +pub use self::model_sensitive_data_scanner_rule_attributes::SensitiveDataScannerRuleAttributes; +pub mod model_sensitive_data_scanner_text_replacement; +pub use self::model_sensitive_data_scanner_text_replacement::SensitiveDataScannerTextReplacement; +pub mod model_sensitive_data_scanner_text_replacement_type; +pub use self::model_sensitive_data_scanner_text_replacement_type::SensitiveDataScannerTextReplacementType; +pub mod model_sensitive_data_scanner_rule_relationships; +pub use self::model_sensitive_data_scanner_rule_relationships::SensitiveDataScannerRuleRelationships; +pub mod model_sensitive_data_scanner_group_data; +pub use self::model_sensitive_data_scanner_group_data::SensitiveDataScannerGroupData; +pub mod model_sensitive_data_scanner_group; +pub use self::model_sensitive_data_scanner_group::SensitiveDataScannerGroup; +pub mod model_sensitive_data_scanner_standard_pattern_data; +pub use self::model_sensitive_data_scanner_standard_pattern_data::SensitiveDataScannerStandardPatternData; +pub mod model_sensitive_data_scanner_standard_pattern; +pub use self::model_sensitive_data_scanner_standard_pattern::SensitiveDataScannerStandardPattern; +pub mod model_sensitive_data_scanner_standard_pattern_type; +pub use self::model_sensitive_data_scanner_standard_pattern_type::SensitiveDataScannerStandardPatternType; +pub mod model_sensitive_data_scanner_rule_type; +pub use self::model_sensitive_data_scanner_rule_type::SensitiveDataScannerRuleType; +pub mod model_sensitive_data_scanner_group_included_item; +pub use self::model_sensitive_data_scanner_group_included_item::SensitiveDataScannerGroupIncludedItem; +pub mod model_sensitive_data_scanner_group_attributes; +pub use self::model_sensitive_data_scanner_group_attributes::SensitiveDataScannerGroupAttributes; +pub mod model_sensitive_data_scanner_filter; +pub use self::model_sensitive_data_scanner_filter::SensitiveDataScannerFilter; +pub mod model_sensitive_data_scanner_product; +pub use self::model_sensitive_data_scanner_product::SensitiveDataScannerProduct; +pub mod model_sensitive_data_scanner_group_relationships; +pub use self::model_sensitive_data_scanner_group_relationships::SensitiveDataScannerGroupRelationships; +pub mod model_sensitive_data_scanner_configuration_data; +pub use self::model_sensitive_data_scanner_configuration_data::SensitiveDataScannerConfigurationData; +pub mod model_sensitive_data_scanner_configuration; +pub use self::model_sensitive_data_scanner_configuration::SensitiveDataScannerConfiguration; +pub mod model_sensitive_data_scanner_rule_data; +pub use self::model_sensitive_data_scanner_rule_data::SensitiveDataScannerRuleData; +pub mod model_sensitive_data_scanner_rule; +pub use self::model_sensitive_data_scanner_rule::SensitiveDataScannerRule; +pub mod model_sensitive_data_scanner_get_config_included_item; +pub use self::model_sensitive_data_scanner_get_config_included_item::SensitiveDataScannerGetConfigIncludedItem; +pub mod model_sensitive_data_scanner_meta; +pub use self::model_sensitive_data_scanner_meta::SensitiveDataScannerMeta; +pub mod model_sensitive_data_scanner_config_request; +pub use self::model_sensitive_data_scanner_config_request::SensitiveDataScannerConfigRequest; +pub mod model_sensitive_data_scanner_reorder_config; +pub use self::model_sensitive_data_scanner_reorder_config::SensitiveDataScannerReorderConfig; +pub mod model_sensitive_data_scanner_meta_version_only; +pub use self::model_sensitive_data_scanner_meta_version_only::SensitiveDataScannerMetaVersionOnly; +pub mod model_sensitive_data_scanner_reorder_groups_response; +pub use self::model_sensitive_data_scanner_reorder_groups_response::SensitiveDataScannerReorderGroupsResponse; +pub mod model_sensitive_data_scanner_group_create_request; +pub use self::model_sensitive_data_scanner_group_create_request::SensitiveDataScannerGroupCreateRequest; +pub mod model_sensitive_data_scanner_group_create; +pub use self::model_sensitive_data_scanner_group_create::SensitiveDataScannerGroupCreate; +pub mod model_sensitive_data_scanner_create_group_response; +pub use self::model_sensitive_data_scanner_create_group_response::SensitiveDataScannerCreateGroupResponse; +pub mod model_sensitive_data_scanner_group_response; +pub use self::model_sensitive_data_scanner_group_response::SensitiveDataScannerGroupResponse; +pub mod model_sensitive_data_scanner_group_delete_request; +pub use self::model_sensitive_data_scanner_group_delete_request::SensitiveDataScannerGroupDeleteRequest; +pub mod model_sensitive_data_scanner_group_delete_response; +pub use self::model_sensitive_data_scanner_group_delete_response::SensitiveDataScannerGroupDeleteResponse; +pub mod model_sensitive_data_scanner_group_update_request; +pub use self::model_sensitive_data_scanner_group_update_request::SensitiveDataScannerGroupUpdateRequest; +pub mod model_sensitive_data_scanner_group_update; +pub use self::model_sensitive_data_scanner_group_update::SensitiveDataScannerGroupUpdate; +pub mod model_sensitive_data_scanner_group_update_response; +pub use self::model_sensitive_data_scanner_group_update_response::SensitiveDataScannerGroupUpdateResponse; +pub mod model_sensitive_data_scanner_rule_create_request; +pub use self::model_sensitive_data_scanner_rule_create_request::SensitiveDataScannerRuleCreateRequest; +pub mod model_sensitive_data_scanner_rule_create; +pub use self::model_sensitive_data_scanner_rule_create::SensitiveDataScannerRuleCreate; +pub mod model_sensitive_data_scanner_create_rule_response; +pub use self::model_sensitive_data_scanner_create_rule_response::SensitiveDataScannerCreateRuleResponse; +pub mod model_sensitive_data_scanner_rule_response; +pub use self::model_sensitive_data_scanner_rule_response::SensitiveDataScannerRuleResponse; +pub mod model_sensitive_data_scanner_rule_delete_request; +pub use self::model_sensitive_data_scanner_rule_delete_request::SensitiveDataScannerRuleDeleteRequest; +pub mod model_sensitive_data_scanner_rule_delete_response; +pub use self::model_sensitive_data_scanner_rule_delete_response::SensitiveDataScannerRuleDeleteResponse; +pub mod model_sensitive_data_scanner_rule_update_request; +pub use self::model_sensitive_data_scanner_rule_update_request::SensitiveDataScannerRuleUpdateRequest; +pub mod model_sensitive_data_scanner_rule_update; +pub use self::model_sensitive_data_scanner_rule_update::SensitiveDataScannerRuleUpdate; +pub mod model_sensitive_data_scanner_rule_update_response; +pub use self::model_sensitive_data_scanner_rule_update_response::SensitiveDataScannerRuleUpdateResponse; +pub mod model_sensitive_data_scanner_standard_patterns_response_data; +pub use self::model_sensitive_data_scanner_standard_patterns_response_data::SensitiveDataScannerStandardPatternsResponseData; +pub mod model_sensitive_data_scanner_standard_patterns_response_item; +pub use self::model_sensitive_data_scanner_standard_patterns_response_item::SensitiveDataScannerStandardPatternsResponseItem; +pub mod model_sensitive_data_scanner_standard_pattern_attributes; +pub use self::model_sensitive_data_scanner_standard_pattern_attributes::SensitiveDataScannerStandardPatternAttributes; pub mod model_metric_content_encoding; pub use self::model_metric_content_encoding::MetricContentEncoding; pub mod model_metric_payload; @@ -510,6 +2156,238 @@ pub mod model_metric_intake_type; pub use self::model_metric_intake_type::MetricIntakeType; pub mod model_intake_payload_accepted; pub use self::model_intake_payload_accepted::IntakePayloadAccepted; +pub mod model_service_account_create_request; +pub use self::model_service_account_create_request::ServiceAccountCreateRequest; +pub mod model_service_account_create_data; +pub use self::model_service_account_create_data::ServiceAccountCreateData; +pub mod model_service_account_create_attributes; +pub use self::model_service_account_create_attributes::ServiceAccountCreateAttributes; +pub mod model_user_relationships; +pub use self::model_user_relationships::UserRelationships; +pub mod model_user_response; +pub use self::model_user_response::UserResponse; +pub mod model_partial_application_key_response; +pub use self::model_partial_application_key_response::PartialApplicationKeyResponse; +pub mod model_incident_services_response; +pub use self::model_incident_services_response::IncidentServicesResponse; +pub mod model_incident_service_response_data; +pub use self::model_incident_service_response_data::IncidentServiceResponseData; +pub mod model_incident_service_response_attributes; +pub use self::model_incident_service_response_attributes::IncidentServiceResponseAttributes; +pub mod model_incident_service_relationships; +pub use self::model_incident_service_relationships::IncidentServiceRelationships; +pub mod model_incident_service_type; +pub use self::model_incident_service_type::IncidentServiceType; +pub mod model_incident_service_included_items; +pub use self::model_incident_service_included_items::IncidentServiceIncludedItems; +pub mod model_incident_service_create_request; +pub use self::model_incident_service_create_request::IncidentServiceCreateRequest; +pub mod model_incident_service_create_data; +pub use self::model_incident_service_create_data::IncidentServiceCreateData; +pub mod model_incident_service_create_attributes; +pub use self::model_incident_service_create_attributes::IncidentServiceCreateAttributes; +pub mod model_incident_service_response; +pub use self::model_incident_service_response::IncidentServiceResponse; +pub mod model_service_definition_schema_versions; +pub use self::model_service_definition_schema_versions::ServiceDefinitionSchemaVersions; +pub mod model_service_definitions_list_response; +pub use self::model_service_definitions_list_response::ServiceDefinitionsListResponse; +pub mod model_service_definition_data; +pub use self::model_service_definition_data::ServiceDefinitionData; +pub mod model_service_definition_data_attributes; +pub use self::model_service_definition_data_attributes::ServiceDefinitionDataAttributes; +pub mod model_service_definition_meta; +pub use self::model_service_definition_meta::ServiceDefinitionMeta; +pub mod model_service_definition_meta_warnings; +pub use self::model_service_definition_meta_warnings::ServiceDefinitionMetaWarnings; +pub mod model_service_definition_v1; +pub use self::model_service_definition_v1::ServiceDefinitionV1; +pub mod model_service_definition_v1_contact; +pub use self::model_service_definition_v1_contact::ServiceDefinitionV1Contact; +pub mod model_service_definition_v1_resource; +pub use self::model_service_definition_v1_resource::ServiceDefinitionV1Resource; +pub mod model_service_definition_v1_resource_type; +pub use self::model_service_definition_v1_resource_type::ServiceDefinitionV1ResourceType; +pub mod model_service_definition_v1_info; +pub use self::model_service_definition_v1_info::ServiceDefinitionV1Info; +pub mod model_service_definition_v1_integrations; +pub use self::model_service_definition_v1_integrations::ServiceDefinitionV1Integrations; +pub mod model_service_definition_v1_org; +pub use self::model_service_definition_v1_org::ServiceDefinitionV1Org; +pub mod model_service_definition_v1_version; +pub use self::model_service_definition_v1_version::ServiceDefinitionV1Version; +pub mod model_service_definition_v2; +pub use self::model_service_definition_v2::ServiceDefinitionV2; +pub mod model_service_definition_v2_email; +pub use self::model_service_definition_v2_email::ServiceDefinitionV2Email; +pub mod model_service_definition_v2_email_type; +pub use self::model_service_definition_v2_email_type::ServiceDefinitionV2EmailType; +pub mod model_service_definition_v2_slack; +pub use self::model_service_definition_v2_slack::ServiceDefinitionV2Slack; +pub mod model_service_definition_v2_slack_type; +pub use self::model_service_definition_v2_slack_type::ServiceDefinitionV2SlackType; +pub mod model_service_definition_v2_ms_teams; +pub use self::model_service_definition_v2_ms_teams::ServiceDefinitionV2MSTeams; +pub mod model_service_definition_v2_ms_teams_type; +pub use self::model_service_definition_v2_ms_teams_type::ServiceDefinitionV2MSTeamsType; +pub mod model_service_definition_v2_contact; +pub use self::model_service_definition_v2_contact::ServiceDefinitionV2Contact; +pub mod model_service_definition_v2_doc; +pub use self::model_service_definition_v2_doc::ServiceDefinitionV2Doc; +pub mod model_service_definition_v2_integrations; +pub use self::model_service_definition_v2_integrations::ServiceDefinitionV2Integrations; +pub mod model_service_definition_v2_opsgenie; +pub use self::model_service_definition_v2_opsgenie::ServiceDefinitionV2Opsgenie; +pub mod model_service_definition_v2_opsgenie_region; +pub use self::model_service_definition_v2_opsgenie_region::ServiceDefinitionV2OpsgenieRegion; +pub mod model_service_definition_v2_link; +pub use self::model_service_definition_v2_link::ServiceDefinitionV2Link; +pub mod model_service_definition_v2_link_type; +pub use self::model_service_definition_v2_link_type::ServiceDefinitionV2LinkType; +pub mod model_service_definition_v2_repo; +pub use self::model_service_definition_v2_repo::ServiceDefinitionV2Repo; +pub mod model_service_definition_v2_version; +pub use self::model_service_definition_v2_version::ServiceDefinitionV2Version; +pub mod model_service_definition_v2_dot1; +pub use self::model_service_definition_v2_dot1::ServiceDefinitionV2Dot1; +pub mod model_service_definition_v2_dot1_email; +pub use self::model_service_definition_v2_dot1_email::ServiceDefinitionV2Dot1Email; +pub mod model_service_definition_v2_dot1_email_type; +pub use self::model_service_definition_v2_dot1_email_type::ServiceDefinitionV2Dot1EmailType; +pub mod model_service_definition_v2_dot1_slack; +pub use self::model_service_definition_v2_dot1_slack::ServiceDefinitionV2Dot1Slack; +pub mod model_service_definition_v2_dot1_slack_type; +pub use self::model_service_definition_v2_dot1_slack_type::ServiceDefinitionV2Dot1SlackType; +pub mod model_service_definition_v2_dot1_ms_teams; +pub use self::model_service_definition_v2_dot1_ms_teams::ServiceDefinitionV2Dot1MSTeams; +pub mod model_service_definition_v2_dot1_ms_teams_type; +pub use self::model_service_definition_v2_dot1_ms_teams_type::ServiceDefinitionV2Dot1MSTeamsType; +pub mod model_service_definition_v2_dot1_contact; +pub use self::model_service_definition_v2_dot1_contact::ServiceDefinitionV2Dot1Contact; +pub mod model_service_definition_v2_dot1_integrations; +pub use self::model_service_definition_v2_dot1_integrations::ServiceDefinitionV2Dot1Integrations; +pub mod model_service_definition_v2_dot1_opsgenie; +pub use self::model_service_definition_v2_dot1_opsgenie::ServiceDefinitionV2Dot1Opsgenie; +pub mod model_service_definition_v2_dot1_opsgenie_region; +pub use self::model_service_definition_v2_dot1_opsgenie_region::ServiceDefinitionV2Dot1OpsgenieRegion; +pub mod model_service_definition_v2_dot1_pagerduty; +pub use self::model_service_definition_v2_dot1_pagerduty::ServiceDefinitionV2Dot1Pagerduty; +pub mod model_service_definition_v2_dot1_link; +pub use self::model_service_definition_v2_dot1_link::ServiceDefinitionV2Dot1Link; +pub mod model_service_definition_v2_dot1_link_type; +pub use self::model_service_definition_v2_dot1_link_type::ServiceDefinitionV2Dot1LinkType; +pub mod model_service_definition_v2_dot1_version; +pub use self::model_service_definition_v2_dot1_version::ServiceDefinitionV2Dot1Version; +pub mod model_service_definition_v2_dot2; +pub use self::model_service_definition_v2_dot2::ServiceDefinitionV2Dot2; +pub mod model_service_definition_v2_dot2_contact; +pub use self::model_service_definition_v2_dot2_contact::ServiceDefinitionV2Dot2Contact; +pub mod model_service_definition_v2_dot2_integrations; +pub use self::model_service_definition_v2_dot2_integrations::ServiceDefinitionV2Dot2Integrations; +pub mod model_service_definition_v2_dot2_opsgenie; +pub use self::model_service_definition_v2_dot2_opsgenie::ServiceDefinitionV2Dot2Opsgenie; +pub mod model_service_definition_v2_dot2_opsgenie_region; +pub use self::model_service_definition_v2_dot2_opsgenie_region::ServiceDefinitionV2Dot2OpsgenieRegion; +pub mod model_service_definition_v2_dot2_pagerduty; +pub use self::model_service_definition_v2_dot2_pagerduty::ServiceDefinitionV2Dot2Pagerduty; +pub mod model_service_definition_v2_dot2_link; +pub use self::model_service_definition_v2_dot2_link::ServiceDefinitionV2Dot2Link; +pub mod model_service_definition_v2_dot2_version; +pub use self::model_service_definition_v2_dot2_version::ServiceDefinitionV2Dot2Version; +pub mod model_service_definition_v2_dot2_type; +pub use self::model_service_definition_v2_dot2_type::ServiceDefinitionV2Dot2Type; +pub mod model_service_definition_schema; +pub use self::model_service_definition_schema::ServiceDefinitionSchema; +pub mod model_service_definitions_create_request; +pub use self::model_service_definitions_create_request::ServiceDefinitionsCreateRequest; +pub mod model_service_definition_create_response; +pub use self::model_service_definition_create_response::ServiceDefinitionCreateResponse; +pub mod model_service_definition_get_response; +pub use self::model_service_definition_get_response::ServiceDefinitionGetResponse; +pub mod model_incident_service_update_request; +pub use self::model_incident_service_update_request::IncidentServiceUpdateRequest; +pub mod model_incident_service_update_data; +pub use self::model_incident_service_update_data::IncidentServiceUpdateData; +pub mod model_incident_service_update_attributes; +pub use self::model_incident_service_update_attributes::IncidentServiceUpdateAttributes; +pub mod model_spans_aggregate_request; +pub use self::model_spans_aggregate_request::SpansAggregateRequest; +pub mod model_spans_aggregate_data; +pub use self::model_spans_aggregate_data::SpansAggregateData; +pub mod model_spans_aggregate_request_attributes; +pub use self::model_spans_aggregate_request_attributes::SpansAggregateRequestAttributes; +pub mod model_spans_compute; +pub use self::model_spans_compute::SpansCompute; +pub mod model_spans_aggregation_function; +pub use self::model_spans_aggregation_function::SpansAggregationFunction; +pub mod model_spans_compute_type; +pub use self::model_spans_compute_type::SpansComputeType; +pub mod model_spans_query_filter; +pub use self::model_spans_query_filter::SpansQueryFilter; +pub mod model_spans_group_by; +pub use self::model_spans_group_by::SpansGroupBy; +pub mod model_spans_group_by_histogram; +pub use self::model_spans_group_by_histogram::SpansGroupByHistogram; +pub mod model_spans_group_by_missing; +pub use self::model_spans_group_by_missing::SpansGroupByMissing; +pub mod model_spans_aggregate_sort; +pub use self::model_spans_aggregate_sort::SpansAggregateSort; +pub mod model_spans_sort_order; +pub use self::model_spans_sort_order::SpansSortOrder; +pub mod model_spans_aggregate_sort_type; +pub use self::model_spans_aggregate_sort_type::SpansAggregateSortType; +pub mod model_spans_group_by_total; +pub use self::model_spans_group_by_total::SpansGroupByTotal; +pub mod model_spans_query_options; +pub use self::model_spans_query_options::SpansQueryOptions; +pub mod model_spans_aggregate_request_type; +pub use self::model_spans_aggregate_request_type::SpansAggregateRequestType; +pub mod model_spans_aggregate_response; +pub use self::model_spans_aggregate_response::SpansAggregateResponse; +pub mod model_spans_aggregate_bucket; +pub use self::model_spans_aggregate_bucket::SpansAggregateBucket; +pub mod model_spans_aggregate_bucket_attributes; +pub use self::model_spans_aggregate_bucket_attributes::SpansAggregateBucketAttributes; +pub mod model_spans_aggregate_bucket_value_timeseries; +pub use self::model_spans_aggregate_bucket_value_timeseries::SpansAggregateBucketValueTimeseries; +pub mod model_spans_aggregate_bucket_value_timeseries_point; +pub use self::model_spans_aggregate_bucket_value_timeseries_point::SpansAggregateBucketValueTimeseriesPoint; +pub mod model_spans_aggregate_bucket_value; +pub use self::model_spans_aggregate_bucket_value::SpansAggregateBucketValue; +pub mod model_spans_aggregate_bucket_type; +pub use self::model_spans_aggregate_bucket_type::SpansAggregateBucketType; +pub mod model_spans_aggregate_response_metadata; +pub use self::model_spans_aggregate_response_metadata::SpansAggregateResponseMetadata; +pub mod model_spans_aggregate_response_status; +pub use self::model_spans_aggregate_response_status::SpansAggregateResponseStatus; +pub mod model_spans_warning; +pub use self::model_spans_warning::SpansWarning; +pub mod model_spans_sort; +pub use self::model_spans_sort::SpansSort; +pub mod model_spans_list_response; +pub use self::model_spans_list_response::SpansListResponse; +pub mod model_span; +pub use self::model_span::Span; +pub mod model_spans_attributes; +pub use self::model_spans_attributes::SpansAttributes; +pub mod model_spans_type; +pub use self::model_spans_type::SpansType; +pub mod model_spans_list_response_links; +pub use self::model_spans_list_response_links::SpansListResponseLinks; +pub mod model_spans_list_response_metadata; +pub use self::model_spans_list_response_metadata::SpansListResponseMetadata; +pub mod model_spans_response_metadata_page; +pub use self::model_spans_response_metadata_page::SpansResponseMetadataPage; +pub mod model_spans_list_request; +pub use self::model_spans_list_request::SpansListRequest; +pub mod model_spans_list_request_data; +pub use self::model_spans_list_request_data::SpansListRequestData; +pub mod model_spans_list_request_attributes; +pub use self::model_spans_list_request_attributes::SpansListRequestAttributes; +pub mod model_spans_list_request_page; +pub use self::model_spans_list_request_page::SpansListRequestPage; +pub mod model_spans_list_request_type; +pub use self::model_spans_list_request_type::SpansListRequestType; pub mod model_on_demand_concurrency_cap_response; pub use self::model_on_demand_concurrency_cap_response::OnDemandConcurrencyCapResponse; pub mod model_on_demand_concurrency_cap; @@ -518,6 +2396,160 @@ pub mod model_on_demand_concurrency_cap_attributes; pub use self::model_on_demand_concurrency_cap_attributes::OnDemandConcurrencyCapAttributes; pub mod model_on_demand_concurrency_cap_type; pub use self::model_on_demand_concurrency_cap_type::OnDemandConcurrencyCapType; +pub mod model_list_teams_sort; +pub use self::model_list_teams_sort::ListTeamsSort; +pub mod model_list_teams_include; +pub use self::model_list_teams_include::ListTeamsInclude; +pub mod model_teams_field; +pub use self::model_teams_field::TeamsField; +pub mod model_teams_response; +pub use self::model_teams_response::TeamsResponse; +pub mod model_team; +pub use self::model_team::Team; +pub mod model_team_attributes; +pub use self::model_team_attributes::TeamAttributes; +pub mod model_team_relationships; +pub use self::model_team_relationships::TeamRelationships; +pub mod model_relationship_to_team_links; +pub use self::model_relationship_to_team_links::RelationshipToTeamLinks; +pub mod model_relationship_to_team_link_data; +pub use self::model_relationship_to_team_link_data::RelationshipToTeamLinkData; +pub mod model_team_link_type; +pub use self::model_team_link_type::TeamLinkType; +pub mod model_team_relationships_links; +pub use self::model_team_relationships_links::TeamRelationshipsLinks; +pub mod model_relationship_to_user_team_permission; +pub use self::model_relationship_to_user_team_permission::RelationshipToUserTeamPermission; +pub mod model_relationship_to_user_team_permission_data; +pub use self::model_relationship_to_user_team_permission_data::RelationshipToUserTeamPermissionData; +pub mod model_user_team_permission_type; +pub use self::model_user_team_permission_type::UserTeamPermissionType; +pub mod model_team_type; +pub use self::model_team_type::TeamType; +pub mod model_team_link; +pub use self::model_team_link::TeamLink; +pub mod model_team_link_attributes; +pub use self::model_team_link_attributes::TeamLinkAttributes; +pub mod model_user_team_permission; +pub use self::model_user_team_permission::UserTeamPermission; +pub mod model_user_team_permission_attributes; +pub use self::model_user_team_permission_attributes::UserTeamPermissionAttributes; +pub mod model_team_included; +pub use self::model_team_included::TeamIncluded; +pub mod model_teams_response_links; +pub use self::model_teams_response_links::TeamsResponseLinks; +pub mod model_teams_response_meta; +pub use self::model_teams_response_meta::TeamsResponseMeta; +pub mod model_teams_response_meta_pagination; +pub use self::model_teams_response_meta_pagination::TeamsResponseMetaPagination; +pub mod model_team_create_request; +pub use self::model_team_create_request::TeamCreateRequest; +pub mod model_team_create; +pub use self::model_team_create::TeamCreate; +pub mod model_team_create_attributes; +pub use self::model_team_create_attributes::TeamCreateAttributes; +pub mod model_team_create_relationships; +pub use self::model_team_create_relationships::TeamCreateRelationships; +pub mod model_team_response; +pub use self::model_team_response::TeamResponse; +pub mod model_team_update_request; +pub use self::model_team_update_request::TeamUpdateRequest; +pub mod model_team_update; +pub use self::model_team_update::TeamUpdate; +pub mod model_team_update_attributes; +pub use self::model_team_update_attributes::TeamUpdateAttributes; +pub mod model_team_update_relationships; +pub use self::model_team_update_relationships::TeamUpdateRelationships; +pub mod model_team_links_response; +pub use self::model_team_links_response::TeamLinksResponse; +pub mod model_team_link_create_request; +pub use self::model_team_link_create_request::TeamLinkCreateRequest; +pub mod model_team_link_create; +pub use self::model_team_link_create::TeamLinkCreate; +pub mod model_team_link_response; +pub use self::model_team_link_response::TeamLinkResponse; +pub mod model_get_team_memberships_sort; +pub use self::model_get_team_memberships_sort::GetTeamMembershipsSort; +pub mod model_user_teams_response; +pub use self::model_user_teams_response::UserTeamsResponse; +pub mod model_user_team; +pub use self::model_user_team::UserTeam; +pub mod model_user_team_attributes; +pub use self::model_user_team_attributes::UserTeamAttributes; +pub mod model_user_team_role; +pub use self::model_user_team_role::UserTeamRole; +pub mod model_user_team_relationships; +pub use self::model_user_team_relationships::UserTeamRelationships; +pub mod model_relationship_to_user_team_team; +pub use self::model_relationship_to_user_team_team::RelationshipToUserTeamTeam; +pub mod model_relationship_to_user_team_team_data; +pub use self::model_relationship_to_user_team_team_data::RelationshipToUserTeamTeamData; +pub mod model_user_team_team_type; +pub use self::model_user_team_team_type::UserTeamTeamType; +pub mod model_relationship_to_user_team_user; +pub use self::model_relationship_to_user_team_user::RelationshipToUserTeamUser; +pub mod model_relationship_to_user_team_user_data; +pub use self::model_relationship_to_user_team_user_data::RelationshipToUserTeamUserData; +pub mod model_user_team_user_type; +pub use self::model_user_team_user_type::UserTeamUserType; +pub mod model_user_team_type; +pub use self::model_user_team_type::UserTeamType; +pub mod model_user_team_request; +pub use self::model_user_team_request::UserTeamRequest; +pub mod model_user_team_create; +pub use self::model_user_team_create::UserTeamCreate; +pub mod model_user_team_response; +pub use self::model_user_team_response::UserTeamResponse; +pub mod model_user_team_update_request; +pub use self::model_user_team_update_request::UserTeamUpdateRequest; +pub mod model_user_team_update; +pub use self::model_user_team_update::UserTeamUpdate; +pub mod model_team_permission_settings_response; +pub use self::model_team_permission_settings_response::TeamPermissionSettingsResponse; +pub mod model_team_permission_setting; +pub use self::model_team_permission_setting::TeamPermissionSetting; +pub mod model_team_permission_setting_attributes; +pub use self::model_team_permission_setting_attributes::TeamPermissionSettingAttributes; +pub mod model_team_permission_setting_serializer_action; +pub use self::model_team_permission_setting_serializer_action::TeamPermissionSettingSerializerAction; +pub mod model_team_permission_setting_value; +pub use self::model_team_permission_setting_value::TeamPermissionSettingValue; +pub mod model_team_permission_setting_type; +pub use self::model_team_permission_setting_type::TeamPermissionSettingType; +pub mod model_team_permission_setting_update_request; +pub use self::model_team_permission_setting_update_request::TeamPermissionSettingUpdateRequest; +pub mod model_team_permission_setting_update; +pub use self::model_team_permission_setting_update::TeamPermissionSettingUpdate; +pub mod model_team_permission_setting_update_attributes; +pub use self::model_team_permission_setting_update_attributes::TeamPermissionSettingUpdateAttributes; +pub mod model_team_permission_setting_response; +pub use self::model_team_permission_setting_response::TeamPermissionSettingResponse; +pub mod model_incident_teams_response; +pub use self::model_incident_teams_response::IncidentTeamsResponse; +pub mod model_incident_team_response_data; +pub use self::model_incident_team_response_data::IncidentTeamResponseData; +pub mod model_incident_team_response_attributes; +pub use self::model_incident_team_response_attributes::IncidentTeamResponseAttributes; +pub mod model_incident_team_relationships; +pub use self::model_incident_team_relationships::IncidentTeamRelationships; +pub mod model_incident_team_type; +pub use self::model_incident_team_type::IncidentTeamType; +pub mod model_incident_team_included_items; +pub use self::model_incident_team_included_items::IncidentTeamIncludedItems; +pub mod model_incident_team_create_request; +pub use self::model_incident_team_create_request::IncidentTeamCreateRequest; +pub mod model_incident_team_create_data; +pub use self::model_incident_team_create_data::IncidentTeamCreateData; +pub mod model_incident_team_create_attributes; +pub use self::model_incident_team_create_attributes::IncidentTeamCreateAttributes; +pub mod model_incident_team_response; +pub use self::model_incident_team_response::IncidentTeamResponse; +pub mod model_incident_team_update_request; +pub use self::model_incident_team_update_request::IncidentTeamUpdateRequest; +pub mod model_incident_team_update_data; +pub use self::model_incident_team_update_data::IncidentTeamUpdateData; +pub mod model_incident_team_update_attributes; +pub use self::model_incident_team_update_attributes::IncidentTeamUpdateAttributes; pub mod model_usage_application_security_monitoring_response; pub use self::model_usage_application_security_monitoring_response::UsageApplicationSecurityMonitoringResponse; pub mod model_usage_data_object; @@ -556,3 +2588,39 @@ pub mod model_usage_lambda_traced_invocations_response; pub use self::model_usage_lambda_traced_invocations_response::UsageLambdaTracedInvocationsResponse; pub mod model_usage_observability_pipelines_response; pub use self::model_usage_observability_pipelines_response::UsageObservabilityPipelinesResponse; +pub mod model_projected_cost_response; +pub use self::model_projected_cost_response::ProjectedCostResponse; +pub mod model_projected_cost; +pub use self::model_projected_cost::ProjectedCost; +pub mod model_projected_cost_attributes; +pub use self::model_projected_cost_attributes::ProjectedCostAttributes; +pub mod model_projected_cost_type; +pub use self::model_projected_cost_type::ProjectedCostType; +pub mod model_user_invitations_request; +pub use self::model_user_invitations_request::UserInvitationsRequest; +pub mod model_user_invitation_data; +pub use self::model_user_invitation_data::UserInvitationData; +pub mod model_user_invitation_relationships; +pub use self::model_user_invitation_relationships::UserInvitationRelationships; +pub mod model_user_invitations_type; +pub use self::model_user_invitations_type::UserInvitationsType; +pub mod model_user_invitations_response; +pub use self::model_user_invitations_response::UserInvitationsResponse; +pub mod model_user_invitation_response_data; +pub use self::model_user_invitation_response_data::UserInvitationResponseData; +pub mod model_user_invitation_data_attributes; +pub use self::model_user_invitation_data_attributes::UserInvitationDataAttributes; +pub mod model_user_invitation_response; +pub use self::model_user_invitation_response::UserInvitationResponse; +pub mod model_user_create_request; +pub use self::model_user_create_request::UserCreateRequest; +pub mod model_user_create_data; +pub use self::model_user_create_data::UserCreateData; +pub mod model_user_create_attributes; +pub use self::model_user_create_attributes::UserCreateAttributes; +pub mod model_user_update_request; +pub use self::model_user_update_request::UserUpdateRequest; +pub mod model_user_update_data; +pub use self::model_user_update_data::UserUpdateData; +pub mod model_user_update_attributes; +pub use self::model_user_update_attributes::UserUpdateAttributes; diff --git a/src/datadogV2/model/model_active_billing_dimensions_attributes.rs b/src/datadogV2/model/model_active_billing_dimensions_attributes.rs new file mode 100644 index 000000000..f2559ca2d --- /dev/null +++ b/src/datadogV2/model/model_active_billing_dimensions_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of active billing dimensions. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActiveBillingDimensionsAttributes { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`. + #[serde(rename = "month")] + pub month: Option, + /// List of active billing dimensions. Example: `[infra_host, apm_host, serverless_infra]`. + #[serde(rename = "values")] + pub values: Option>, +} + +impl ActiveBillingDimensionsAttributes { + pub fn new() -> ActiveBillingDimensionsAttributes { + ActiveBillingDimensionsAttributes { + month: None, + values: None, + } + } +} diff --git a/src/datadogV2/model/model_active_billing_dimensions_body.rs b/src/datadogV2/model/model_active_billing_dimensions_body.rs new file mode 100644 index 000000000..0bb3e2b67 --- /dev/null +++ b/src/datadogV2/model/model_active_billing_dimensions_body.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Active billing dimensions data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActiveBillingDimensionsBody { + /// List of active billing dimensions. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the response. + #[serde(rename = "id")] + pub id: Option, + /// Type of active billing dimensions data. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ActiveBillingDimensionsBody { + pub fn new() -> ActiveBillingDimensionsBody { + ActiveBillingDimensionsBody { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_active_billing_dimensions_response.rs b/src/datadogV2/model/model_active_billing_dimensions_response.rs new file mode 100644 index 000000000..d67586cd4 --- /dev/null +++ b/src/datadogV2/model/model_active_billing_dimensions_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Active billing dimensions response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ActiveBillingDimensionsResponse { + /// Active billing dimensions data. + #[serde(rename = "data")] + pub data: Option>, +} + +impl ActiveBillingDimensionsResponse { + pub fn new() -> ActiveBillingDimensionsResponse { + ActiveBillingDimensionsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_active_billing_dimensions_type.rs b/src/datadogV2/model/model_active_billing_dimensions_type.rs new file mode 100644 index 000000000..b5c5cde92 --- /dev/null +++ b/src/datadogV2/model/model_active_billing_dimensions_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ActiveBillingDimensionsType { + #[serde(rename = "billing_dimensions")] + BILLING_DIMENSIONS, +} + +impl ToString for ActiveBillingDimensionsType { + fn to_string(&self) -> String { + match self { + Self::BILLING_DIMENSIONS => String::from("billing_dimensions"), + } + } +} diff --git a/src/datadogV2/model/model_api_error_response.rs b/src/datadogV2/model/model_api_error_response.rs index 020885f67..adf7e0bee 100644 --- a/src/datadogV2/model/model_api_error_response.rs +++ b/src/datadogV2/model/model_api_error_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// API error response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct APIErrorResponse { /// A list of errors. #[serde(rename = "errors")] diff --git a/src/datadogV2/model/model_api_key_create_attributes.rs b/src/datadogV2/model/model_api_key_create_attributes.rs new file mode 100644 index 000000000..b6997ae25 --- /dev/null +++ b/src/datadogV2/model/model_api_key_create_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes used to create an API Key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyCreateAttributes { + /// Name of the API key. + #[serde(rename = "name")] + pub name: String, +} + +impl APIKeyCreateAttributes { + pub fn new(name: String) -> APIKeyCreateAttributes { + APIKeyCreateAttributes { name } + } +} diff --git a/src/datadogV2/model/model_api_key_create_data.rs b/src/datadogV2/model/model_api_key_create_data.rs new file mode 100644 index 000000000..968414968 --- /dev/null +++ b/src/datadogV2/model/model_api_key_create_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object used to create an API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyCreateData { + /// Attributes used to create an API Key. + #[serde(rename = "attributes")] + pub attributes: Box, + /// API Keys resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::APIKeysType, +} + +impl APIKeyCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::APIKeysType, + ) -> APIKeyCreateData { + APIKeyCreateData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_api_key_create_request.rs b/src/datadogV2/model/model_api_key_create_request.rs new file mode 100644 index 000000000..3c53769a7 --- /dev/null +++ b/src/datadogV2/model/model_api_key_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request used to create an API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyCreateRequest { + /// Object used to create an API key. + #[serde(rename = "data")] + pub data: Box, +} + +impl APIKeyCreateRequest { + pub fn new(data: Box) -> APIKeyCreateRequest { + APIKeyCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_api_key_relationships.rs b/src/datadogV2/model/model_api_key_relationships.rs new file mode 100644 index 000000000..2ea71418b --- /dev/null +++ b/src/datadogV2/model/model_api_key_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Resources related to the API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyRelationships { + /// Relationship to user. + #[serde(rename = "created_by")] + pub created_by: Option>, + /// Relationship to user. + #[serde(rename = "modified_by")] + pub modified_by: Option>, +} + +impl APIKeyRelationships { + pub fn new() -> APIKeyRelationships { + APIKeyRelationships { + created_by: None, + modified_by: None, + } + } +} diff --git a/src/datadogV2/model/model_api_key_response.rs b/src/datadogV2/model/model_api_key_response.rs new file mode 100644 index 000000000..0c6128e6d --- /dev/null +++ b/src/datadogV2/model/model_api_key_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for retrieving an API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyResponse { + /// Datadog API key. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the API key. + #[serde(rename = "included")] + pub included: Option>, +} + +impl APIKeyResponse { + pub fn new() -> APIKeyResponse { + APIKeyResponse { + data: None, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_api_key_response_included_item.rs b/src/datadogV2/model/model_api_key_response_included_item.rs new file mode 100644 index 000000000..b283968d2 --- /dev/null +++ b/src/datadogV2/model/model_api_key_response_included_item.rs @@ -0,0 +1,11 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an API key. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum APIKeyResponseIncludedItem { + User(Box), +} diff --git a/src/datadogV2/model/model_api_key_update_attributes.rs b/src/datadogV2/model/model_api_key_update_attributes.rs new file mode 100644 index 000000000..5373244f5 --- /dev/null +++ b/src/datadogV2/model/model_api_key_update_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes used to update an API Key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyUpdateAttributes { + /// Name of the API key. + #[serde(rename = "name")] + pub name: String, +} + +impl APIKeyUpdateAttributes { + pub fn new(name: String) -> APIKeyUpdateAttributes { + APIKeyUpdateAttributes { name } + } +} diff --git a/src/datadogV2/model/model_api_key_update_data.rs b/src/datadogV2/model/model_api_key_update_data.rs new file mode 100644 index 000000000..14aa9fb57 --- /dev/null +++ b/src/datadogV2/model/model_api_key_update_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object used to update an API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyUpdateData { + /// Attributes used to update an API Key. + #[serde(rename = "attributes")] + pub attributes: Box, + /// ID of the API key. + #[serde(rename = "id")] + pub id: String, + /// API Keys resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::APIKeysType, +} + +impl APIKeyUpdateData { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::APIKeysType, + ) -> APIKeyUpdateData { + APIKeyUpdateData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_api_key_update_request.rs b/src/datadogV2/model/model_api_key_update_request.rs new file mode 100644 index 000000000..eb6fab2b8 --- /dev/null +++ b/src/datadogV2/model/model_api_key_update_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request used to update an API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeyUpdateRequest { + /// Object used to update an API key. + #[serde(rename = "data")] + pub data: Box, +} + +impl APIKeyUpdateRequest { + pub fn new(data: Box) -> APIKeyUpdateRequest { + APIKeyUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_api_keys_response.rs b/src/datadogV2/model/model_api_keys_response.rs new file mode 100644 index 000000000..d4b335b50 --- /dev/null +++ b/src/datadogV2/model/model_api_keys_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for a list of API keys. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeysResponse { + /// Array of API keys. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the API key. + #[serde(rename = "included")] + pub included: Option>, + /// Additional information related to api keys response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl APIKeysResponse { + pub fn new() -> APIKeysResponse { + APIKeysResponse { + data: None, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_api_keys_response_meta.rs b/src/datadogV2/model/model_api_keys_response_meta.rs new file mode 100644 index 000000000..e3678b343 --- /dev/null +++ b/src/datadogV2/model/model_api_keys_response_meta.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Additional information related to api keys response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeysResponseMeta { + /// Max allowed number of API keys. + #[serde(rename = "max_allowed")] + pub max_allowed: Option, + /// Additional information related to the API keys response. + #[serde(rename = "page")] + pub page: Option>, +} + +impl APIKeysResponseMeta { + pub fn new() -> APIKeysResponseMeta { + APIKeysResponseMeta { + max_allowed: None, + page: None, + } + } +} diff --git a/src/datadogV2/model/model_api_keys_response_meta_page.rs b/src/datadogV2/model/model_api_keys_response_meta_page.rs new file mode 100644 index 000000000..fb457a8a8 --- /dev/null +++ b/src/datadogV2/model/model_api_keys_response_meta_page.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Additional information related to the API keys response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct APIKeysResponseMetaPage { + /// Total filtered application key count. + #[serde(rename = "total_filtered_count")] + pub total_filtered_count: Option, +} + +impl APIKeysResponseMetaPage { + pub fn new() -> APIKeysResponseMetaPage { + APIKeysResponseMetaPage { + total_filtered_count: None, + } + } +} diff --git a/src/datadogV2/model/model_api_keys_sort.rs b/src/datadogV2/model/model_api_keys_sort.rs new file mode 100644 index 000000000..1c930d9e7 --- /dev/null +++ b/src/datadogV2/model/model_api_keys_sort.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum APIKeysSort { + #[serde(rename = "created_at")] + CREATED_AT_ASCENDING, + #[serde(rename = "-created_at")] + CREATED_AT_DESCENDING, + #[serde(rename = "last4")] + LAST4_ASCENDING, + #[serde(rename = "-last4")] + LAST4_DESCENDING, + #[serde(rename = "modified_at")] + MODIFIED_AT_ASCENDING, + #[serde(rename = "-modified_at")] + MODIFIED_AT_DESCENDING, + #[serde(rename = "name")] + NAME_ASCENDING, + #[serde(rename = "-name")] + NAME_DESCENDING, +} + +impl ToString for APIKeysSort { + fn to_string(&self) -> String { + match self { + Self::CREATED_AT_ASCENDING => String::from("created_at"), + Self::CREATED_AT_DESCENDING => String::from("-created_at"), + Self::LAST4_ASCENDING => String::from("last4"), + Self::LAST4_DESCENDING => String::from("-last4"), + Self::MODIFIED_AT_ASCENDING => String::from("modified_at"), + Self::MODIFIED_AT_DESCENDING => String::from("-modified_at"), + Self::NAME_ASCENDING => String::from("name"), + Self::NAME_DESCENDING => String::from("-name"), + } + } +} diff --git a/src/datadogV2/model/model_api_keys_type.rs b/src/datadogV2/model/model_api_keys_type.rs new file mode 100644 index 000000000..a38e365ec --- /dev/null +++ b/src/datadogV2/model/model_api_keys_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum APIKeysType { + #[serde(rename = "api_keys")] + API_KEYS, +} + +impl ToString for APIKeysType { + fn to_string(&self) -> String { + match self { + Self::API_KEYS => String::from("api_keys"), + } + } +} diff --git a/src/datadogV2/model/model_apm_retention_filter_type.rs b/src/datadogV2/model/model_apm_retention_filter_type.rs index 77210a0bf..6d3643f15 100644 --- a/src/datadogV2/model/model_apm_retention_filter_type.rs +++ b/src/datadogV2/model/model_apm_retention_filter_type.rs @@ -17,9 +17,3 @@ impl ToString for ApmRetentionFilterType { } } } - -impl Default for ApmRetentionFilterType { - fn default() -> ApmRetentionFilterType { - Self::apm_retention_filter - } -} diff --git a/src/datadogV2/model/model_application_key_create_attributes.rs b/src/datadogV2/model/model_application_key_create_attributes.rs new file mode 100644 index 000000000..eb574bc60 --- /dev/null +++ b/src/datadogV2/model/model_application_key_create_attributes.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes used to create an application Key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyCreateAttributes { + /// Name of the application key. + #[serde(rename = "name")] + pub name: String, + /// Array of scopes to grant the application key. + #[serde(rename = "scopes", default, with = "::serde_with::rust::double_option")] + pub scopes: Option>>, +} + +impl ApplicationKeyCreateAttributes { + pub fn new(name: String) -> ApplicationKeyCreateAttributes { + ApplicationKeyCreateAttributes { name, scopes: None } + } +} diff --git a/src/datadogV2/model/model_application_key_create_data.rs b/src/datadogV2/model/model_application_key_create_data.rs new file mode 100644 index 000000000..ce2e287d7 --- /dev/null +++ b/src/datadogV2/model/model_application_key_create_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object used to create an application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyCreateData { + /// Attributes used to create an application Key. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Application Keys resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ApplicationKeysType, +} + +impl ApplicationKeyCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::ApplicationKeysType, + ) -> ApplicationKeyCreateData { + ApplicationKeyCreateData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_application_key_create_request.rs b/src/datadogV2/model/model_application_key_create_request.rs new file mode 100644 index 000000000..f0882f78c --- /dev/null +++ b/src/datadogV2/model/model_application_key_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request used to create an application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyCreateRequest { + /// Object used to create an application key. + #[serde(rename = "data")] + pub data: Box, +} + +impl ApplicationKeyCreateRequest { + pub fn new( + data: Box, + ) -> ApplicationKeyCreateRequest { + ApplicationKeyCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_application_key_relationships.rs b/src/datadogV2/model/model_application_key_relationships.rs new file mode 100644 index 000000000..fd6134420 --- /dev/null +++ b/src/datadogV2/model/model_application_key_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Resources related to the application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyRelationships { + /// Relationship to user. + #[serde(rename = "owned_by")] + pub owned_by: Option>, +} + +impl ApplicationKeyRelationships { + pub fn new() -> ApplicationKeyRelationships { + ApplicationKeyRelationships { owned_by: None } + } +} diff --git a/src/datadogV2/model/model_application_key_response.rs b/src/datadogV2/model/model_application_key_response.rs new file mode 100644 index 000000000..010d392fe --- /dev/null +++ b/src/datadogV2/model/model_application_key_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for retrieving an application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyResponse { + /// Datadog application key. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the application key. + #[serde(rename = "included")] + pub included: Option>, +} + +impl ApplicationKeyResponse { + pub fn new() -> ApplicationKeyResponse { + ApplicationKeyResponse { + data: None, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_application_key_response_included_item.rs b/src/datadogV2/model/model_application_key_response_included_item.rs new file mode 100644 index 000000000..32020e49d --- /dev/null +++ b/src/datadogV2/model/model_application_key_response_included_item.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an application key. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApplicationKeyResponseIncludedItem { + User(Box), + Role(Box), +} diff --git a/src/datadogV2/model/model_application_key_response_meta.rs b/src/datadogV2/model/model_application_key_response_meta.rs new file mode 100644 index 000000000..dd352165d --- /dev/null +++ b/src/datadogV2/model/model_application_key_response_meta.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Additional information related to the application key response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyResponseMeta { + /// Max allowed number of application keys per user. + #[serde(rename = "max_allowed_per_user")] + pub max_allowed_per_user: Option, + /// Additional information related to the application key response. + #[serde(rename = "page")] + pub page: Option>, +} + +impl ApplicationKeyResponseMeta { + pub fn new() -> ApplicationKeyResponseMeta { + ApplicationKeyResponseMeta { + max_allowed_per_user: None, + page: None, + } + } +} diff --git a/src/datadogV2/model/model_application_key_response_meta_page.rs b/src/datadogV2/model/model_application_key_response_meta_page.rs new file mode 100644 index 000000000..68c7cac03 --- /dev/null +++ b/src/datadogV2/model/model_application_key_response_meta_page.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Additional information related to the application key response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyResponseMetaPage { + /// Total filtered application key count. + #[serde(rename = "total_filtered_count")] + pub total_filtered_count: Option, +} + +impl ApplicationKeyResponseMetaPage { + pub fn new() -> ApplicationKeyResponseMetaPage { + ApplicationKeyResponseMetaPage { + total_filtered_count: None, + } + } +} diff --git a/src/datadogV2/model/model_application_key_update_attributes.rs b/src/datadogV2/model/model_application_key_update_attributes.rs new file mode 100644 index 000000000..81ab938a7 --- /dev/null +++ b/src/datadogV2/model/model_application_key_update_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes used to update an application Key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyUpdateAttributes { + /// Name of the application key. + #[serde(rename = "name")] + pub name: Option, + /// Array of scopes to grant the application key. + #[serde(rename = "scopes", default, with = "::serde_with::rust::double_option")] + pub scopes: Option>>, +} + +impl ApplicationKeyUpdateAttributes { + pub fn new() -> ApplicationKeyUpdateAttributes { + ApplicationKeyUpdateAttributes { + name: None, + scopes: None, + } + } +} diff --git a/src/datadogV2/model/model_application_key_update_data.rs b/src/datadogV2/model/model_application_key_update_data.rs new file mode 100644 index 000000000..908df7e6c --- /dev/null +++ b/src/datadogV2/model/model_application_key_update_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object used to update an application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyUpdateData { + /// Attributes used to update an application Key. + #[serde(rename = "attributes")] + pub attributes: Box, + /// ID of the application key. + #[serde(rename = "id")] + pub id: String, + /// Application Keys resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ApplicationKeysType, +} + +impl ApplicationKeyUpdateData { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::ApplicationKeysType, + ) -> ApplicationKeyUpdateData { + ApplicationKeyUpdateData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_application_key_update_request.rs b/src/datadogV2/model/model_application_key_update_request.rs new file mode 100644 index 000000000..4c062fb92 --- /dev/null +++ b/src/datadogV2/model/model_application_key_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request used to update an application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ApplicationKeyUpdateRequest { + /// Object used to update an application key. + #[serde(rename = "data")] + pub data: Box, +} + +impl ApplicationKeyUpdateRequest { + pub fn new( + data: Box, + ) -> ApplicationKeyUpdateRequest { + ApplicationKeyUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_application_keys_sort.rs b/src/datadogV2/model/model_application_keys_sort.rs new file mode 100644 index 000000000..d2c1a4c8d --- /dev/null +++ b/src/datadogV2/model/model_application_keys_sort.rs @@ -0,0 +1,34 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ApplicationKeysSort { + #[serde(rename = "created_at")] + CREATED_AT_ASCENDING, + #[serde(rename = "-created_at")] + CREATED_AT_DESCENDING, + #[serde(rename = "last4")] + LAST4_ASCENDING, + #[serde(rename = "-last4")] + LAST4_DESCENDING, + #[serde(rename = "name")] + NAME_ASCENDING, + #[serde(rename = "-name")] + NAME_DESCENDING, +} + +impl ToString for ApplicationKeysSort { + fn to_string(&self) -> String { + match self { + Self::CREATED_AT_ASCENDING => String::from("created_at"), + Self::CREATED_AT_DESCENDING => String::from("-created_at"), + Self::LAST4_ASCENDING => String::from("last4"), + Self::LAST4_DESCENDING => String::from("-last4"), + Self::NAME_ASCENDING => String::from("name"), + Self::NAME_DESCENDING => String::from("-name"), + } + } +} diff --git a/src/datadogV2/model/model_application_keys_type.rs b/src/datadogV2/model/model_application_keys_type.rs new file mode 100644 index 000000000..ebbbc736c --- /dev/null +++ b/src/datadogV2/model/model_application_keys_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ApplicationKeysType { + #[serde(rename = "application_keys")] + APPLICATION_KEYS, +} + +impl ToString for ApplicationKeysType { + fn to_string(&self) -> String { + match self { + Self::APPLICATION_KEYS => String::from("application_keys"), + } + } +} diff --git a/src/datadogV2/model/model_audit_logs_event.rs b/src/datadogV2/model/model_audit_logs_event.rs index 12f5a7736..b93858b10 100644 --- a/src/datadogV2/model/model_audit_logs_event.rs +++ b/src/datadogV2/model/model_audit_logs_event.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object description of an Audit Logs event after it is processed and stored by Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsEvent { /// JSON object containing all event attributes and their associated values. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_audit_logs_event_attributes.rs b/src/datadogV2/model/model_audit_logs_event_attributes.rs index 9cfb4c3ca..04f66ef47 100644 --- a/src/datadogV2/model/model_audit_logs_event_attributes.rs +++ b/src/datadogV2/model/model_audit_logs_event_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// JSON object containing all event attributes and their associated values. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsEventAttributes { /// JSON object of attributes from Audit Logs events. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_audit_logs_event_type.rs b/src/datadogV2/model/model_audit_logs_event_type.rs index e4bcaf7d6..78e24574b 100644 --- a/src/datadogV2/model/model_audit_logs_event_type.rs +++ b/src/datadogV2/model/model_audit_logs_event_type.rs @@ -17,9 +17,3 @@ impl ToString for AuditLogsEventType { } } } - -impl Default for AuditLogsEventType { - fn default() -> AuditLogsEventType { - Self::Audit - } -} diff --git a/src/datadogV2/model/model_audit_logs_events_response.rs b/src/datadogV2/model/model_audit_logs_events_response.rs index 9ba00a277..fd69736a2 100644 --- a/src/datadogV2/model/model_audit_logs_events_response.rs +++ b/src/datadogV2/model/model_audit_logs_events_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response object with all events matching the request and pagination information. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsEventsResponse { /// Array of events matching the request. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_audit_logs_query_filter.rs b/src/datadogV2/model/model_audit_logs_query_filter.rs index 8913591b4..03332beef 100644 --- a/src/datadogV2/model/model_audit_logs_query_filter.rs +++ b/src/datadogV2/model/model_audit_logs_query_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Search and filter query settings. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsQueryFilter { /// Minimum time for the requested events. Supports date, math, and regular timestamps (in milliseconds). #[serde(rename = "from")] diff --git a/src/datadogV2/model/model_audit_logs_query_options.rs b/src/datadogV2/model/model_audit_logs_query_options.rs index 13cbcc71e..515d8e888 100644 --- a/src/datadogV2/model/model_audit_logs_query_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_options.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// Global query options that are used during the query. /// Note: Specify either timezone or time offset, not both. Otherwise, the query fails. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsQueryOptions { /// Time offset (in seconds) to apply to the query. #[serde(rename = "time_offset")] diff --git a/src/datadogV2/model/model_audit_logs_query_page_options.rs b/src/datadogV2/model/model_audit_logs_query_page_options.rs index 21c2198ee..da8064311 100644 --- a/src/datadogV2/model/model_audit_logs_query_page_options.rs +++ b/src/datadogV2/model/model_audit_logs_query_page_options.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Paging attributes for listing events. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsQueryPageOptions { /// List following results with a cursor provided in the previous query. #[serde(rename = "cursor")] diff --git a/src/datadogV2/model/model_audit_logs_response_links.rs b/src/datadogV2/model/model_audit_logs_response_links.rs index e2be8266d..37e60e1b6 100644 --- a/src/datadogV2/model/model_audit_logs_response_links.rs +++ b/src/datadogV2/model/model_audit_logs_response_links.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Links attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsResponseLinks { /// Link for the next set of results. Note that the request can also be made using the /// POST endpoint. diff --git a/src/datadogV2/model/model_audit_logs_response_metadata.rs b/src/datadogV2/model/model_audit_logs_response_metadata.rs index 4ce7545c1..b688429a1 100644 --- a/src/datadogV2/model/model_audit_logs_response_metadata.rs +++ b/src/datadogV2/model/model_audit_logs_response_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata associated with a request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsResponseMetadata { /// Time elapsed in milliseconds. #[serde(rename = "elapsed")] diff --git a/src/datadogV2/model/model_audit_logs_response_page.rs b/src/datadogV2/model/model_audit_logs_response_page.rs index f5ad651ff..1cb8050c2 100644 --- a/src/datadogV2/model/model_audit_logs_response_page.rs +++ b/src/datadogV2/model/model_audit_logs_response_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Paging attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsResponsePage { /// The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. #[serde(rename = "after")] diff --git a/src/datadogV2/model/model_audit_logs_response_status.rs b/src/datadogV2/model/model_audit_logs_response_status.rs index 7c748e36b..f4e75662f 100644 --- a/src/datadogV2/model/model_audit_logs_response_status.rs +++ b/src/datadogV2/model/model_audit_logs_response_status.rs @@ -20,9 +20,3 @@ impl ToString for AuditLogsResponseStatus { } } } - -impl Default for AuditLogsResponseStatus { - fn default() -> AuditLogsResponseStatus { - Self::DONE - } -} diff --git a/src/datadogV2/model/model_audit_logs_search_events_request.rs b/src/datadogV2/model/model_audit_logs_search_events_request.rs index 429fa2acc..391a3e6c2 100644 --- a/src/datadogV2/model/model_audit_logs_search_events_request.rs +++ b/src/datadogV2/model/model_audit_logs_search_events_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The request for a Audit Logs events list. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsSearchEventsRequest { /// Search and filter query settings. #[serde(rename = "filter")] diff --git a/src/datadogV2/model/model_audit_logs_sort.rs b/src/datadogV2/model/model_audit_logs_sort.rs index 12c142be4..29cb34fe2 100644 --- a/src/datadogV2/model/model_audit_logs_sort.rs +++ b/src/datadogV2/model/model_audit_logs_sort.rs @@ -20,9 +20,3 @@ impl ToString for AuditLogsSort { } } } - -impl Default for AuditLogsSort { - fn default() -> AuditLogsSort { - Self::TIMESTAMP_ASCENDING - } -} diff --git a/src/datadogV2/model/model_audit_logs_warning.rs b/src/datadogV2/model/model_audit_logs_warning.rs index 7529e1ae0..caa115893 100644 --- a/src/datadogV2/model/model_audit_logs_warning.rs +++ b/src/datadogV2/model/model_audit_logs_warning.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Warning message indicating something that went wrong with the query. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AuditLogsWarning { /// Unique code for this type of warning. #[serde(rename = "code")] diff --git a/src/datadogV2/model/model_auth_n_mapping.rs b/src/datadogV2/model/model_auth_n_mapping.rs new file mode 100644 index 000000000..c76107f38 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The AuthN Mapping object returned by API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMapping { + /// Attributes of AuthN Mapping. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the AuthN Mapping. + #[serde(rename = "id")] + pub id: String, + /// All relationships associated with AuthN Mapping. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// AuthN Mappings resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AuthNMappingsType, +} + +impl AuthNMapping { + pub fn new(id: String, type_: crate::datadogV2::model::AuthNMappingsType) -> AuthNMapping { + AuthNMapping { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_attributes.rs new file mode 100644 index 000000000..6912f66c4 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of AuthN Mapping. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingAttributes { + /// Key portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_key")] + pub attribute_key: Option, + /// Value portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_value")] + pub attribute_value: Option, + /// Creation time of the AuthN Mapping. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Time of last AuthN Mapping modification. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// The ID of the SAML assertion attribute. + #[serde(rename = "saml_assertion_attribute_id")] + pub saml_assertion_attribute_id: Option, +} + +impl AuthNMappingAttributes { + pub fn new() -> AuthNMappingAttributes { + AuthNMappingAttributes { + attribute_key: None, + attribute_value: None, + created_at: None, + modified_at: None, + saml_assertion_attribute_id: None, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs new file mode 100644 index 000000000..52fa1889f --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_create_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Key/Value pair of attributes used for create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingCreateAttributes { + /// Key portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_key")] + pub attribute_key: Option, + /// Value portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_value")] + pub attribute_value: Option, +} + +impl AuthNMappingCreateAttributes { + pub fn new() -> AuthNMappingCreateAttributes { + AuthNMappingCreateAttributes { + attribute_key: None, + attribute_value: None, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_create_data.rs b/src/datadogV2/model/model_auth_n_mapping_create_data.rs new file mode 100644 index 000000000..a89c10e70 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_create_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data for creating an AuthN Mapping. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingCreateData { + /// Key/Value pair of attributes used for create request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Relationship of AuthN Mapping create object to Role. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// AuthN Mappings resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AuthNMappingsType, +} + +impl AuthNMappingCreateData { + pub fn new(type_: crate::datadogV2::model::AuthNMappingsType) -> AuthNMappingCreateData { + AuthNMappingCreateData { + attributes: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs new file mode 100644 index 000000000..fc4e82a0b --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_create_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship of AuthN Mapping create object to Role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingCreateRelationships { + /// Relationship to role. + #[serde(rename = "role")] + pub role: Option>, +} + +impl AuthNMappingCreateRelationships { + pub fn new() -> AuthNMappingCreateRelationships { + AuthNMappingCreateRelationships { role: None } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_create_request.rs b/src/datadogV2/model/model_auth_n_mapping_create_request.rs new file mode 100644 index 000000000..3f8d40334 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request for creating an AuthN Mapping. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingCreateRequest { + /// Data for creating an AuthN Mapping. + #[serde(rename = "data")] + pub data: Box, +} + +impl AuthNMappingCreateRequest { + pub fn new( + data: Box, + ) -> AuthNMappingCreateRequest { + AuthNMappingCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_included.rs b/src/datadogV2/model/model_auth_n_mapping_included.rs new file mode 100644 index 000000000..2b42f34b1 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_included.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Included data in the AuthN Mapping response. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AuthNMappingIncluded { + SAMLAssertionAttribute(Box), + Role(Box), +} diff --git a/src/datadogV2/model/model_auth_n_mapping_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_relationships.rs new file mode 100644 index 000000000..db4f2acd7 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_relationships.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// All relationships associated with AuthN Mapping. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingRelationships { + /// Relationship to role. + #[serde(rename = "role")] + pub role: Option>, + /// AuthN Mapping relationship to SAML Assertion Attribute. + #[serde(rename = "saml_assertion_attribute")] + pub saml_assertion_attribute: + Option>, +} + +impl AuthNMappingRelationships { + pub fn new() -> AuthNMappingRelationships { + AuthNMappingRelationships { + role: None, + saml_assertion_attribute: None, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_response.rs b/src/datadogV2/model/model_auth_n_mapping_response.rs new file mode 100644 index 000000000..b2f6c6ddd --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AuthN Mapping response from the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingResponse { + /// The AuthN Mapping object returned by API. + #[serde(rename = "data")] + pub data: Option>, + /// Included data in the AuthN Mapping response. + #[serde(rename = "included")] + pub included: Option>, +} + +impl AuthNMappingResponse { + pub fn new() -> AuthNMappingResponse { + AuthNMappingResponse { + data: None, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs b/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs new file mode 100644 index 000000000..332cd7600 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_update_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Key/Value pair of attributes used for update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingUpdateAttributes { + /// Key portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_key")] + pub attribute_key: Option, + /// Value portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_value")] + pub attribute_value: Option, +} + +impl AuthNMappingUpdateAttributes { + pub fn new() -> AuthNMappingUpdateAttributes { + AuthNMappingUpdateAttributes { + attribute_key: None, + attribute_value: None, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_update_data.rs b/src/datadogV2/model/model_auth_n_mapping_update_data.rs new file mode 100644 index 000000000..4e98d9dd4 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_update_data.rs @@ -0,0 +1,37 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data for updating an AuthN Mapping. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingUpdateData { + /// Key/Value pair of attributes used for update request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the AuthN Mapping. + #[serde(rename = "id")] + pub id: String, + /// Relationship of AuthN Mapping update object to Role. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// AuthN Mappings resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AuthNMappingsType, +} + +impl AuthNMappingUpdateData { + pub fn new( + id: String, + type_: crate::datadogV2::model::AuthNMappingsType, + ) -> AuthNMappingUpdateData { + AuthNMappingUpdateData { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs b/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs new file mode 100644 index 000000000..dd138d975 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_update_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship of AuthN Mapping update object to Role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingUpdateRelationships { + /// Relationship to role. + #[serde(rename = "role")] + pub role: Option>, +} + +impl AuthNMappingUpdateRelationships { + pub fn new() -> AuthNMappingUpdateRelationships { + AuthNMappingUpdateRelationships { role: None } + } +} diff --git a/src/datadogV2/model/model_auth_n_mapping_update_request.rs b/src/datadogV2/model/model_auth_n_mapping_update_request.rs new file mode 100644 index 000000000..017742fe2 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mapping_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request to update an AuthN Mapping. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingUpdateRequest { + /// Data for updating an AuthN Mapping. + #[serde(rename = "data")] + pub data: Box, +} + +impl AuthNMappingUpdateRequest { + pub fn new( + data: Box, + ) -> AuthNMappingUpdateRequest { + AuthNMappingUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_auth_n_mappings_response.rs b/src/datadogV2/model/model_auth_n_mappings_response.rs new file mode 100644 index 000000000..b4540cd42 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mappings_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Array of AuthN Mappings response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AuthNMappingsResponse { + /// Array of returned AuthN Mappings. + #[serde(rename = "data")] + pub data: Option>, + /// Included data in the AuthN Mapping response. + #[serde(rename = "included")] + pub included: Option>, + /// Object describing meta attributes of response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl AuthNMappingsResponse { + pub fn new() -> AuthNMappingsResponse { + AuthNMappingsResponse { + data: None, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mappings_sort.rs b/src/datadogV2/model/model_auth_n_mappings_sort.rs new file mode 100644 index 000000000..2166c8269 --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mappings_sort.rs @@ -0,0 +1,64 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AuthNMappingsSort { + #[serde(rename = "created_at")] + CREATED_AT_ASCENDING, + #[serde(rename = "-created_at")] + CREATED_AT_DESCENDING, + #[serde(rename = "role_id")] + ROLE_ID_ASCENDING, + #[serde(rename = "-role_id")] + ROLE_ID_DESCENDING, + #[serde(rename = "saml_assertion_attribute_id")] + SAML_ASSERTION_ATTRIBUTE_ID_ASCENDING, + #[serde(rename = "-saml_assertion_attribute_id")] + SAML_ASSERTION_ATTRIBUTE_ID_DESCENDING, + #[serde(rename = "role.name")] + ROLE_NAME_ASCENDING, + #[serde(rename = "-role.name")] + ROLE_NAME_DESCENDING, + #[serde(rename = "saml_assertion_attribute.attribute_key")] + SAML_ASSERTION_ATTRIBUTE_KEY_ASCENDING, + #[serde(rename = "-saml_assertion_attribute.attribute_key")] + SAML_ASSERTION_ATTRIBUTE_KEY_DESCENDING, + #[serde(rename = "saml_assertion_attribute.attribute_value")] + SAML_ASSERTION_ATTRIBUTE_VALUE_ASCENDING, + #[serde(rename = "-saml_assertion_attribute.attribute_value")] + SAML_ASSERTION_ATTRIBUTE_VALUE_DESCENDING, +} + +impl ToString for AuthNMappingsSort { + fn to_string(&self) -> String { + match self { + Self::CREATED_AT_ASCENDING => String::from("created_at"), + Self::CREATED_AT_DESCENDING => String::from("-created_at"), + Self::ROLE_ID_ASCENDING => String::from("role_id"), + Self::ROLE_ID_DESCENDING => String::from("-role_id"), + Self::SAML_ASSERTION_ATTRIBUTE_ID_ASCENDING => { + String::from("saml_assertion_attribute_id") + } + Self::SAML_ASSERTION_ATTRIBUTE_ID_DESCENDING => { + String::from("-saml_assertion_attribute_id") + } + Self::ROLE_NAME_ASCENDING => String::from("role.name"), + Self::ROLE_NAME_DESCENDING => String::from("-role.name"), + Self::SAML_ASSERTION_ATTRIBUTE_KEY_ASCENDING => { + String::from("saml_assertion_attribute.attribute_key") + } + Self::SAML_ASSERTION_ATTRIBUTE_KEY_DESCENDING => { + String::from("-saml_assertion_attribute.attribute_key") + } + Self::SAML_ASSERTION_ATTRIBUTE_VALUE_ASCENDING => { + String::from("saml_assertion_attribute.attribute_value") + } + Self::SAML_ASSERTION_ATTRIBUTE_VALUE_DESCENDING => { + String::from("-saml_assertion_attribute.attribute_value") + } + } + } +} diff --git a/src/datadogV2/model/model_auth_n_mappings_type.rs b/src/datadogV2/model/model_auth_n_mappings_type.rs new file mode 100644 index 000000000..62f62e51f --- /dev/null +++ b/src/datadogV2/model/model_auth_n_mappings_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AuthNMappingsType { + #[serde(rename = "authn_mappings")] + AUTHN_MAPPINGS, +} + +impl ToString for AuthNMappingsType { + fn to_string(&self) -> String { + match self { + Self::AUTHN_MAPPINGS => String::from("authn_mappings"), + } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config.rs b/src/datadogV2/model/model_aws_cur_config.rs new file mode 100644 index 000000000..11b78baea --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AWS CUR config. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfig { + /// Attributes for An AWS CUR config. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The ID of the AWS CUR config. + #[serde(rename = "id")] + pub id: Option, + /// Type of AWS CUR config. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AwsCURConfigType, +} + +impl AwsCURConfig { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::AwsCURConfigType, + ) -> AwsCURConfig { + AwsCURConfig { + attributes, + id: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_attributes.rs b/src/datadogV2/model/model_aws_cur_config_attributes.rs new file mode 100644 index 000000000..6a3408072 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_attributes.rs @@ -0,0 +1,71 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for An AWS CUR config. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigAttributes { + /// The AWS account ID. + #[serde(rename = "account_id")] + pub account_id: String, + /// The AWS bucket name used to store the Cost and Usage Report. + #[serde(rename = "bucket_name")] + pub bucket_name: String, + /// The region the bucket is located in. + #[serde(rename = "bucket_region")] + pub bucket_region: String, + /// The timestamp when the AWS CUR config was created. + #[serde(rename = "created_at")] + pub created_at: Option, + /// The error messages for the AWS CUR config. + #[serde(rename = "error_messages")] + pub error_messages: Option>, + /// The number of months the report has been backfilled. + #[deprecated] + #[serde(rename = "months")] + pub months: Option, + /// The name of the Cost and Usage Report. + #[serde(rename = "report_name")] + pub report_name: String, + /// The report prefix used for the Cost and Usage Report. + #[serde(rename = "report_prefix")] + pub report_prefix: String, + /// The status of the AWS CUR. + #[serde(rename = "status")] + pub status: String, + /// The timestamp when the AWS CUR config status was updated. + #[serde(rename = "status_updated_at")] + pub status_updated_at: Option, + /// The timestamp when the AWS CUR config status was updated. + #[serde(rename = "updated_at")] + pub updated_at: Option, +} + +impl AwsCURConfigAttributes { + pub fn new( + account_id: String, + bucket_name: String, + bucket_region: String, + report_name: String, + report_prefix: String, + status: String, + ) -> AwsCURConfigAttributes { + #[allow(deprecated)] + AwsCURConfigAttributes { + account_id, + bucket_name, + bucket_region, + created_at: None, + error_messages: None, + months: None, + report_name, + report_prefix, + status, + status_updated_at: None, + updated_at: None, + } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_patch_data.rs b/src/datadogV2/model/model_aws_cur_config_patch_data.rs new file mode 100644 index 000000000..9bbc6987b --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_patch_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AWS CUR config Patch data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigPatchData { + /// Attributes for AWS CUR config Patch Request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of AWS CUR config Patch Request. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AwsCURConfigPatchRequestType, +} + +impl AwsCURConfigPatchData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::AwsCURConfigPatchRequestType, + ) -> AwsCURConfigPatchData { + AwsCURConfigPatchData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_patch_request.rs b/src/datadogV2/model/model_aws_cur_config_patch_request.rs new file mode 100644 index 000000000..3b9fac3b4 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_patch_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AWS CUR config Patch Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigPatchRequest { + /// AWS CUR config Patch data. + #[serde(rename = "data")] + pub data: Box, +} + +impl AwsCURConfigPatchRequest { + pub fn new( + data: Box, + ) -> AwsCURConfigPatchRequest { + AwsCURConfigPatchRequest { data } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_patch_request_attributes.rs b/src/datadogV2/model/model_aws_cur_config_patch_request_attributes.rs new file mode 100644 index 000000000..ef246f477 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_patch_request_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for AWS CUR config Patch Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigPatchRequestAttributes { + /// Whether or not the Cloud Cost Management account is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: bool, +} + +impl AwsCURConfigPatchRequestAttributes { + pub fn new(is_enabled: bool) -> AwsCURConfigPatchRequestAttributes { + AwsCURConfigPatchRequestAttributes { is_enabled } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_patch_request_type.rs b/src/datadogV2/model/model_aws_cur_config_patch_request_type.rs new file mode 100644 index 000000000..d3fac59e0 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_patch_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AwsCURConfigPatchRequestType { + #[serde(rename = "aws_cur_config_patch_request")] + AWS_CUR_CONFIG_PATCH_REQUEST, +} + +impl ToString for AwsCURConfigPatchRequestType { + fn to_string(&self) -> String { + match self { + Self::AWS_CUR_CONFIG_PATCH_REQUEST => String::from("aws_cur_config_patch_request"), + } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_post_data.rs b/src/datadogV2/model/model_aws_cur_config_post_data.rs new file mode 100644 index 000000000..947799172 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_post_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AWS CUR config Post data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigPostData { + /// Attributes for AWS CUR config Post Request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of AWS CUR config Post Request. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AwsCURConfigPostRequestType, +} + +impl AwsCURConfigPostData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::AwsCURConfigPostRequestType, + ) -> AwsCURConfigPostData { + AwsCURConfigPostData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_post_request.rs b/src/datadogV2/model/model_aws_cur_config_post_request.rs new file mode 100644 index 000000000..a1e5f51c9 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_post_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AWS CUR config Post Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigPostRequest { + /// AWS CUR config Post data. + #[serde(rename = "data")] + pub data: Box, +} + +impl AwsCURConfigPostRequest { + pub fn new( + data: Box, + ) -> AwsCURConfigPostRequest { + AwsCURConfigPostRequest { data } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs b/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs new file mode 100644 index 000000000..d6536f58d --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_post_request_attributes.rs @@ -0,0 +1,51 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for AWS CUR config Post Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigPostRequestAttributes { + /// The AWS account ID. + #[serde(rename = "account_id")] + pub account_id: String, + /// The AWS bucket name used to store the Cost and Usage Report. + #[serde(rename = "bucket_name")] + pub bucket_name: String, + /// The region the bucket is located in. + #[serde(rename = "bucket_region")] + pub bucket_region: Option, + /// Whether or not the Cloud Cost Management account is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// The month of the report. + #[serde(rename = "months")] + pub months: Option, + /// The name of the Cost and Usage Report. + #[serde(rename = "report_name")] + pub report_name: String, + /// The report prefix used for the Cost and Usage Report. + #[serde(rename = "report_prefix")] + pub report_prefix: String, +} + +impl AwsCURConfigPostRequestAttributes { + pub fn new( + account_id: String, + bucket_name: String, + report_name: String, + report_prefix: String, + ) -> AwsCURConfigPostRequestAttributes { + AwsCURConfigPostRequestAttributes { + account_id, + bucket_name, + bucket_region: None, + is_enabled: None, + months: None, + report_name, + report_prefix, + } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_post_request_type.rs b/src/datadogV2/model/model_aws_cur_config_post_request_type.rs new file mode 100644 index 000000000..4a29fcc0a --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_post_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AwsCURConfigPostRequestType { + #[serde(rename = "aws_cur_config_post_request")] + AWS_CUR_CONFIG_POST_REQUEST, +} + +impl ToString for AwsCURConfigPostRequestType { + fn to_string(&self) -> String { + match self { + Self::AWS_CUR_CONFIG_POST_REQUEST => String::from("aws_cur_config_post_request"), + } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_response.rs b/src/datadogV2/model/model_aws_cur_config_response.rs new file mode 100644 index 000000000..6f7872596 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response of AWS CUR config. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigResponse { + /// AWS CUR config. + #[serde(rename = "data")] + pub data: Option>, +} + +impl AwsCURConfigResponse { + pub fn new() -> AwsCURConfigResponse { + AwsCURConfigResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_aws_cur_config_type.rs b/src/datadogV2/model/model_aws_cur_config_type.rs new file mode 100644 index 000000000..88246c48d --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_config_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AwsCURConfigType { + #[serde(rename = "aws_cur_config")] + AWS_CUR_CONFIG, +} + +impl ToString for AwsCURConfigType { + fn to_string(&self) -> String { + match self { + Self::AWS_CUR_CONFIG => String::from("aws_cur_config"), + } + } +} diff --git a/src/datadogV2/model/model_aws_cur_configs_response.rs b/src/datadogV2/model/model_aws_cur_configs_response.rs new file mode 100644 index 000000000..c393f61f1 --- /dev/null +++ b/src/datadogV2/model/model_aws_cur_configs_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of AWS CUR configs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AwsCURConfigsResponse { + /// An AWS CUR config. + #[serde(rename = "data")] + pub data: Option>, +} + +impl AwsCURConfigsResponse { + pub fn new() -> AwsCURConfigsResponse { + AwsCURConfigsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_aws_related_account.rs b/src/datadogV2/model/model_aws_related_account.rs new file mode 100644 index 000000000..66d4b2ef2 --- /dev/null +++ b/src/datadogV2/model/model_aws_related_account.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AWS related account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AWSRelatedAccount { + /// Attributes for an AWS related account. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The AWS account ID. + #[serde(rename = "id")] + pub id: String, + /// Type of AWS related account. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AWSRelatedAccountType, +} + +impl AWSRelatedAccount { + pub fn new( + id: String, + type_: crate::datadogV2::model::AWSRelatedAccountType, + ) -> AWSRelatedAccount { + AWSRelatedAccount { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_aws_related_account_attributes.rs b/src/datadogV2/model/model_aws_related_account_attributes.rs new file mode 100644 index 000000000..8fa53fb4b --- /dev/null +++ b/src/datadogV2/model/model_aws_related_account_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for an AWS related account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AWSRelatedAccountAttributes { + /// Whether or not the AWS account has a Datadog integration. + #[serde(rename = "has_datadog_integration")] + pub has_datadog_integration: Option, + /// The name of the AWS account. + #[serde(rename = "name")] + pub name: Option, +} + +impl AWSRelatedAccountAttributes { + pub fn new() -> AWSRelatedAccountAttributes { + AWSRelatedAccountAttributes { + has_datadog_integration: None, + name: None, + } + } +} diff --git a/src/datadogV2/model/model_aws_related_account_type.rs b/src/datadogV2/model/model_aws_related_account_type.rs new file mode 100644 index 000000000..b94690c12 --- /dev/null +++ b/src/datadogV2/model/model_aws_related_account_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AWSRelatedAccountType { + #[serde(rename = "aws_account")] + AWS_ACCOUNT, +} + +impl ToString for AWSRelatedAccountType { + fn to_string(&self) -> String { + match self { + Self::AWS_ACCOUNT => String::from("aws_account"), + } + } +} diff --git a/src/datadogV2/model/model_aws_related_accounts_response.rs b/src/datadogV2/model/model_aws_related_accounts_response.rs new file mode 100644 index 000000000..321f12bfc --- /dev/null +++ b/src/datadogV2/model/model_aws_related_accounts_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of AWS related accounts. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AWSRelatedAccountsResponse { + /// An AWS related account. + #[serde(rename = "data")] + pub data: Option>, +} + +impl AWSRelatedAccountsResponse { + pub fn new() -> AWSRelatedAccountsResponse { + AWSRelatedAccountsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config.rs b/src/datadogV2/model/model_azure_uc_config.rs new file mode 100644 index 000000000..a2beb9df4 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config.rs @@ -0,0 +1,90 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Azure config. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfig { + /// The tenant ID of the azure account. + #[serde(rename = "account_id")] + pub account_id: String, + /// The client ID of the Azure account. + #[serde(rename = "client_id")] + pub client_id: String, + /// The timestamp when the Azure config was created. + #[serde(rename = "created_at")] + pub created_at: Option, + /// The dataset type of the Azure config. + #[serde(rename = "dataset_type")] + pub dataset_type: String, + /// The error messages for the Azure config. + #[serde(rename = "error_messages")] + pub error_messages: Option>, + /// The name of the configured Azure Export. + #[serde(rename = "export_name")] + pub export_name: String, + /// The path where the Azure Export is saved. + #[serde(rename = "export_path")] + pub export_path: String, + /// The ID of the Azure config. + #[serde(rename = "id")] + pub id: Option, + /// The number of months the report has been backfilled. + #[deprecated] + #[serde(rename = "months")] + pub months: Option, + /// The scope of your observed subscription. + #[serde(rename = "scope")] + pub scope: String, + /// The status of the Azure config. + #[serde(rename = "status")] + pub status: String, + /// The timestamp when the Azure config status was last updated. + #[serde(rename = "status_updated_at")] + pub status_updated_at: Option, + /// The name of the storage account where the Azure Export is saved. + #[serde(rename = "storage_account")] + pub storage_account: String, + /// The name of the storage container where the Azure Export is saved. + #[serde(rename = "storage_container")] + pub storage_container: String, + /// The timestamp when the Azure config was last updated. + #[serde(rename = "updated_at")] + pub updated_at: Option, +} + +impl AzureUCConfig { + pub fn new( + account_id: String, + client_id: String, + dataset_type: String, + export_name: String, + export_path: String, + scope: String, + status: String, + storage_account: String, + storage_container: String, + ) -> AzureUCConfig { + #[allow(deprecated)] + AzureUCConfig { + account_id, + client_id, + created_at: None, + dataset_type, + error_messages: None, + export_name, + export_path, + id: None, + months: None, + scope, + status, + status_updated_at: None, + storage_account, + storage_container, + updated_at: None, + } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_pair.rs b/src/datadogV2/model/model_azure_uc_config_pair.rs new file mode 100644 index 000000000..fb61c4116 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_pair.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Azure config pair. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPair { + /// Attributes for Azure config pair. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The ID of Cloud Cost Management account. + #[serde(rename = "id")] + pub id: Option, + /// Type of Azure config pair. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AzureUCConfigPairType, +} + +impl AzureUCConfigPair { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::AzureUCConfigPairType, + ) -> AzureUCConfigPair { + AzureUCConfigPair { + attributes, + id: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs b/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs new file mode 100644 index 000000000..23de99832 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_pair_attributes.rs @@ -0,0 +1,25 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for Azure config pair. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPairAttributes { + /// An Azure config. + #[serde(rename = "configs")] + pub configs: Vec, + /// The ID of the Azure config pair. + #[serde(rename = "id")] + pub id: Option, +} + +impl AzureUCConfigPairAttributes { + pub fn new( + configs: Vec, + ) -> AzureUCConfigPairAttributes { + AzureUCConfigPairAttributes { configs, id: None } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_pair_type.rs b/src/datadogV2/model/model_azure_uc_config_pair_type.rs new file mode 100644 index 000000000..acb998f89 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_pair_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AzureUCConfigPairType { + #[serde(rename = "azure_uc_configs")] + AZURE_UC_CONFIGS, +} + +impl ToString for AzureUCConfigPairType { + fn to_string(&self) -> String { + match self { + Self::AZURE_UC_CONFIGS => String::from("azure_uc_configs"), + } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_pairs_response.rs b/src/datadogV2/model/model_azure_uc_config_pairs_response.rs new file mode 100644 index 000000000..144afe840 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_pairs_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response of Azure config pair. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPairsResponse { + /// Azure config pair. + #[serde(rename = "data")] + pub data: Option>, +} + +impl AzureUCConfigPairsResponse { + pub fn new() -> AzureUCConfigPairsResponse { + AzureUCConfigPairsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_patch_data.rs b/src/datadogV2/model/model_azure_uc_config_patch_data.rs new file mode 100644 index 000000000..92623f532 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_patch_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Azure config Patch data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPatchData { + /// Attributes for Azure config Patch Request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of Azure config Patch Request. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AzureUCConfigPatchRequestType, +} + +impl AzureUCConfigPatchData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::AzureUCConfigPatchRequestType, + ) -> AzureUCConfigPatchData { + AzureUCConfigPatchData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_patch_request.rs b/src/datadogV2/model/model_azure_uc_config_patch_request.rs new file mode 100644 index 000000000..44657e03b --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_patch_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Azure config Patch Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPatchRequest { + /// Azure config Patch data. + #[serde(rename = "data")] + pub data: Box, +} + +impl AzureUCConfigPatchRequest { + pub fn new( + data: Box, + ) -> AzureUCConfigPatchRequest { + AzureUCConfigPatchRequest { data } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_patch_request_attributes.rs b/src/datadogV2/model/model_azure_uc_config_patch_request_attributes.rs new file mode 100644 index 000000000..a879ce824 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_patch_request_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for Azure config Patch Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPatchRequestAttributes { + /// Whether or not the Cloud Cost Management account is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: bool, +} + +impl AzureUCConfigPatchRequestAttributes { + pub fn new(is_enabled: bool) -> AzureUCConfigPatchRequestAttributes { + AzureUCConfigPatchRequestAttributes { is_enabled } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_patch_request_type.rs b/src/datadogV2/model/model_azure_uc_config_patch_request_type.rs new file mode 100644 index 000000000..fc76730ed --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_patch_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AzureUCConfigPatchRequestType { + #[serde(rename = "azure_uc_config_patch_request")] + AZURE_UC_CONFIG_PATCH_REQUEST, +} + +impl ToString for AzureUCConfigPatchRequestType { + fn to_string(&self) -> String { + match self { + Self::AZURE_UC_CONFIG_PATCH_REQUEST => String::from("azure_uc_config_patch_request"), + } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_post_data.rs b/src/datadogV2/model/model_azure_uc_config_post_data.rs new file mode 100644 index 000000000..2ed4e0b5f --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_post_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Azure config Post data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPostData { + /// Attributes for Azure config Post Request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of Azure config Post Request. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::AzureUCConfigPostRequestType, +} + +impl AzureUCConfigPostData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::AzureUCConfigPostRequestType, + ) -> AzureUCConfigPostData { + AzureUCConfigPostData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_post_request.rs b/src/datadogV2/model/model_azure_uc_config_post_request.rs new file mode 100644 index 000000000..1655a0105 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_post_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Azure config Post Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPostRequest { + /// Azure config Post data. + #[serde(rename = "data")] + pub data: Box, +} + +impl AzureUCConfigPostRequest { + pub fn new( + data: Box, + ) -> AzureUCConfigPostRequest { + AzureUCConfigPostRequest { data } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs b/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs new file mode 100644 index 000000000..9a0197d22 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_post_request_attributes.rs @@ -0,0 +1,48 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for Azure config Post Request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigPostRequestAttributes { + /// The tenant ID of the azure account. + #[serde(rename = "account_id")] + pub account_id: String, + /// Bill config. + #[serde(rename = "actual_bill_config")] + pub actual_bill_config: Box, + /// Bill config. + #[serde(rename = "amortized_bill_config")] + pub amortized_bill_config: Box, + /// The client ID of the azure account. + #[serde(rename = "client_id")] + pub client_id: String, + /// Whether or not the Cloud Cost Management account is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// The scope of your observed subscription. + #[serde(rename = "scope")] + pub scope: String, +} + +impl AzureUCConfigPostRequestAttributes { + pub fn new( + account_id: String, + actual_bill_config: Box, + amortized_bill_config: Box, + client_id: String, + scope: String, + ) -> AzureUCConfigPostRequestAttributes { + AzureUCConfigPostRequestAttributes { + account_id, + actual_bill_config, + amortized_bill_config, + client_id, + is_enabled: None, + scope, + } + } +} diff --git a/src/datadogV2/model/model_azure_uc_config_post_request_type.rs b/src/datadogV2/model/model_azure_uc_config_post_request_type.rs new file mode 100644 index 000000000..5d0f6d873 --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_config_post_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum AzureUCConfigPostRequestType { + #[serde(rename = "azure_uc_config_post_request")] + AZURE_UC_CONFIG_POST_REQUEST, +} + +impl ToString for AzureUCConfigPostRequestType { + fn to_string(&self) -> String { + match self { + Self::AZURE_UC_CONFIG_POST_REQUEST => String::from("azure_uc_config_post_request"), + } + } +} diff --git a/src/datadogV2/model/model_azure_uc_configs_response.rs b/src/datadogV2/model/model_azure_uc_configs_response.rs new file mode 100644 index 000000000..2a395c54b --- /dev/null +++ b/src/datadogV2/model/model_azure_uc_configs_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of Azure accounts with configs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct AzureUCConfigsResponse { + /// An Azure config pair. + #[serde(rename = "data")] + pub data: Option>, +} + +impl AzureUCConfigsResponse { + pub fn new() -> AzureUCConfigsResponse { + AzureUCConfigsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_bill_config.rs b/src/datadogV2/model/model_bill_config.rs new file mode 100644 index 000000000..4494efd14 --- /dev/null +++ b/src/datadogV2/model/model_bill_config.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Bill config. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BillConfig { + /// The name of the configured Azure Export. + #[serde(rename = "export_name")] + pub export_name: String, + /// The path where the Azure Export is saved. + #[serde(rename = "export_path")] + pub export_path: String, + /// The name of the storage account where the Azure Export is saved. + #[serde(rename = "storage_account")] + pub storage_account: String, + /// The name of the storage container where the Azure Export is saved. + #[serde(rename = "storage_container")] + pub storage_container: String, +} + +impl BillConfig { + pub fn new( + export_name: String, + export_path: String, + storage_account: String, + storage_container: String, + ) -> BillConfig { + BillConfig { + export_name, + export_path, + storage_account, + storage_container, + } + } +} diff --git a/src/datadogV2/model/model_mute_finding_request.rs b/src/datadogV2/model/model_bulk_mute_findings_request.rs similarity index 51% rename from src/datadogV2/model/model_mute_finding_request.rs rename to src/datadogV2/model/model_bulk_mute_findings_request.rs index 6cefda464..1ee687ac0 100644 --- a/src/datadogV2/model/model_mute_finding_request.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request.rs @@ -4,19 +4,19 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; -/// The new mute finding request. +/// The new bulk mute finding request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingRequest { - /// Data object containing the new mute properties of the finding. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsRequest { + /// Data object containing the new bulk mute properties of the finding. #[serde(rename = "data")] - pub data: Box, + pub data: Box, } -impl MuteFindingRequest { - pub fn new(data: crate::datadogV2::model::MuteFindingRequestData) -> MuteFindingRequest { - MuteFindingRequest { - data: Box::new(data), - } +impl BulkMuteFindingsRequest { + pub fn new( + data: Box, + ) -> BulkMuteFindingsRequest { + BulkMuteFindingsRequest { data } } } diff --git a/src/datadogV2/model/model_mute_finding_request_attributes.rs b/src/datadogV2/model/model_bulk_mute_findings_request_attributes.rs similarity index 54% rename from src/datadogV2/model/model_mute_finding_request_attributes.rs rename to src/datadogV2/model/model_bulk_mute_findings_request_attributes.rs index 9972e4804..3577f21b8 100644 --- a/src/datadogV2/model/model_mute_finding_request_attributes.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_attributes.rs @@ -6,19 +6,17 @@ use serde_with::skip_serializing_none; /// The mute properties to be updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingRequestAttributes { - /// Object containing the new mute properties of the finding. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsRequestAttributes { + /// Object containing the new mute properties of the findings. #[serde(rename = "mute")] - pub mute: Box, + pub mute: Box, } -impl MuteFindingRequestAttributes { +impl BulkMuteFindingsRequestAttributes { pub fn new( - mute: crate::datadogV2::model::MuteFindingRequestProperties, - ) -> MuteFindingRequestAttributes { - MuteFindingRequestAttributes { - mute: Box::new(mute), - } + mute: Box, + ) -> BulkMuteFindingsRequestAttributes { + BulkMuteFindingsRequestAttributes { mute } } } diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_data.rs b/src/datadogV2/model/model_bulk_mute_findings_request_data.rs new file mode 100644 index 000000000..c9defe6c2 --- /dev/null +++ b/src/datadogV2/model/model_bulk_mute_findings_request_data.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data object containing the new bulk mute properties of the finding. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsRequestData { + /// The mute properties to be updated. + #[serde(rename = "attributes")] + pub attributes: Box, + /// UUID to identify the request + #[serde(rename = "id")] + pub id: String, + /// Meta object containing the findings to be updated. + #[serde(rename = "meta")] + pub meta: Box, + /// The JSON:API type for findings. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::FindingType, +} + +impl BulkMuteFindingsRequestData { + pub fn new( + attributes: Box, + id: String, + meta: Box, + type_: crate::datadogV2::model::FindingType, + ) -> BulkMuteFindingsRequestData { + BulkMuteFindingsRequestData { + attributes, + id, + meta, + type_, + } + } +} diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs b/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs new file mode 100644 index 000000000..02db8696e --- /dev/null +++ b/src/datadogV2/model/model_bulk_mute_findings_request_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Meta object containing the findings to be updated. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsRequestMeta { + /// Array of findings. + #[serde(rename = "findings")] + pub findings: Option>, +} + +impl BulkMuteFindingsRequestMeta { + pub fn new() -> BulkMuteFindingsRequestMeta { + BulkMuteFindingsRequestMeta { findings: None } + } +} diff --git a/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs b/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs new file mode 100644 index 000000000..d6a7857be --- /dev/null +++ b/src/datadogV2/model/model_bulk_mute_findings_request_meta_findings.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Finding object containing the finding information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsRequestMetaFindings { + /// The unique ID for this finding. + #[serde(rename = "finding_id")] + pub finding_id: Option, +} + +impl BulkMuteFindingsRequestMetaFindings { + pub fn new() -> BulkMuteFindingsRequestMetaFindings { + BulkMuteFindingsRequestMetaFindings { finding_id: None } + } +} diff --git a/src/datadogV2/model/model_mute_finding_request_properties.rs b/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs similarity index 70% rename from src/datadogV2/model/model_mute_finding_request_properties.rs rename to src/datadogV2/model/model_bulk_mute_findings_request_properties.rs index 69a3b6d55..92afcb74b 100644 --- a/src/datadogV2/model/model_mute_finding_request_properties.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_request_properties.rs @@ -4,11 +4,11 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; -/// Object containing the new mute properties of the finding. +/// Object containing the new mute properties of the findings. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingRequestProperties { - /// Additional information about the reason why this finding is muted or unmuted. This field has a maximum limit of 280 characters. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsRequestProperties { + /// Additional information about the reason why those findings are muted or unmuted. This field has a maximum limit of 280 characters. #[serde(rename = "description")] pub description: Option, /// The expiration date of the mute or unmute action (Unix ms). It must be set to a value greater than the current timestamp. @@ -16,7 +16,7 @@ pub struct MuteFindingRequestProperties { /// #[serde(rename = "expiration_date")] pub expiration_date: Option, - /// Whether this finding is muted or unmuted. + /// Whether those findings should be muted or unmuted. #[serde(rename = "muted")] pub muted: bool, /// The reason why this finding is muted or unmuted. @@ -24,12 +24,12 @@ pub struct MuteFindingRequestProperties { pub reason: crate::datadogV2::model::FindingMuteReason, } -impl MuteFindingRequestProperties { +impl BulkMuteFindingsRequestProperties { pub fn new( muted: bool, reason: crate::datadogV2::model::FindingMuteReason, - ) -> MuteFindingRequestProperties { - MuteFindingRequestProperties { + ) -> BulkMuteFindingsRequestProperties { + BulkMuteFindingsRequestProperties { description: None, expiration_date: None, muted, diff --git a/src/datadogV2/model/model_bulk_mute_findings_response.rs b/src/datadogV2/model/model_bulk_mute_findings_response.rs new file mode 100644 index 000000000..0426bc514 --- /dev/null +++ b/src/datadogV2/model/model_bulk_mute_findings_response.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The expected response schema. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsResponse { + /// Data object containing the ID of the request that was updated. + #[serde(rename = "data")] + pub data: Box, +} + +impl BulkMuteFindingsResponse { + pub fn new( + data: Box, + ) -> BulkMuteFindingsResponse { + BulkMuteFindingsResponse { data } + } +} diff --git a/src/datadogV2/model/model_mute_finding_response_data.rs b/src/datadogV2/model/model_bulk_mute_findings_response_data.rs similarity index 53% rename from src/datadogV2/model/model_mute_finding_response_data.rs rename to src/datadogV2/model/model_bulk_mute_findings_response_data.rs index 7d8ed1a71..cc7f369e0 100644 --- a/src/datadogV2/model/model_mute_finding_response_data.rs +++ b/src/datadogV2/model/model_bulk_mute_findings_response_data.rs @@ -4,14 +4,11 @@ use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; -/// Data object containing the updated finding. +/// Data object containing the ID of the request that was updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingResponseData { - /// The JSON:API attributes of the finding. - #[serde(rename = "attributes")] - pub attributes: Option>, - /// The unique ID for this finding. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BulkMuteFindingsResponseData { + /// UUID used to identify the request #[serde(rename = "id")] pub id: Option, /// The JSON:API type for findings. @@ -19,10 +16,9 @@ pub struct MuteFindingResponseData { pub type_: Option, } -impl MuteFindingResponseData { - pub fn new() -> MuteFindingResponseData { - MuteFindingResponseData { - attributes: None, +impl BulkMuteFindingsResponseData { + pub fn new() -> BulkMuteFindingsResponseData { + BulkMuteFindingsResponseData { id: None, type_: None, } diff --git a/src/datadogV2/model/model_chargeback_breakdown.rs b/src/datadogV2/model/model_chargeback_breakdown.rs index efee1da82..0483d3014 100644 --- a/src/datadogV2/model/model_chargeback_breakdown.rs +++ b/src/datadogV2/model/model_chargeback_breakdown.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Charges breakdown. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ChargebackBreakdown { /// The type of charge for a particular product. #[serde(rename = "charge_type")] diff --git a/src/datadogV2/model/model_ci_app_aggregate_bucket_value.rs b/src/datadogV2/model/model_ci_app_aggregate_bucket_value.rs new file mode 100644 index 000000000..3d1377aa4 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_aggregate_bucket_value.rs @@ -0,0 +1,15 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A bucket value, can either be a timeseries or a single value. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CIAppAggregateBucketValue { + CIAppAggregateBucketValueSingleString(Box), + CIAppAggregateBucketValueSingleNumber(Box), + CIAppAggregateBucketValueTimeseries( + Box, + ), +} diff --git a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries.rs new file mode 100644 index 000000000..3fabd8c06 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries array. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppAggregateBucketValueTimeseries {} + +impl CIAppAggregateBucketValueTimeseries { + pub fn new() -> CIAppAggregateBucketValueTimeseries { + CIAppAggregateBucketValueTimeseries {} + } +} diff --git a/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs new file mode 100644 index 000000000..b2fe891bd --- /dev/null +++ b/src/datadogV2/model/model_ci_app_aggregate_bucket_value_timeseries_point.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries point. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppAggregateBucketValueTimeseriesPoint { + /// The time value for this point. + #[serde(rename = "time")] + pub time: Option, + /// The value for this point. + #[serde(rename = "value")] + pub value: Option, +} + +impl CIAppAggregateBucketValueTimeseriesPoint { + pub fn new() -> CIAppAggregateBucketValueTimeseriesPoint { + CIAppAggregateBucketValueTimeseriesPoint { + time: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_aggregate_sort.rs b/src/datadogV2/model/model_ci_app_aggregate_sort.rs new file mode 100644 index 000000000..803ca0172 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_aggregate_sort.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A sort rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppAggregateSort { + /// An aggregation function. + #[serde(rename = "aggregation")] + pub aggregation: Option, + /// The metric to sort by (only used for `type=measure`). + #[serde(rename = "metric")] + pub metric: Option, + /// The order to use, ascending or descending. + #[serde(rename = "order")] + pub order: Option, + /// The type of sorting algorithm. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CIAppAggregateSort { + pub fn new() -> CIAppAggregateSort { + CIAppAggregateSort { + aggregation: None, + metric: None, + order: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_aggregate_sort_type.rs b/src/datadogV2/model/model_ci_app_aggregate_sort_type.rs new file mode 100644 index 000000000..b14a0a0b1 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_aggregate_sort_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppAggregateSortType { + #[serde(rename = "alphabetical")] + ALPHABETICAL, + #[serde(rename = "measure")] + MEASURE, +} + +impl ToString for CIAppAggregateSortType { + fn to_string(&self) -> String { + match self { + Self::ALPHABETICAL => String::from("alphabetical"), + Self::MEASURE => String::from("measure"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_aggregation_function.rs b/src/datadogV2/model/model_ci_app_aggregation_function.rs new file mode 100644 index 000000000..e9a5d80cb --- /dev/null +++ b/src/datadogV2/model/model_ci_app_aggregation_function.rs @@ -0,0 +1,64 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppAggregationFunction { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "pc75")] + PERCENTILE_75, + #[serde(rename = "pc90")] + PERCENTILE_90, + #[serde(rename = "pc95")] + PERCENTILE_95, + #[serde(rename = "pc98")] + PERCENTILE_98, + #[serde(rename = "pc99")] + PERCENTILE_99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, + #[serde(rename = "median")] + MEDIAN, + #[serde(rename = "latest")] + LATEST, + #[serde(rename = "earliest")] + EARLIEST, + #[serde(rename = "most_frequent")] + MOST_FREQUENT, + #[serde(rename = "delta")] + DELTA, +} + +impl ToString for CIAppAggregationFunction { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::PERCENTILE_75 => String::from("pc75"), + Self::PERCENTILE_90 => String::from("pc90"), + Self::PERCENTILE_95 => String::from("pc95"), + Self::PERCENTILE_98 => String::from("pc98"), + Self::PERCENTILE_99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + Self::MEDIAN => String::from("median"), + Self::LATEST => String::from("latest"), + Self::EARLIEST => String::from("earliest"), + Self::MOST_FREQUENT => String::from("most_frequent"), + Self::DELTA => String::from("delta"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_ci_error.rs b/src/datadogV2/model/model_ci_app_ci_error.rs new file mode 100644 index 000000000..c8607eed7 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_ci_error.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Contains information of the CI error. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppCIError { + /// Error category used to differentiate between issues related to the developer or provider environments. + #[serde(rename = "domain")] + pub domain: Option, + /// Error message. + #[serde( + rename = "message", + default, + with = "::serde_with::rust::double_option" + )] + pub message: Option>, + /// The stack trace of the reported errors. + #[serde(rename = "stack", default, with = "::serde_with::rust::double_option")] + pub stack: Option>, + /// Short description of the error type. + #[serde(rename = "type", default, with = "::serde_with::rust::double_option")] + pub type_: Option>, +} + +impl CIAppCIError { + pub fn new() -> CIAppCIError { + CIAppCIError { + domain: None, + message: None, + stack: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_ci_error_domain.rs b/src/datadogV2/model/model_ci_app_ci_error_domain.rs new file mode 100644 index 000000000..b04ef8404 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_ci_error_domain.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppCIErrorDomain { + #[serde(rename = "provider")] + PROVIDER, + #[serde(rename = "user")] + USER, + #[serde(rename = "unknown")] + UNKNOWN, +} + +impl ToString for CIAppCIErrorDomain { + fn to_string(&self) -> String { + match self { + Self::PROVIDER => String::from("provider"), + Self::USER => String::from("user"), + Self::UNKNOWN => String::from("unknown"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_compute.rs b/src/datadogV2/model/model_ci_app_compute.rs new file mode 100644 index 000000000..f8e2f3308 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_compute.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A compute rule to compute metrics or timeseries. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppCompute { + /// An aggregation function. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV2::model::CIAppAggregationFunction, + /// The time buckets' size (only used for type=timeseries) + /// Defaults to a resolution of 150 points. + #[serde(rename = "interval")] + pub interval: Option, + /// The metric to use. + #[serde(rename = "metric")] + pub metric: Option, + /// The type of compute. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CIAppCompute { + pub fn new(aggregation: crate::datadogV2::model::CIAppAggregationFunction) -> CIAppCompute { + CIAppCompute { + aggregation, + interval: None, + metric: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_compute_type.rs b/src/datadogV2/model/model_ci_app_compute_type.rs new file mode 100644 index 000000000..a1695fe6a --- /dev/null +++ b/src/datadogV2/model/model_ci_app_compute_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppComputeType { + #[serde(rename = "timeseries")] + TIMESERIES, + #[serde(rename = "total")] + TOTAL, +} + +impl ToString for CIAppComputeType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES => String::from("timeseries"), + Self::TOTAL => String::from("total"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs new file mode 100644 index 000000000..88193c2ec --- /dev/null +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppCreatePipelineEventRequest { + /// Data of the pipeline event to create. + #[serde(rename = "data")] + pub data: Option>, +} + +impl CIAppCreatePipelineEventRequest { + pub fn new() -> CIAppCreatePipelineEventRequest { + CIAppCreatePipelineEventRequest { data: None } + } +} diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs new file mode 100644 index 000000000..8f60dbe8f --- /dev/null +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the pipeline event to create. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppCreatePipelineEventRequestAttributes { + /// The Datadog environment. + #[serde(rename = "env")] + pub env: Option, + /// Details of the CI pipeline event. + #[serde(rename = "resource")] + pub resource: Box, + /// If the CI provider is SaaS, use this to differentiate between instances. + #[serde(rename = "service")] + pub service: Option, +} + +impl CIAppCreatePipelineEventRequestAttributes { + pub fn new( + resource: Box, + ) -> CIAppCreatePipelineEventRequestAttributes { + CIAppCreatePipelineEventRequestAttributes { + env: None, + resource, + service: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs new file mode 100644 index 000000000..a9761cd1d --- /dev/null +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_attributes_resource.rs @@ -0,0 +1,14 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; + +/// Details of the CI pipeline event. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CIAppCreatePipelineEventRequestAttributesResource { + CIAppPipelineEventPipeline(Box), + CIAppPipelineEventStage(Box), + CIAppPipelineEventJob(Box), + CIAppPipelineEventStep(Box), +} diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs new file mode 100644 index 000000000..35d6dd78b --- /dev/null +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data of the pipeline event to create. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppCreatePipelineEventRequestData { + /// Attributes of the pipeline event to create. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Type of the event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CIAppCreatePipelineEventRequestData { + pub fn new() -> CIAppCreatePipelineEventRequestData { + CIAppCreatePipelineEventRequestData { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data_type.rs b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data_type.rs new file mode 100644 index 000000000..552c5815e --- /dev/null +++ b/src/datadogV2/model/model_ci_app_create_pipeline_event_request_data_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppCreatePipelineEventRequestDataType { + #[serde(rename = "cipipeline_resource_request")] + CIPIPELINE_RESOURCE_REQUEST, +} + +impl ToString for CIAppCreatePipelineEventRequestDataType { + fn to_string(&self) -> String { + match self { + Self::CIPIPELINE_RESOURCE_REQUEST => String::from("cipipeline_resource_request"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_event_attributes.rs b/src/datadogV2/model/model_ci_app_event_attributes.rs new file mode 100644 index 000000000..744b979b7 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_event_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// JSON object containing all event attributes and their associated values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppEventAttributes { + /// JSON object of attributes from CI Visibility test events. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Array of tags associated with your event. + #[serde(rename = "tags")] + pub tags: Option>, + /// Test run level. + #[serde(rename = "test_level")] + pub test_level: Option, +} + +impl CIAppEventAttributes { + pub fn new() -> CIAppEventAttributes { + CIAppEventAttributes { + attributes: None, + tags: None, + test_level: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_git_info.rs b/src/datadogV2/model/model_ci_app_git_info.rs new file mode 100644 index 000000000..79c1bb379 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_git_info.rs @@ -0,0 +1,95 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. +/// Note that either `tag` or `branch` has to be provided, but not both. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppGitInfo { + /// The commit author email. + #[serde(rename = "author_email")] + pub author_email: String, + /// The commit author name. + #[serde( + rename = "author_name", + default, + with = "::serde_with::rust::double_option" + )] + pub author_name: Option>, + /// The commit author timestamp in RFC3339 format. + #[serde( + rename = "author_time", + default, + with = "::serde_with::rust::double_option" + )] + pub author_time: Option>, + /// The branch name (if a tag use the tag parameter). + #[serde(rename = "branch", default, with = "::serde_with::rust::double_option")] + pub branch: Option>, + /// The commit timestamp in RFC3339 format. + #[serde( + rename = "commit_time", + default, + with = "::serde_with::rust::double_option" + )] + pub commit_time: Option>, + /// The committer email. + #[serde( + rename = "committer_email", + default, + with = "::serde_with::rust::double_option" + )] + pub committer_email: Option>, + /// The committer name. + #[serde( + rename = "committer_name", + default, + with = "::serde_with::rust::double_option" + )] + pub committer_name: Option>, + /// The Git repository's default branch. + #[serde( + rename = "default_branch", + default, + with = "::serde_with::rust::double_option" + )] + pub default_branch: Option>, + /// The commit message. + #[serde( + rename = "message", + default, + with = "::serde_with::rust::double_option" + )] + pub message: Option>, + /// The URL of the repository. + #[serde(rename = "repository_url")] + pub repository_url: String, + /// The git commit SHA. + #[serde(rename = "sha")] + pub sha: String, + /// The tag name (if a branch use the branch parameter). + #[serde(rename = "tag", default, with = "::serde_with::rust::double_option")] + pub tag: Option>, +} + +impl CIAppGitInfo { + pub fn new(author_email: String, repository_url: String, sha: String) -> CIAppGitInfo { + CIAppGitInfo { + author_email, + author_name: None, + author_time: None, + branch: None, + commit_time: None, + committer_email: None, + committer_name: None, + default_branch: None, + message: None, + repository_url, + sha, + tag: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_group_by_histogram.rs b/src/datadogV2/model/model_ci_app_group_by_histogram.rs new file mode 100644 index 000000000..5718118e1 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_group_by_histogram.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Used to perform a histogram computation (only for measure facets). +/// At most, 100 buckets are allowed, the number of buckets is `(max - min)/interval`. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppGroupByHistogram { + /// The bin size of the histogram buckets. + #[serde(rename = "interval")] + pub interval: f64, + /// The maximum value for the measure used in the histogram + /// (values greater than this one are filtered out). + #[serde(rename = "max")] + pub max: f64, + /// The minimum value for the measure used in the histogram + /// (values smaller than this one are filtered out). + #[serde(rename = "min")] + pub min: f64, +} + +impl CIAppGroupByHistogram { + pub fn new(interval: f64, max: f64, min: f64) -> CIAppGroupByHistogram { + CIAppGroupByHistogram { interval, max, min } + } +} diff --git a/src/datadogV2/model/model_ci_app_group_by_missing.rs b/src/datadogV2/model/model_ci_app_group_by_missing.rs new file mode 100644 index 000000000..7f77ae13d --- /dev/null +++ b/src/datadogV2/model/model_ci_app_group_by_missing.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The value to use for logs that don't have the facet used to group-by. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CIAppGroupByMissing { + CIAppGroupByMissingString(Box), + CIAppGroupByMissingNumber(Box), +} diff --git a/src/datadogV2/model/model_ci_app_group_by_total.rs b/src/datadogV2/model/model_ci_app_group_by_total.rs new file mode 100644 index 000000000..449d8196e --- /dev/null +++ b/src/datadogV2/model/model_ci_app_group_by_total.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A resulting object to put the given computes in over all the matching records. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CIAppGroupByTotal { + CIAppGroupByTotalBoolean(Box), + CIAppGroupByTotalString(Box), + CIAppGroupByTotalNumber(Box), +} diff --git a/src/datadogV2/model/model_ci_app_host_info.rs b/src/datadogV2/model/model_ci_app_host_info.rs new file mode 100644 index 000000000..0d95ab3f8 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_host_info.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Contains information of the host running the pipeline, stage, job, or step. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppHostInfo { + /// FQDN of the host. + #[serde(rename = "hostname")] + pub hostname: Option, + /// A list of labels used to select or identify the node. + #[serde(rename = "labels")] + pub labels: Option>, + /// Name for the host. + #[serde(rename = "name")] + pub name: Option, + /// The path where the code is checked out. + #[serde(rename = "workspace")] + pub workspace: Option, +} + +impl CIAppHostInfo { + pub fn new() -> CIAppHostInfo { + CIAppHostInfo { + hostname: None, + labels: None, + name: None, + workspace: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event.rs b/src/datadogV2/model/model_ci_app_pipeline_event.rs new file mode 100644 index 000000000..633dec513 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object description of a pipeline event after being processed and stored by Datadog. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEvent { + /// JSON object containing all event attributes and their associated values. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the event. + #[serde(rename = "id")] + pub id: Option, + /// Type of the event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CIAppPipelineEvent { + pub fn new() -> CIAppPipelineEvent { + CIAppPipelineEvent { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs b/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs new file mode 100644 index 000000000..64d2ce906 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// JSON object containing all event attributes and their associated values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventAttributes { + /// JSON object of attributes from CI Visibility pipeline events. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Pipeline execution level. + #[serde(rename = "ci_level")] + pub ci_level: Option, + /// Array of tags associated with your event. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl CIAppPipelineEventAttributes { + pub fn new() -> CIAppPipelineEventAttributes { + CIAppPipelineEventAttributes { + attributes: None, + ci_level: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_job.rs b/src/datadogV2/model/model_ci_app_pipeline_event_job.rs new file mode 100644 index 000000000..7b2e27135 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_job.rs @@ -0,0 +1,129 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details of a CI job. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventJob { + /// A list of job IDs that this job depends on. + #[serde( + rename = "dependencies", + default, + with = "::serde_with::rust::double_option" + )] + pub dependencies: Option>>, + /// Time when the job run finished. The time format must be RFC3339. + #[serde(rename = "end")] + pub end: String, + /// Contains information of the CI error. + #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] + pub error: Option>>, + /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. + /// Note that either `tag` or `branch` has to be provided, but not both. + #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] + pub git: Option>>, + /// The UUID for the job. It has to be unique within each pipeline execution. + #[serde(rename = "id")] + pub id: String, + /// Used to distinguish between pipelines, stages, jobs, and steps. + #[serde(rename = "level")] + pub level: crate::datadogV2::model::CIAppPipelineEventJobLevel, + /// A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric. + #[serde( + rename = "metrics", + default, + with = "::serde_with::rust::double_option" + )] + pub metrics: Option>>, + /// The name for the job. + #[serde(rename = "name")] + pub name: String, + /// Contains information of the host running the pipeline, stage, job, or step. + #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] + pub node: Option>>, + /// A map of key-value parameters or environment variables that were defined for the pipeline. + #[serde( + rename = "parameters", + default, + with = "::serde_with::rust::double_option" + )] + pub parameters: Option>>, + /// The parent pipeline name. + #[serde(rename = "pipeline_name")] + pub pipeline_name: String, + /// The parent pipeline UUID. + #[serde(rename = "pipeline_unique_id")] + pub pipeline_unique_id: String, + /// The queue time in milliseconds, if applicable. + #[serde( + rename = "queue_time", + default, + with = "::serde_with::rust::double_option" + )] + pub queue_time: Option>, + /// The parent stage UUID (if applicable). + #[serde( + rename = "stage_id", + default, + with = "::serde_with::rust::double_option" + )] + pub stage_id: Option>, + /// The parent stage name (if applicable). + #[serde( + rename = "stage_name", + default, + with = "::serde_with::rust::double_option" + )] + pub stage_name: Option>, + /// Time when the job run instance started (it should not include any queue time). The time format must be RFC3339. + #[serde(rename = "start")] + pub start: String, + /// The final status of the job. + #[serde(rename = "status")] + pub status: crate::datadogV2::model::CIAppPipelineEventJobStatus, + /// A list of user-defined tags. The tags must follow the `key:value` pattern. + #[serde(rename = "tags", default, with = "::serde_with::rust::double_option")] + pub tags: Option>>, + /// The URL to look at the job in the CI provider UI. + #[serde(rename = "url")] + pub url: String, +} + +impl CIAppPipelineEventJob { + pub fn new( + end: String, + id: String, + level: crate::datadogV2::model::CIAppPipelineEventJobLevel, + name: String, + pipeline_name: String, + pipeline_unique_id: String, + start: String, + status: crate::datadogV2::model::CIAppPipelineEventJobStatus, + url: String, + ) -> CIAppPipelineEventJob { + CIAppPipelineEventJob { + dependencies: None, + end, + error: None, + git: None, + id, + level, + metrics: None, + name, + node: None, + parameters: None, + pipeline_name, + pipeline_unique_id, + queue_time: None, + stage_id: None, + stage_name: None, + start, + status, + tags: None, + url, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_job_level.rs b/src/datadogV2/model/model_ci_app_pipeline_event_job_level.rs new file mode 100644 index 000000000..6f47059f8 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_job_level.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventJobLevel { + #[serde(rename = "job")] + JOB, +} + +impl ToString for CIAppPipelineEventJobLevel { + fn to_string(&self) -> String { + match self { + Self::JOB => String::from("job"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_job_status.rs b/src/datadogV2/model/model_ci_app_pipeline_event_job_status.rs new file mode 100644 index 000000000..cb788688f --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_job_status.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventJobStatus { + #[serde(rename = "success")] + SUCCESS, + #[serde(rename = "error")] + ERROR, + #[serde(rename = "canceled")] + CANCELED, + #[serde(rename = "skipped")] + SKIPPED, +} + +impl ToString for CIAppPipelineEventJobStatus { + fn to_string(&self) -> String { + match self { + Self::SUCCESS => String::from("success"), + Self::ERROR => String::from("error"), + Self::CANCELED => String::from("canceled"), + Self::SKIPPED => String::from("skipped"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs new file mode 100644 index 000000000..8d1ea4ac8 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_parent_pipeline.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// If the pipeline is triggered as child of another pipeline, this should contain the details of the parent pipeline. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventParentPipeline { + /// UUID of a pipeline. + #[serde(rename = "id")] + pub id: String, + /// The URL to look at the pipeline in the CI provider UI. + #[serde(rename = "url")] + pub url: Option, +} + +impl CIAppPipelineEventParentPipeline { + pub fn new(id: String) -> CIAppPipelineEventParentPipeline { + CIAppPipelineEventParentPipeline { id, url: None } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs new file mode 100644 index 000000000..c727a4be5 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline.rs @@ -0,0 +1,141 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details of the top level pipeline, build, or workflow of your CI. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventPipeline { + /// Time when the pipeline run finished. It cannot be older than 18 hours in the past from the current time. The time format must be RFC3339. + #[serde(rename = "end")] + pub end: String, + /// Contains information of the CI error. + #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] + pub error: Option>>, + /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. + /// Note that either `tag` or `branch` has to be provided, but not both. + #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] + pub git: Option>>, + /// Whether or not the pipeline was triggered manually by the user. + #[serde( + rename = "is_manual", + default, + with = "::serde_with::rust::double_option" + )] + pub is_manual: Option>, + /// Whether or not the pipeline was resumed after being blocked. + #[serde( + rename = "is_resumed", + default, + with = "::serde_with::rust::double_option" + )] + pub is_resumed: Option>, + /// Used to distinguish between pipelines, stages, jobs, and steps. + #[serde(rename = "level")] + pub level: crate::datadogV2::model::CIAppPipelineEventPipelineLevel, + /// A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric. + #[serde( + rename = "metrics", + default, + with = "::serde_with::rust::double_option" + )] + pub metrics: Option>>, + /// Name of the pipeline. All pipeline runs for the builds should have the same name. + #[serde(rename = "name")] + pub name: String, + /// Contains information of the host running the pipeline, stage, job, or step. + #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] + pub node: Option>>, + /// A map of key-value parameters or environment variables that were defined for the pipeline. + #[serde( + rename = "parameters", + default, + with = "::serde_with::rust::double_option" + )] + pub parameters: Option>>, + /// If the pipeline is triggered as child of another pipeline, this should contain the details of the parent pipeline. + #[serde( + rename = "parent_pipeline", + default, + with = "::serde_with::rust::double_option" + )] + pub parent_pipeline: + Option>>, + /// Whether or not the pipeline was a partial retry of a previous attempt. A partial retry is one + /// which only runs a subset of the original jobs. + #[serde(rename = "partial_retry")] + pub partial_retry: bool, + /// Any ID used in the provider to identify the pipeline run even if it is not unique across retries. + /// If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id` can be set to the same value. + #[serde(rename = "pipeline_id")] + pub pipeline_id: Option, + /// If the pipeline is a retry, this should contain the details of the previous attempt. + #[serde( + rename = "previous_attempt", + default, + with = "::serde_with::rust::double_option" + )] + pub previous_attempt: + Option>>, + /// The queue time in milliseconds, if applicable. + #[serde( + rename = "queue_time", + default, + with = "::serde_with::rust::double_option" + )] + pub queue_time: Option>, + /// Time when the pipeline run started (it should not include any queue time). The time format must be RFC3339. + #[serde(rename = "start")] + pub start: String, + /// The final status of the pipeline. + #[serde(rename = "status")] + pub status: crate::datadogV2::model::CIAppPipelineEventPipelineStatus, + /// A list of user-defined tags. The tags must follow the `key:value` pattern. + #[serde(rename = "tags", default, with = "::serde_with::rust::double_option")] + pub tags: Option>>, + /// UUID of the pipeline run. The ID has to be unique across retries and pipelines, + /// including partial retries. + #[serde(rename = "unique_id")] + pub unique_id: String, + /// The URL to look at the pipeline in the CI provider UI. + #[serde(rename = "url")] + pub url: String, +} + +impl CIAppPipelineEventPipeline { + pub fn new( + end: String, + level: crate::datadogV2::model::CIAppPipelineEventPipelineLevel, + name: String, + partial_retry: bool, + start: String, + status: crate::datadogV2::model::CIAppPipelineEventPipelineStatus, + unique_id: String, + url: String, + ) -> CIAppPipelineEventPipeline { + CIAppPipelineEventPipeline { + end, + error: None, + git: None, + is_manual: None, + is_resumed: None, + level, + metrics: None, + name, + node: None, + parameters: None, + parent_pipeline: None, + partial_retry, + pipeline_id: None, + previous_attempt: None, + queue_time: None, + start, + status, + tags: None, + unique_id, + url, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_pipeline_level.rs b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline_level.rs new file mode 100644 index 000000000..863a467c5 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline_level.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventPipelineLevel { + #[serde(rename = "pipeline")] + PIPELINE, +} + +impl ToString for CIAppPipelineEventPipelineLevel { + fn to_string(&self) -> String { + match self { + Self::PIPELINE => String::from("pipeline"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_pipeline_status.rs b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline_status.rs new file mode 100644 index 000000000..d6d790bcf --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_pipeline_status.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventPipelineStatus { + #[serde(rename = "success")] + SUCCESS, + #[serde(rename = "error")] + ERROR, + #[serde(rename = "canceled")] + CANCELED, + #[serde(rename = "skipped")] + SKIPPED, + #[serde(rename = "blocked")] + BLOCKED, +} + +impl ToString for CIAppPipelineEventPipelineStatus { + fn to_string(&self) -> String { + match self { + Self::SUCCESS => String::from("success"), + Self::ERROR => String::from("error"), + Self::CANCELED => String::from("canceled"), + Self::SKIPPED => String::from("skipped"), + Self::BLOCKED => String::from("blocked"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs b/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs new file mode 100644 index 000000000..39459cacc --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_previous_pipeline.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// If the pipeline is a retry, this should contain the details of the previous attempt. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventPreviousPipeline { + /// UUID of a pipeline. + #[serde(rename = "id")] + pub id: String, + /// The URL to look at the pipeline in the CI provider UI. + #[serde(rename = "url")] + pub url: Option, +} + +impl CIAppPipelineEventPreviousPipeline { + pub fn new(id: String) -> CIAppPipelineEventPreviousPipeline { + CIAppPipelineEventPreviousPipeline { id, url: None } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs b/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs new file mode 100644 index 000000000..98b670bca --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_stage.rs @@ -0,0 +1,108 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details of a CI stage. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventStage { + /// A list of stage IDs that this stage depends on. + #[serde( + rename = "dependencies", + default, + with = "::serde_with::rust::double_option" + )] + pub dependencies: Option>>, + /// Time when the stage run finished. The time format must be RFC3339. + #[serde(rename = "end")] + pub end: String, + /// Contains information of the CI error. + #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] + pub error: Option>>, + /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. + /// Note that either `tag` or `branch` has to be provided, but not both. + #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] + pub git: Option>>, + /// UUID for the stage. It has to be unique at least in the pipeline scope. + #[serde(rename = "id")] + pub id: String, + /// Used to distinguish between pipelines, stages, jobs and steps. + #[serde(rename = "level")] + pub level: crate::datadogV2::model::CIAppPipelineEventStageLevel, + /// A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric. + #[serde( + rename = "metrics", + default, + with = "::serde_with::rust::double_option" + )] + pub metrics: Option>>, + /// The name for the stage. + #[serde(rename = "name")] + pub name: String, + /// Contains information of the host running the pipeline, stage, job, or step. + #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] + pub node: Option>>, + /// A map of key-value parameters or environment variables that were defined for the pipeline. + #[serde( + rename = "parameters", + default, + with = "::serde_with::rust::double_option" + )] + pub parameters: Option>>, + /// The parent pipeline name. + #[serde(rename = "pipeline_name")] + pub pipeline_name: String, + /// The parent pipeline UUID. + #[serde(rename = "pipeline_unique_id")] + pub pipeline_unique_id: String, + /// The queue time in milliseconds, if applicable. + #[serde( + rename = "queue_time", + default, + with = "::serde_with::rust::double_option" + )] + pub queue_time: Option>, + /// Time when the stage run started (it should not include any queue time). The time format must be RFC3339. + #[serde(rename = "start")] + pub start: String, + /// The final status of the stage. + #[serde(rename = "status")] + pub status: crate::datadogV2::model::CIAppPipelineEventStageStatus, + /// A list of user-defined tags. The tags must follow the `key:value` pattern. + #[serde(rename = "tags", default, with = "::serde_with::rust::double_option")] + pub tags: Option>>, +} + +impl CIAppPipelineEventStage { + pub fn new( + end: String, + id: String, + level: crate::datadogV2::model::CIAppPipelineEventStageLevel, + name: String, + pipeline_name: String, + pipeline_unique_id: String, + start: String, + status: crate::datadogV2::model::CIAppPipelineEventStageStatus, + ) -> CIAppPipelineEventStage { + CIAppPipelineEventStage { + dependencies: None, + end, + error: None, + git: None, + id, + level, + metrics: None, + name, + node: None, + parameters: None, + pipeline_name, + pipeline_unique_id, + queue_time: None, + start, + status, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_stage_level.rs b/src/datadogV2/model/model_ci_app_pipeline_event_stage_level.rs new file mode 100644 index 000000000..f3eb920c5 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_stage_level.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventStageLevel { + #[serde(rename = "stage")] + STAGE, +} + +impl ToString for CIAppPipelineEventStageLevel { + fn to_string(&self) -> String { + match self { + Self::STAGE => String::from("stage"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_stage_status.rs b/src/datadogV2/model/model_ci_app_pipeline_event_stage_status.rs new file mode 100644 index 000000000..946e06738 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_stage_status.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventStageStatus { + #[serde(rename = "success")] + SUCCESS, + #[serde(rename = "error")] + ERROR, + #[serde(rename = "canceled")] + CANCELED, + #[serde(rename = "skipped")] + SKIPPED, +} + +impl ToString for CIAppPipelineEventStageStatus { + fn to_string(&self) -> String { + match self { + Self::SUCCESS => String::from("success"), + Self::ERROR => String::from("error"), + Self::CANCELED => String::from("canceled"), + Self::SKIPPED => String::from("skipped"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_step.rs b/src/datadogV2/model/model_ci_app_pipeline_event_step.rs new file mode 100644 index 000000000..494f59e34 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_step.rs @@ -0,0 +1,124 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details of a CI step. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventStep { + /// Time when the step run finished. The time format must be RFC3339. + #[serde(rename = "end")] + pub end: String, + /// Contains information of the CI error. + #[serde(rename = "error", default, with = "::serde_with::rust::double_option")] + pub error: Option>>, + /// If pipelines are triggered due to actions to a Git repository, then all payloads must contain this. + /// Note that either `tag` or `branch` has to be provided, but not both. + #[serde(rename = "git", default, with = "::serde_with::rust::double_option")] + pub git: Option>>, + /// UUID for the step. It has to be unique within each pipeline execution. + #[serde(rename = "id")] + pub id: String, + /// The parent job UUID (if applicable). + #[serde(rename = "job_id", default, with = "::serde_with::rust::double_option")] + pub job_id: Option>, + /// The parent job name (if applicable). + #[serde( + rename = "job_name", + default, + with = "::serde_with::rust::double_option" + )] + pub job_name: Option>, + /// Used to distinguish between pipelines, stages, jobs and steps. + #[serde(rename = "level")] + pub level: crate::datadogV2::model::CIAppPipelineEventStepLevel, + /// A list of user-defined metrics. The metrics must follow the `key:value` pattern and the value must be numeric. + #[serde( + rename = "metrics", + default, + with = "::serde_with::rust::double_option" + )] + pub metrics: Option>>, + /// The name for the step. + #[serde(rename = "name")] + pub name: String, + /// Contains information of the host running the pipeline, stage, job, or step. + #[serde(rename = "node", default, with = "::serde_with::rust::double_option")] + pub node: Option>>, + /// A map of key-value parameters or environment variables that were defined for the pipeline. + #[serde( + rename = "parameters", + default, + with = "::serde_with::rust::double_option" + )] + pub parameters: Option>>, + /// The parent pipeline name. + #[serde(rename = "pipeline_name")] + pub pipeline_name: String, + /// The parent pipeline UUID. + #[serde(rename = "pipeline_unique_id")] + pub pipeline_unique_id: String, + /// The parent stage UUID (if applicable). + #[serde( + rename = "stage_id", + default, + with = "::serde_with::rust::double_option" + )] + pub stage_id: Option>, + /// The parent stage name (if applicable). + #[serde( + rename = "stage_name", + default, + with = "::serde_with::rust::double_option" + )] + pub stage_name: Option>, + /// Time when the step run started. The time format must be RFC3339. + #[serde(rename = "start")] + pub start: String, + /// The final status of the step. + #[serde(rename = "status")] + pub status: crate::datadogV2::model::CIAppPipelineEventStepStatus, + /// A list of user-defined tags. The tags must follow the `key:value` pattern. + #[serde(rename = "tags", default, with = "::serde_with::rust::double_option")] + pub tags: Option>>, + /// The URL to look at the step in the CI provider UI. + #[serde(rename = "url", default, with = "::serde_with::rust::double_option")] + pub url: Option>, +} + +impl CIAppPipelineEventStep { + pub fn new( + end: String, + id: String, + level: crate::datadogV2::model::CIAppPipelineEventStepLevel, + name: String, + pipeline_name: String, + pipeline_unique_id: String, + start: String, + status: crate::datadogV2::model::CIAppPipelineEventStepStatus, + ) -> CIAppPipelineEventStep { + CIAppPipelineEventStep { + end, + error: None, + git: None, + id, + job_id: None, + job_name: None, + level, + metrics: None, + name, + node: None, + parameters: None, + pipeline_name, + pipeline_unique_id, + stage_id: None, + stage_name: None, + start, + status, + tags: None, + url: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_step_level.rs b/src/datadogV2/model/model_ci_app_pipeline_event_step_level.rs new file mode 100644 index 000000000..5a7f90793 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_step_level.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventStepLevel { + #[serde(rename = "step")] + STEP, +} + +impl ToString for CIAppPipelineEventStepLevel { + fn to_string(&self) -> String { + match self { + Self::STEP => String::from("step"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_step_status.rs b/src/datadogV2/model/model_ci_app_pipeline_event_step_status.rs new file mode 100644 index 000000000..86f1f682a --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_step_status.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventStepStatus { + #[serde(rename = "success")] + SUCCESS, + #[serde(rename = "error")] + ERROR, +} + +impl ToString for CIAppPipelineEventStepStatus { + fn to_string(&self) -> String { + match self { + Self::SUCCESS => String::from("success"), + Self::ERROR => String::from("error"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_event_type_name.rs b/src/datadogV2/model/model_ci_app_pipeline_event_type_name.rs new file mode 100644 index 000000000..ac346ead1 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_event_type_name.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineEventTypeName { + #[serde(rename = "cipipeline")] + CIPIPELINE, +} + +impl ToString for CIAppPipelineEventTypeName { + fn to_string(&self) -> String { + match self { + Self::CIPIPELINE => String::from("cipipeline"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_events_request.rs b/src/datadogV2/model/model_ci_app_pipeline_events_request.rs new file mode 100644 index 000000000..94cb17c2f --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_events_request.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The request for a pipelines search. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventsRequest { + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// Global query options that are used during the query. + /// Only supply timezone or time offset, not both. Otherwise, the query fails. + #[serde(rename = "options")] + pub options: Option>, + /// Paging attributes for listing events. + #[serde(rename = "page")] + pub page: Option>, + /// Sort parameters when querying events. + #[serde(rename = "sort")] + pub sort: Option, +} + +impl CIAppPipelineEventsRequest { + pub fn new() -> CIAppPipelineEventsRequest { + CIAppPipelineEventsRequest { + filter: None, + options: None, + page: None, + sort: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_events_response.rs b/src/datadogV2/model/model_ci_app_pipeline_events_response.rs new file mode 100644 index 000000000..0cfe0b91a --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_events_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object with all pipeline events matching the request and pagination information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelineEventsResponse { + /// Array of events matching the request. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl CIAppPipelineEventsResponse { + pub fn new() -> CIAppPipelineEventsResponse { + CIAppPipelineEventsResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipeline_level.rs b/src/datadogV2/model/model_ci_app_pipeline_level.rs new file mode 100644 index 000000000..752f20337 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipeline_level.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppPipelineLevel { + #[serde(rename = "pipeline")] + PIPELINE, + #[serde(rename = "stage")] + STAGE, + #[serde(rename = "job")] + JOB, + #[serde(rename = "step")] + STEP, + #[serde(rename = "custom")] + CUSTOM, +} + +impl ToString for CIAppPipelineLevel { + fn to_string(&self) -> String { + match self { + Self::PIPELINE => String::from("pipeline"), + Self::STAGE => String::from("stage"), + Self::JOB => String::from("job"), + Self::STEP => String::from("step"), + Self::CUSTOM => String::from("custom"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs b/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs new file mode 100644 index 000000000..1f8e2ee51 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipelines_aggregate_request.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object sent with the request to retrieve aggregation buckets of pipeline events from your organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelinesAggregateRequest { + /// The list of metrics or timeseries to compute for the retrieved buckets. + #[serde(rename = "compute")] + pub compute: Option>, + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// The rules for the group-by. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// Global query options that are used during the query. + /// Only supply timezone or time offset, not both. Otherwise, the query fails. + #[serde(rename = "options")] + pub options: Option>, +} + +impl CIAppPipelinesAggregateRequest { + pub fn new() -> CIAppPipelinesAggregateRequest { + CIAppPipelinesAggregateRequest { + compute: None, + filter: None, + group_by: None, + options: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs b/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs new file mode 100644 index 000000000..f9011626b --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipelines_aggregation_buckets_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The query results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelinesAggregationBucketsResponse { + /// The list of matching buckets, one item per bucket. + #[serde(rename = "buckets")] + pub buckets: Option>, +} + +impl CIAppPipelinesAggregationBucketsResponse { + pub fn new() -> CIAppPipelinesAggregationBucketsResponse { + CIAppPipelinesAggregationBucketsResponse { buckets: None } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs b/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs new file mode 100644 index 000000000..877ff10ce --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipelines_analytics_aggregate_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object for the pipeline events aggregate API endpoint. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelinesAnalyticsAggregateResponse { + /// The query results. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl CIAppPipelinesAnalyticsAggregateResponse { + pub fn new() -> CIAppPipelinesAnalyticsAggregateResponse { + CIAppPipelinesAnalyticsAggregateResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs b/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs new file mode 100644 index 000000000..883e46e98 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipelines_bucket_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Bucket values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelinesBucketResponse { + /// The key-value pairs for each group-by. + #[serde(rename = "by")] + pub by: Option< + std::collections::HashMap>, + >, + /// A map of the metric name to value for regular compute, or a list of values for a timeseries. + #[serde(rename = "computes")] + pub computes: Option< + std::collections::HashMap, + >, +} + +impl CIAppPipelinesBucketResponse { + pub fn new() -> CIAppPipelinesBucketResponse { + CIAppPipelinesBucketResponse { + by: None, + computes: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipelines_group_by.rs b/src/datadogV2/model/model_ci_app_pipelines_group_by.rs new file mode 100644 index 000000000..28055abdb --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipelines_group_by.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A group-by rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelinesGroupBy { + /// The name of the facet to use (required). + #[serde(rename = "facet")] + pub facet: String, + /// Used to perform a histogram computation (only for measure facets). + /// At most, 100 buckets are allowed, the number of buckets is `(max - min)/interval`. + #[serde(rename = "histogram")] + pub histogram: Option>, + /// The maximum buckets to return for this group-by. + #[serde(rename = "limit")] + pub limit: Option, + /// The value to use for logs that don't have the facet used to group-by. + #[serde(rename = "missing")] + pub missing: Option>, + /// A sort rule. + #[serde(rename = "sort")] + pub sort: Option>, + /// A resulting object to put the given computes in over all the matching records. + #[serde(rename = "total")] + pub total: Option>, +} + +impl CIAppPipelinesGroupBy { + pub fn new(facet: String) -> CIAppPipelinesGroupBy { + CIAppPipelinesGroupBy { + facet, + histogram: None, + limit: None, + missing: None, + sort: None, + total: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs b/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs new file mode 100644 index 000000000..57c1399cb --- /dev/null +++ b/src/datadogV2/model/model_ci_app_pipelines_query_filter.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The search and filter query settings. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppPipelinesQueryFilter { + /// The minimum time for the requested events; supports date, math, and regular timestamps (in milliseconds). + #[serde(rename = "from")] + pub from: Option, + /// The search query following the CI Visibility Explorer search syntax. + #[serde(rename = "query")] + pub query: Option, + /// The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds). + #[serde(rename = "to")] + pub to: Option, +} + +impl CIAppPipelinesQueryFilter { + pub fn new() -> CIAppPipelinesQueryFilter { + CIAppPipelinesQueryFilter { + from: None, + query: None, + to: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_query_options.rs b/src/datadogV2/model/model_ci_app_query_options.rs new file mode 100644 index 000000000..7858f86f9 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_query_options.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Global query options that are used during the query. +/// Only supply timezone or time offset, not both. Otherwise, the query fails. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppQueryOptions { + /// The time offset (in seconds) to apply to the query. + #[serde(rename = "time_offset")] + pub time_offset: Option, + /// The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl CIAppQueryOptions { + pub fn new() -> CIAppQueryOptions { + CIAppQueryOptions { + time_offset: None, + timezone: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_query_page_options.rs b/src/datadogV2/model/model_ci_app_query_page_options.rs new file mode 100644 index 000000000..b1113e5a8 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_query_page_options.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes for listing events. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppQueryPageOptions { + /// List following results with a cursor provided in the previous query. + #[serde(rename = "cursor")] + pub cursor: Option, + /// Maximum number of events in the response. + #[serde(rename = "limit")] + pub limit: Option, +} + +impl CIAppQueryPageOptions { + pub fn new() -> CIAppQueryPageOptions { + CIAppQueryPageOptions { + cursor: None, + limit: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_response_links.rs b/src/datadogV2/model/model_ci_app_response_links.rs new file mode 100644 index 000000000..1f35edcff --- /dev/null +++ b/src/datadogV2/model/model_ci_app_response_links.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppResponseLinks { + /// Link for the next set of results. The request can also be made using the + /// POST endpoint. + #[serde(rename = "next")] + pub next: Option, +} + +impl CIAppResponseLinks { + pub fn new() -> CIAppResponseLinks { + CIAppResponseLinks { next: None } + } +} diff --git a/src/datadogV2/model/model_ci_app_response_metadata.rs b/src/datadogV2/model/model_ci_app_response_metadata.rs new file mode 100644 index 000000000..dfec31413 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_response_metadata.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata associated with a request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppResponseMetadata { + /// The time elapsed in milliseconds. + #[serde(rename = "elapsed")] + pub elapsed: Option, + /// The identifier of the request. + #[serde(rename = "request_id")] + pub request_id: Option, + /// The status of the response. + #[serde(rename = "status")] + pub status: Option, + /// A list of warnings (non-fatal errors) encountered. Partial results may return if + /// warnings are present in the response. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl CIAppResponseMetadata { + pub fn new() -> CIAppResponseMetadata { + CIAppResponseMetadata { + elapsed: None, + request_id: None, + status: None, + warnings: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs b/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs new file mode 100644 index 000000000..0f1652567 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_response_metadata_with_pagination.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata associated with a request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppResponseMetadataWithPagination { + /// The time elapsed in milliseconds. + #[serde(rename = "elapsed")] + pub elapsed: Option, + /// Paging attributes. + #[serde(rename = "page")] + pub page: Option>, + /// The identifier of the request. + #[serde(rename = "request_id")] + pub request_id: Option, + /// The status of the response. + #[serde(rename = "status")] + pub status: Option, + /// A list of warnings (non-fatal errors) encountered. Partial results may return if + /// warnings are present in the response. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl CIAppResponseMetadataWithPagination { + pub fn new() -> CIAppResponseMetadataWithPagination { + CIAppResponseMetadataWithPagination { + elapsed: None, + page: None, + request_id: None, + status: None, + warnings: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_response_page.rs b/src/datadogV2/model/model_ci_app_response_page.rs new file mode 100644 index 000000000..d3b5c906d --- /dev/null +++ b/src/datadogV2/model/model_ci_app_response_page.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppResponsePage { + /// The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. + #[serde(rename = "after")] + pub after: Option, +} + +impl CIAppResponsePage { + pub fn new() -> CIAppResponsePage { + CIAppResponsePage { after: None } + } +} diff --git a/src/datadogV2/model/model_ci_app_response_status.rs b/src/datadogV2/model/model_ci_app_response_status.rs new file mode 100644 index 000000000..1d817a0d2 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_response_status.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppResponseStatus { + #[serde(rename = "done")] + DONE, + #[serde(rename = "timeout")] + TIMEOUT, +} + +impl ToString for CIAppResponseStatus { + fn to_string(&self) -> String { + match self { + Self::DONE => String::from("done"), + Self::TIMEOUT => String::from("timeout"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_sort.rs b/src/datadogV2/model/model_ci_app_sort.rs new file mode 100644 index 000000000..2fca7e218 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_sort.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppSort { + #[serde(rename = "timestamp")] + TIMESTAMP_ASCENDING, + #[serde(rename = "-timestamp")] + TIMESTAMP_DESCENDING, +} + +impl ToString for CIAppSort { + fn to_string(&self) -> String { + match self { + Self::TIMESTAMP_ASCENDING => String::from("timestamp"), + Self::TIMESTAMP_DESCENDING => String::from("-timestamp"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_sort_order.rs b/src/datadogV2/model/model_ci_app_sort_order.rs new file mode 100644 index 000000000..9a43189b6 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_sort_order.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppSortOrder { + #[serde(rename = "asc")] + ASCENDING, + #[serde(rename = "desc")] + DESCENDING, +} + +impl ToString for CIAppSortOrder { + fn to_string(&self) -> String { + match self { + Self::ASCENDING => String::from("asc"), + Self::DESCENDING => String::from("desc"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_test_event.rs b/src/datadogV2/model/model_ci_app_test_event.rs new file mode 100644 index 000000000..ddf009482 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_test_event.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object description of test event after being processed and stored by Datadog. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestEvent { + /// JSON object containing all event attributes and their associated values. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the event. + #[serde(rename = "id")] + pub id: Option, + /// Type of the event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CIAppTestEvent { + pub fn new() -> CIAppTestEvent { + CIAppTestEvent { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_test_event_type_name.rs b/src/datadogV2/model/model_ci_app_test_event_type_name.rs new file mode 100644 index 000000000..f4bb46458 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_test_event_type_name.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppTestEventTypeName { + #[serde(rename = "citest")] + CITEST, +} + +impl ToString for CIAppTestEventTypeName { + fn to_string(&self) -> String { + match self { + Self::CITEST => String::from("citest"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_test_events_request.rs b/src/datadogV2/model/model_ci_app_test_events_request.rs new file mode 100644 index 000000000..a129f6c6c --- /dev/null +++ b/src/datadogV2/model/model_ci_app_test_events_request.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The request for a tests search. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestEventsRequest { + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// Global query options that are used during the query. + /// Only supply timezone or time offset, not both. Otherwise, the query fails. + #[serde(rename = "options")] + pub options: Option>, + /// Paging attributes for listing events. + #[serde(rename = "page")] + pub page: Option>, + /// Sort parameters when querying events. + #[serde(rename = "sort")] + pub sort: Option, +} + +impl CIAppTestEventsRequest { + pub fn new() -> CIAppTestEventsRequest { + CIAppTestEventsRequest { + filter: None, + options: None, + page: None, + sort: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_test_events_response.rs b/src/datadogV2/model/model_ci_app_test_events_response.rs new file mode 100644 index 000000000..c731377f0 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_test_events_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object with all test events matching the request and pagination information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestEventsResponse { + /// Array of events matching the request. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl CIAppTestEventsResponse { + pub fn new() -> CIAppTestEventsResponse { + CIAppTestEventsResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_test_level.rs b/src/datadogV2/model/model_ci_app_test_level.rs new file mode 100644 index 000000000..deea3dfc5 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_test_level.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CIAppTestLevel { + #[serde(rename = "session")] + SESSION, + #[serde(rename = "module")] + MODULE, + #[serde(rename = "suite")] + SUITE, + #[serde(rename = "test")] + TEST, +} + +impl ToString for CIAppTestLevel { + fn to_string(&self) -> String { + match self { + Self::SESSION => String::from("session"), + Self::MODULE => String::from("module"), + Self::SUITE => String::from("suite"), + Self::TEST => String::from("test"), + } + } +} diff --git a/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs b/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs new file mode 100644 index 000000000..b42ba498a --- /dev/null +++ b/src/datadogV2/model/model_ci_app_tests_aggregate_request.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object sent with the request to retrieve aggregation buckets of test events from your organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestsAggregateRequest { + /// The list of metrics or timeseries to compute for the retrieved buckets. + #[serde(rename = "compute")] + pub compute: Option>, + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// The rules for the group-by. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// Global query options that are used during the query. + /// Only supply timezone or time offset, not both. Otherwise, the query fails. + #[serde(rename = "options")] + pub options: Option>, +} + +impl CIAppTestsAggregateRequest { + pub fn new() -> CIAppTestsAggregateRequest { + CIAppTestsAggregateRequest { + compute: None, + filter: None, + group_by: None, + options: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs b/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs new file mode 100644 index 000000000..42a04f5f9 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_tests_aggregation_buckets_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The query results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestsAggregationBucketsResponse { + /// The list of matching buckets, one item per bucket. + #[serde(rename = "buckets")] + pub buckets: Option>, +} + +impl CIAppTestsAggregationBucketsResponse { + pub fn new() -> CIAppTestsAggregationBucketsResponse { + CIAppTestsAggregationBucketsResponse { buckets: None } + } +} diff --git a/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs b/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs new file mode 100644 index 000000000..9eac474cf --- /dev/null +++ b/src/datadogV2/model/model_ci_app_tests_analytics_aggregate_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object for the test events aggregate API endpoint. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestsAnalyticsAggregateResponse { + /// The query results. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl CIAppTestsAnalyticsAggregateResponse { + pub fn new() -> CIAppTestsAnalyticsAggregateResponse { + CIAppTestsAnalyticsAggregateResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_tests_bucket_response.rs b/src/datadogV2/model/model_ci_app_tests_bucket_response.rs new file mode 100644 index 000000000..964c3c293 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_tests_bucket_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Bucket values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestsBucketResponse { + /// The key-value pairs for each group-by. + #[serde(rename = "by")] + pub by: Option< + std::collections::HashMap>, + >, + /// A map of the metric name to value for regular compute, or a list of values for a timeseries. + #[serde(rename = "computes")] + pub computes: Option< + std::collections::HashMap, + >, +} + +impl CIAppTestsBucketResponse { + pub fn new() -> CIAppTestsBucketResponse { + CIAppTestsBucketResponse { + by: None, + computes: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_tests_group_by.rs b/src/datadogV2/model/model_ci_app_tests_group_by.rs new file mode 100644 index 000000000..a17ccb8f5 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_tests_group_by.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A group-by rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestsGroupBy { + /// The name of the facet to use (required). + #[serde(rename = "facet")] + pub facet: String, + /// Used to perform a histogram computation (only for measure facets). + /// At most, 100 buckets are allowed, the number of buckets is `(max - min)/interval`. + #[serde(rename = "histogram")] + pub histogram: Option>, + /// The maximum buckets to return for this group-by. + #[serde(rename = "limit")] + pub limit: Option, + /// The value to use for logs that don't have the facet used to group-by. + #[serde(rename = "missing")] + pub missing: Option>, + /// A sort rule. + #[serde(rename = "sort")] + pub sort: Option>, + /// A resulting object to put the given computes in over all the matching records. + #[serde(rename = "total")] + pub total: Option>, +} + +impl CIAppTestsGroupBy { + pub fn new(facet: String) -> CIAppTestsGroupBy { + CIAppTestsGroupBy { + facet, + histogram: None, + limit: None, + missing: None, + sort: None, + total: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_tests_query_filter.rs b/src/datadogV2/model/model_ci_app_tests_query_filter.rs new file mode 100644 index 000000000..d8aefbf60 --- /dev/null +++ b/src/datadogV2/model/model_ci_app_tests_query_filter.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The search and filter query settings. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppTestsQueryFilter { + /// The minimum time for the requested events; supports date, math, and regular timestamps (in milliseconds). + #[serde(rename = "from")] + pub from: Option, + /// The search query following the CI Visibility Explorer search syntax. + #[serde(rename = "query")] + pub query: Option, + /// The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds). + #[serde(rename = "to")] + pub to: Option, +} + +impl CIAppTestsQueryFilter { + pub fn new() -> CIAppTestsQueryFilter { + CIAppTestsQueryFilter { + from: None, + query: None, + to: None, + } + } +} diff --git a/src/datadogV2/model/model_ci_app_warning.rs b/src/datadogV2/model/model_ci_app_warning.rs new file mode 100644 index 000000000..75695d64a --- /dev/null +++ b/src/datadogV2/model/model_ci_app_warning.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A warning message indicating something that went wrong with the query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CIAppWarning { + /// A unique code for this type of warning. + #[serde(rename = "code")] + pub code: Option, + /// A detailed explanation of this specific warning. + #[serde(rename = "detail")] + pub detail: Option, + /// A short human-readable summary of the warning. + #[serde(rename = "title")] + pub title: Option, +} + +impl CIAppWarning { + pub fn new() -> CIAppWarning { + CIAppWarning { + code: None, + detail: None, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs b/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs new file mode 100644 index 000000000..542fc4cca --- /dev/null +++ b/src/datadogV2/model/model_cloud_configuration_compliance_rule_options.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options for cloud_configuration rules. +/// Fields `resourceType` and `regoRule` are mandatory when managing custom `cloud_configuration` rules. +/// +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudConfigurationComplianceRuleOptions { + /// Whether the rule is a complex one. + /// Must be set to true if `regoRule.resourceTypes` contains more than one item. Defaults to false. + /// + #[serde(rename = "complexRule")] + pub complex_rule: Option, + /// Rule details. + #[serde(rename = "regoRule")] + pub rego_rule: Option>, + /// Main resource type to be checked by the rule. It should be specified again in `regoRule.resourceTypes`. + /// + #[serde(rename = "resourceType")] + pub resource_type: Option, + #[serde(flatten)] + pub additional_properties: std::collections::HashMap, +} + +impl CloudConfigurationComplianceRuleOptions { + pub fn new() -> CloudConfigurationComplianceRuleOptions { + CloudConfigurationComplianceRuleOptions { + complex_rule: None, + rego_rule: None, + resource_type: None, + additional_properties: std::collections::HashMap::new(), + } + } +} diff --git a/src/datadogV2/model/model_cloud_configuration_rego_rule.rs b/src/datadogV2/model/model_cloud_configuration_rego_rule.rs new file mode 100644 index 000000000..601e25e7f --- /dev/null +++ b/src/datadogV2/model/model_cloud_configuration_rego_rule.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Rule details. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudConfigurationRegoRule { + /// The policy written in `rego`, see: https://www.openpolicyagent.org/docs/latest/policy-language/ + #[serde(rename = "policy")] + pub policy: String, + /// List of resource types that will be evaluated upon. Must have at least one element. + #[serde(rename = "resourceTypes")] + pub resource_types: Vec, +} + +impl CloudConfigurationRegoRule { + pub fn new(policy: String, resource_types: Vec) -> CloudConfigurationRegoRule { + CloudConfigurationRegoRule { + policy, + resource_types, + } + } +} diff --git a/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs b/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs new file mode 100644 index 000000000..127beda1d --- /dev/null +++ b/src/datadogV2/model/model_cloud_configuration_rule_case_create.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Description of signals. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudConfigurationRuleCaseCreate { + /// Notification targets for each rule case. + #[serde(rename = "notifications")] + pub notifications: Option>, + /// Severity of the Security Signal. + #[serde(rename = "status")] + pub status: crate::datadogV2::model::SecurityMonitoringRuleSeverity, +} + +impl CloudConfigurationRuleCaseCreate { + pub fn new( + status: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> CloudConfigurationRuleCaseCreate { + CloudConfigurationRuleCaseCreate { + notifications: None, + status, + } + } +} diff --git a/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs b/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs new file mode 100644 index 000000000..14829c460 --- /dev/null +++ b/src/datadogV2/model/model_cloud_configuration_rule_compliance_signal_options.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// How to generate compliance signals. Useful for cloud_configuration rules only. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudConfigurationRuleComplianceSignalOptions { + /// The default activation status. + #[serde( + rename = "defaultActivationStatus", + default, + with = "::serde_with::rust::double_option" + )] + pub default_activation_status: Option>, + /// The default group by fields. + #[serde( + rename = "defaultGroupByFields", + default, + with = "::serde_with::rust::double_option" + )] + pub default_group_by_fields: Option>>, + /// Whether signals will be sent. + #[serde( + rename = "userActivationStatus", + default, + with = "::serde_with::rust::double_option" + )] + pub user_activation_status: Option>, + /// Fields to use to group findings by when sending signals. + #[serde( + rename = "userGroupByFields", + default, + with = "::serde_with::rust::double_option" + )] + pub user_group_by_fields: Option>>, +} + +impl CloudConfigurationRuleComplianceSignalOptions { + pub fn new() -> CloudConfigurationRuleComplianceSignalOptions { + CloudConfigurationRuleComplianceSignalOptions { + default_activation_status: None, + default_group_by_fields: None, + user_activation_status: None, + user_group_by_fields: None, + } + } +} diff --git a/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs b/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs new file mode 100644 index 000000000..8698b741f --- /dev/null +++ b/src/datadogV2/model/model_cloud_configuration_rule_create_payload.rs @@ -0,0 +1,65 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create a new cloud configuration rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudConfigurationRuleCreatePayload { + /// Description of generated findings and signals (severity and channels to be notified in case of a signal). Must contain exactly one item. + /// + #[serde(rename = "cases")] + pub cases: Vec, + /// How to generate compliance signals. Useful for cloud_configuration rules only. + #[serde(rename = "complianceSignalOptions")] + pub compliance_signal_options: + Box, + /// Additional queries to filter matched events before they are processed. + #[serde(rename = "filters")] + pub filters: Option>, + /// Whether the rule is enabled. + #[serde(rename = "isEnabled")] + pub is_enabled: bool, + /// Message in markdown format for generated findings and signals. + #[serde(rename = "message")] + pub message: String, + /// The name of the rule. + #[serde(rename = "name")] + pub name: String, + /// Options on cloud configuration rules. + #[serde(rename = "options")] + pub options: Box, + /// Tags for generated findings and signals. + #[serde(rename = "tags")] + pub tags: Option>, + /// The rule type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CloudConfigurationRuleCreatePayload { + pub fn new( + cases: Vec, + compliance_signal_options: Box< + crate::datadogV2::model::CloudConfigurationRuleComplianceSignalOptions, + >, + is_enabled: bool, + message: String, + name: String, + options: Box, + ) -> CloudConfigurationRuleCreatePayload { + CloudConfigurationRuleCreatePayload { + cases, + compliance_signal_options, + filters: None, + is_enabled, + message, + name, + options, + tags: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_cloud_configuration_rule_options.rs b/src/datadogV2/model/model_cloud_configuration_rule_options.rs new file mode 100644 index 000000000..f3a3f9f28 --- /dev/null +++ b/src/datadogV2/model/model_cloud_configuration_rule_options.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options on cloud configuration rules. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudConfigurationRuleOptions { + /// Options for cloud_configuration rules. + /// Fields `resourceType` and `regoRule` are mandatory when managing custom `cloud_configuration` rules. + /// + #[serde(rename = "complianceRuleOptions")] + pub compliance_rule_options: + Box, +} + +impl CloudConfigurationRuleOptions { + pub fn new( + compliance_rule_options: Box< + crate::datadogV2::model::CloudConfigurationComplianceRuleOptions, + >, + ) -> CloudConfigurationRuleOptions { + CloudConfigurationRuleOptions { + compliance_rule_options, + } + } +} diff --git a/src/datadogV2/model/model_cloud_configuration_rule_type.rs b/src/datadogV2/model/model_cloud_configuration_rule_type.rs new file mode 100644 index 000000000..9fc435808 --- /dev/null +++ b/src/datadogV2/model/model_cloud_configuration_rule_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CloudConfigurationRuleType { + #[serde(rename = "cloud_configuration")] + CLOUD_CONFIGURATION, +} + +impl ToString for CloudConfigurationRuleType { + fn to_string(&self) -> String { + match self { + Self::CLOUD_CONFIGURATION => String::from("cloud_configuration"), + } + } +} diff --git a/src/datadogV2/model/model_cloud_cost_activity.rs b/src/datadogV2/model/model_cloud_cost_activity.rs new file mode 100644 index 000000000..75131b6a6 --- /dev/null +++ b/src/datadogV2/model/model_cloud_cost_activity.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Cloud Cost Activity. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudCostActivity { + /// Attributes for Cloud Cost activity. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of Cloud Cost Activity. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::CloudCostActivityType, +} + +impl CloudCostActivity { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::CloudCostActivityType, + ) -> CloudCostActivity { + CloudCostActivity { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_cloud_cost_activity_attributes.rs b/src/datadogV2/model/model_cloud_cost_activity_attributes.rs new file mode 100644 index 000000000..3603c73b8 --- /dev/null +++ b/src/datadogV2/model/model_cloud_cost_activity_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for Cloud Cost activity. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudCostActivityAttributes { + /// Whether or not the cloud account is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: bool, +} + +impl CloudCostActivityAttributes { + pub fn new(is_enabled: bool) -> CloudCostActivityAttributes { + CloudCostActivityAttributes { is_enabled } + } +} diff --git a/src/datadogV2/model/model_cloud_cost_activity_response.rs b/src/datadogV2/model/model_cloud_cost_activity_response.rs new file mode 100644 index 000000000..085dcc5f9 --- /dev/null +++ b/src/datadogV2/model/model_cloud_cost_activity_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for Cloud Cost activity. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CloudCostActivityResponse { + /// Cloud Cost Activity. + #[serde(rename = "data")] + pub data: Option>, +} + +impl CloudCostActivityResponse { + pub fn new() -> CloudCostActivityResponse { + CloudCostActivityResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_cloud_cost_activity_type.rs b/src/datadogV2/model/model_cloud_cost_activity_type.rs new file mode 100644 index 000000000..6b1070604 --- /dev/null +++ b/src/datadogV2/model/model_cloud_cost_activity_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CloudCostActivityType { + #[serde(rename = "cloud_cost_activity")] + CLOUD_COST_ACTIVITY, +} + +impl ToString for CloudCostActivityType { + fn to_string(&self) -> String { + match self { + Self::CLOUD_COST_ACTIVITY => String::from("cloud_cost_activity"), + } + } +} diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs index 3a47277f0..318131fa0 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A Cloud Workload Security Agent rule returned by the API. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleAttributes { /// The version of the agent. #[serde(rename = "agentConstraint")] @@ -36,6 +36,9 @@ pub struct CloudWorkloadSecurityAgentRuleAttributes { /// The SECL expression of the Agent rule. #[serde(rename = "expression")] pub expression: Option, + /// The platforms the Agent rule is supported on. + #[serde(rename = "filters")] + pub filters: Option>, /// The name of the Agent rule. #[serde(rename = "name")] pub name: Option, @@ -69,6 +72,7 @@ impl CloudWorkloadSecurityAgentRuleAttributes { description: None, enabled: None, expression: None, + filters: None, name: None, update_author_uu_id: None, update_date: None, diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs index 1faf849ce..59e98dbbc 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Create a new Cloud Workload Security Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleCreateAttributes { /// The description of the Agent rule. #[serde(rename = "description")] diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs index 2b5044652..97046ddf4 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object for a single Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleCreateData { /// Create a new Cloud Workload Security Agent rule. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct CloudWorkloadSecurityAgentRuleCreateData { impl CloudWorkloadSecurityAgentRuleCreateData { pub fn new( - attributes: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateAttributes, + attributes: Box, type_: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, ) -> CloudWorkloadSecurityAgentRuleCreateData { - CloudWorkloadSecurityAgentRuleCreateData { - attributes: Box::new(attributes), - type_, - } + CloudWorkloadSecurityAgentRuleCreateData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs index dfabb69a5..ae4f9747c 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Request object that includes the Agent rule to create. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleCreateRequest { /// Object for a single Agent rule. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct CloudWorkloadSecurityAgentRuleCreateRequest { impl CloudWorkloadSecurityAgentRuleCreateRequest { pub fn new( - data: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleCreateData, + data: Box, ) -> CloudWorkloadSecurityAgentRuleCreateRequest { - CloudWorkloadSecurityAgentRuleCreateRequest { - data: Box::new(data), - } + CloudWorkloadSecurityAgentRuleCreateRequest { data } } } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs index 9e9e51bb4..280609f2c 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_creator_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attributes of the user who created the Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleCreatorAttributes { /// The handle of the user. #[serde(rename = "handle")] diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs index 750f97164..ee8329728 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object for a single Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleData { /// A Cloud Workload Security Agent rule returned by the API. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs index a77abe1e0..6b0b4a691 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response object that includes an Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleResponse { /// Object for a single Agent rule. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_type.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_type.rs index dd15e9b6f..b5a2bb2a8 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_type.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_type.rs @@ -17,9 +17,3 @@ impl ToString for CloudWorkloadSecurityAgentRuleType { } } } - -impl Default for CloudWorkloadSecurityAgentRuleType { - fn default() -> CloudWorkloadSecurityAgentRuleType { - Self::AGENT_RULE - } -} diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs index 5e0e79678..d82157394 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Update an existing Cloud Workload Security Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleUpdateAttributes { /// The description of the Agent rule. #[serde(rename = "description")] diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs index b448a3be6..0fe91cde6 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object for a single Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleUpdateData { /// Update an existing Cloud Workload Security Agent rule. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct CloudWorkloadSecurityAgentRuleUpdateData { impl CloudWorkloadSecurityAgentRuleUpdateData { pub fn new( - attributes: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateAttributes, + attributes: Box, type_: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleType, ) -> CloudWorkloadSecurityAgentRuleUpdateData { - CloudWorkloadSecurityAgentRuleUpdateData { - attributes: Box::new(attributes), - type_, - } + CloudWorkloadSecurityAgentRuleUpdateData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs index aaac43b5b..1334babf4 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Request object that includes the Agent rule with the attributes to update. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleUpdateRequest { /// Object for a single Agent rule. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct CloudWorkloadSecurityAgentRuleUpdateRequest { impl CloudWorkloadSecurityAgentRuleUpdateRequest { pub fn new( - data: crate::datadogV2::model::CloudWorkloadSecurityAgentRuleUpdateData, + data: Box, ) -> CloudWorkloadSecurityAgentRuleUpdateRequest { - CloudWorkloadSecurityAgentRuleUpdateRequest { - data: Box::new(data), - } + CloudWorkloadSecurityAgentRuleUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs index 83cc10d3f..58301c5a5 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rule_updater_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attributes of the user who last updated the Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRuleUpdaterAttributes { /// The handle of the user. #[serde(rename = "handle")] diff --git a/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs b/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs index 256da09d9..044e2e111 100644 --- a/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs +++ b/src/datadogV2/model/model_cloud_workload_security_agent_rules_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response object that includes a list of Agent rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudWorkloadSecurityAgentRulesListResponse { /// A list of Agent rules objects. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_cloudflare_account_create_request.rs b/src/datadogV2/model/model_cloudflare_account_create_request.rs index 775ae8d63..ace255da4 100644 --- a/src/datadogV2/model/model_cloudflare_account_create_request.rs +++ b/src/datadogV2/model/model_cloudflare_account_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Payload schema when adding a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountCreateRequest { /// Data object for creating a Cloudflare account. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct CloudflareAccountCreateRequest { impl CloudflareAccountCreateRequest { pub fn new( - data: crate::datadogV2::model::CloudflareAccountCreateRequestData, + data: Box, ) -> CloudflareAccountCreateRequest { - CloudflareAccountCreateRequest { - data: Box::new(data), - } + CloudflareAccountCreateRequest { data } } } diff --git a/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs b/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs index f95fbc109..a8e965754 100644 --- a/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_create_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for creating a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountCreateRequestAttributes { /// The API key (or token) for the Cloudflare account. #[serde(rename = "api_key")] diff --git a/src/datadogV2/model/model_cloudflare_account_create_request_data.rs b/src/datadogV2/model/model_cloudflare_account_create_request_data.rs index fa5746a12..23652f3f1 100644 --- a/src/datadogV2/model/model_cloudflare_account_create_request_data.rs +++ b/src/datadogV2/model/model_cloudflare_account_create_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object for creating a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountCreateRequestData { /// Attributes object for creating a Cloudflare account. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct CloudflareAccountCreateRequestData { impl CloudflareAccountCreateRequestData { pub fn new( - attributes: crate::datadogV2::model::CloudflareAccountCreateRequestAttributes, + attributes: Box, type_: crate::datadogV2::model::CloudflareAccountType, ) -> CloudflareAccountCreateRequestData { - CloudflareAccountCreateRequestData { - attributes: Box::new(attributes), - type_, - } + CloudflareAccountCreateRequestData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_cloudflare_account_response.rs b/src/datadogV2/model/model_cloudflare_account_response.rs index 29f4f6030..22f17549c 100644 --- a/src/datadogV2/model/model_cloudflare_account_response.rs +++ b/src/datadogV2/model/model_cloudflare_account_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountResponse { /// Data object of a Cloudflare account. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_cloudflare_account_response_attributes.rs b/src/datadogV2/model/model_cloudflare_account_response_attributes.rs index 54c72a5dd..04dfd1faf 100644 --- a/src/datadogV2/model/model_cloudflare_account_response_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object of a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountResponseAttributes { /// The email associated with the Cloudflare account. #[serde(rename = "email")] diff --git a/src/datadogV2/model/model_cloudflare_account_response_data.rs b/src/datadogV2/model/model_cloudflare_account_response_data.rs index 7bf906d33..4c83a28d8 100644 --- a/src/datadogV2/model/model_cloudflare_account_response_data.rs +++ b/src/datadogV2/model/model_cloudflare_account_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object of a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountResponseData { /// Attributes object of a Cloudflare account. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct CloudflareAccountResponseData { impl CloudflareAccountResponseData { pub fn new( - attributes: crate::datadogV2::model::CloudflareAccountResponseAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::CloudflareAccountType, ) -> CloudflareAccountResponseData { CloudflareAccountResponseData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_cloudflare_account_type.rs b/src/datadogV2/model/model_cloudflare_account_type.rs index 87e7336ad..2e3058852 100644 --- a/src/datadogV2/model/model_cloudflare_account_type.rs +++ b/src/datadogV2/model/model_cloudflare_account_type.rs @@ -17,9 +17,3 @@ impl ToString for CloudflareAccountType { } } } - -impl Default for CloudflareAccountType { - fn default() -> CloudflareAccountType { - Self::CLOUDFLARE_ACCOUNTS - } -} diff --git a/src/datadogV2/model/model_cloudflare_account_update_request.rs b/src/datadogV2/model/model_cloudflare_account_update_request.rs index 3cb8fdb7a..0ba4505f7 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Payload schema when updating a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountUpdateRequest { /// Data object for updating a Cloudflare account. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct CloudflareAccountUpdateRequest { impl CloudflareAccountUpdateRequest { pub fn new( - data: crate::datadogV2::model::CloudflareAccountUpdateRequestData, + data: Box, ) -> CloudflareAccountUpdateRequest { - CloudflareAccountUpdateRequest { - data: Box::new(data), - } + CloudflareAccountUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs b/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs index fef51b6d0..20ef7b654 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for updating a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountUpdateRequestAttributes { /// The API key of the Cloudflare account. #[serde(rename = "api_key")] diff --git a/src/datadogV2/model/model_cloudflare_account_update_request_data.rs b/src/datadogV2/model/model_cloudflare_account_update_request_data.rs index e1a753a9b..d0192d0e7 100644 --- a/src/datadogV2/model/model_cloudflare_account_update_request_data.rs +++ b/src/datadogV2/model/model_cloudflare_account_update_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object for updating a Cloudflare account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountUpdateRequestData { /// Attributes object for updating a Cloudflare account. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_cloudflare_accounts_response.rs b/src/datadogV2/model/model_cloudflare_accounts_response.rs index d9f43692b..645be1f07 100644 --- a/src/datadogV2/model/model_cloudflare_accounts_response.rs +++ b/src/datadogV2/model/model_cloudflare_accounts_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting Cloudflare accounts. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CloudflareAccountsResponse { /// The JSON:API data schema. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_confluent_account_create_request.rs b/src/datadogV2/model/model_confluent_account_create_request.rs index efa74d6ef..797d9da0f 100644 --- a/src/datadogV2/model/model_confluent_account_create_request.rs +++ b/src/datadogV2/model/model_confluent_account_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Payload schema when adding a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountCreateRequest { /// The data body for adding a Confluent account. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct ConfluentAccountCreateRequest { impl ConfluentAccountCreateRequest { pub fn new( - data: crate::datadogV2::model::ConfluentAccountCreateRequestData, + data: Box, ) -> ConfluentAccountCreateRequest { - ConfluentAccountCreateRequest { - data: Box::new(data), - } + ConfluentAccountCreateRequest { data } } } diff --git a/src/datadogV2/model/model_confluent_account_create_request_attributes.rs b/src/datadogV2/model/model_confluent_account_create_request_attributes.rs index c2513ff2c..476734776 100644 --- a/src/datadogV2/model/model_confluent_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_create_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes associated with the account creation request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountCreateRequestAttributes { /// The API key associated with your Confluent account. #[serde(rename = "api_key")] diff --git a/src/datadogV2/model/model_confluent_account_create_request_data.rs b/src/datadogV2/model/model_confluent_account_create_request_data.rs index b99ef5141..3535b6c28 100644 --- a/src/datadogV2/model/model_confluent_account_create_request_data.rs +++ b/src/datadogV2/model/model_confluent_account_create_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The data body for adding a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountCreateRequestData { /// Attributes associated with the account creation request. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct ConfluentAccountCreateRequestData { impl ConfluentAccountCreateRequestData { pub fn new( - attributes: crate::datadogV2::model::ConfluentAccountCreateRequestAttributes, + attributes: Box, type_: crate::datadogV2::model::ConfluentAccountType, ) -> ConfluentAccountCreateRequestData { - ConfluentAccountCreateRequestData { - attributes: Box::new(attributes), - type_, - } + ConfluentAccountCreateRequestData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_confluent_account_resource_attributes.rs b/src/datadogV2/model/model_confluent_account_resource_attributes.rs index da4776ab7..a870344b9 100644 --- a/src/datadogV2/model/model_confluent_account_resource_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_resource_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for updating a Confluent resource. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountResourceAttributes { /// Enable the `custom.consumer_lag_offset` metric, which contains extra metric tags. #[serde(rename = "enable_custom_metrics")] diff --git a/src/datadogV2/model/model_confluent_account_response.rs b/src/datadogV2/model/model_confluent_account_response.rs index bf6fb33af..e80d46140 100644 --- a/src/datadogV2/model/model_confluent_account_response.rs +++ b/src/datadogV2/model/model_confluent_account_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountResponse { /// An API key and API secret pair that represents a Confluent account. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_confluent_account_response_attributes.rs b/src/datadogV2/model/model_confluent_account_response_attributes.rs index 66c1b5a9a..e7e1112a0 100644 --- a/src/datadogV2/model/model_confluent_account_response_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attributes of a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountResponseAttributes { /// The API key associated with your Confluent account. #[serde(rename = "api_key")] diff --git a/src/datadogV2/model/model_confluent_account_response_data.rs b/src/datadogV2/model/model_confluent_account_response_data.rs index 51d8454c4..5b6761077 100644 --- a/src/datadogV2/model/model_confluent_account_response_data.rs +++ b/src/datadogV2/model/model_confluent_account_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An API key and API secret pair that represents a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountResponseData { /// The attributes of a Confluent account. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct ConfluentAccountResponseData { impl ConfluentAccountResponseData { pub fn new( - attributes: crate::datadogV2::model::ConfluentAccountResponseAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::ConfluentAccountType, ) -> ConfluentAccountResponseData { ConfluentAccountResponseData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_confluent_account_type.rs b/src/datadogV2/model/model_confluent_account_type.rs index 4202fec8b..1d861559d 100644 --- a/src/datadogV2/model/model_confluent_account_type.rs +++ b/src/datadogV2/model/model_confluent_account_type.rs @@ -17,9 +17,3 @@ impl ToString for ConfluentAccountType { } } } - -impl Default for ConfluentAccountType { - fn default() -> ConfluentAccountType { - Self::CONFLUENT_CLOUD_ACCOUNTS - } -} diff --git a/src/datadogV2/model/model_confluent_account_update_request.rs b/src/datadogV2/model/model_confluent_account_update_request.rs index 38a0cae18..32865389a 100644 --- a/src/datadogV2/model/model_confluent_account_update_request.rs +++ b/src/datadogV2/model/model_confluent_account_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The JSON:API request for updating a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountUpdateRequest { /// Data object for updating a Confluent account. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct ConfluentAccountUpdateRequest { impl ConfluentAccountUpdateRequest { pub fn new( - data: crate::datadogV2::model::ConfluentAccountUpdateRequestData, + data: Box, ) -> ConfluentAccountUpdateRequest { - ConfluentAccountUpdateRequest { - data: Box::new(data), - } + ConfluentAccountUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_confluent_account_update_request_attributes.rs b/src/datadogV2/model/model_confluent_account_update_request_attributes.rs index 6e87b0203..928c3de9d 100644 --- a/src/datadogV2/model/model_confluent_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_account_update_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for updating a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountUpdateRequestAttributes { /// The API key associated with your Confluent account. #[serde(rename = "api_key")] diff --git a/src/datadogV2/model/model_confluent_account_update_request_data.rs b/src/datadogV2/model/model_confluent_account_update_request_data.rs index b8da7adf5..c76264cb1 100644 --- a/src/datadogV2/model/model_confluent_account_update_request_data.rs +++ b/src/datadogV2/model/model_confluent_account_update_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object for updating a Confluent account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountUpdateRequestData { /// Attributes object for updating a Confluent account. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct ConfluentAccountUpdateRequestData { impl ConfluentAccountUpdateRequestData { pub fn new( - attributes: crate::datadogV2::model::ConfluentAccountUpdateRequestAttributes, + attributes: Box, type_: crate::datadogV2::model::ConfluentAccountType, ) -> ConfluentAccountUpdateRequestData { - ConfluentAccountUpdateRequestData { - attributes: Box::new(attributes), - type_, - } + ConfluentAccountUpdateRequestData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_confluent_accounts_response.rs b/src/datadogV2/model/model_confluent_accounts_response.rs index 890226f4c..32fce1e0e 100644 --- a/src/datadogV2/model/model_confluent_accounts_response.rs +++ b/src/datadogV2/model/model_confluent_accounts_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Confluent account returned by the API. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentAccountsResponse { /// The Confluent account. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_confluent_resource_request.rs b/src/datadogV2/model/model_confluent_resource_request.rs index 88549cb0a..1a0adcfc6 100644 --- a/src/datadogV2/model/model_confluent_resource_request.rs +++ b/src/datadogV2/model/model_confluent_resource_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The JSON:API request for updating a Confluent resource. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentResourceRequest { /// JSON:API request for updating a Confluent resource. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct ConfluentResourceRequest { impl ConfluentResourceRequest { pub fn new( - data: crate::datadogV2::model::ConfluentResourceRequestData, + data: Box, ) -> ConfluentResourceRequest { - ConfluentResourceRequest { - data: Box::new(data), - } + ConfluentResourceRequest { data } } } diff --git a/src/datadogV2/model/model_confluent_resource_request_attributes.rs b/src/datadogV2/model/model_confluent_resource_request_attributes.rs index 8d25e8005..8880f7368 100644 --- a/src/datadogV2/model/model_confluent_resource_request_attributes.rs +++ b/src/datadogV2/model/model_confluent_resource_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for updating a Confluent resource. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentResourceRequestAttributes { /// Enable the `custom.consumer_lag_offset` metric, which contains extra metric tags. #[serde(rename = "enable_custom_metrics")] diff --git a/src/datadogV2/model/model_confluent_resource_request_data.rs b/src/datadogV2/model/model_confluent_resource_request_data.rs index 6e92a1e5b..14eee87a5 100644 --- a/src/datadogV2/model/model_confluent_resource_request_data.rs +++ b/src/datadogV2/model/model_confluent_resource_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// JSON:API request for updating a Confluent resource. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentResourceRequestData { /// Attributes object for updating a Confluent resource. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct ConfluentResourceRequestData { impl ConfluentResourceRequestData { pub fn new( - attributes: crate::datadogV2::model::ConfluentResourceRequestAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::ConfluentResourceType, ) -> ConfluentResourceRequestData { ConfluentResourceRequestData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_confluent_resource_response.rs b/src/datadogV2/model/model_confluent_resource_response.rs index 5eae2f71a..c096064f1 100644 --- a/src/datadogV2/model/model_confluent_resource_response.rs +++ b/src/datadogV2/model/model_confluent_resource_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response schema when interacting with a Confluent resource. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentResourceResponse { /// Confluent Cloud resource data. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_confluent_resource_response_attributes.rs b/src/datadogV2/model/model_confluent_resource_response_attributes.rs index 34b5c6781..3cd3e77e7 100644 --- a/src/datadogV2/model/model_confluent_resource_response_attributes.rs +++ b/src/datadogV2/model/model_confluent_resource_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Model representation of a Confluent Cloud resource. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentResourceResponseAttributes { /// Enable the `custom.consumer_lag_offset` metric, which contains extra metric tags. #[serde(rename = "enable_custom_metrics")] diff --git a/src/datadogV2/model/model_confluent_resource_response_data.rs b/src/datadogV2/model/model_confluent_resource_response_data.rs index 8b78cd65f..988eeeecc 100644 --- a/src/datadogV2/model/model_confluent_resource_response_data.rs +++ b/src/datadogV2/model/model_confluent_resource_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Confluent Cloud resource data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentResourceResponseData { /// Model representation of a Confluent Cloud resource. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct ConfluentResourceResponseData { impl ConfluentResourceResponseData { pub fn new( - attributes: crate::datadogV2::model::ConfluentResourceResponseAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::ConfluentResourceType, ) -> ConfluentResourceResponseData { ConfluentResourceResponseData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_confluent_resource_type.rs b/src/datadogV2/model/model_confluent_resource_type.rs index 621ccf466..c0e9a397b 100644 --- a/src/datadogV2/model/model_confluent_resource_type.rs +++ b/src/datadogV2/model/model_confluent_resource_type.rs @@ -17,9 +17,3 @@ impl ToString for ConfluentResourceType { } } } - -impl Default for ConfluentResourceType { - fn default() -> ConfluentResourceType { - Self::CONFLUENT_CLOUD_RESOURCES - } -} diff --git a/src/datadogV2/model/model_confluent_resources_response.rs b/src/datadogV2/model/model_confluent_resources_response.rs index 092ba7b4c..938d08b21 100644 --- a/src/datadogV2/model/model_confluent_resources_response.rs +++ b/src/datadogV2/model/model_confluent_resources_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response schema when interacting with a list of Confluent resources. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfluentResourcesResponse { /// The JSON:API data attribute. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_container.rs b/src/datadogV2/model/model_container.rs new file mode 100644 index 000000000..b238887cf --- /dev/null +++ b/src/datadogV2/model/model_container.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Container object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Container { + /// Attributes for a container. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Container ID. + #[serde(rename = "id")] + pub id: Option, + /// Type of container. + #[serde(rename = "type")] + pub type_: Option, +} + +impl Container { + pub fn new() -> Container { + Container { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_container_attributes.rs b/src/datadogV2/model/model_container_attributes.rs new file mode 100644 index 000000000..3df045652 --- /dev/null +++ b/src/datadogV2/model/model_container_attributes.rs @@ -0,0 +1,66 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for a container. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerAttributes { + /// The ID of the container. + #[serde(rename = "container_id")] + pub container_id: Option, + /// Time the container was created. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Hostname of the host running the container. + #[serde(rename = "host")] + pub host: Option, + /// Digest of the compressed image manifest. + #[serde( + rename = "image_digest", + default, + with = "::serde_with::rust::double_option" + )] + pub image_digest: Option>, + /// Name of the associated container image. + #[serde(rename = "image_name")] + pub image_name: Option, + /// List of image tags associated with the container image. + #[serde( + rename = "image_tags", + default, + with = "::serde_with::rust::double_option" + )] + pub image_tags: Option>>, + /// Name of the container. + #[serde(rename = "name")] + pub name: Option, + /// Time the container was started. + #[serde(rename = "started_at")] + pub started_at: Option, + /// State of the container. This depends on the container runtime. + #[serde(rename = "state")] + pub state: Option, + /// List of tags associated with the container. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl ContainerAttributes { + pub fn new() -> ContainerAttributes { + ContainerAttributes { + container_id: None, + created_at: None, + host: None, + image_digest: None, + image_name: None, + image_tags: None, + name: None, + started_at: None, + state: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_container_group.rs b/src/datadogV2/model/model_container_group.rs new file mode 100644 index 000000000..a5e16c410 --- /dev/null +++ b/src/datadogV2/model/model_container_group.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Container group object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerGroup { + /// Attributes for a container group. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Container Group ID. + #[serde(rename = "id")] + pub id: Option, + /// Relationships to containers inside a container group. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Type of container group. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ContainerGroup { + pub fn new() -> ContainerGroup { + ContainerGroup { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_container_group_attributes.rs b/src/datadogV2/model/model_container_group_attributes.rs new file mode 100644 index 000000000..2cebd5f76 --- /dev/null +++ b/src/datadogV2/model/model_container_group_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for a container group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerGroupAttributes { + /// Number of containers in the group. + #[serde(rename = "count")] + pub count: Option, + /// Tags from the group name parsed in key/value format. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl ContainerGroupAttributes { + pub fn new() -> ContainerGroupAttributes { + ContainerGroupAttributes { + count: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_container_group_relationships.rs b/src/datadogV2/model/model_container_group_relationships.rs new file mode 100644 index 000000000..c182e5eb4 --- /dev/null +++ b/src/datadogV2/model/model_container_group_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships to containers inside a container group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerGroupRelationships { + /// Relationships to Containers inside a Container Group. + #[serde(rename = "containers")] + pub containers: Option>, +} + +impl ContainerGroupRelationships { + pub fn new() -> ContainerGroupRelationships { + ContainerGroupRelationships { containers: None } + } +} diff --git a/src/datadogV2/model/model_container_group_relationships_link.rs b/src/datadogV2/model/model_container_group_relationships_link.rs new file mode 100644 index 000000000..c936cf3cb --- /dev/null +++ b/src/datadogV2/model/model_container_group_relationships_link.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships to Containers inside a Container Group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerGroupRelationshipsLink { + /// Links data. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, +} + +impl ContainerGroupRelationshipsLink { + pub fn new() -> ContainerGroupRelationshipsLink { + ContainerGroupRelationshipsLink { + data: None, + links: None, + } + } +} diff --git a/src/datadogV2/model/model_container_group_relationships_links.rs b/src/datadogV2/model/model_container_group_relationships_links.rs new file mode 100644 index 000000000..e643b7625 --- /dev/null +++ b/src/datadogV2/model/model_container_group_relationships_links.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerGroupRelationshipsLinks { + /// Link to related containers. + #[serde(rename = "related")] + pub related: Option, +} + +impl ContainerGroupRelationshipsLinks { + pub fn new() -> ContainerGroupRelationshipsLinks { + ContainerGroupRelationshipsLinks { related: None } + } +} diff --git a/src/datadogV2/model/model_container_group_type.rs b/src/datadogV2/model/model_container_group_type.rs new file mode 100644 index 000000000..ec08a32b7 --- /dev/null +++ b/src/datadogV2/model/model_container_group_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ContainerGroupType { + #[serde(rename = "container_group")] + CONTAINER_GROUP, +} + +impl ToString for ContainerGroupType { + fn to_string(&self) -> String { + match self { + Self::CONTAINER_GROUP => String::from("container_group"), + } + } +} diff --git a/src/datadogV2/model/model_container_image.rs b/src/datadogV2/model/model_container_image.rs new file mode 100644 index 000000000..458f93f80 --- /dev/null +++ b/src/datadogV2/model/model_container_image.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Container Image object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImage { + /// Attributes for a Container Image. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Container Image ID. + #[serde(rename = "id")] + pub id: Option, + /// Type of Container Image. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ContainerImage { + pub fn new() -> ContainerImage { + ContainerImage { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_attributes.rs b/src/datadogV2/model/model_container_image_attributes.rs new file mode 100644 index 000000000..f55e5dd67 --- /dev/null +++ b/src/datadogV2/model/model_container_image_attributes.rs @@ -0,0 +1,89 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for a Container Image. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageAttributes { + /// Number of containers running the image. + #[serde(rename = "container_count")] + pub container_count: Option, + /// List of platform-specific images associated with the image record. + /// The list contains more than 1 entry for multi-architecture images. + #[serde(rename = "image_flavors")] + pub image_flavors: Option>, + /// List of image tags associated with the Container Image. + #[serde(rename = "image_tags")] + pub image_tags: Option>, + /// List of build times associated with the Container Image. + /// The list contains more than 1 entry for multi-architecture images. + #[serde(rename = "images_built_at")] + pub images_built_at: Option>, + /// Name of the Container Image. + #[serde(rename = "name")] + pub name: Option, + /// List of Operating System architectures supported by the Container Image. + #[serde(rename = "os_architectures")] + pub os_architectures: Option>, + /// List of Operating System names supported by the Container Image. + #[serde(rename = "os_names")] + pub os_names: Option>, + /// List of Operating System versions supported by the Container Image. + #[serde(rename = "os_versions")] + pub os_versions: Option>, + /// Time the image was pushed to the container registry. + #[serde(rename = "published_at")] + pub published_at: Option, + /// Registry the Container Image was pushed to. + #[serde(rename = "registry")] + pub registry: Option, + /// Digest of the compressed image manifest. + #[serde(rename = "repo_digest")] + pub repo_digest: Option, + /// Repository where the Container Image is stored in. + #[serde(rename = "repository")] + pub repository: Option, + /// Short version of the Container Image name. + #[serde(rename = "short_image")] + pub short_image: Option, + /// List of size for each platform-specific image associated with the image record. + /// The list contains more than 1 entry for multi-architecture images. + #[serde(rename = "sizes")] + pub sizes: Option>, + /// List of sources where the Container Image was collected from. + #[serde(rename = "sources")] + pub sources: Option>, + /// List of tags associated with the Container Image. + #[serde(rename = "tags")] + pub tags: Option>, + /// Vulnerability counts associated with the Container Image. + #[serde(rename = "vulnerability_count")] + pub vulnerability_count: Option>, +} + +impl ContainerImageAttributes { + pub fn new() -> ContainerImageAttributes { + ContainerImageAttributes { + container_count: None, + image_flavors: None, + image_tags: None, + images_built_at: None, + name: None, + os_architectures: None, + os_names: None, + os_versions: None, + published_at: None, + registry: None, + repo_digest: None, + repository: None, + short_image: None, + sizes: None, + sources: None, + tags: None, + vulnerability_count: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_flavor.rs b/src/datadogV2/model/model_container_image_flavor.rs new file mode 100644 index 000000000..cbae7fc3f --- /dev/null +++ b/src/datadogV2/model/model_container_image_flavor.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Container Image breakdown by supported platform. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageFlavor { + /// Time the platform-specific Container Image was built. + #[serde(rename = "built_at")] + pub built_at: Option, + /// Operating System architecture supported by the Container Image. + #[serde(rename = "os_architecture")] + pub os_architecture: Option, + /// Operating System name supported by the Container Image. + #[serde(rename = "os_name")] + pub os_name: Option, + /// Operating System version supported by the Container Image. + #[serde(rename = "os_version")] + pub os_version: Option, + /// Size of the platform-specific Container Image. + #[serde(rename = "size")] + pub size: Option, +} + +impl ContainerImageFlavor { + pub fn new() -> ContainerImageFlavor { + ContainerImageFlavor { + built_at: None, + os_architecture: None, + os_name: None, + os_version: None, + size: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_group.rs b/src/datadogV2/model/model_container_image_group.rs new file mode 100644 index 000000000..48f9af054 --- /dev/null +++ b/src/datadogV2/model/model_container_image_group.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Container Image Group object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageGroup { + /// Attributes for a Container Image Group. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Container Image Group ID. + #[serde(rename = "id")] + pub id: Option, + /// Relationships inside a Container Image Group. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Type of Container Image Group. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ContainerImageGroup { + pub fn new() -> ContainerImageGroup { + ContainerImageGroup { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_group_attributes.rs b/src/datadogV2/model/model_container_image_group_attributes.rs new file mode 100644 index 000000000..52d46e854 --- /dev/null +++ b/src/datadogV2/model/model_container_image_group_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes for a Container Image Group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageGroupAttributes { + /// Number of Container Images in the group. + #[serde(rename = "count")] + pub count: Option, + /// Name of the Container Image group. + #[serde(rename = "name")] + pub name: Option, + /// Tags from the group name parsed in key/value format. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl ContainerImageGroupAttributes { + pub fn new() -> ContainerImageGroupAttributes { + ContainerImageGroupAttributes { + count: None, + name: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_group_images_relationships_link.rs b/src/datadogV2/model/model_container_image_group_images_relationships_link.rs new file mode 100644 index 000000000..e849b5236 --- /dev/null +++ b/src/datadogV2/model/model_container_image_group_images_relationships_link.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships to Container Images inside a Container Image Group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageGroupImagesRelationshipsLink { + /// Links data. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, +} + +impl ContainerImageGroupImagesRelationshipsLink { + pub fn new() -> ContainerImageGroupImagesRelationshipsLink { + ContainerImageGroupImagesRelationshipsLink { + data: None, + links: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_group_relationships.rs b/src/datadogV2/model/model_container_image_group_relationships.rs new file mode 100644 index 000000000..59c92ebe4 --- /dev/null +++ b/src/datadogV2/model/model_container_image_group_relationships.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships inside a Container Image Group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageGroupRelationships { + /// Relationships to Container Images inside a Container Image Group. + #[serde(rename = "container_images")] + pub container_images: + Option>, +} + +impl ContainerImageGroupRelationships { + pub fn new() -> ContainerImageGroupRelationships { + ContainerImageGroupRelationships { + container_images: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_group_relationships_links.rs b/src/datadogV2/model/model_container_image_group_relationships_links.rs new file mode 100644 index 000000000..8c4b65f34 --- /dev/null +++ b/src/datadogV2/model/model_container_image_group_relationships_links.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageGroupRelationshipsLinks { + /// Link to related Container Images. + #[serde(rename = "related")] + pub related: Option, +} + +impl ContainerImageGroupRelationshipsLinks { + pub fn new() -> ContainerImageGroupRelationshipsLinks { + ContainerImageGroupRelationshipsLinks { related: None } + } +} diff --git a/src/datadogV2/model/model_container_image_group_type.rs b/src/datadogV2/model/model_container_image_group_type.rs new file mode 100644 index 000000000..65f58ccec --- /dev/null +++ b/src/datadogV2/model/model_container_image_group_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ContainerImageGroupType { + #[serde(rename = "container_image_group")] + CONTAINER_IMAGE_GROUP, +} + +impl ToString for ContainerImageGroupType { + fn to_string(&self) -> String { + match self { + Self::CONTAINER_IMAGE_GROUP => String::from("container_image_group"), + } + } +} diff --git a/src/datadogV2/model/model_container_image_item.rs b/src/datadogV2/model/model_container_image_item.rs new file mode 100644 index 000000000..1b1f75171 --- /dev/null +++ b/src/datadogV2/model/model_container_image_item.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Possible Container Image models. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ContainerImageItem { + ContainerImage(Box), + ContainerImageGroup(Box), +} diff --git a/src/datadogV2/model/model_container_image_meta.rs b/src/datadogV2/model/model_container_image_meta.rs new file mode 100644 index 000000000..c08df1647 --- /dev/null +++ b/src/datadogV2/model/model_container_image_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response metadata object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageMeta { + /// Paging attributes. + #[serde(rename = "pagination")] + pub pagination: Option>, +} + +impl ContainerImageMeta { + pub fn new() -> ContainerImageMeta { + ContainerImageMeta { pagination: None } + } +} diff --git a/src/datadogV2/model/model_container_image_meta_page.rs b/src/datadogV2/model/model_container_image_meta_page.rs new file mode 100644 index 000000000..794aba8e6 --- /dev/null +++ b/src/datadogV2/model/model_container_image_meta_page.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageMetaPage { + /// The cursor used to get the current results, if any. + #[serde(rename = "cursor")] + pub cursor: Option, + /// Number of results returned + #[serde(rename = "limit")] + pub limit: Option, + /// The cursor used to get the next results, if any. + #[serde(rename = "next_cursor")] + pub next_cursor: Option, + /// The cursor used to get the previous results, if any. + #[serde( + rename = "prev_cursor", + default, + with = "::serde_with::rust::double_option" + )] + pub prev_cursor: Option>, + /// Total number of records that match the query. + #[serde(rename = "total")] + pub total: Option, + /// Type of Container Image pagination. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ContainerImageMetaPage { + pub fn new() -> ContainerImageMetaPage { + ContainerImageMetaPage { + cursor: None, + limit: None, + next_cursor: None, + prev_cursor: None, + total: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_container_image_meta_page_type.rs b/src/datadogV2/model/model_container_image_meta_page_type.rs new file mode 100644 index 000000000..ee60ceee8 --- /dev/null +++ b/src/datadogV2/model/model_container_image_meta_page_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ContainerImageMetaPageType { + #[serde(rename = "cursor_limit")] + CURSOR_LIMIT, +} + +impl ToString for ContainerImageMetaPageType { + fn to_string(&self) -> String { + match self { + Self::CURSOR_LIMIT => String::from("cursor_limit"), + } + } +} diff --git a/src/datadogV2/model/model_container_image_type.rs b/src/datadogV2/model/model_container_image_type.rs new file mode 100644 index 000000000..b2e050e73 --- /dev/null +++ b/src/datadogV2/model/model_container_image_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ContainerImageType { + #[serde(rename = "container_image")] + CONTAINER_IMAGE, +} + +impl ToString for ContainerImageType { + fn to_string(&self) -> String { + match self { + Self::CONTAINER_IMAGE => String::from("container_image"), + } + } +} diff --git a/src/datadogV2/model/model_container_image_vulnerabilities.rs b/src/datadogV2/model/model_container_image_vulnerabilities.rs new file mode 100644 index 000000000..a0aaba1d6 --- /dev/null +++ b/src/datadogV2/model/model_container_image_vulnerabilities.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Vulnerability counts associated with the Container Image. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImageVulnerabilities { + /// ID of the Container Image. + #[serde(rename = "asset_id")] + pub asset_id: Option, + /// Number of vulnerabilities with CVSS Critical severity. + #[serde(rename = "critical")] + pub critical: Option, + /// Number of vulnerabilities with CVSS High severity. + #[serde(rename = "high")] + pub high: Option, + /// Number of vulnerabilities with CVSS Low severity. + #[serde(rename = "low")] + pub low: Option, + /// Number of vulnerabilities with CVSS Medium severity. + #[serde(rename = "medium")] + pub medium: Option, + /// Number of vulnerabilities with CVSS None severity. + #[serde(rename = "none")] + pub none: Option, + /// Number of vulnerabilities with an unknown CVSS severity. + #[serde(rename = "unknown")] + pub unknown: Option, +} + +impl ContainerImageVulnerabilities { + pub fn new() -> ContainerImageVulnerabilities { + ContainerImageVulnerabilities { + asset_id: None, + critical: None, + high: None, + low: None, + medium: None, + none: None, + unknown: None, + } + } +} diff --git a/src/datadogV2/model/model_container_images_response.rs b/src/datadogV2/model/model_container_images_response.rs new file mode 100644 index 000000000..0b50ce7e8 --- /dev/null +++ b/src/datadogV2/model/model_container_images_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of Container Images. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImagesResponse { + /// Array of Container Image objects. + #[serde(rename = "data")] + pub data: Option>, + /// Pagination links. + #[serde(rename = "links")] + pub links: Option>, + /// Response metadata object. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl ContainerImagesResponse { + pub fn new() -> ContainerImagesResponse { + ContainerImagesResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_container_images_response_links.rs b/src/datadogV2/model/model_container_images_response_links.rs new file mode 100644 index 000000000..fc9ad5966 --- /dev/null +++ b/src/datadogV2/model/model_container_images_response_links.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pagination links. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerImagesResponseLinks { + /// Link to the first page. + #[serde(rename = "first")] + pub first: Option, + /// Link to the last page. + #[serde(rename = "last", default, with = "::serde_with::rust::double_option")] + pub last: Option>, + /// Link to the next page. + #[serde(rename = "next", default, with = "::serde_with::rust::double_option")] + pub next: Option>, + /// Link to previous page. + #[serde(rename = "prev", default, with = "::serde_with::rust::double_option")] + pub prev: Option>, + /// Link to current page. + #[serde(rename = "self")] + pub self_: Option, +} + +impl ContainerImagesResponseLinks { + pub fn new() -> ContainerImagesResponseLinks { + ContainerImagesResponseLinks { + first: None, + last: None, + next: None, + prev: None, + self_: None, + } + } +} diff --git a/src/datadogV2/model/model_container_item.rs b/src/datadogV2/model/model_container_item.rs new file mode 100644 index 000000000..11146742c --- /dev/null +++ b/src/datadogV2/model/model_container_item.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Possible Container models. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ContainerItem { + Container(Box), + ContainerGroup(Box), +} diff --git a/src/datadogV2/model/model_container_meta.rs b/src/datadogV2/model/model_container_meta.rs new file mode 100644 index 000000000..3e4b20306 --- /dev/null +++ b/src/datadogV2/model/model_container_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response metadata object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerMeta { + /// Paging attributes. + #[serde(rename = "pagination")] + pub pagination: Option>, +} + +impl ContainerMeta { + pub fn new() -> ContainerMeta { + ContainerMeta { pagination: None } + } +} diff --git a/src/datadogV2/model/model_container_meta_page.rs b/src/datadogV2/model/model_container_meta_page.rs new file mode 100644 index 000000000..5be6970a6 --- /dev/null +++ b/src/datadogV2/model/model_container_meta_page.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainerMetaPage { + /// The cursor used to get the current results, if any. + #[serde(rename = "cursor")] + pub cursor: Option, + /// Number of results returned + #[serde(rename = "limit")] + pub limit: Option, + /// The cursor used to get the next results, if any. + #[serde(rename = "next_cursor")] + pub next_cursor: Option, + /// The cursor used to get the previous results, if any. + #[serde( + rename = "prev_cursor", + default, + with = "::serde_with::rust::double_option" + )] + pub prev_cursor: Option>, + /// Total number of records that match the query. + #[serde(rename = "total")] + pub total: Option, + /// Type of Container pagination. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ContainerMetaPage { + pub fn new() -> ContainerMetaPage { + ContainerMetaPage { + cursor: None, + limit: None, + next_cursor: None, + prev_cursor: None, + total: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_container_meta_page_type.rs b/src/datadogV2/model/model_container_meta_page_type.rs new file mode 100644 index 000000000..293dbfb66 --- /dev/null +++ b/src/datadogV2/model/model_container_meta_page_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ContainerMetaPageType { + #[serde(rename = "cursor_limit")] + CURSOR_LIMIT, +} + +impl ToString for ContainerMetaPageType { + fn to_string(&self) -> String { + match self { + Self::CURSOR_LIMIT => String::from("cursor_limit"), + } + } +} diff --git a/src/datadogV2/model/model_container_type.rs b/src/datadogV2/model/model_container_type.rs new file mode 100644 index 000000000..280d3afb0 --- /dev/null +++ b/src/datadogV2/model/model_container_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ContainerType { + #[serde(rename = "container")] + CONTAINER, +} + +impl ToString for ContainerType { + fn to_string(&self) -> String { + match self { + Self::CONTAINER => String::from("container"), + } + } +} diff --git a/src/datadogV2/model/model_containers_response.rs b/src/datadogV2/model/model_containers_response.rs new file mode 100644 index 000000000..d0cdb0799 --- /dev/null +++ b/src/datadogV2/model/model_containers_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of containers. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainersResponse { + /// Array of Container objects. + #[serde(rename = "data")] + pub data: Option>, + /// Pagination links. + #[serde(rename = "links")] + pub links: Option>, + /// Response metadata object. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl ContainersResponse { + pub fn new() -> ContainersResponse { + ContainersResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_containers_response_links.rs b/src/datadogV2/model/model_containers_response_links.rs new file mode 100644 index 000000000..7e9f0a4ad --- /dev/null +++ b/src/datadogV2/model/model_containers_response_links.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pagination links. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ContainersResponseLinks { + /// Link to the first page. + #[serde(rename = "first")] + pub first: Option, + /// Link to the last page. + #[serde(rename = "last", default, with = "::serde_with::rust::double_option")] + pub last: Option>, + /// Link to the next page. + #[serde(rename = "next", default, with = "::serde_with::rust::double_option")] + pub next: Option>, + /// Link to previous page. + #[serde(rename = "prev", default, with = "::serde_with::rust::double_option")] + pub prev: Option>, + /// Link to current page. + #[serde(rename = "self")] + pub self_: Option, +} + +impl ContainersResponseLinks { + pub fn new() -> ContainersResponseLinks { + ContainersResponseLinks { + first: None, + last: None, + next: None, + prev: None, + self_: None, + } + } +} diff --git a/src/datadogV2/model/model_content_encoding.rs b/src/datadogV2/model/model_content_encoding.rs index 11f72b34b..e8f69720e 100644 --- a/src/datadogV2/model/model_content_encoding.rs +++ b/src/datadogV2/model/model_content_encoding.rs @@ -23,9 +23,3 @@ impl ToString for ContentEncoding { } } } - -impl Default for ContentEncoding { - fn default() -> ContentEncoding { - Self::IDENTITY - } -} diff --git a/src/datadogV2/model/model_cost_attribution_aggregates_body.rs b/src/datadogV2/model/model_cost_attribution_aggregates_body.rs new file mode 100644 index 000000000..8b2847f5a --- /dev/null +++ b/src/datadogV2/model/model_cost_attribution_aggregates_body.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object containing the aggregates. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CostAttributionAggregatesBody { + /// The aggregate type. + #[serde(rename = "agg_type")] + pub agg_type: Option, + /// The field. + #[serde(rename = "field")] + pub field: Option, + /// The value for a given field. + #[serde(rename = "value")] + pub value: Option, +} + +impl CostAttributionAggregatesBody { + pub fn new() -> CostAttributionAggregatesBody { + CostAttributionAggregatesBody { + agg_type: None, + field: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_cost_attribution_type.rs b/src/datadogV2/model/model_cost_attribution_type.rs new file mode 100644 index 000000000..7e2fa4c97 --- /dev/null +++ b/src/datadogV2/model/model_cost_attribution_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum CostAttributionType { + #[serde(rename = "cost_by_tag")] + COST_BY_TAG, +} + +impl ToString for CostAttributionType { + fn to_string(&self) -> String { + match self { + Self::COST_BY_TAG => String::from("cost_by_tag"), + } + } +} diff --git a/src/datadogV2/model/model_cost_by_org.rs b/src/datadogV2/model/model_cost_by_org.rs index ee17e3800..f83217970 100644 --- a/src/datadogV2/model/model_cost_by_org.rs +++ b/src/datadogV2/model/model_cost_by_org.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Cost data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CostByOrg { /// Cost attributes data. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_cost_by_org_attributes.rs b/src/datadogV2/model/model_cost_by_org_attributes.rs index 0d608a9e4..a08dc95d2 100644 --- a/src/datadogV2/model/model_cost_by_org_attributes.rs +++ b/src/datadogV2/model/model_cost_by_org_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Cost attributes data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CostByOrgAttributes { /// List of charges data reported for the requested month. #[serde(rename = "charges")] diff --git a/src/datadogV2/model/model_cost_by_org_response.rs b/src/datadogV2/model/model_cost_by_org_response.rs index 1d0bdce1f..274284851 100644 --- a/src/datadogV2/model/model_cost_by_org_response.rs +++ b/src/datadogV2/model/model_cost_by_org_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Chargeback Summary response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CostByOrgResponse { /// Response containing Chargeback Summary. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_cost_by_org_type.rs b/src/datadogV2/model/model_cost_by_org_type.rs index 7e81c4610..448d6eaf9 100644 --- a/src/datadogV2/model/model_cost_by_org_type.rs +++ b/src/datadogV2/model/model_cost_by_org_type.rs @@ -17,9 +17,3 @@ impl ToString for CostByOrgType { } } } - -impl Default for CostByOrgType { - fn default() -> CostByOrgType { - Self::COST_BY_ORG - } -} diff --git a/src/datadogV2/model/model_create_rule_request.rs b/src/datadogV2/model/model_create_rule_request.rs new file mode 100644 index 000000000..bddb947dd --- /dev/null +++ b/src/datadogV2/model/model_create_rule_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard create rule request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateRuleRequest { + /// Scorecard create rule request data. + #[serde(rename = "data")] + pub data: Option>, +} + +impl CreateRuleRequest { + pub fn new() -> CreateRuleRequest { + CreateRuleRequest { data: None } + } +} diff --git a/src/datadogV2/model/model_create_rule_request_data.rs b/src/datadogV2/model/model_create_rule_request_data.rs new file mode 100644 index 000000000..13e1e6147 --- /dev/null +++ b/src/datadogV2/model/model_create_rule_request_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard create rule request data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateRuleRequestData { + /// Details of a rule. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The JSON:API type for scorecard rules. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CreateRuleRequestData { + pub fn new() -> CreateRuleRequestData { + CreateRuleRequestData { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_create_rule_response.rs b/src/datadogV2/model/model_create_rule_response.rs new file mode 100644 index 000000000..fb273407e --- /dev/null +++ b/src/datadogV2/model/model_create_rule_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Created rule in response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateRuleResponse { + /// Create rule response data. + #[serde(rename = "data")] + pub data: Option>, +} + +impl CreateRuleResponse { + pub fn new() -> CreateRuleResponse { + CreateRuleResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_create_rule_response_data.rs b/src/datadogV2/model/model_create_rule_response_data.rs new file mode 100644 index 000000000..47c824bca --- /dev/null +++ b/src/datadogV2/model/model_create_rule_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create rule response data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateRuleResponseData { + /// Details of a rule. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique ID for a scorecard rule. + #[serde(rename = "id")] + pub id: Option, + /// Scorecard create rule response relationship. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// The JSON:API type for scorecard rules. + #[serde(rename = "type")] + pub type_: Option, +} + +impl CreateRuleResponseData { + pub fn new() -> CreateRuleResponseData { + CreateRuleResponseData { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_creator.rs b/src/datadogV2/model/model_creator.rs index ee9303c98..3c1b4313a 100644 --- a/src/datadogV2/model/model_creator.rs +++ b/src/datadogV2/model/model_creator.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Creator of the object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Creator { /// Email of the creator. #[serde(rename = "email")] diff --git a/src/datadogV2/model/model_dashboard_list_add_items_request.rs b/src/datadogV2/model/model_dashboard_list_add_items_request.rs index 4e3b6705e..147b8a355 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Request containing a list of dashboards to add. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListAddItemsRequest { /// List of dashboards to add the dashboard list. #[serde(rename = "dashboards")] diff --git a/src/datadogV2/model/model_dashboard_list_add_items_response.rs b/src/datadogV2/model/model_dashboard_list_add_items_response.rs index 75e7e53b0..4fcfef3bb 100644 --- a/src/datadogV2/model/model_dashboard_list_add_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_add_items_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing a list of added dashboards. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListAddItemsResponse { /// List of dashboards added to the dashboard list. #[serde(rename = "added_dashboards_to_list")] diff --git a/src/datadogV2/model/model_dashboard_list_delete_items_request.rs b/src/datadogV2/model/model_dashboard_list_delete_items_request.rs index 6287ee5f0..55989c9ff 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Request containing a list of dashboards to delete. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListDeleteItemsRequest { /// List of dashboards to delete from the dashboard list. #[serde(rename = "dashboards")] diff --git a/src/datadogV2/model/model_dashboard_list_delete_items_response.rs b/src/datadogV2/model/model_dashboard_list_delete_items_response.rs index f44556b2b..351d5dbd1 100644 --- a/src/datadogV2/model/model_dashboard_list_delete_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_delete_items_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing a list of deleted dashboards. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListDeleteItemsResponse { /// List of dashboards deleted from the dashboard list. #[serde(rename = "deleted_dashboards_from_list")] diff --git a/src/datadogV2/model/model_dashboard_list_item.rs b/src/datadogV2/model/model_dashboard_list_item.rs index 87f7e201d..2bf9b0795 100644 --- a/src/datadogV2/model/model_dashboard_list_item.rs +++ b/src/datadogV2/model/model_dashboard_list_item.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A dashboard within a list. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListItem { /// Creator of the object. #[serde(rename = "author")] diff --git a/src/datadogV2/model/model_dashboard_list_item_request.rs b/src/datadogV2/model/model_dashboard_list_item_request.rs index a6589410e..84831e5ab 100644 --- a/src/datadogV2/model/model_dashboard_list_item_request.rs +++ b/src/datadogV2/model/model_dashboard_list_item_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A dashboard within a list. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListItemRequest { /// ID of the dashboard. #[serde(rename = "id")] diff --git a/src/datadogV2/model/model_dashboard_list_item_response.rs b/src/datadogV2/model/model_dashboard_list_item_response.rs index 04825ce23..5f41106df 100644 --- a/src/datadogV2/model/model_dashboard_list_item_response.rs +++ b/src/datadogV2/model/model_dashboard_list_item_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A dashboard within a list. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListItemResponse { /// ID of the dashboard. #[serde(rename = "id")] diff --git a/src/datadogV2/model/model_dashboard_list_items.rs b/src/datadogV2/model/model_dashboard_list_items.rs index 6cd84b33c..cf30363a3 100644 --- a/src/datadogV2/model/model_dashboard_list_items.rs +++ b/src/datadogV2/model/model_dashboard_list_items.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Dashboards within a list. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListItems { /// List of dashboards in the dashboard list. #[serde(rename = "dashboards")] diff --git a/src/datadogV2/model/model_dashboard_list_update_items_request.rs b/src/datadogV2/model/model_dashboard_list_update_items_request.rs index b75739ad7..5f6d900c5 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_request.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Request containing the list of dashboards to update to. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListUpdateItemsRequest { /// List of dashboards to update the dashboard list to. #[serde(rename = "dashboards")] diff --git a/src/datadogV2/model/model_dashboard_list_update_items_response.rs b/src/datadogV2/model/model_dashboard_list_update_items_response.rs index 1af0587a7..222c02e8e 100644 --- a/src/datadogV2/model/model_dashboard_list_update_items_response.rs +++ b/src/datadogV2/model/model_dashboard_list_update_items_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing a list of updated dashboards. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DashboardListUpdateItemsResponse { /// List of dashboards in the dashboard list. #[serde(rename = "dashboards")] diff --git a/src/datadogV2/model/model_dashboard_type.rs b/src/datadogV2/model/model_dashboard_type.rs index 2ba607a03..38ea1999c 100644 --- a/src/datadogV2/model/model_dashboard_type.rs +++ b/src/datadogV2/model/model_dashboard_type.rs @@ -29,9 +29,3 @@ impl ToString for DashboardType { } } } - -impl Default for DashboardType { - fn default() -> DashboardType { - Self::CUSTOM_TIMEBOARD - } -} diff --git a/src/datadogV2/model/model_data_scalar_column.rs b/src/datadogV2/model/model_data_scalar_column.rs new file mode 100644 index 000000000..7f9ac2973 --- /dev/null +++ b/src/datadogV2/model/model_data_scalar_column.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A column containing the numerical results for a formula or query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DataScalarColumn { + /// Metadata for the resulting numerical values. + #[serde(rename = "meta")] + pub meta: Option>, + /// The name referencing the formula or query for this column. + #[serde(rename = "name")] + pub name: Option, + /// The type of column present for numbers. + #[serde(rename = "type")] + pub type_: Option, + /// The array of numerical values for one formula or query. + #[serde(rename = "values")] + pub values: Option>>, +} + +impl DataScalarColumn { + pub fn new() -> DataScalarColumn { + DataScalarColumn { + meta: None, + name: None, + type_: None, + values: None, + } + } +} diff --git a/src/datadogV2/model/model_detailed_finding.rs b/src/datadogV2/model/model_detailed_finding.rs index 0a167ab8c..e8fd339d1 100644 --- a/src/datadogV2/model/model_detailed_finding.rs +++ b/src/datadogV2/model/model_detailed_finding.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A single finding with with message and resource configuration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DetailedFinding { /// The JSON:API attributes of the detailed finding. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_detailed_finding_attributes.rs b/src/datadogV2/model/model_detailed_finding_attributes.rs index 4c67482aa..a460a2e76 100644 --- a/src/datadogV2/model/model_detailed_finding_attributes.rs +++ b/src/datadogV2/model/model_detailed_finding_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The JSON:API attributes of the detailed finding. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DetailedFindingAttributes { /// The evaluation of the finding. #[serde(rename = "evaluation")] diff --git a/src/datadogV2/model/model_detailed_finding_type.rs b/src/datadogV2/model/model_detailed_finding_type.rs index 1b95316ec..866c98bbe 100644 --- a/src/datadogV2/model/model_detailed_finding_type.rs +++ b/src/datadogV2/model/model_detailed_finding_type.rs @@ -17,9 +17,3 @@ impl ToString for DetailedFindingType { } } } - -impl Default for DetailedFindingType { - fn default() -> DetailedFindingType { - Self::DETAILED_FINDING - } -} diff --git a/src/datadogV2/model/model_dora_deployment_request.rs b/src/datadogV2/model/model_dora_deployment_request.rs new file mode 100644 index 000000000..6a5d1387b --- /dev/null +++ b/src/datadogV2/model/model_dora_deployment_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request to create a DORA deployment event. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORADeploymentRequest { + /// The JSON:API data. + #[serde(rename = "data")] + pub data: Box, +} + +impl DORADeploymentRequest { + pub fn new( + data: Box, + ) -> DORADeploymentRequest { + DORADeploymentRequest { data } + } +} diff --git a/src/datadogV2/model/model_dora_deployment_request_attributes.rs b/src/datadogV2/model/model_dora_deployment_request_attributes.rs new file mode 100644 index 000000000..82b74b143 --- /dev/null +++ b/src/datadogV2/model/model_dora_deployment_request_attributes.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes to create a DORA deployment event. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORADeploymentRequestAttributes { + /// Unix timestamp in nanoseconds when the deployment finished. It should not be older than 3 hours. + #[serde(rename = "finished_at")] + pub finished_at: i64, + /// Git info for DORA Metrics events. + #[serde(rename = "git")] + pub git: Option>, + /// Deployment ID. + #[serde(rename = "id")] + pub id: Option, + /// Service name from a service available in the Service Catalog. + #[serde(rename = "service")] + pub service: String, + /// Unix timestamp in nanoseconds when the deployment started. + #[serde(rename = "started_at")] + pub started_at: i64, + /// Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/). + #[serde(rename = "version")] + pub version: Option, +} + +impl DORADeploymentRequestAttributes { + pub fn new( + finished_at: i64, + service: String, + started_at: i64, + ) -> DORADeploymentRequestAttributes { + DORADeploymentRequestAttributes { + finished_at, + git: None, + id: None, + service, + started_at, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_dora_deployment_request_data.rs b/src/datadogV2/model/model_dora_deployment_request_data.rs new file mode 100644 index 000000000..72c907fde --- /dev/null +++ b/src/datadogV2/model/model_dora_deployment_request_data.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORADeploymentRequestData { + /// Attributes to create a DORA deployment event. + #[serde(rename = "attributes")] + pub attributes: Box, +} + +impl DORADeploymentRequestData { + pub fn new( + attributes: Box, + ) -> DORADeploymentRequestData { + DORADeploymentRequestData { attributes } + } +} diff --git a/src/datadogV2/model/model_dora_deployment_response.rs b/src/datadogV2/model/model_dora_deployment_response.rs new file mode 100644 index 000000000..e601f0525 --- /dev/null +++ b/src/datadogV2/model/model_dora_deployment_response.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response after receiving a DORA deployment event. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORADeploymentResponse { + /// The JSON:API data. + #[serde(rename = "data")] + pub data: Box, +} + +impl DORADeploymentResponse { + pub fn new( + data: Box, + ) -> DORADeploymentResponse { + DORADeploymentResponse { data } + } +} diff --git a/src/datadogV2/model/model_dora_deployment_response_data.rs b/src/datadogV2/model/model_dora_deployment_response_data.rs new file mode 100644 index 000000000..9489070e5 --- /dev/null +++ b/src/datadogV2/model/model_dora_deployment_response_data.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORADeploymentResponseData { + /// The ID of the received DORA deployment event. + #[serde(rename = "id")] + pub id: String, + /// JSON:API type for DORA deployment events. + #[serde(rename = "type")] + pub type_: Option, +} + +impl DORADeploymentResponseData { + pub fn new(id: String) -> DORADeploymentResponseData { + DORADeploymentResponseData { id, type_: None } + } +} diff --git a/src/datadogV2/model/model_dora_deployment_type.rs b/src/datadogV2/model/model_dora_deployment_type.rs new file mode 100644 index 000000000..ebb2148ed --- /dev/null +++ b/src/datadogV2/model/model_dora_deployment_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DORADeploymentType { + #[serde(rename = "dora_deployment")] + DORA_DEPLOYMENT, +} + +impl ToString for DORADeploymentType { + fn to_string(&self) -> String { + match self { + Self::DORA_DEPLOYMENT => String::from("dora_deployment"), + } + } +} diff --git a/src/datadogV2/model/model_dora_git_info.rs b/src/datadogV2/model/model_dora_git_info.rs new file mode 100644 index 000000000..2cd06e104 --- /dev/null +++ b/src/datadogV2/model/model_dora_git_info.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Git info for DORA Metrics events. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORAGitInfo { + /// Git Commit SHA. + #[serde(rename = "commit_sha")] + pub commit_sha: String, + /// Git Repository URL + #[serde(rename = "repository_url")] + pub repository_url: String, +} + +impl DORAGitInfo { + pub fn new(commit_sha: String, repository_url: String) -> DORAGitInfo { + DORAGitInfo { + commit_sha, + repository_url, + } + } +} diff --git a/src/datadogV2/model/model_dora_incident_request.rs b/src/datadogV2/model/model_dora_incident_request.rs new file mode 100644 index 000000000..03376efe9 --- /dev/null +++ b/src/datadogV2/model/model_dora_incident_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request to create a DORA incident event. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORAIncidentRequest { + /// The JSON:API data. + #[serde(rename = "data")] + pub data: Box, +} + +impl DORAIncidentRequest { + pub fn new(data: Box) -> DORAIncidentRequest { + DORAIncidentRequest { data } + } +} diff --git a/src/datadogV2/model/model_dora_incident_request_attributes.rs b/src/datadogV2/model/model_dora_incident_request_attributes.rs new file mode 100644 index 000000000..fceef9aa8 --- /dev/null +++ b/src/datadogV2/model/model_dora_incident_request_attributes.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes to create a DORA incident event. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORAIncidentRequestAttributes { + /// Unix timestamp in nanoseconds when the incident finished. It should not be older than 3 hours. + #[serde(rename = "finished_at")] + pub finished_at: Option, + /// Git info for DORA Metrics events. + #[serde(rename = "git")] + pub git: Option>, + /// Incident ID + #[serde(rename = "id")] + pub id: Option, + /// Incident name. + #[serde(rename = "name")] + pub name: Option, + /// Service name from a service available in the Service Catalog. + #[serde(rename = "service")] + pub service: String, + /// Incident severity. + #[serde(rename = "severity")] + pub severity: Option, + /// Unix timestamp in nanoseconds when the incident started. + #[serde(rename = "started_at")] + pub started_at: i64, + /// Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/). + #[serde(rename = "version")] + pub version: Option, +} + +impl DORAIncidentRequestAttributes { + pub fn new(service: String, started_at: i64) -> DORAIncidentRequestAttributes { + DORAIncidentRequestAttributes { + finished_at: None, + git: None, + id: None, + name: None, + service, + severity: None, + started_at, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_dora_incident_request_data.rs b/src/datadogV2/model/model_dora_incident_request_data.rs new file mode 100644 index 000000000..4b7baa5b3 --- /dev/null +++ b/src/datadogV2/model/model_dora_incident_request_data.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORAIncidentRequestData { + /// Attributes to create a DORA incident event. + #[serde(rename = "attributes")] + pub attributes: Box, +} + +impl DORAIncidentRequestData { + pub fn new( + attributes: Box, + ) -> DORAIncidentRequestData { + DORAIncidentRequestData { attributes } + } +} diff --git a/src/datadogV2/model/model_dora_incident_response.rs b/src/datadogV2/model/model_dora_incident_response.rs new file mode 100644 index 000000000..63c013c54 --- /dev/null +++ b/src/datadogV2/model/model_dora_incident_response.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response after receiving a DORA incident event. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORAIncidentResponse { + /// Response after receiving a DORA incident event. + #[serde(rename = "data")] + pub data: Box, +} + +impl DORAIncidentResponse { + pub fn new( + data: Box, + ) -> DORAIncidentResponse { + DORAIncidentResponse { data } + } +} diff --git a/src/datadogV2/model/model_dora_incident_response_data.rs b/src/datadogV2/model/model_dora_incident_response_data.rs new file mode 100644 index 000000000..24ee768ae --- /dev/null +++ b/src/datadogV2/model/model_dora_incident_response_data.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response after receiving a DORA incident event. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DORAIncidentResponseData { + /// The ID of the received DORA incident event. + #[serde(rename = "id")] + pub id: String, + /// JSON:API type for DORA incident events. + #[serde(rename = "type")] + pub type_: Option, +} + +impl DORAIncidentResponseData { + pub fn new(id: String) -> DORAIncidentResponseData { + DORAIncidentResponseData { id, type_: None } + } +} diff --git a/src/datadogV2/model/model_dora_incident_type.rs b/src/datadogV2/model/model_dora_incident_type.rs new file mode 100644 index 000000000..4a5705a81 --- /dev/null +++ b/src/datadogV2/model/model_dora_incident_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DORAIncidentType { + #[serde(rename = "dora_incident")] + DORA_INCIDENT, +} + +impl ToString for DORAIncidentType { + fn to_string(&self) -> String { + match self { + Self::DORA_INCIDENT => String::from("dora_incident"), + } + } +} diff --git a/src/datadogV2/model/model_downtime_create_request.rs b/src/datadogV2/model/model_downtime_create_request.rs new file mode 100644 index 000000000..56feccb99 --- /dev/null +++ b/src/datadogV2/model/model_downtime_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request for creating a downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeCreateRequest { + /// Object to create a downtime. + #[serde(rename = "data")] + pub data: Box, +} + +impl DowntimeCreateRequest { + pub fn new( + data: Box, + ) -> DowntimeCreateRequest { + DowntimeCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_downtime_create_request_attributes.rs b/src/datadogV2/model/model_downtime_create_request_attributes.rs new file mode 100644 index 000000000..e0e87f799 --- /dev/null +++ b/src/datadogV2/model/model_downtime_create_request_attributes.rs @@ -0,0 +1,63 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Downtime details. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeCreateRequestAttributes { + /// The timezone in which to display the downtime's start and end times in Datadog applications. This is not used + /// as an offset for scheduling. + #[serde( + rename = "display_timezone", + default, + with = "::serde_with::rust::double_option" + )] + pub display_timezone: Option>, + /// A message to include with notifications for this downtime. Email notifications can be sent to specific users + /// by using the same `@username` notation as events. + #[serde( + rename = "message", + default, + with = "::serde_with::rust::double_option" + )] + pub message: Option>, + /// Monitor identifier for the downtime. + #[serde(rename = "monitor_identifier")] + pub monitor_identifier: Box, + /// If the first recovery notification during a downtime should be muted. + #[serde(rename = "mute_first_recovery_notification")] + pub mute_first_recovery_notification: Option, + /// States that will trigger a monitor notification when the `notify_end_types` action occurs. + #[serde(rename = "notify_end_states")] + pub notify_end_states: Option>, + /// Actions that will trigger a monitor notification if the downtime is in the `notify_end_types` state. + #[serde(rename = "notify_end_types")] + pub notify_end_types: Option>, + /// Schedule for the downtime. + #[serde(rename = "schedule")] + pub schedule: Option>, + /// The scope to which the downtime applies. Must follow the [common search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). + #[serde(rename = "scope")] + pub scope: String, +} + +impl DowntimeCreateRequestAttributes { + pub fn new( + monitor_identifier: Box, + scope: String, + ) -> DowntimeCreateRequestAttributes { + DowntimeCreateRequestAttributes { + display_timezone: None, + message: None, + monitor_identifier, + mute_first_recovery_notification: None, + notify_end_states: None, + notify_end_types: None, + schedule: None, + scope, + } + } +} diff --git a/src/datadogV2/model/model_downtime_create_request_data.rs b/src/datadogV2/model/model_downtime_create_request_data.rs new file mode 100644 index 000000000..b214a41ad --- /dev/null +++ b/src/datadogV2/model/model_downtime_create_request_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to create a downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeCreateRequestData { + /// Downtime details. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Downtime resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::DowntimeResourceType, +} + +impl DowntimeCreateRequestData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::DowntimeResourceType, + ) -> DowntimeCreateRequestData { + DowntimeCreateRequestData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_downtime_included_monitor_type.rs b/src/datadogV2/model/model_downtime_included_monitor_type.rs new file mode 100644 index 000000000..c99eff311 --- /dev/null +++ b/src/datadogV2/model/model_downtime_included_monitor_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DowntimeIncludedMonitorType { + #[serde(rename = "monitors")] + MONITORS, +} + +impl ToString for DowntimeIncludedMonitorType { + fn to_string(&self) -> String { + match self { + Self::MONITORS => String::from("monitors"), + } + } +} diff --git a/src/datadogV2/model/model_downtime_meta.rs b/src/datadogV2/model/model_downtime_meta.rs new file mode 100644 index 000000000..889144718 --- /dev/null +++ b/src/datadogV2/model/model_downtime_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pagination metadata returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeMeta { + /// Object containing the total filtered count. + #[serde(rename = "page")] + pub page: Option>, +} + +impl DowntimeMeta { + pub fn new() -> DowntimeMeta { + DowntimeMeta { page: None } + } +} diff --git a/src/datadogV2/model/model_downtime_meta_page.rs b/src/datadogV2/model/model_downtime_meta_page.rs new file mode 100644 index 000000000..306765231 --- /dev/null +++ b/src/datadogV2/model/model_downtime_meta_page.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the total filtered count. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeMetaPage { + /// Total count of elements matched by the filter. + #[serde(rename = "total_filtered_count")] + pub total_filtered_count: Option, +} + +impl DowntimeMetaPage { + pub fn new() -> DowntimeMetaPage { + DowntimeMetaPage { + total_filtered_count: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_monitor_identifier.rs b/src/datadogV2/model/model_downtime_monitor_identifier.rs new file mode 100644 index 000000000..590be8eb6 --- /dev/null +++ b/src/datadogV2/model/model_downtime_monitor_identifier.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Monitor identifier for the downtime. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DowntimeMonitorIdentifier { + DowntimeMonitorIdentifierId(Box), + DowntimeMonitorIdentifierTags(Box), +} diff --git a/src/datadogV2/model/model_downtime_monitor_identifier_id.rs b/src/datadogV2/model/model_downtime_monitor_identifier_id.rs new file mode 100644 index 000000000..712c98bef --- /dev/null +++ b/src/datadogV2/model/model_downtime_monitor_identifier_id.rs @@ -0,0 +1,25 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object of the monitor identifier. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeMonitorIdentifierId { + /// ID of the monitor to prevent notifications. + #[serde(rename = "monitor_id")] + pub monitor_id: i64, + #[serde(flatten)] + pub additional_properties: std::collections::HashMap, +} + +impl DowntimeMonitorIdentifierId { + pub fn new(monitor_id: i64) -> DowntimeMonitorIdentifierId { + DowntimeMonitorIdentifierId { + monitor_id, + additional_properties: std::collections::HashMap::new(), + } + } +} diff --git a/src/datadogV2/model/model_downtime_monitor_identifier_tags.rs b/src/datadogV2/model/model_downtime_monitor_identifier_tags.rs new file mode 100644 index 000000000..f2f7b8e85 --- /dev/null +++ b/src/datadogV2/model/model_downtime_monitor_identifier_tags.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object of the monitor tags. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeMonitorIdentifierTags { + /// A list of monitor tags. For example, tags that are applied directly to monitors, + /// not tags that are used in monitor queries (which are filtered by the scope parameter), to which the downtime applies. + /// The resulting downtime applies to monitors that match **all** provided monitor tags. Setting `monitor_tags` + /// to `[*]` configures the downtime to mute all monitors for the given scope. + #[serde(rename = "monitor_tags")] + pub monitor_tags: Vec, + #[serde(flatten)] + pub additional_properties: std::collections::HashMap, +} + +impl DowntimeMonitorIdentifierTags { + pub fn new(monitor_tags: Vec) -> DowntimeMonitorIdentifierTags { + DowntimeMonitorIdentifierTags { + monitor_tags, + additional_properties: std::collections::HashMap::new(), + } + } +} diff --git a/src/datadogV2/model/model_downtime_monitor_included_attributes.rs b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs new file mode 100644 index 000000000..3cd36d0f3 --- /dev/null +++ b/src/datadogV2/model/model_downtime_monitor_included_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the monitor identified by the downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeMonitorIncludedAttributes { + /// The name of the monitor identified by the downtime. + #[serde(rename = "name")] + pub name: Option, +} + +impl DowntimeMonitorIncludedAttributes { + pub fn new() -> DowntimeMonitorIncludedAttributes { + DowntimeMonitorIncludedAttributes { name: None } + } +} diff --git a/src/datadogV2/model/model_downtime_monitor_included_item.rs b/src/datadogV2/model/model_downtime_monitor_included_item.rs new file mode 100644 index 000000000..2ec597414 --- /dev/null +++ b/src/datadogV2/model/model_downtime_monitor_included_item.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Information about the monitor identified by the downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeMonitorIncludedItem { + /// Attributes of the monitor identified by the downtime. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the monitor identified by the downtime. + #[serde(rename = "id")] + pub id: Option, + /// Monitor resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl DowntimeMonitorIncludedItem { + pub fn new() -> DowntimeMonitorIncludedItem { + DowntimeMonitorIncludedItem { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_notify_end_state_actions.rs b/src/datadogV2/model/model_downtime_notify_end_state_actions.rs new file mode 100644 index 000000000..55cd07e4f --- /dev/null +++ b/src/datadogV2/model/model_downtime_notify_end_state_actions.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DowntimeNotifyEndStateActions { + #[serde(rename = "canceled")] + CANCELED, + #[serde(rename = "expired")] + EXPIRED, +} + +impl ToString for DowntimeNotifyEndStateActions { + fn to_string(&self) -> String { + match self { + Self::CANCELED => String::from("canceled"), + Self::EXPIRED => String::from("expired"), + } + } +} diff --git a/src/datadogV2/model/model_downtime_notify_end_state_types.rs b/src/datadogV2/model/model_downtime_notify_end_state_types.rs new file mode 100644 index 000000000..3b5359efd --- /dev/null +++ b/src/datadogV2/model/model_downtime_notify_end_state_types.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DowntimeNotifyEndStateTypes { + #[serde(rename = "alert")] + ALERT, + #[serde(rename = "no data")] + NO_DATA, + #[serde(rename = "warn")] + WARN, +} + +impl ToString for DowntimeNotifyEndStateTypes { + fn to_string(&self) -> String { + match self { + Self::ALERT => String::from("alert"), + Self::NO_DATA => String::from("no data"), + Self::WARN => String::from("warn"), + } + } +} diff --git a/src/datadogV2/model/model_downtime_relationships.rs b/src/datadogV2/model/model_downtime_relationships.rs new file mode 100644 index 000000000..cadfbbe1b --- /dev/null +++ b/src/datadogV2/model/model_downtime_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// All relationships associated with downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeRelationships { + /// The user who created the downtime. + #[serde(rename = "created_by")] + pub created_by: Option>, + /// The monitor identified by the downtime. + #[serde(rename = "monitor")] + pub monitor: Option>, +} + +impl DowntimeRelationships { + pub fn new() -> DowntimeRelationships { + DowntimeRelationships { + created_by: None, + monitor: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_relationships_created_by.rs b/src/datadogV2/model/model_downtime_relationships_created_by.rs new file mode 100644 index 000000000..c155b3526 --- /dev/null +++ b/src/datadogV2/model/model_downtime_relationships_created_by.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The user who created the downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeRelationshipsCreatedBy { + /// Data for the user who created the downtime. + #[serde(rename = "data", default, with = "::serde_with::rust::double_option")] + pub data: Option>>, +} + +impl DowntimeRelationshipsCreatedBy { + pub fn new() -> DowntimeRelationshipsCreatedBy { + DowntimeRelationshipsCreatedBy { data: None } + } +} diff --git a/src/datadogV2/model/model_downtime_relationships_created_by_data.rs b/src/datadogV2/model/model_downtime_relationships_created_by_data.rs new file mode 100644 index 000000000..73abbc061 --- /dev/null +++ b/src/datadogV2/model/model_downtime_relationships_created_by_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data for the user who created the downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeRelationshipsCreatedByData { + /// User ID of the downtime creator. + #[serde(rename = "id")] + pub id: Option, + /// Users resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl DowntimeRelationshipsCreatedByData { + pub fn new() -> DowntimeRelationshipsCreatedByData { + DowntimeRelationshipsCreatedByData { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_relationships_monitor.rs b/src/datadogV2/model/model_downtime_relationships_monitor.rs new file mode 100644 index 000000000..68767bcda --- /dev/null +++ b/src/datadogV2/model/model_downtime_relationships_monitor.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The monitor identified by the downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeRelationshipsMonitor { + /// Data for the monitor. + #[serde(rename = "data", default, with = "::serde_with::rust::double_option")] + pub data: Option>>, +} + +impl DowntimeRelationshipsMonitor { + pub fn new() -> DowntimeRelationshipsMonitor { + DowntimeRelationshipsMonitor { data: None } + } +} diff --git a/src/datadogV2/model/model_downtime_relationships_monitor_data.rs b/src/datadogV2/model/model_downtime_relationships_monitor_data.rs new file mode 100644 index 000000000..03a839fe8 --- /dev/null +++ b/src/datadogV2/model/model_downtime_relationships_monitor_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data for the monitor. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeRelationshipsMonitorData { + /// Monitor ID of the downtime. + #[serde(rename = "id")] + pub id: Option, + /// Monitor resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl DowntimeRelationshipsMonitorData { + pub fn new() -> DowntimeRelationshipsMonitorData { + DowntimeRelationshipsMonitorData { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_resource_type.rs b/src/datadogV2/model/model_downtime_resource_type.rs new file mode 100644 index 000000000..d1878fdd6 --- /dev/null +++ b/src/datadogV2/model/model_downtime_resource_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DowntimeResourceType { + #[serde(rename = "downtime")] + DOWNTIME, +} + +impl ToString for DowntimeResourceType { + fn to_string(&self) -> String { + match self { + Self::DOWNTIME => String::from("downtime"), + } + } +} diff --git a/src/datadogV2/model/model_downtime_response.rs b/src/datadogV2/model/model_downtime_response.rs new file mode 100644 index 000000000..b32df8e37 --- /dev/null +++ b/src/datadogV2/model/model_downtime_response.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Downtiming gives you greater control over monitor notifications by +/// allowing you to globally exclude scopes from alerting. +/// Downtime settings, which can be scheduled with start and end times, +/// prevent all alerting related to specified Datadog tags. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeResponse { + /// Downtime data. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the downtime that the user requested. + #[serde(rename = "included")] + pub included: Option>, +} + +impl DowntimeResponse { + pub fn new() -> DowntimeResponse { + DowntimeResponse { + data: None, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_response_attributes.rs b/src/datadogV2/model/model_downtime_response_attributes.rs new file mode 100644 index 000000000..32fc6aa2f --- /dev/null +++ b/src/datadogV2/model/model_downtime_response_attributes.rs @@ -0,0 +1,82 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Downtime details. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeResponseAttributes { + /// Time that the downtime was canceled. + #[serde( + rename = "canceled", + default, + with = "::serde_with::rust::double_option" + )] + pub canceled: Option>, + /// Creation time of the downtime. + #[serde(rename = "created")] + pub created: Option, + /// The timezone in which to display the downtime's start and end times in Datadog applications. This is not used + /// as an offset for scheduling. + #[serde( + rename = "display_timezone", + default, + with = "::serde_with::rust::double_option" + )] + pub display_timezone: Option>, + /// A message to include with notifications for this downtime. Email notifications can be sent to specific users + /// by using the same `@username` notation as events. + #[serde( + rename = "message", + default, + with = "::serde_with::rust::double_option" + )] + pub message: Option>, + /// Time that the downtime was last modified. + #[serde(rename = "modified")] + pub modified: Option, + /// Monitor identifier for the downtime. + #[serde(rename = "monitor_identifier")] + pub monitor_identifier: Option>, + /// If the first recovery notification during a downtime should be muted. + #[serde(rename = "mute_first_recovery_notification")] + pub mute_first_recovery_notification: Option, + /// States that will trigger a monitor notification when the `notify_end_types` action occurs. + #[serde(rename = "notify_end_states")] + pub notify_end_states: Option>, + /// Actions that will trigger a monitor notification if the downtime is in the `notify_end_types` state. + #[serde(rename = "notify_end_types")] + pub notify_end_types: Option>, + /// The schedule that defines when the monitor starts, stops, and recurs. There are two types of schedules: + /// one-time and recurring. Recurring schedules may have up to five RRULE-based recurrences. If no schedules are + /// provided, the downtime will begin immediately and never end. + #[serde(rename = "schedule")] + pub schedule: Option>, + /// The scope to which the downtime applies. Must follow the [common search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). + #[serde(rename = "scope")] + pub scope: Option, + /// The current status of the downtime. + #[serde(rename = "status")] + pub status: Option, +} + +impl DowntimeResponseAttributes { + pub fn new() -> DowntimeResponseAttributes { + DowntimeResponseAttributes { + canceled: None, + created: None, + display_timezone: None, + message: None, + modified: None, + monitor_identifier: None, + mute_first_recovery_notification: None, + notify_end_states: None, + notify_end_types: None, + schedule: None, + scope: None, + status: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_response_data.rs b/src/datadogV2/model/model_downtime_response_data.rs new file mode 100644 index 000000000..a73932c37 --- /dev/null +++ b/src/datadogV2/model/model_downtime_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Downtime data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeResponseData { + /// Downtime details. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The downtime ID. + #[serde(rename = "id")] + pub id: Option, + /// All relationships associated with downtime. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Downtime resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl DowntimeResponseData { + pub fn new() -> DowntimeResponseData { + DowntimeResponseData { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_response_included_item.rs b/src/datadogV2/model/model_downtime_response_included_item.rs new file mode 100644 index 000000000..65f88bdfc --- /dev/null +++ b/src/datadogV2/model/model_downtime_response_included_item.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to a downtime. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DowntimeResponseIncludedItem { + User(Box), + DowntimeMonitorIncludedItem(Box), +} diff --git a/src/datadogV2/model/model_downtime_schedule_create_request.rs b/src/datadogV2/model/model_downtime_schedule_create_request.rs new file mode 100644 index 000000000..bbb44600d --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_create_request.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Schedule for the downtime. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DowntimeScheduleCreateRequest { + DowntimeScheduleRecurrencesCreateRequest( + Box, + ), + DowntimeScheduleOneTimeCreateUpdateRequest( + Box, + ), +} diff --git a/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs new file mode 100644 index 000000000..3daa8676b --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_current_downtime_response.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The most recent actual start and end dates for a recurring downtime. For a canceled downtime, +/// this is the previously occurring downtime. For active downtimes, this is the ongoing downtime, and for scheduled +/// downtimes it is the upcoming downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleCurrentDowntimeResponse { + /// The end of the current downtime. + #[serde(rename = "end", default, with = "::serde_with::rust::double_option")] + pub end: Option>, + /// The start of the current downtime. + #[serde(rename = "start")] + pub start: Option, +} + +impl DowntimeScheduleCurrentDowntimeResponse { + pub fn new() -> DowntimeScheduleCurrentDowntimeResponse { + DowntimeScheduleCurrentDowntimeResponse { + end: None, + start: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs b/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs new file mode 100644 index 000000000..a5687a4e7 --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_one_time_create_update_request.rs @@ -0,0 +1,31 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A one-time downtime definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleOneTimeCreateUpdateRequest { + /// ISO-8601 Datetime to end the downtime. Must include a UTC offset of zero. If not provided, the + /// downtime continues forever. + #[serde(rename = "end", default, with = "::serde_with::rust::double_option")] + pub end: Option>, + /// ISO-8601 Datetime to start the downtime. Must include a UTC offset of zero. If not provided, the + /// downtime starts the moment it is created. + #[serde(rename = "start", default, with = "::serde_with::rust::double_option")] + pub start: Option>, + #[serde(flatten)] + pub additional_properties: std::collections::HashMap, +} + +impl DowntimeScheduleOneTimeCreateUpdateRequest { + pub fn new() -> DowntimeScheduleOneTimeCreateUpdateRequest { + DowntimeScheduleOneTimeCreateUpdateRequest { + end: None, + start: None, + additional_properties: std::collections::HashMap::new(), + } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_one_time_response.rs b/src/datadogV2/model/model_downtime_schedule_one_time_response.rs new file mode 100644 index 000000000..63b943c59 --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_one_time_response.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A one-time downtime definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleOneTimeResponse { + /// ISO-8601 Datetime to end the downtime. + #[serde(rename = "end", default, with = "::serde_with::rust::double_option")] + pub end: Option>, + /// ISO-8601 Datetime to start the downtime. + #[serde(rename = "start")] + pub start: String, +} + +impl DowntimeScheduleOneTimeResponse { + pub fn new(start: String) -> DowntimeScheduleOneTimeResponse { + DowntimeScheduleOneTimeResponse { end: None, start } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs new file mode 100644 index 000000000..f1ca6fdd0 --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_recurrence_create_update_request.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An object defining the recurrence of the downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleRecurrenceCreateUpdateRequest { + /// The length of the downtime. Must begin with an integer and end with one of 'm', 'h', d', or 'w'. + #[serde(rename = "duration")] + pub duration: String, + /// The `RRULE` standard for defining recurring events. + /// For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`. + /// Most common `rrule` options from the [iCalendar Spec](https://tools.ietf.org/html/rfc5545) are supported. + /// + /// **Note**: Attributes specifying the duration in `RRULE` are not supported (for example, `DTSTART`, `DTEND`, `DURATION`). + /// More examples available in this [downtime guide](https://docs.datadoghq.com/monitors/guide/suppress-alert-with-downtimes/?tab=api). + #[serde(rename = "rrule")] + pub rrule: String, + /// ISO-8601 Datetime to start the downtime. Must not include a UTC offset. If not provided, the + /// downtime starts the moment it is created. + #[serde(rename = "start", default, with = "::serde_with::rust::double_option")] + pub start: Option>, + #[serde(flatten)] + pub additional_properties: std::collections::HashMap, +} + +impl DowntimeScheduleRecurrenceCreateUpdateRequest { + pub fn new(duration: String, rrule: String) -> DowntimeScheduleRecurrenceCreateUpdateRequest { + DowntimeScheduleRecurrenceCreateUpdateRequest { + duration, + rrule, + start: None, + additional_properties: std::collections::HashMap::new(), + } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs b/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs new file mode 100644 index 000000000..d07550ecf --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_recurrence_response.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An RRULE-based recurring downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleRecurrenceResponse { + /// The length of the downtime. Must begin with an integer and end with one of 'm', 'h', d', or 'w'. + #[serde(rename = "duration")] + pub duration: Option, + /// The `RRULE` standard for defining recurring events. + /// For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`. + /// Most common `rrule` options from the [iCalendar Spec](https://tools.ietf.org/html/rfc5545) are supported. + /// + /// **Note**: Attributes specifying the duration in `RRULE` are not supported (for example, `DTSTART`, `DTEND`, `DURATION`). + /// More examples available in this [downtime guide](https://docs.datadoghq.com/monitors/guide/suppress-alert-with-downtimes/?tab=api). + #[serde(rename = "rrule")] + pub rrule: Option, + /// ISO-8601 Datetime to start the downtime. Must not include a UTC offset. If not provided, the + /// downtime starts the moment it is created. + #[serde(rename = "start")] + pub start: Option, +} + +impl DowntimeScheduleRecurrenceResponse { + pub fn new() -> DowntimeScheduleRecurrenceResponse { + DowntimeScheduleRecurrenceResponse { + duration: None, + rrule: None, + start: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs new file mode 100644 index 000000000..644054ab5 --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_create_request.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A recurring downtime schedule definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleRecurrencesCreateRequest { + /// A list of downtime recurrences. + #[serde(rename = "recurrences")] + pub recurrences: Vec, + /// The timezone in which to schedule the downtime. + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl DowntimeScheduleRecurrencesCreateRequest { + pub fn new( + recurrences: Vec, + ) -> DowntimeScheduleRecurrencesCreateRequest { + DowntimeScheduleRecurrencesCreateRequest { + recurrences, + timezone: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs new file mode 100644 index 000000000..5dfd44b13 --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_response.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A recurring downtime schedule definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleRecurrencesResponse { + /// The most recent actual start and end dates for a recurring downtime. For a canceled downtime, + /// this is the previously occurring downtime. For active downtimes, this is the ongoing downtime, and for scheduled + /// downtimes it is the upcoming downtime. + #[serde(rename = "current_downtime")] + pub current_downtime: + Option>, + /// A list of downtime recurrences. + #[serde(rename = "recurrences")] + pub recurrences: Vec, + /// The timezone in which to schedule the downtime. This affects recurring start and end dates. + /// Must match `display_timezone`. + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl DowntimeScheduleRecurrencesResponse { + pub fn new( + recurrences: Vec, + ) -> DowntimeScheduleRecurrencesResponse { + DowntimeScheduleRecurrencesResponse { + current_downtime: None, + recurrences, + timezone: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs b/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs new file mode 100644 index 000000000..6ef5fc6b2 --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_recurrences_update_request.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A recurring downtime schedule definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeScheduleRecurrencesUpdateRequest { + /// A list of downtime recurrences. + #[serde(rename = "recurrences")] + pub recurrences: + Option>, + /// The timezone in which to schedule the downtime. + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl DowntimeScheduleRecurrencesUpdateRequest { + pub fn new() -> DowntimeScheduleRecurrencesUpdateRequest { + DowntimeScheduleRecurrencesUpdateRequest { + recurrences: None, + timezone: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_schedule_response.rs b/src/datadogV2/model/model_downtime_schedule_response.rs new file mode 100644 index 000000000..3044aa8e2 --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_response.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The schedule that defines when the monitor starts, stops, and recurs. There are two types of schedules: +/// one-time and recurring. Recurring schedules may have up to five RRULE-based recurrences. If no schedules are +/// provided, the downtime will begin immediately and never end. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DowntimeScheduleResponse { + DowntimeScheduleRecurrencesResponse( + Box, + ), + DowntimeScheduleOneTimeResponse(Box), +} diff --git a/src/datadogV2/model/model_downtime_schedule_update_request.rs b/src/datadogV2/model/model_downtime_schedule_update_request.rs new file mode 100644 index 000000000..327ee133e --- /dev/null +++ b/src/datadogV2/model/model_downtime_schedule_update_request.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Schedule for the downtime. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DowntimeScheduleUpdateRequest { + DowntimeScheduleRecurrencesUpdateRequest( + Box, + ), + DowntimeScheduleOneTimeCreateUpdateRequest( + Box, + ), +} diff --git a/src/datadogV2/model/model_downtime_status.rs b/src/datadogV2/model/model_downtime_status.rs new file mode 100644 index 000000000..ac6b59d30 --- /dev/null +++ b/src/datadogV2/model/model_downtime_status.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum DowntimeStatus { + #[serde(rename = "active")] + ACTIVE, + #[serde(rename = "canceled")] + CANCELED, + #[serde(rename = "ended")] + ENDED, + #[serde(rename = "scheduled")] + SCHEDULED, +} + +impl ToString for DowntimeStatus { + fn to_string(&self) -> String { + match self { + Self::ACTIVE => String::from("active"), + Self::CANCELED => String::from("canceled"), + Self::ENDED => String::from("ended"), + Self::SCHEDULED => String::from("scheduled"), + } + } +} diff --git a/src/datadogV2/model/model_downtime_update_request.rs b/src/datadogV2/model/model_downtime_update_request.rs new file mode 100644 index 000000000..ae1442b85 --- /dev/null +++ b/src/datadogV2/model/model_downtime_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request for editing a downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeUpdateRequest { + /// Object to update a downtime. + #[serde(rename = "data")] + pub data: Box, +} + +impl DowntimeUpdateRequest { + pub fn new( + data: Box, + ) -> DowntimeUpdateRequest { + DowntimeUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_downtime_update_request_attributes.rs b/src/datadogV2/model/model_downtime_update_request_attributes.rs new file mode 100644 index 000000000..59bb038ab --- /dev/null +++ b/src/datadogV2/model/model_downtime_update_request_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the downtime to update. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeUpdateRequestAttributes { + /// The timezone in which to display the downtime's start and end times in Datadog applications. This is not used + /// as an offset for scheduling. + #[serde( + rename = "display_timezone", + default, + with = "::serde_with::rust::double_option" + )] + pub display_timezone: Option>, + /// A message to include with notifications for this downtime. Email notifications can be sent to specific users + /// by using the same `@username` notation as events. + #[serde( + rename = "message", + default, + with = "::serde_with::rust::double_option" + )] + pub message: Option>, + /// Monitor identifier for the downtime. + #[serde(rename = "monitor_identifier")] + pub monitor_identifier: Option>, + /// If the first recovery notification during a downtime should be muted. + #[serde(rename = "mute_first_recovery_notification")] + pub mute_first_recovery_notification: Option, + /// States that will trigger a monitor notification when the `notify_end_types` action occurs. + #[serde(rename = "notify_end_states")] + pub notify_end_states: Option>, + /// Actions that will trigger a monitor notification if the downtime is in the `notify_end_types` state. + #[serde(rename = "notify_end_types")] + pub notify_end_types: Option>, + /// Schedule for the downtime. + #[serde(rename = "schedule")] + pub schedule: Option>, + /// The scope to which the downtime applies. Must follow the [common search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). + #[serde(rename = "scope")] + pub scope: Option, +} + +impl DowntimeUpdateRequestAttributes { + pub fn new() -> DowntimeUpdateRequestAttributes { + DowntimeUpdateRequestAttributes { + display_timezone: None, + message: None, + monitor_identifier: None, + mute_first_recovery_notification: None, + notify_end_states: None, + notify_end_types: None, + schedule: None, + scope: None, + } + } +} diff --git a/src/datadogV2/model/model_downtime_update_request_data.rs b/src/datadogV2/model/model_downtime_update_request_data.rs new file mode 100644 index 000000000..646aa0cf6 --- /dev/null +++ b/src/datadogV2/model/model_downtime_update_request_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to update a downtime. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct DowntimeUpdateRequestData { + /// Attributes of the downtime to update. + #[serde(rename = "attributes")] + pub attributes: Box, + /// ID of this downtime. + #[serde(rename = "id")] + pub id: String, + /// Downtime resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::DowntimeResourceType, +} + +impl DowntimeUpdateRequestData { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::DowntimeResourceType, + ) -> DowntimeUpdateRequestData { + DowntimeUpdateRequestData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_event.rs b/src/datadogV2/model/model_event.rs index 846495900..de619b218 100644 --- a/src/datadogV2/model/model_event.rs +++ b/src/datadogV2/model/model_event.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata associated with a request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Event { /// Event ID. #[serde(rename = "id")] diff --git a/src/datadogV2/model/model_event_attributes.rs b/src/datadogV2/model/model_event_attributes.rs index c7562ad5e..135fcb8df 100644 --- a/src/datadogV2/model/model_event_attributes.rs +++ b/src/datadogV2/model/model_event_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object description of attributes from your event. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventAttributes { /// Aggregation key of the event. #[serde(rename = "aggregation_key")] diff --git a/src/datadogV2/model/model_event_priority.rs b/src/datadogV2/model/model_event_priority.rs index f6c339c74..38fef7152 100644 --- a/src/datadogV2/model/model_event_priority.rs +++ b/src/datadogV2/model/model_event_priority.rs @@ -20,9 +20,3 @@ impl ToString for EventPriority { } } } - -impl Default for EventPriority { - fn default() -> EventPriority { - Self::NORMAL - } -} diff --git a/src/datadogV2/model/model_event_response.rs b/src/datadogV2/model/model_event_response.rs index 68bd5a3f0..8d06fbbe0 100644 --- a/src/datadogV2/model/model_event_response.rs +++ b/src/datadogV2/model/model_event_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object description of an event after being processed and stored by Datadog. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventResponse { /// The object description of an event response attribute. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_event_response_attributes.rs b/src/datadogV2/model/model_event_response_attributes.rs index 3e365565a..26a4ced42 100644 --- a/src/datadogV2/model/model_event_response_attributes.rs +++ b/src/datadogV2/model/model_event_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object description of an event response attribute. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventResponseAttributes { /// Object description of attributes from your event. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_event_status_type.rs b/src/datadogV2/model/model_event_status_type.rs index 71a1c9448..d757bc4e5 100644 --- a/src/datadogV2/model/model_event_status_type.rs +++ b/src/datadogV2/model/model_event_status_type.rs @@ -38,9 +38,3 @@ impl ToString for EventStatusType { } } } - -impl Default for EventStatusType { - fn default() -> EventStatusType { - Self::FAILURE - } -} diff --git a/src/datadogV2/model/model_event_type.rs b/src/datadogV2/model/model_event_type.rs index 29969b866..a1a870273 100644 --- a/src/datadogV2/model/model_event_type.rs +++ b/src/datadogV2/model/model_event_type.rs @@ -17,9 +17,3 @@ impl ToString for EventType { } } } - -impl Default for EventType { - fn default() -> EventType { - Self::EVENT - } -} diff --git a/src/datadogV2/model/model_events_aggregation.rs b/src/datadogV2/model/model_events_aggregation.rs new file mode 100644 index 000000000..d65876a77 --- /dev/null +++ b/src/datadogV2/model/model_events_aggregation.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EventsAggregation { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "pc75")] + PC75, + #[serde(rename = "pc90")] + PC90, + #[serde(rename = "pc95")] + PC95, + #[serde(rename = "pc98")] + PC98, + #[serde(rename = "pc99")] + PC99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, +} + +impl ToString for EventsAggregation { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::PC75 => String::from("pc75"), + Self::PC90 => String::from("pc90"), + Self::PC95 => String::from("pc95"), + Self::PC98 => String::from("pc98"), + Self::PC99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + } + } +} diff --git a/src/datadogV2/model/model_events_compute.rs b/src/datadogV2/model/model_events_compute.rs new file mode 100644 index 000000000..e1fbedde9 --- /dev/null +++ b/src/datadogV2/model/model_events_compute.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The instructions for what to compute for this query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventsCompute { + /// The type of aggregation that can be performed on events-based queries. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV2::model::EventsAggregation, + /// Interval for compute in milliseconds. + #[serde(rename = "interval")] + pub interval: Option, + /// The "measure" attribute on which to perform the computation. + #[serde(rename = "metric")] + pub metric: Option, +} + +impl EventsCompute { + pub fn new(aggregation: crate::datadogV2::model::EventsAggregation) -> EventsCompute { + EventsCompute { + aggregation, + interval: None, + metric: None, + } + } +} diff --git a/src/datadogV2/model/model_events_data_source.rs b/src/datadogV2/model/model_events_data_source.rs new file mode 100644 index 000000000..b4869295f --- /dev/null +++ b/src/datadogV2/model/model_events_data_source.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EventsDataSource { + #[serde(rename = "logs")] + LOGS, + #[serde(rename = "rum")] + RUM, +} + +impl ToString for EventsDataSource { + fn to_string(&self) -> String { + match self { + Self::LOGS => String::from("logs"), + Self::RUM => String::from("rum"), + } + } +} diff --git a/src/datadogV2/model/model_events_group_by.rs b/src/datadogV2/model/model_events_group_by.rs new file mode 100644 index 000000000..3a3c27684 --- /dev/null +++ b/src/datadogV2/model/model_events_group_by.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A dimension on which to split a query's results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventsGroupBy { + /// The facet by which to split groups. + #[serde(rename = "facet")] + pub facet: String, + /// The maximum number of groups to return. + #[serde(rename = "limit")] + pub limit: Option, + /// The dimension by which to sort a query's results. + #[serde(rename = "sort")] + pub sort: Option>, +} + +impl EventsGroupBy { + pub fn new(facet: String) -> EventsGroupBy { + EventsGroupBy { + facet, + limit: None, + sort: None, + } + } +} diff --git a/src/datadogV2/model/model_events_group_by_sort.rs b/src/datadogV2/model/model_events_group_by_sort.rs new file mode 100644 index 000000000..99d8eb674 --- /dev/null +++ b/src/datadogV2/model/model_events_group_by_sort.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The dimension by which to sort a query's results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventsGroupBySort { + /// The type of aggregation that can be performed on events-based queries. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV2::model::EventsAggregation, + /// The metric's calculated value which should be used to define the sort order of a query's results. + #[serde(rename = "metric")] + pub metric: Option, + /// Direction of sort. + #[serde(rename = "order")] + pub order: Option, + /// The type of sort to use on the calculated value. + #[serde(rename = "type")] + pub type_: Option, +} + +impl EventsGroupBySort { + pub fn new(aggregation: crate::datadogV2::model::EventsAggregation) -> EventsGroupBySort { + EventsGroupBySort { + aggregation, + metric: None, + order: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_events_list_request.rs b/src/datadogV2/model/model_events_list_request.rs index 99dd9366b..93ebb7e65 100644 --- a/src/datadogV2/model/model_events_list_request.rs +++ b/src/datadogV2/model/model_events_list_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object sent with the request to retrieve a list of events from your organization. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsListRequest { /// The search and filter query settings. #[serde(rename = "filter")] diff --git a/src/datadogV2/model/model_events_list_response.rs b/src/datadogV2/model/model_events_list_response.rs index ead3cde72..17460fe3e 100644 --- a/src/datadogV2/model/model_events_list_response.rs +++ b/src/datadogV2/model/model_events_list_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The response object with all events matching the request and pagination information. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsListResponse { /// An array of events matching the request. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_events_list_response_links.rs b/src/datadogV2/model/model_events_list_response_links.rs index 3397268f9..6fd6d6110 100644 --- a/src/datadogV2/model/model_events_list_response_links.rs +++ b/src/datadogV2/model/model_events_list_response_links.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Links attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsListResponseLinks { /// Link for the next set of results. Note that the request can also be made using the /// POST endpoint. diff --git a/src/datadogV2/model/model_events_query_filter.rs b/src/datadogV2/model/model_events_query_filter.rs index 4cca0947b..8a01dd1b2 100644 --- a/src/datadogV2/model/model_events_query_filter.rs +++ b/src/datadogV2/model/model_events_query_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The search and filter query settings. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsQueryFilter { /// The minimum time for the requested events. Supports date math and regular timestamps in milliseconds. #[serde(rename = "from")] diff --git a/src/datadogV2/model/model_events_query_options.rs b/src/datadogV2/model/model_events_query_options.rs index c8fb1e484..41b95a741 100644 --- a/src/datadogV2/model/model_events_query_options.rs +++ b/src/datadogV2/model/model_events_query_options.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// The global query options that are used. Either provide a timezone or a time offset but not both, /// otherwise the query fails. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsQueryOptions { /// The time offset to apply to the query in seconds. #[serde(rename = "timeOffset")] diff --git a/src/datadogV2/model/model_events_request_page.rs b/src/datadogV2/model/model_events_request_page.rs index 72254f3db..9ec540722 100644 --- a/src/datadogV2/model/model_events_request_page.rs +++ b/src/datadogV2/model/model_events_request_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Pagination settings. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsRequestPage { /// The returned paging point to use to get the next results. #[serde(rename = "cursor")] diff --git a/src/datadogV2/model/model_events_response_metadata.rs b/src/datadogV2/model/model_events_response_metadata.rs index fc175e4c2..170e12aa1 100644 --- a/src/datadogV2/model/model_events_response_metadata.rs +++ b/src/datadogV2/model/model_events_response_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata associated with a request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsResponseMetadata { /// The time elapsed in milliseconds. #[serde(rename = "elapsed")] diff --git a/src/datadogV2/model/model_events_response_metadata_page.rs b/src/datadogV2/model/model_events_response_metadata_page.rs index 5881b2928..ffa1d209a 100644 --- a/src/datadogV2/model/model_events_response_metadata_page.rs +++ b/src/datadogV2/model/model_events_response_metadata_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Pagination attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsResponseMetadataPage { /// The cursor to use to get the next results, if any. To make the next request, use the same /// parameters with the addition of the `page[cursor]`. diff --git a/src/datadogV2/model/model_events_scalar_query.rs b/src/datadogV2/model/model_events_scalar_query.rs new file mode 100644 index 000000000..b2781049d --- /dev/null +++ b/src/datadogV2/model/model_events_scalar_query.rs @@ -0,0 +1,45 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An individual scalar events query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventsScalarQuery { + /// The instructions for what to compute for this query. + #[serde(rename = "compute")] + pub compute: Box, + /// A data source that is powered by the Events Platform. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV2::model::EventsDataSource, + /// The list of facets on which to split results. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// The indexes in which to search. + #[serde(rename = "indexes")] + pub indexes: Option>, + /// The variable name for use in formulas. + #[serde(rename = "name")] + pub name: Option, + /// Configuration of the search/filter for an events query. + #[serde(rename = "search")] + pub search: Option>, +} + +impl EventsScalarQuery { + pub fn new( + compute: Box, + data_source: crate::datadogV2::model::EventsDataSource, + ) -> EventsScalarQuery { + EventsScalarQuery { + compute, + data_source, + group_by: None, + indexes: None, + name: None, + search: None, + } + } +} diff --git a/src/datadogV2/model/model_events_search.rs b/src/datadogV2/model/model_events_search.rs new file mode 100644 index 000000000..af20f75a5 --- /dev/null +++ b/src/datadogV2/model/model_events_search.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Configuration of the search/filter for an events query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventsSearch { + /// The search/filter string for an events query. + #[serde(rename = "query")] + pub query: Option, +} + +impl EventsSearch { + pub fn new() -> EventsSearch { + EventsSearch { query: None } + } +} diff --git a/src/datadogV2/model/model_events_sort.rs b/src/datadogV2/model/model_events_sort.rs index 4cc74f61d..cd53ca904 100644 --- a/src/datadogV2/model/model_events_sort.rs +++ b/src/datadogV2/model/model_events_sort.rs @@ -20,9 +20,3 @@ impl ToString for EventsSort { } } } - -impl Default for EventsSort { - fn default() -> EventsSort { - Self::TIMESTAMP_ASCENDING - } -} diff --git a/src/datadogV2/model/model_events_sort_type.rs b/src/datadogV2/model/model_events_sort_type.rs new file mode 100644 index 000000000..571c5a1e3 --- /dev/null +++ b/src/datadogV2/model/model_events_sort_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum EventsSortType { + #[serde(rename = "alphabetical")] + ALPHABETICAL, + #[serde(rename = "measure")] + MEASURE, +} + +impl ToString for EventsSortType { + fn to_string(&self) -> String { + match self { + Self::ALPHABETICAL => String::from("alphabetical"), + Self::MEASURE => String::from("measure"), + } + } +} diff --git a/src/datadogV2/model/model_events_timeseries_query.rs b/src/datadogV2/model/model_events_timeseries_query.rs new file mode 100644 index 000000000..0c81a08c1 --- /dev/null +++ b/src/datadogV2/model/model_events_timeseries_query.rs @@ -0,0 +1,45 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An individual timeseries events query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct EventsTimeseriesQuery { + /// The instructions for what to compute for this query. + #[serde(rename = "compute")] + pub compute: Box, + /// A data source that is powered by the Events Platform. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV2::model::EventsDataSource, + /// The list of facets on which to split results. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// The indexes in which to search. + #[serde(rename = "indexes")] + pub indexes: Option>, + /// The variable name for use in formulas. + #[serde(rename = "name")] + pub name: Option, + /// Configuration of the search/filter for an events query. + #[serde(rename = "search")] + pub search: Option>, +} + +impl EventsTimeseriesQuery { + pub fn new( + compute: Box, + data_source: crate::datadogV2::model::EventsDataSource, + ) -> EventsTimeseriesQuery { + EventsTimeseriesQuery { + compute, + data_source, + group_by: None, + indexes: None, + name: None, + search: None, + } + } +} diff --git a/src/datadogV2/model/model_events_warning.rs b/src/datadogV2/model/model_events_warning.rs index 76164b859..f99643653 100644 --- a/src/datadogV2/model/model_events_warning.rs +++ b/src/datadogV2/model/model_events_warning.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A warning message indicating something is wrong with the query. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EventsWarning { /// A unique code for this type of warning. #[serde(rename = "code")] diff --git a/src/datadogV2/model/model_fastly_accoun_response_attributes.rs b/src/datadogV2/model/model_fastly_accoun_response_attributes.rs index 221150a2e..f2b665b11 100644 --- a/src/datadogV2/model/model_fastly_accoun_response_attributes.rs +++ b/src/datadogV2/model/model_fastly_accoun_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object of a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccounResponseAttributes { /// The name of the Fastly account. #[serde(rename = "name")] diff --git a/src/datadogV2/model/model_fastly_account_create_request.rs b/src/datadogV2/model/model_fastly_account_create_request.rs index 992a12948..a79b1d0e6 100644 --- a/src/datadogV2/model/model_fastly_account_create_request.rs +++ b/src/datadogV2/model/model_fastly_account_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Payload schema when adding a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountCreateRequest { /// Data object for creating a Fastly account. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct FastlyAccountCreateRequest { impl FastlyAccountCreateRequest { pub fn new( - data: crate::datadogV2::model::FastlyAccountCreateRequestData, + data: Box, ) -> FastlyAccountCreateRequest { - FastlyAccountCreateRequest { - data: Box::new(data), - } + FastlyAccountCreateRequest { data } } } diff --git a/src/datadogV2/model/model_fastly_account_create_request_attributes.rs b/src/datadogV2/model/model_fastly_account_create_request_attributes.rs index 67fdafe8d..ad366ce43 100644 --- a/src/datadogV2/model/model_fastly_account_create_request_attributes.rs +++ b/src/datadogV2/model/model_fastly_account_create_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for creating a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountCreateRequestAttributes { /// The API key for the Fastly account. #[serde(rename = "api_key")] diff --git a/src/datadogV2/model/model_fastly_account_create_request_data.rs b/src/datadogV2/model/model_fastly_account_create_request_data.rs index 1663b92b8..11e518089 100644 --- a/src/datadogV2/model/model_fastly_account_create_request_data.rs +++ b/src/datadogV2/model/model_fastly_account_create_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object for creating a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountCreateRequestData { /// Attributes object for creating a Fastly account. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct FastlyAccountCreateRequestData { impl FastlyAccountCreateRequestData { pub fn new( - attributes: crate::datadogV2::model::FastlyAccountCreateRequestAttributes, + attributes: Box, type_: crate::datadogV2::model::FastlyAccountType, ) -> FastlyAccountCreateRequestData { - FastlyAccountCreateRequestData { - attributes: Box::new(attributes), - type_, - } + FastlyAccountCreateRequestData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_fastly_account_response.rs b/src/datadogV2/model/model_fastly_account_response.rs index 2bbbbb594..41d61bd63 100644 --- a/src/datadogV2/model/model_fastly_account_response.rs +++ b/src/datadogV2/model/model_fastly_account_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountResponse { /// Data object of a Fastly account. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_fastly_account_response_data.rs b/src/datadogV2/model/model_fastly_account_response_data.rs index d85a40a2b..a432874c7 100644 --- a/src/datadogV2/model/model_fastly_account_response_data.rs +++ b/src/datadogV2/model/model_fastly_account_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object of a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountResponseData { /// Attributes object of a Fastly account. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct FastlyAccountResponseData { impl FastlyAccountResponseData { pub fn new( - attributes: crate::datadogV2::model::FastlyAccounResponseAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::FastlyAccountType, ) -> FastlyAccountResponseData { FastlyAccountResponseData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_fastly_account_type.rs b/src/datadogV2/model/model_fastly_account_type.rs index 6e87988af..9461ee8e3 100644 --- a/src/datadogV2/model/model_fastly_account_type.rs +++ b/src/datadogV2/model/model_fastly_account_type.rs @@ -17,9 +17,3 @@ impl ToString for FastlyAccountType { } } } - -impl Default for FastlyAccountType { - fn default() -> FastlyAccountType { - Self::FASTLY_ACCOUNTS - } -} diff --git a/src/datadogV2/model/model_fastly_account_update_request.rs b/src/datadogV2/model/model_fastly_account_update_request.rs index 9317579cf..75844fdd2 100644 --- a/src/datadogV2/model/model_fastly_account_update_request.rs +++ b/src/datadogV2/model/model_fastly_account_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Payload schema when updating a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountUpdateRequest { /// Data object for updating a Fastly account. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct FastlyAccountUpdateRequest { impl FastlyAccountUpdateRequest { pub fn new( - data: crate::datadogV2::model::FastlyAccountUpdateRequestData, + data: Box, ) -> FastlyAccountUpdateRequest { - FastlyAccountUpdateRequest { - data: Box::new(data), - } + FastlyAccountUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_fastly_account_update_request_attributes.rs b/src/datadogV2/model/model_fastly_account_update_request_attributes.rs index 93ca8b61b..49c43021d 100644 --- a/src/datadogV2/model/model_fastly_account_update_request_attributes.rs +++ b/src/datadogV2/model/model_fastly_account_update_request_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for updating a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountUpdateRequestAttributes { /// The API key of the Fastly account. #[serde(rename = "api_key")] diff --git a/src/datadogV2/model/model_fastly_account_update_request_data.rs b/src/datadogV2/model/model_fastly_account_update_request_data.rs index 4b46397e6..a82871264 100644 --- a/src/datadogV2/model/model_fastly_account_update_request_data.rs +++ b/src/datadogV2/model/model_fastly_account_update_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object for updating a Fastly account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountUpdateRequestData { /// Attributes object for updating a Fastly account. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_fastly_accounts_response.rs b/src/datadogV2/model/model_fastly_accounts_response.rs index 480daa396..9fdba5b3c 100644 --- a/src/datadogV2/model/model_fastly_accounts_response.rs +++ b/src/datadogV2/model/model_fastly_accounts_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting Fastly accounts. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyAccountsResponse { /// The JSON:API data schema. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_fastly_service.rs b/src/datadogV2/model/model_fastly_service.rs index 4fb37816f..8229082d2 100644 --- a/src/datadogV2/model/model_fastly_service.rs +++ b/src/datadogV2/model/model_fastly_service.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The schema representation of a Fastly service. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyService { /// The id of the Fastly service #[serde(rename = "id")] diff --git a/src/datadogV2/model/model_fastly_service_attributes.rs b/src/datadogV2/model/model_fastly_service_attributes.rs index 0c4638e5c..5d27a543b 100644 --- a/src/datadogV2/model/model_fastly_service_attributes.rs +++ b/src/datadogV2/model/model_fastly_service_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes object for Fastly service requests. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyServiceAttributes { /// A list of tags for the Fastly service. #[serde(rename = "tags")] diff --git a/src/datadogV2/model/model_fastly_service_data.rs b/src/datadogV2/model/model_fastly_service_data.rs index b0086ab2b..398db4cbf 100644 --- a/src/datadogV2/model/model_fastly_service_data.rs +++ b/src/datadogV2/model/model_fastly_service_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data object for Fastly service requests. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyServiceData { /// Attributes object for Fastly service requests. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_fastly_service_request.rs b/src/datadogV2/model/model_fastly_service_request.rs index 8d10f6557..e9bb45f74 100644 --- a/src/datadogV2/model/model_fastly_service_request.rs +++ b/src/datadogV2/model/model_fastly_service_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Payload schema for Fastly service requests. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyServiceRequest { /// Data object for Fastly service requests. #[serde(rename = "data")] @@ -14,9 +14,7 @@ pub struct FastlyServiceRequest { } impl FastlyServiceRequest { - pub fn new(data: crate::datadogV2::model::FastlyServiceData) -> FastlyServiceRequest { - FastlyServiceRequest { - data: Box::new(data), - } + pub fn new(data: Box) -> FastlyServiceRequest { + FastlyServiceRequest { data } } } diff --git a/src/datadogV2/model/model_fastly_service_response.rs b/src/datadogV2/model/model_fastly_service_response.rs index 2a5bf6b07..3aebd8365 100644 --- a/src/datadogV2/model/model_fastly_service_response.rs +++ b/src/datadogV2/model/model_fastly_service_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting a Fastly service. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyServiceResponse { /// Data object for Fastly service requests. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_fastly_service_type.rs b/src/datadogV2/model/model_fastly_service_type.rs index 41afcce75..8da08fc5b 100644 --- a/src/datadogV2/model/model_fastly_service_type.rs +++ b/src/datadogV2/model/model_fastly_service_type.rs @@ -17,9 +17,3 @@ impl ToString for FastlyServiceType { } } } - -impl Default for FastlyServiceType { - fn default() -> FastlyServiceType { - Self::FASTLY_SERVICES - } -} diff --git a/src/datadogV2/model/model_fastly_services_response.rs b/src/datadogV2/model/model_fastly_services_response.rs index 64727e28b..8d0921822 100644 --- a/src/datadogV2/model/model_fastly_services_response.rs +++ b/src/datadogV2/model/model_fastly_services_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting Fastly services. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FastlyServicesResponse { /// The JSON:API data schema. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_finding.rs b/src/datadogV2/model/model_finding.rs index abc3913be..481404166 100644 --- a/src/datadogV2/model/model_finding.rs +++ b/src/datadogV2/model/model_finding.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A single finding without the message and resource configuration. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Finding { /// The JSON:API attributes of the finding. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_finding_attributes.rs b/src/datadogV2/model/model_finding_attributes.rs index 61d40f201..f1bd81e46 100644 --- a/src/datadogV2/model/model_finding_attributes.rs +++ b/src/datadogV2/model/model_finding_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The JSON:API attributes of the finding. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FindingAttributes { /// The evaluation of the finding. #[serde(rename = "evaluation")] diff --git a/src/datadogV2/model/model_finding_evaluation.rs b/src/datadogV2/model/model_finding_evaluation.rs index 2cbf8ef3a..7b0824c38 100644 --- a/src/datadogV2/model/model_finding_evaluation.rs +++ b/src/datadogV2/model/model_finding_evaluation.rs @@ -20,9 +20,3 @@ impl ToString for FindingEvaluation { } } } - -impl Default for FindingEvaluation { - fn default() -> FindingEvaluation { - Self::PASS - } -} diff --git a/src/datadogV2/model/model_finding_mute.rs b/src/datadogV2/model/model_finding_mute.rs index 09176913b..1bcbb2bee 100644 --- a/src/datadogV2/model/model_finding_mute.rs +++ b/src/datadogV2/model/model_finding_mute.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Information about the mute status of this finding. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FindingMute { /// Additional information about the reason why this finding is muted or unmuted. #[serde(rename = "description")] diff --git a/src/datadogV2/model/model_finding_mute_reason.rs b/src/datadogV2/model/model_finding_mute_reason.rs index d5e5127a1..02cbf1de3 100644 --- a/src/datadogV2/model/model_finding_mute_reason.rs +++ b/src/datadogV2/model/model_finding_mute_reason.rs @@ -35,9 +35,3 @@ impl ToString for FindingMuteReason { } } } - -impl Default for FindingMuteReason { - fn default() -> FindingMuteReason { - Self::PENDING_FIX - } -} diff --git a/src/datadogV2/model/model_finding_rule.rs b/src/datadogV2/model/model_finding_rule.rs index 2312e1c77..4657066a5 100644 --- a/src/datadogV2/model/model_finding_rule.rs +++ b/src/datadogV2/model/model_finding_rule.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The rule that triggered this finding. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FindingRule { /// The ID of the rule that triggered this finding. #[serde(rename = "id")] diff --git a/src/datadogV2/model/model_finding_status.rs b/src/datadogV2/model/model_finding_status.rs index d6d355d81..330f060d5 100644 --- a/src/datadogV2/model/model_finding_status.rs +++ b/src/datadogV2/model/model_finding_status.rs @@ -29,9 +29,3 @@ impl ToString for FindingStatus { } } } - -impl Default for FindingStatus { - fn default() -> FindingStatus { - Self::CRITICAL - } -} diff --git a/src/datadogV2/model/model_finding_type.rs b/src/datadogV2/model/model_finding_type.rs index 223a41609..f81acc658 100644 --- a/src/datadogV2/model/model_finding_type.rs +++ b/src/datadogV2/model/model_finding_type.rs @@ -17,9 +17,3 @@ impl ToString for FindingType { } } } - -impl Default for FindingType { - fn default() -> FindingType { - Self::FINDING - } -} diff --git a/src/datadogV2/model/model_formula_limit.rs b/src/datadogV2/model/model_formula_limit.rs new file mode 100644 index 000000000..fba0fbf32 --- /dev/null +++ b/src/datadogV2/model/model_formula_limit.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Message for specifying limits to the number of values returned by a query. +/// This limit is only for scalar queries and has no effect on timeseries queries. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FormulaLimit { + /// The number of results to which to limit. + #[serde(rename = "count")] + pub count: Option, + /// Direction of sort. + #[serde(rename = "order")] + pub order: Option, +} + +impl FormulaLimit { + pub fn new() -> FormulaLimit { + FormulaLimit { + count: None, + order: None, + } + } +} diff --git a/src/datadogV2/model/model_full_api_key.rs b/src/datadogV2/model/model_full_api_key.rs new file mode 100644 index 000000000..5c6012767 --- /dev/null +++ b/src/datadogV2/model/model_full_api_key.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Datadog API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FullAPIKey { + /// Attributes of a full API key. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the API key. + #[serde(rename = "id")] + pub id: Option, + /// Resources related to the API key. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// API Keys resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl FullAPIKey { + pub fn new() -> FullAPIKey { + FullAPIKey { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_full_api_key_attributes.rs b/src/datadogV2/model/model_full_api_key_attributes.rs new file mode 100644 index 000000000..38194b123 --- /dev/null +++ b/src/datadogV2/model/model_full_api_key_attributes.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of a full API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FullAPIKeyAttributes { + /// The category of the API key. + #[serde(rename = "category")] + pub category: Option, + /// Creation date of the API key. + #[serde(rename = "created_at")] + pub created_at: Option, + /// The API key. + #[serde(rename = "key")] + pub key: Option, + /// The last four characters of the API key. + #[serde(rename = "last4")] + pub last4: Option, + /// Date the API key was last modified. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Name of the API key. + #[serde(rename = "name")] + pub name: Option, + /// The remote config read enabled status. + #[serde(rename = "remote_config_read_enabled")] + pub remote_config_read_enabled: Option, +} + +impl FullAPIKeyAttributes { + pub fn new() -> FullAPIKeyAttributes { + FullAPIKeyAttributes { + category: None, + created_at: None, + key: None, + last4: None, + modified_at: None, + name: None, + remote_config_read_enabled: None, + } + } +} diff --git a/src/datadogV2/model/model_full_application_key.rs b/src/datadogV2/model/model_full_application_key.rs new file mode 100644 index 000000000..c0a114ed8 --- /dev/null +++ b/src/datadogV2/model/model_full_application_key.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Datadog application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FullApplicationKey { + /// Attributes of a full application key. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the application key. + #[serde(rename = "id")] + pub id: Option, + /// Resources related to the application key. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Application Keys resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl FullApplicationKey { + pub fn new() -> FullApplicationKey { + FullApplicationKey { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_full_application_key_attributes.rs b/src/datadogV2/model/model_full_application_key_attributes.rs new file mode 100644 index 000000000..81b8c883d --- /dev/null +++ b/src/datadogV2/model/model_full_application_key_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of a full application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct FullApplicationKeyAttributes { + /// Creation date of the application key. + #[serde(rename = "created_at")] + pub created_at: Option, + /// The application key. + #[serde(rename = "key")] + pub key: Option, + /// The last four characters of the application key. + #[serde(rename = "last4")] + pub last4: Option, + /// Name of the application key. + #[serde(rename = "name")] + pub name: Option, + /// Array of scopes to grant the application key. + #[serde(rename = "scopes", default, with = "::serde_with::rust::double_option")] + pub scopes: Option>>, +} + +impl FullApplicationKeyAttributes { + pub fn new() -> FullApplicationKeyAttributes { + FullApplicationKeyAttributes { + created_at: None, + key: None, + last4: None, + name: None, + scopes: None, + } + } +} diff --git a/src/datadogV2/model/model_gcp_service_account_meta.rs b/src/datadogV2/model/model_gcp_service_account_meta.rs index 7ae53b210..e7efff904 100644 --- a/src/datadogV2/model/model_gcp_service_account_meta.rs +++ b/src/datadogV2/model/model_gcp_service_account_meta.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Additional information related to your service account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPServiceAccountMeta { /// The current list of projects accessible from your service account. #[serde(rename = "accessible_projects")] diff --git a/src/datadogV2/model/model_gcp_service_account_type.rs b/src/datadogV2/model/model_gcp_service_account_type.rs index aa78b7da5..769651a01 100644 --- a/src/datadogV2/model/model_gcp_service_account_type.rs +++ b/src/datadogV2/model/model_gcp_service_account_type.rs @@ -17,9 +17,3 @@ impl ToString for GCPServiceAccountType { } } } - -impl Default for GCPServiceAccountType { - fn default() -> GCPServiceAccountType { - Self::GCP_SERVICE_ACCOUNT - } -} diff --git a/src/datadogV2/model/model_gcpsts_delegate_account.rs b/src/datadogV2/model/model_gcpsts_delegate_account.rs index 6b9948d03..d548e4a9c 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Datadog principal service account info. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSDelegateAccount { /// Your delegate account attributes. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs b/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs index 888055506..52c9c1f7d 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Your delegate account attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSDelegateAccountAttributes { /// Your organization's Datadog principal email address. #[serde(rename = "delegate_account_email")] diff --git a/src/datadogV2/model/model_gcpsts_delegate_account_response.rs b/src/datadogV2/model/model_gcpsts_delegate_account_response.rs index 7a836b510..f7c7c12bb 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Your delegate service account response data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSDelegateAccountResponse { /// Datadog principal service account info. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_gcpsts_delegate_account_type.rs b/src/datadogV2/model/model_gcpsts_delegate_account_type.rs index ce9942525..324adce11 100644 --- a/src/datadogV2/model/model_gcpsts_delegate_account_type.rs +++ b/src/datadogV2/model/model_gcpsts_delegate_account_type.rs @@ -17,9 +17,3 @@ impl ToString for GCPSTSDelegateAccountType { } } } - -impl Default for GCPSTSDelegateAccountType { - fn default() -> GCPSTSDelegateAccountType { - Self::GCP_STS_DELEGATE - } -} diff --git a/src/datadogV2/model/model_gcpsts_service_account.rs b/src/datadogV2/model/model_gcpsts_service_account.rs index d5316ce67..e37efdb3d 100644 --- a/src/datadogV2/model/model_gcpsts_service_account.rs +++ b/src/datadogV2/model/model_gcpsts_service_account.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Info on your service account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccount { /// Attributes associated with your service account. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_gcpsts_service_account_attributes.rs b/src/datadogV2/model/model_gcpsts_service_account_attributes.rs index f5f9a4b26..665c0f8e5 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_attributes.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes associated with your service account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccountAttributes { /// Tags to be associated with GCP metrics and service checks from your account. #[serde(rename = "account_tags")] @@ -20,9 +20,15 @@ pub struct GCPSTSServiceAccountAttributes { /// Your Host Filters. #[serde(rename = "host_filters")] pub host_filters: Option>, - /// When enabled, Datadog performs configuration checks across your Google Cloud environment by continuously scanning every resource. + /// When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true. #[serde(rename = "is_cspm_enabled")] pub is_cspm_enabled: Option, + /// When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account. + #[serde(rename = "is_security_command_center_enabled")] + pub is_security_command_center_enabled: Option, + /// When enabled, Datadog scans for all resources in your GCP environment. + #[serde(rename = "resource_collection_enabled")] + pub resource_collection_enabled: Option, } impl GCPSTSServiceAccountAttributes { @@ -33,6 +39,8 @@ impl GCPSTSServiceAccountAttributes { client_email: None, host_filters: None, is_cspm_enabled: None, + is_security_command_center_enabled: None, + resource_collection_enabled: None, } } } diff --git a/src/datadogV2/model/model_gcpsts_service_account_create_request.rs b/src/datadogV2/model/model_gcpsts_service_account_create_request.rs index 9363669c3..8af368d5f 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_create_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data on your newly generated service account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccountCreateRequest { /// Additional metadata on your generated service account. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_gcpsts_service_account_data.rs b/src/datadogV2/model/model_gcpsts_service_account_data.rs index 9ccff5150..486935304 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_data.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Additional metadata on your generated service account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccountData { /// Attributes associated with your service account. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_gcpsts_service_account_response.rs b/src/datadogV2/model/model_gcpsts_service_account_response.rs index 359669741..3adc8ddf0 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The account creation response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccountResponse { /// Info on your service account. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_gcpsts_service_account_update_request.rs b/src/datadogV2/model/model_gcpsts_service_account_update_request.rs index 20b410aff..09c57e999 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_update_request.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Service account info. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccountUpdateRequest { /// Data on your service account. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs b/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs index 8795ae21e..a58a2d77a 100644 --- a/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs +++ b/src/datadogV2/model/model_gcpsts_service_account_update_request_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data on your service account. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccountUpdateRequestData { /// Attributes associated with your service account. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_gcpsts_service_accounts_response.rs b/src/datadogV2/model/model_gcpsts_service_accounts_response.rs index 4e0d24dda..f01fc4577 100644 --- a/src/datadogV2/model/model_gcpsts_service_accounts_response.rs +++ b/src/datadogV2/model/model_gcpsts_service_accounts_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Object containing all your STS enabled accounts. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GCPSTSServiceAccountsResponse { /// Array of GCP STS enabled service accounts. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_get_finding_response.rs b/src/datadogV2/model/model_get_finding_response.rs index a10647c7b..5423b213a 100644 --- a/src/datadogV2/model/model_get_finding_response.rs +++ b/src/datadogV2/model/model_get_finding_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when getting a finding. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFindingResponse { /// A single finding with with message and resource configuration. #[serde(rename = "data")] @@ -14,9 +14,7 @@ pub struct GetFindingResponse { } impl GetFindingResponse { - pub fn new(data: crate::datadogV2::model::DetailedFinding) -> GetFindingResponse { - GetFindingResponse { - data: Box::new(data), - } + pub fn new(data: Box) -> GetFindingResponse { + GetFindingResponse { data } } } diff --git a/src/datadogV2/model/model_get_team_memberships_sort.rs b/src/datadogV2/model/model_get_team_memberships_sort.rs new file mode 100644 index 000000000..f19fb614d --- /dev/null +++ b/src/datadogV2/model/model_get_team_memberships_sort.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum GetTeamMembershipsSort { + #[serde(rename = "manager_name")] + MANAGER_NAME, + #[serde(rename = "-manager_name")] + _MANAGER_NAME, + #[serde(rename = "name")] + NAME, + #[serde(rename = "-name")] + _NAME, + #[serde(rename = "handle")] + HANDLE, + #[serde(rename = "-handle")] + _HANDLE, + #[serde(rename = "email")] + EMAIL, + #[serde(rename = "-email")] + _EMAIL, +} + +impl ToString for GetTeamMembershipsSort { + fn to_string(&self) -> String { + match self { + Self::MANAGER_NAME => String::from("manager_name"), + Self::_MANAGER_NAME => String::from("-manager_name"), + Self::NAME => String::from("name"), + Self::_NAME => String::from("-name"), + Self::HANDLE => String::from("handle"), + Self::_HANDLE => String::from("-handle"), + Self::EMAIL => String::from("email"), + Self::_EMAIL => String::from("-email"), + } + } +} diff --git a/src/datadogV2/model/model_group_scalar_column.rs b/src/datadogV2/model/model_group_scalar_column.rs new file mode 100644 index 000000000..a4175cc45 --- /dev/null +++ b/src/datadogV2/model/model_group_scalar_column.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A column containing the tag keys and values in a group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct GroupScalarColumn { + /// The name of the tag key or group. + #[serde(rename = "name")] + pub name: Option, + /// The type of column present for groups. + #[serde(rename = "type")] + pub type_: Option, + /// The array of tag values for each group found for the results of the formulas or queries. + #[serde(rename = "values")] + pub values: Option>>, +} + +impl GroupScalarColumn { + pub fn new() -> GroupScalarColumn { + GroupScalarColumn { + name: None, + type_: None, + values: None, + } + } +} diff --git a/src/datadogV2/model/model_hourly_usage.rs b/src/datadogV2/model/model_hourly_usage.rs index d1d2a8f51..3e9d80831 100644 --- a/src/datadogV2/model/model_hourly_usage.rs +++ b/src/datadogV2/model/model_hourly_usage.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Hourly usage for a product family for an org. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsage { /// Attributes of hourly usage for a product family for an org for a time period. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_hourly_usage_attributes.rs b/src/datadogV2/model/model_hourly_usage_attributes.rs index 7f303337e..def1753d0 100644 --- a/src/datadogV2/model/model_hourly_usage_attributes.rs +++ b/src/datadogV2/model/model_hourly_usage_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes of hourly usage for a product family for an org for a time period. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageAttributes { /// List of the measured usage values for the product family for the org for the time period. #[serde(rename = "measurements")] diff --git a/src/datadogV2/model/model_hourly_usage_measurement.rs b/src/datadogV2/model/model_hourly_usage_measurement.rs index 9d9258efb..52b022441 100644 --- a/src/datadogV2/model/model_hourly_usage_measurement.rs +++ b/src/datadogV2/model/model_hourly_usage_measurement.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Usage amount for a given usage type. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageMeasurement { /// Type of usage. #[serde(rename = "usage_type")] diff --git a/src/datadogV2/model/model_hourly_usage_metadata.rs b/src/datadogV2/model/model_hourly_usage_metadata.rs index 63a8a2c19..81a9e3908 100644 --- a/src/datadogV2/model/model_hourly_usage_metadata.rs +++ b/src/datadogV2/model/model_hourly_usage_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object containing document metadata. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageMetadata { /// The metadata for the current pagination. #[serde(rename = "pagination")] diff --git a/src/datadogV2/model/model_hourly_usage_pagination.rs b/src/datadogV2/model/model_hourly_usage_pagination.rs index 311d5592a..d123e7773 100644 --- a/src/datadogV2/model/model_hourly_usage_pagination.rs +++ b/src/datadogV2/model/model_hourly_usage_pagination.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metadata for the current pagination. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsagePagination { /// The cursor to get the next results (if any). To make the next request, use the same parameters and add `next_record_id`. #[serde( diff --git a/src/datadogV2/model/model_hourly_usage_response.rs b/src/datadogV2/model/model_hourly_usage_response.rs index 22a42f29e..5d1725a6a 100644 --- a/src/datadogV2/model/model_hourly_usage_response.rs +++ b/src/datadogV2/model/model_hourly_usage_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Hourly usage response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HourlyUsageResponse { /// Response containing hourly usage. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_hourly_usage_type.rs b/src/datadogV2/model/model_hourly_usage_type.rs index 91db38a98..6d2c926c7 100644 --- a/src/datadogV2/model/model_hourly_usage_type.rs +++ b/src/datadogV2/model/model_hourly_usage_type.rs @@ -27,9 +27,3 @@ impl ToString for HourlyUsageType { } } } - -impl Default for HourlyUsageType { - fn default() -> HourlyUsageType { - Self::APP_SEC_HOST_COUNT - } -} diff --git a/src/datadogV2/model/model_http_log_error.rs b/src/datadogV2/model/model_http_log_error.rs index 3d1b9ea61..5010d69c1 100644 --- a/src/datadogV2/model/model_http_log_error.rs +++ b/src/datadogV2/model/model_http_log_error.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// List of errors. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HTTPLogError { /// Error message. #[serde(rename = "detail")] diff --git a/src/datadogV2/model/model_http_log_errors.rs b/src/datadogV2/model/model_http_log_errors.rs index e729af2fe..012f810fc 100644 --- a/src/datadogV2/model/model_http_log_errors.rs +++ b/src/datadogV2/model/model_http_log_errors.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Invalid query performed. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HTTPLogErrors { /// Structured errors. #[serde(rename = "errors")] diff --git a/src/datadogV2/model/model_http_log_item.rs b/src/datadogV2/model/model_http_log_item.rs index ccef7645e..f32ffd8aa 100644 --- a/src/datadogV2/model/model_http_log_item.rs +++ b/src/datadogV2/model/model_http_log_item.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Logs that are sent over HTTP. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct HTTPLogItem { /// The integration name associated with your log: the technology from which the log originated. /// When it matches an integration name, Datadog automatically installs the corresponding parsers and facets. diff --git a/src/datadogV2/model/model_httpci_app_error.rs b/src/datadogV2/model/model_httpci_app_error.rs new file mode 100644 index 000000000..fc6f1859c --- /dev/null +++ b/src/datadogV2/model/model_httpci_app_error.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of errors. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HTTPCIAppError { + /// Error message. + #[serde(rename = "detail")] + pub detail: Option, + /// Error code. + #[serde(rename = "status")] + pub status: Option, + /// Error title. + #[serde(rename = "title")] + pub title: Option, +} + +impl HTTPCIAppError { + pub fn new() -> HTTPCIAppError { + HTTPCIAppError { + detail: None, + status: None, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_httpci_app_errors.rs b/src/datadogV2/model/model_httpci_app_errors.rs new file mode 100644 index 000000000..5e3ed9707 --- /dev/null +++ b/src/datadogV2/model/model_httpci_app_errors.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Errors occurred. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct HTTPCIAppErrors { + /// Structured errors. + #[serde(rename = "errors")] + pub errors: Option>, +} + +impl HTTPCIAppErrors { + pub fn new() -> HTTPCIAppErrors { + HTTPCIAppErrors { errors: None } + } +} diff --git a/src/datadogV2/model/model_id_p_metadata_form_data.rs b/src/datadogV2/model/model_id_p_metadata_form_data.rs index d4747fadb..12c986191 100644 --- a/src/datadogV2/model/model_id_p_metadata_form_data.rs +++ b/src/datadogV2/model/model_id_p_metadata_form_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The form data submitted to upload IdP metadata #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IdPMetadataFormData { /// The IdP metadata XML file #[serde(rename = "idp_file")] diff --git a/src/datadogV2/model/model_incident_attachment_attachment_type.rs b/src/datadogV2/model/model_incident_attachment_attachment_type.rs new file mode 100644 index 000000000..21b6889be --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_attachment_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentAttachmentAttachmentType { + #[serde(rename = "link")] + LINK, + #[serde(rename = "postmortem")] + POSTMORTEM, +} + +impl ToString for IncidentAttachmentAttachmentType { + fn to_string(&self) -> String { + match self { + Self::LINK => String::from("link"), + Self::POSTMORTEM => String::from("postmortem"), + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_attributes.rs b/src/datadogV2/model/model_incident_attachment_attributes.rs new file mode 100644 index 000000000..6d42055e9 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_attributes.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The attributes object for an attachment. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentAttachmentAttributes { + IncidentAttachmentPostmortemAttributes( + Box, + ), + IncidentAttachmentLinkAttributes( + Box, + ), +} diff --git a/src/datadogV2/model/model_incident_attachment_data.rs b/src/datadogV2/model/model_incident_attachment_data.rs new file mode 100644 index 000000000..a726c1d4f --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_data.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single incident attachment. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentData { + /// The attributes object for an attachment. + #[serde(rename = "attributes")] + pub attributes: Box, + /// A unique identifier that represents the incident attachment. + #[serde(rename = "id")] + pub id: String, + /// The incident attachment's relationships. + #[serde(rename = "relationships")] + pub relationships: Box, + /// The incident attachment resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentAttachmentType, +} + +impl IncidentAttachmentData { + pub fn new( + attributes: Box, + id: String, + relationships: Box, + type_: crate::datadogV2::model::IncidentAttachmentType, + ) -> IncidentAttachmentData { + IncidentAttachmentData { + attributes, + id, + relationships, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_link_attachment_type.rs b/src/datadogV2/model/model_incident_attachment_link_attachment_type.rs new file mode 100644 index 000000000..2f0e48b29 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_link_attachment_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentAttachmentLinkAttachmentType { + #[serde(rename = "link")] + LINK, +} + +impl ToString for IncidentAttachmentLinkAttachmentType { + fn to_string(&self) -> String { + match self { + Self::LINK => String::from("link"), + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_link_attributes.rs b/src/datadogV2/model/model_incident_attachment_link_attributes.rs new file mode 100644 index 000000000..f3b367818 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_link_attributes.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes object for a link attachment. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentLinkAttributes { + /// The link attachment. + #[serde(rename = "attachment")] + pub attachment: Box, + /// The type of link attachment attributes. + #[serde(rename = "attachment_type")] + pub attachment_type: crate::datadogV2::model::IncidentAttachmentLinkAttachmentType, + /// Timestamp when the incident attachment link was last modified. + #[serde(rename = "modified")] + pub modified: Option, +} + +impl IncidentAttachmentLinkAttributes { + pub fn new( + attachment: Box, + attachment_type: crate::datadogV2::model::IncidentAttachmentLinkAttachmentType, + ) -> IncidentAttachmentLinkAttributes { + IncidentAttachmentLinkAttributes { + attachment, + attachment_type, + modified: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_link_attributes_attachment_object.rs b/src/datadogV2/model/model_incident_attachment_link_attributes_attachment_object.rs new file mode 100644 index 000000000..8da939441 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_link_attributes_attachment_object.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The link attachment. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentLinkAttributesAttachmentObject { + /// The URL of this link attachment. + #[serde(rename = "documentUrl")] + pub document_url: String, + /// The title of this link attachment. + #[serde(rename = "title")] + pub title: String, +} + +impl IncidentAttachmentLinkAttributesAttachmentObject { + pub fn new( + document_url: String, + title: String, + ) -> IncidentAttachmentLinkAttributesAttachmentObject { + IncidentAttachmentLinkAttributesAttachmentObject { + document_url, + title, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_postmortem_attachment_type.rs b/src/datadogV2/model/model_incident_attachment_postmortem_attachment_type.rs new file mode 100644 index 000000000..e2f314474 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_postmortem_attachment_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentAttachmentPostmortemAttachmentType { + #[serde(rename = "postmortem")] + POSTMORTEM, +} + +impl ToString for IncidentAttachmentPostmortemAttachmentType { + fn to_string(&self) -> String { + match self { + Self::POSTMORTEM => String::from("postmortem"), + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_postmortem_attributes.rs b/src/datadogV2/model/model_incident_attachment_postmortem_attributes.rs new file mode 100644 index 000000000..ac91a520e --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_postmortem_attributes.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes object for a postmortem attachment. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentPostmortemAttributes { + /// The postmortem attachment. + #[serde(rename = "attachment")] + pub attachment: + Box, + /// The type of postmortem attachment attributes. + #[serde(rename = "attachment_type")] + pub attachment_type: crate::datadogV2::model::IncidentAttachmentPostmortemAttachmentType, +} + +impl IncidentAttachmentPostmortemAttributes { + pub fn new( + attachment: Box< + crate::datadogV2::model::IncidentAttachmentsPostmortemAttributesAttachmentObject, + >, + attachment_type: crate::datadogV2::model::IncidentAttachmentPostmortemAttachmentType, + ) -> IncidentAttachmentPostmortemAttributes { + IncidentAttachmentPostmortemAttributes { + attachment, + attachment_type, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_related_object.rs b/src/datadogV2/model/model_incident_attachment_related_object.rs new file mode 100644 index 000000000..a00f234d9 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_related_object.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentAttachmentRelatedObject { + #[serde(rename = "users")] + USERS, +} + +impl ToString for IncidentAttachmentRelatedObject { + fn to_string(&self) -> String { + match self { + Self::USERS => String::from("users"), + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_relationships.rs b/src/datadogV2/model/model_incident_attachment_relationships.rs new file mode 100644 index 000000000..50ee558a7 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_relationships.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident attachment's relationships. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentRelationships { + /// Relationship to user. + #[serde(rename = "last_modified_by_user")] + pub last_modified_by_user: Option>, +} + +impl IncidentAttachmentRelationships { + pub fn new() -> IncidentAttachmentRelationships { + IncidentAttachmentRelationships { + last_modified_by_user: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_type.rs b/src/datadogV2/model/model_incident_attachment_type.rs new file mode 100644 index 000000000..ac6a05518 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentAttachmentType { + #[serde(rename = "incident_attachments")] + INCIDENT_ATTACHMENTS, +} + +impl ToString for IncidentAttachmentType { + fn to_string(&self) -> String { + match self { + Self::INCIDENT_ATTACHMENTS => String::from("incident_attachments"), + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_update_attributes.rs b/src/datadogV2/model/model_incident_attachment_update_attributes.rs new file mode 100644 index 000000000..45e8eb4ba --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_update_attributes.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Incident attachment attributes. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentAttachmentUpdateAttributes { + IncidentAttachmentPostmortemAttributes( + Box, + ), + IncidentAttachmentLinkAttributes( + Box, + ), +} diff --git a/src/datadogV2/model/model_incident_attachment_update_data.rs b/src/datadogV2/model/model_incident_attachment_update_data.rs new file mode 100644 index 000000000..179946804 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_update_data.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single incident attachment. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentUpdateData { + /// Incident attachment attributes. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// A unique identifier that represents the incident attachment. + #[serde(rename = "id")] + pub id: Option, + /// The incident attachment resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentAttachmentType, +} + +impl IncidentAttachmentUpdateData { + pub fn new( + type_: crate::datadogV2::model::IncidentAttachmentType, + ) -> IncidentAttachmentUpdateData { + IncidentAttachmentUpdateData { + attributes: None, + id: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_update_request.rs b/src/datadogV2/model/model_incident_attachment_update_request.rs new file mode 100644 index 000000000..9c01c31f6 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_update_request.rs @@ -0,0 +1,25 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The update request for an incident's attachments. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentUpdateRequest { + /// An array of incident attachments. An attachment object without an "id" key indicates that you want to + /// create that attachment. An attachment object without an "attributes" key indicates that you want to + /// delete that attachment. An attachment object with both the "id" key and a populated "attributes" object + /// indicates that you want to update that attachment. + #[serde(rename = "data")] + pub data: Vec, +} + +impl IncidentAttachmentUpdateRequest { + pub fn new( + data: Vec, + ) -> IncidentAttachmentUpdateRequest { + IncidentAttachmentUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_attachment_update_response.rs b/src/datadogV2/model/model_incident_attachment_update_response.rs new file mode 100644 index 000000000..cd7af3797 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachment_update_response.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object containing the created or updated incident attachments. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentUpdateResponse { + /// An array of incident attachments. Only the attachments that were created or updated by the request are + /// returned. + #[serde(rename = "data")] + pub data: Vec, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: Option>, +} + +impl IncidentAttachmentUpdateResponse { + pub fn new( + data: Vec, + ) -> IncidentAttachmentUpdateResponse { + IncidentAttachmentUpdateResponse { + data, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachments_postmortem_attributes_attachment_object.rs b/src/datadogV2/model/model_incident_attachments_postmortem_attributes_attachment_object.rs new file mode 100644 index 000000000..4591fcbe2 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachments_postmortem_attributes_attachment_object.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The postmortem attachment. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentsPostmortemAttributesAttachmentObject { + /// The URL of this notebook attachment. + #[serde(rename = "documentUrl")] + pub document_url: String, + /// The title of this postmortem attachment. + #[serde(rename = "title")] + pub title: String, +} + +impl IncidentAttachmentsPostmortemAttributesAttachmentObject { + pub fn new( + document_url: String, + title: String, + ) -> IncidentAttachmentsPostmortemAttributesAttachmentObject { + IncidentAttachmentsPostmortemAttributesAttachmentObject { + document_url, + title, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachments_response.rs b/src/datadogV2/model/model_incident_attachments_response.rs new file mode 100644 index 000000000..7723015e5 --- /dev/null +++ b/src/datadogV2/model/model_incident_attachments_response.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object containing an incident's attachments. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentAttachmentsResponse { + /// An array of incident attachments. + #[serde(rename = "data")] + pub data: Vec, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: Option>, +} + +impl IncidentAttachmentsResponse { + pub fn new( + data: Vec, + ) -> IncidentAttachmentsResponse { + IncidentAttachmentsResponse { + data, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_attachments_response_included_item.rs b/src/datadogV2/model/model_incident_attachments_response_included_item.rs new file mode 100644 index 000000000..2b6f5d5fb --- /dev/null +++ b/src/datadogV2/model/model_incident_attachments_response_included_item.rs @@ -0,0 +1,11 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an attachment that is included in the response. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentAttachmentsResponseIncludedItem { + User(Box), +} diff --git a/src/datadogV2/model/model_incident_create_attributes.rs b/src/datadogV2/model/model_incident_create_attributes.rs new file mode 100644 index 000000000..65156893b --- /dev/null +++ b/src/datadogV2/model/model_incident_create_attributes.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident's attributes for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentCreateAttributes { + /// Required if `customer_impacted:"true"`. A summary of the impact customers experienced during the incident. + #[serde(rename = "customer_impact_scope")] + pub customer_impact_scope: Option, + /// A flag indicating whether the incident caused customer impact. + #[serde(rename = "customer_impacted")] + pub customer_impacted: bool, + /// A condensed view of the user-defined fields for which to create initial selections. + #[serde(rename = "fields")] + pub fields: + Option>, + /// An array of initial timeline cells to be placed at the beginning of the incident timeline. + #[serde(rename = "initial_cells")] + pub initial_cells: Option>, + /// Notification handles that will be notified of the incident at creation. + #[serde(rename = "notification_handles")] + pub notification_handles: Option>, + /// The title of the incident, which summarizes what happened. + #[serde(rename = "title")] + pub title: String, +} + +impl IncidentCreateAttributes { + pub fn new(customer_impacted: bool, title: String) -> IncidentCreateAttributes { + IncidentCreateAttributes { + customer_impact_scope: None, + customer_impacted, + fields: None, + initial_cells: None, + notification_handles: None, + title, + } + } +} diff --git a/src/datadogV2/model/model_incident_create_data.rs b/src/datadogV2/model/model_incident_create_data.rs new file mode 100644 index 000000000..fc2003399 --- /dev/null +++ b/src/datadogV2/model/model_incident_create_data.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident data for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentCreateData { + /// The incident's attributes for a create request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The relationships the incident will have with other resources once created. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentType, +} + +impl IncidentCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::IncidentType, + ) -> IncidentCreateData { + IncidentCreateData { + attributes, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_create_relationships.rs b/src/datadogV2/model/model_incident_create_relationships.rs new file mode 100644 index 000000000..ec6d69706 --- /dev/null +++ b/src/datadogV2/model/model_incident_create_relationships.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The relationships the incident will have with other resources once created. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentCreateRelationships { + /// Relationship to user. + #[serde(rename = "commander_user")] + pub commander_user: Option>, +} + +impl IncidentCreateRelationships { + pub fn new( + commander_user: Option>, + ) -> IncidentCreateRelationships { + IncidentCreateRelationships { commander_user } + } +} diff --git a/src/datadogV2/model/model_incident_create_request.rs b/src/datadogV2/model/model_incident_create_request.rs new file mode 100644 index 000000000..3d3bc52fc --- /dev/null +++ b/src/datadogV2/model/model_incident_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create request for an incident. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentCreateRequest { + /// Incident data for a create request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentCreateRequest { + pub fn new(data: Box) -> IncidentCreateRequest { + IncidentCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_field_attributes.rs b/src/datadogV2/model/model_incident_field_attributes.rs new file mode 100644 index 000000000..5371dde1b --- /dev/null +++ b/src/datadogV2/model/model_incident_field_attributes.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Dynamic fields for which selections can be made, with field names as keys. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentFieldAttributes { + IncidentFieldAttributesSingleValue( + Box, + ), + IncidentFieldAttributesMultipleValue( + Box, + ), +} diff --git a/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs new file mode 100644 index 000000000..e2dcbecf5 --- /dev/null +++ b/src/datadogV2/model/model_incident_field_attributes_multiple_value.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A field with potentially multiple values selected. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentFieldAttributesMultipleValue { + /// Type of the multiple value field definitions. + #[serde(rename = "type")] + pub type_: Option, + /// The multiple values selected for this field. + #[serde(rename = "value", default, with = "::serde_with::rust::double_option")] + pub value: Option>>, +} + +impl IncidentFieldAttributesMultipleValue { + pub fn new() -> IncidentFieldAttributesMultipleValue { + IncidentFieldAttributesMultipleValue { + type_: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_field_attributes_single_value.rs b/src/datadogV2/model/model_incident_field_attributes_single_value.rs new file mode 100644 index 000000000..cf786163c --- /dev/null +++ b/src/datadogV2/model/model_incident_field_attributes_single_value.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A field with a single value selected. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentFieldAttributesSingleValue { + /// Type of the single value field definitions. + #[serde(rename = "type")] + pub type_: Option, + /// The single value selected for this field. + #[serde(rename = "value", default, with = "::serde_with::rust::double_option")] + pub value: Option>, +} + +impl IncidentFieldAttributesSingleValue { + pub fn new() -> IncidentFieldAttributesSingleValue { + IncidentFieldAttributesSingleValue { + type_: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_field_attributes_single_value_type.rs b/src/datadogV2/model/model_incident_field_attributes_single_value_type.rs new file mode 100644 index 000000000..1231ce626 --- /dev/null +++ b/src/datadogV2/model/model_incident_field_attributes_single_value_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentFieldAttributesSingleValueType { + #[serde(rename = "dropdown")] + DROPDOWN, + #[serde(rename = "textbox")] + TEXTBOX, +} + +impl ToString for IncidentFieldAttributesSingleValueType { + fn to_string(&self) -> String { + match self { + Self::DROPDOWN => String::from("dropdown"), + Self::TEXTBOX => String::from("textbox"), + } + } +} diff --git a/src/datadogV2/model/model_incident_field_attributes_value_type.rs b/src/datadogV2/model/model_incident_field_attributes_value_type.rs new file mode 100644 index 000000000..06780b203 --- /dev/null +++ b/src/datadogV2/model/model_incident_field_attributes_value_type.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentFieldAttributesValueType { + #[serde(rename = "multiselect")] + MULTISELECT, + #[serde(rename = "textarray")] + TEXTARRAY, + #[serde(rename = "metrictag")] + METRICTAG, + #[serde(rename = "autocomplete")] + AUTOCOMPLETE, +} + +impl ToString for IncidentFieldAttributesValueType { + fn to_string(&self) -> String { + match self { + Self::MULTISELECT => String::from("multiselect"), + Self::TEXTARRAY => String::from("textarray"), + Self::METRICTAG => String::from("metrictag"), + Self::AUTOCOMPLETE => String::from("autocomplete"), + } + } +} diff --git a/src/datadogV2/model/model_incident_impacts_type.rs b/src/datadogV2/model/model_incident_impacts_type.rs new file mode 100644 index 000000000..37927b090 --- /dev/null +++ b/src/datadogV2/model/model_incident_impacts_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentImpactsType { + #[serde(rename = "incident_impacts")] + INCIDENT_IMPACTS, +} + +impl ToString for IncidentImpactsType { + fn to_string(&self) -> String { + match self { + Self::INCIDENT_IMPACTS => String::from("incident_impacts"), + } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_attributes.rs b/src/datadogV2/model/model_incident_integration_metadata_attributes.rs new file mode 100644 index 000000000..d93bc60fe --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_attributes.rs @@ -0,0 +1,48 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident integration metadata's attributes for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataAttributes { + /// Timestamp when the incident todo was created. + #[serde(rename = "created")] + pub created: Option, + /// UUID of the incident this integration metadata is connected to. + #[serde(rename = "incident_id")] + pub incident_id: Option, + /// A number indicating the type of integration this metadata is for. 1 indicates Slack; + /// 8 indicates Jira. + #[serde(rename = "integration_type")] + pub integration_type: i32, + /// Incident integration metadata's metadata attribute. + #[serde(rename = "metadata")] + pub metadata: Box, + /// Timestamp when the incident todo was last modified. + #[serde(rename = "modified")] + pub modified: Option, + /// A number indicating the status of this integration metadata. 0 indicates unknown; + /// 1 indicates pending; 2 indicates complete; 3 indicates manually created; + /// 4 indicates manually updated; 5 indicates failed. + #[serde(rename = "status")] + pub status: Option, +} + +impl IncidentIntegrationMetadataAttributes { + pub fn new( + integration_type: i32, + metadata: Box, + ) -> IncidentIntegrationMetadataAttributes { + IncidentIntegrationMetadataAttributes { + created: None, + incident_id: None, + integration_type, + metadata, + modified: None, + status: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_create_data.rs b/src/datadogV2/model/model_incident_integration_metadata_create_data.rs new file mode 100644 index 000000000..34ed4d870 --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_create_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident integration metadata data for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataCreateData { + /// Incident integration metadata's attributes for a create request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Integration metadata resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentIntegrationMetadataType, +} + +impl IncidentIntegrationMetadataCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::IncidentIntegrationMetadataType, + ) -> IncidentIntegrationMetadataCreateData { + IncidentIntegrationMetadataCreateData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_create_request.rs b/src/datadogV2/model/model_incident_integration_metadata_create_request.rs new file mode 100644 index 000000000..307150f98 --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create request for an incident integration metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataCreateRequest { + /// Incident integration metadata data for a create request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentIntegrationMetadataCreateRequest { + pub fn new( + data: Box, + ) -> IncidentIntegrationMetadataCreateRequest { + IncidentIntegrationMetadataCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_list_response.rs b/src/datadogV2/model/model_incident_integration_metadata_list_response.rs new file mode 100644 index 000000000..de75cb2c8 --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_list_response.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with a list of incident integration metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataListResponse { + /// An array of incident integration metadata. + #[serde(rename = "data")] + pub data: Vec, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: + Option>, + /// The metadata object containing pagination metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl IncidentIntegrationMetadataListResponse { + pub fn new( + data: Vec, + ) -> IncidentIntegrationMetadataListResponse { + IncidentIntegrationMetadataListResponse { + data, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_metadata.rs b/src/datadogV2/model/model_incident_integration_metadata_metadata.rs new file mode 100644 index 000000000..a2e33623d --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_metadata.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Incident integration metadata's metadata attribute. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentIntegrationMetadataMetadata { + SlackIntegrationMetadata(Box), + JiraIntegrationMetadata(Box), +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_patch_data.rs b/src/datadogV2/model/model_incident_integration_metadata_patch_data.rs new file mode 100644 index 000000000..ccc0909ff --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_patch_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident integration metadata data for a patch request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataPatchData { + /// Incident integration metadata's attributes for a create request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Integration metadata resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentIntegrationMetadataType, +} + +impl IncidentIntegrationMetadataPatchData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::IncidentIntegrationMetadataType, + ) -> IncidentIntegrationMetadataPatchData { + IncidentIntegrationMetadataPatchData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_patch_request.rs b/src/datadogV2/model/model_incident_integration_metadata_patch_request.rs new file mode 100644 index 000000000..6ed01a2ca --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_patch_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Patch request for an incident integration metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataPatchRequest { + /// Incident integration metadata data for a patch request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentIntegrationMetadataPatchRequest { + pub fn new( + data: Box, + ) -> IncidentIntegrationMetadataPatchRequest { + IncidentIntegrationMetadataPatchRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_response.rs b/src/datadogV2/model/model_incident_integration_metadata_response.rs new file mode 100644 index 000000000..87a5f55a9 --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_response.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with an incident integration metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataResponse { + /// Incident integration metadata from a response. + #[serde(rename = "data")] + pub data: Box, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: + Option>, +} + +impl IncidentIntegrationMetadataResponse { + pub fn new( + data: Box, + ) -> IncidentIntegrationMetadataResponse { + IncidentIntegrationMetadataResponse { + data, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_response_data.rs b/src/datadogV2/model/model_incident_integration_metadata_response_data.rs new file mode 100644 index 000000000..a1c79dca8 --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_response_data.rs @@ -0,0 +1,37 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident integration metadata from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationMetadataResponseData { + /// Incident integration metadata's attributes for a create request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident integration metadata's ID. + #[serde(rename = "id")] + pub id: String, + /// The incident's integration relationships from a response. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Integration metadata resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentIntegrationMetadataType, +} + +impl IncidentIntegrationMetadataResponseData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentIntegrationMetadataType, + ) -> IncidentIntegrationMetadataResponseData { + IncidentIntegrationMetadataResponseData { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs b/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs new file mode 100644 index 000000000..b0876bab3 --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_response_included_item.rs @@ -0,0 +1,11 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an incident integration metadata that is included in the response. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentIntegrationMetadataResponseIncludedItem { + User(Box), +} diff --git a/src/datadogV2/model/model_incident_integration_metadata_type.rs b/src/datadogV2/model/model_incident_integration_metadata_type.rs new file mode 100644 index 000000000..75afe3402 --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_metadata_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentIntegrationMetadataType { + #[serde(rename = "incident_integrations")] + INCIDENT_INTEGRATIONS, +} + +impl ToString for IncidentIntegrationMetadataType { + fn to_string(&self) -> String { + match self { + Self::INCIDENT_INTEGRATIONS => String::from("incident_integrations"), + } + } +} diff --git a/src/datadogV2/model/model_incident_integration_relationships.rs b/src/datadogV2/model/model_incident_integration_relationships.rs new file mode 100644 index 000000000..4f02145ff --- /dev/null +++ b/src/datadogV2/model/model_incident_integration_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident's integration relationships from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentIntegrationRelationships { + /// Relationship to user. + #[serde(rename = "created_by_user")] + pub created_by_user: Option>, + /// Relationship to user. + #[serde(rename = "last_modified_by_user")] + pub last_modified_by_user: Option>, +} + +impl IncidentIntegrationRelationships { + pub fn new() -> IncidentIntegrationRelationships { + IncidentIntegrationRelationships { + created_by_user: None, + last_modified_by_user: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_non_datadog_creator.rs b/src/datadogV2/model/model_incident_non_datadog_creator.rs new file mode 100644 index 000000000..53354a528 --- /dev/null +++ b/src/datadogV2/model/model_incident_non_datadog_creator.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident's non Datadog creator. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentNonDatadogCreator { + /// Non Datadog creator `48px` image. + #[serde(rename = "image_48_px")] + pub image_48_px: Option, + /// Non Datadog creator name. + #[serde(rename = "name")] + pub name: Option, +} + +impl IncidentNonDatadogCreator { + pub fn new() -> IncidentNonDatadogCreator { + IncidentNonDatadogCreator { + image_48_px: None, + name: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_notification_handle.rs b/src/datadogV2/model/model_incident_notification_handle.rs new file mode 100644 index 000000000..74f735694 --- /dev/null +++ b/src/datadogV2/model/model_incident_notification_handle.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A notification handle that will be notified at incident creation. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentNotificationHandle { + /// The name of the notified handle. + #[serde(rename = "display_name")] + pub display_name: Option, + /// The email address used for the notification. + #[serde(rename = "handle")] + pub handle: Option, +} + +impl IncidentNotificationHandle { + pub fn new() -> IncidentNotificationHandle { + IncidentNotificationHandle { + display_name: None, + handle: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_postmortem_type.rs b/src/datadogV2/model/model_incident_postmortem_type.rs new file mode 100644 index 000000000..3d09e0054 --- /dev/null +++ b/src/datadogV2/model/model_incident_postmortem_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentPostmortemType { + #[serde(rename = "incident_postmortems")] + INCIDENT_POSTMORTEMS, +} + +impl ToString for IncidentPostmortemType { + fn to_string(&self) -> String { + match self { + Self::INCIDENT_POSTMORTEMS => String::from("incident_postmortems"), + } + } +} diff --git a/src/datadogV2/model/model_incident_related_object.rs b/src/datadogV2/model/model_incident_related_object.rs new file mode 100644 index 000000000..8c0753cf8 --- /dev/null +++ b/src/datadogV2/model/model_incident_related_object.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentRelatedObject { + #[serde(rename = "users")] + USERS, + #[serde(rename = "attachments")] + ATTACHMENTS, +} + +impl ToString for IncidentRelatedObject { + fn to_string(&self) -> String { + match self { + Self::USERS => String::from("users"), + Self::ATTACHMENTS => String::from("attachments"), + } + } +} diff --git a/src/datadogV2/model/model_incident_responders_type.rs b/src/datadogV2/model/model_incident_responders_type.rs new file mode 100644 index 000000000..5e787e37f --- /dev/null +++ b/src/datadogV2/model/model_incident_responders_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentRespondersType { + #[serde(rename = "incident_responders")] + INCIDENT_RESPONDERS, +} + +impl ToString for IncidentRespondersType { + fn to_string(&self) -> String { + match self { + Self::INCIDENT_RESPONDERS => String::from("incident_responders"), + } + } +} diff --git a/src/datadogV2/model/model_incident_response.rs b/src/datadogV2/model/model_incident_response.rs new file mode 100644 index 000000000..8b5d47840 --- /dev/null +++ b/src/datadogV2/model/model_incident_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with an incident. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentResponse { + /// Incident data from a response. + #[serde(rename = "data")] + pub data: Box, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: Option>, +} + +impl IncidentResponse { + pub fn new(data: Box) -> IncidentResponse { + IncidentResponse { + data, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_response_attributes.rs b/src/datadogV2/model/model_incident_response_attributes.rs new file mode 100644 index 000000000..6f50a64ff --- /dev/null +++ b/src/datadogV2/model/model_incident_response_attributes.rs @@ -0,0 +1,155 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident's attributes from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentResponseAttributes { + /// Timestamp of when the incident was archived. + #[serde( + rename = "archived", + default, + with = "::serde_with::rust::double_option" + )] + pub archived: Option>, + /// The incident case id. + #[serde( + rename = "case_id", + default, + with = "::serde_with::rust::double_option" + )] + pub case_id: Option>, + /// Timestamp when the incident was created. + #[serde(rename = "created")] + pub created: Option, + /// Length of the incident's customer impact in seconds. + /// Equals the difference between `customer_impact_start` and `customer_impact_end`. + #[serde(rename = "customer_impact_duration")] + pub customer_impact_duration: Option, + /// Timestamp when customers were no longer impacted by the incident. + #[serde( + rename = "customer_impact_end", + default, + with = "::serde_with::rust::double_option" + )] + pub customer_impact_end: Option>, + /// A summary of the impact customers experienced during the incident. + #[serde( + rename = "customer_impact_scope", + default, + with = "::serde_with::rust::double_option" + )] + pub customer_impact_scope: Option>, + /// Timestamp when customers began being impacted by the incident. + #[serde( + rename = "customer_impact_start", + default, + with = "::serde_with::rust::double_option" + )] + pub customer_impact_start: Option>, + /// A flag indicating whether the incident caused customer impact. + #[serde(rename = "customer_impacted")] + pub customer_impacted: Option, + /// Timestamp when the incident was detected. + #[serde( + rename = "detected", + default, + with = "::serde_with::rust::double_option" + )] + pub detected: Option>, + /// A condensed view of the user-defined fields attached to incidents. + #[serde(rename = "fields")] + pub fields: + Option>, + /// Timestamp when the incident was last modified. + #[serde(rename = "modified")] + pub modified: Option, + /// Incident's non Datadog creator. + #[serde( + rename = "non_datadog_creator", + default, + with = "::serde_with::rust::double_option" + )] + pub non_datadog_creator: + Option>>, + /// Notification handles that will be notified of the incident during update. + #[serde( + rename = "notification_handles", + default, + with = "::serde_with::rust::double_option" + )] + pub notification_handles: + Option>>>, + /// The monotonically increasing integer ID for the incident. + #[serde(rename = "public_id")] + pub public_id: Option, + /// Timestamp when the incident's state was last changed from active or stable to resolved or completed. + #[serde( + rename = "resolved", + default, + with = "::serde_with::rust::double_option" + )] + pub resolved: Option>, + /// The incident severity. + #[serde(rename = "severity")] + pub severity: Option, + /// The state incident. + #[serde(rename = "state", default, with = "::serde_with::rust::double_option")] + pub state: Option>, + /// The amount of time in seconds to detect the incident. + /// Equals the difference between `customer_impact_start` and `detected`. + #[serde(rename = "time_to_detect")] + pub time_to_detect: Option, + /// The amount of time in seconds to call incident after detection. Equals the difference of `detected` and `created`. + #[serde(rename = "time_to_internal_response")] + pub time_to_internal_response: Option, + /// The amount of time in seconds to resolve customer impact after detecting the issue. Equals the difference between `customer_impact_end` and `detected`. + #[serde(rename = "time_to_repair")] + pub time_to_repair: Option, + /// The amount of time in seconds to resolve the incident after it was created. Equals the difference between `created` and `resolved`. + #[serde(rename = "time_to_resolve")] + pub time_to_resolve: Option, + /// The title of the incident, which summarizes what happened. + #[serde(rename = "title")] + pub title: String, + /// The incident visibility status. + #[serde( + rename = "visibility", + default, + with = "::serde_with::rust::double_option" + )] + pub visibility: Option>, +} + +impl IncidentResponseAttributes { + pub fn new(title: String) -> IncidentResponseAttributes { + IncidentResponseAttributes { + archived: None, + case_id: None, + created: None, + customer_impact_duration: None, + customer_impact_end: None, + customer_impact_scope: None, + customer_impact_start: None, + customer_impacted: None, + detected: None, + fields: None, + modified: None, + non_datadog_creator: None, + notification_handles: None, + public_id: None, + resolved: None, + severity: None, + state: None, + time_to_detect: None, + time_to_internal_response: None, + time_to_repair: None, + time_to_resolve: None, + title, + visibility: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_response_data.rs b/src/datadogV2/model/model_incident_response_data.rs new file mode 100644 index 000000000..5b77321dd --- /dev/null +++ b/src/datadogV2/model/model_incident_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident data from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentResponseData { + /// The incident's attributes from a response. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident's ID. + #[serde(rename = "id")] + pub id: String, + /// The incident's relationships from a response. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentType, +} + +impl IncidentResponseData { + pub fn new(id: String, type_: crate::datadogV2::model::IncidentType) -> IncidentResponseData { + IncidentResponseData { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_response_included_item.rs b/src/datadogV2/model/model_incident_response_included_item.rs new file mode 100644 index 000000000..d8548196c --- /dev/null +++ b/src/datadogV2/model/model_incident_response_included_item.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an incident that is included in the response. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentResponseIncludedItem { + User(Box), + IncidentAttachmentData(Box), +} diff --git a/src/datadogV2/model/model_incident_response_meta.rs b/src/datadogV2/model/model_incident_response_meta.rs new file mode 100644 index 000000000..1dcc99eea --- /dev/null +++ b/src/datadogV2/model/model_incident_response_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata object containing pagination metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentResponseMeta { + /// Pagination properties. + #[serde(rename = "pagination")] + pub pagination: Option>, +} + +impl IncidentResponseMeta { + pub fn new() -> IncidentResponseMeta { + IncidentResponseMeta { pagination: None } + } +} diff --git a/src/datadogV2/model/model_incident_response_meta_pagination.rs b/src/datadogV2/model/model_incident_response_meta_pagination.rs new file mode 100644 index 000000000..5d986a3ef --- /dev/null +++ b/src/datadogV2/model/model_incident_response_meta_pagination.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pagination properties. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentResponseMetaPagination { + /// The index of the first element in the next page of results. Equal to page size added to the current offset. + #[serde(rename = "next_offset")] + pub next_offset: Option, + /// The index of the first element in the results. + #[serde(rename = "offset")] + pub offset: Option, + /// Maximum size of pages to return. + #[serde(rename = "size")] + pub size: Option, +} + +impl IncidentResponseMetaPagination { + pub fn new() -> IncidentResponseMetaPagination { + IncidentResponseMetaPagination { + next_offset: None, + offset: None, + size: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_response_relationships.rs b/src/datadogV2/model/model_incident_response_relationships.rs new file mode 100644 index 000000000..63ee97aee --- /dev/null +++ b/src/datadogV2/model/model_incident_response_relationships.rs @@ -0,0 +1,56 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident's relationships from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentResponseRelationships { + /// A relationship reference for attachments. + #[serde(rename = "attachments")] + pub attachments: Option>, + /// Relationship to user. + #[serde( + rename = "commander_user", + default, + with = "::serde_with::rust::double_option" + )] + pub commander_user: Option>>, + /// Relationship to user. + #[serde(rename = "created_by_user")] + pub created_by_user: Option>, + /// Relationship to impacts. + #[serde(rename = "impacts")] + pub impacts: Option>, + /// A relationship reference for multiple integration metadata objects. + #[serde(rename = "integrations")] + pub integrations: + Option>, + /// Relationship to user. + #[serde(rename = "last_modified_by_user")] + pub last_modified_by_user: Option>, + /// Relationship to incident responders. + #[serde(rename = "responders")] + pub responders: Option>, + /// Relationship to incident user defined fields. + #[serde(rename = "user_defined_fields")] + pub user_defined_fields: + Option>, +} + +impl IncidentResponseRelationships { + pub fn new() -> IncidentResponseRelationships { + IncidentResponseRelationships { + attachments: None, + commander_user: None, + created_by_user: None, + impacts: None, + integrations: None, + last_modified_by_user: None, + responders: None, + user_defined_fields: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response.rs b/src/datadogV2/model/model_incident_search_response.rs new file mode 100644 index 000000000..92f05e819 --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with incidents and facets. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponse { + /// Data returned by an incident search. + #[serde(rename = "data")] + pub data: Box, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: Option>, + /// The metadata object containing pagination metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl IncidentSearchResponse { + pub fn new( + data: Box, + ) -> IncidentSearchResponse { + IncidentSearchResponse { + data, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_attributes.rs b/src/datadogV2/model/model_incident_search_response_attributes.rs new file mode 100644 index 000000000..d4adeb2d0 --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes returned by an incident search. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseAttributes { + /// Facet data for incidents returned by a search query. + #[serde(rename = "facets")] + pub facets: Box, + /// Incidents returned by the search. + #[serde(rename = "incidents")] + pub incidents: Vec, + /// Number of incidents returned by the search. + #[serde(rename = "total")] + pub total: i32, +} + +impl IncidentSearchResponseAttributes { + pub fn new( + facets: Box, + incidents: Vec, + total: i32, + ) -> IncidentSearchResponseAttributes { + IncidentSearchResponseAttributes { + facets, + incidents, + total, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_data.rs b/src/datadogV2/model/model_incident_search_response_data.rs new file mode 100644 index 000000000..e57050614 --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data returned by an incident search. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseData { + /// Attributes returned by an incident search. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Incident search result type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl IncidentSearchResponseData { + pub fn new() -> IncidentSearchResponseData { + IncidentSearchResponseData { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_facets_data.rs b/src/datadogV2/model/model_incident_search_response_facets_data.rs new file mode 100644 index 000000000..c9506d9d3 --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_facets_data.rs @@ -0,0 +1,64 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Facet data for incidents returned by a search query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseFacetsData { + /// Facet data for incident commander users. + #[serde(rename = "commander")] + pub commander: Option>, + /// Facet data for incident creator users. + #[serde(rename = "created_by")] + pub created_by: Option>, + /// Facet data for incident property fields. + #[serde(rename = "fields")] + pub fields: Option>, + /// Facet data for incident impact attributes. + #[serde(rename = "impact")] + pub impact: Option>, + /// Facet data for incident last modified by users. + #[serde(rename = "last_modified_by")] + pub last_modified_by: Option>, + /// Facet data for incident postmortem existence. + #[serde(rename = "postmortem")] + pub postmortem: Option>, + /// Facet data for incident responder users. + #[serde(rename = "responder")] + pub responder: Option>, + /// Facet data for incident severity attributes. + #[serde(rename = "severity")] + pub severity: Option>, + /// Facet data for incident state attributes. + #[serde(rename = "state")] + pub state: Option>, + /// Facet data for incident time to repair metrics. + #[serde(rename = "time_to_repair")] + pub time_to_repair: + Option>, + /// Facet data for incident time to resolve metrics. + #[serde(rename = "time_to_resolve")] + pub time_to_resolve: + Option>, +} + +impl IncidentSearchResponseFacetsData { + pub fn new() -> IncidentSearchResponseFacetsData { + IncidentSearchResponseFacetsData { + commander: None, + created_by: None, + fields: None, + impact: None, + last_modified_by: None, + postmortem: None, + responder: None, + severity: None, + state: None, + time_to_repair: None, + time_to_resolve: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_field_facet_data.rs b/src/datadogV2/model/model_incident_search_response_field_facet_data.rs new file mode 100644 index 000000000..bd6267eab --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_field_facet_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Facet value and number of occurrences for a property field of an incident. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseFieldFacetData { + /// Count of the facet value appearing in search results. + #[serde(rename = "count")] + pub count: Option, + /// The facet value appearing in search results. + #[serde(rename = "name")] + pub name: Option, +} + +impl IncidentSearchResponseFieldFacetData { + pub fn new() -> IncidentSearchResponseFieldFacetData { + IncidentSearchResponseFieldFacetData { + count: None, + name: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_incidents_data.rs b/src/datadogV2/model/model_incident_search_response_incidents_data.rs new file mode 100644 index 000000000..6f799295a --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_incidents_data.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident returned by the search. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseIncidentsData { + /// Incident data from a response. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentSearchResponseIncidentsData { + pub fn new( + data: Box, + ) -> IncidentSearchResponseIncidentsData { + IncidentSearchResponseIncidentsData { data } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_meta.rs b/src/datadogV2/model/model_incident_search_response_meta.rs new file mode 100644 index 000000000..088f6a393 --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata object containing pagination metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseMeta { + /// Pagination properties. + #[serde(rename = "pagination")] + pub pagination: Option>, +} + +impl IncidentSearchResponseMeta { + pub fn new() -> IncidentSearchResponseMeta { + IncidentSearchResponseMeta { pagination: None } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_numeric_facet_data.rs b/src/datadogV2/model/model_incident_search_response_numeric_facet_data.rs new file mode 100644 index 000000000..39dbce302 --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_numeric_facet_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Facet data numeric attributes of an incident. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseNumericFacetData { + /// Aggregate information for numeric incident data. + #[serde(rename = "aggregates")] + pub aggregates: Box, + /// Name of the incident property field. + #[serde(rename = "name")] + pub name: String, +} + +impl IncidentSearchResponseNumericFacetData { + pub fn new( + aggregates: Box, + name: String, + ) -> IncidentSearchResponseNumericFacetData { + IncidentSearchResponseNumericFacetData { aggregates, name } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs b/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs new file mode 100644 index 000000000..fbb7ad35e --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_numeric_facet_data_aggregates.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Aggregate information for numeric incident data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseNumericFacetDataAggregates { + /// Maximum value of the numeric aggregates. + #[serde(rename = "max", default, with = "::serde_with::rust::double_option")] + pub max: Option>, + /// Minimum value of the numeric aggregates. + #[serde(rename = "min", default, with = "::serde_with::rust::double_option")] + pub min: Option>, +} + +impl IncidentSearchResponseNumericFacetDataAggregates { + pub fn new() -> IncidentSearchResponseNumericFacetDataAggregates { + IncidentSearchResponseNumericFacetDataAggregates { + max: None, + min: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs b/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs new file mode 100644 index 000000000..6aeaf1eae --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_property_field_facet_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Facet data for the incident property fields. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponsePropertyFieldFacetData { + /// Aggregate information for numeric incident data. + #[serde(rename = "aggregates")] + pub aggregates: + Option>, + /// Facet data for the property field of an incident. + #[serde(rename = "facets")] + pub facets: Vec, + /// Name of the incident property field. + #[serde(rename = "name")] + pub name: String, +} + +impl IncidentSearchResponsePropertyFieldFacetData { + pub fn new( + facets: Vec, + name: String, + ) -> IncidentSearchResponsePropertyFieldFacetData { + IncidentSearchResponsePropertyFieldFacetData { + aggregates: None, + facets, + name, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_response_user_facet_data.rs b/src/datadogV2/model/model_incident_search_response_user_facet_data.rs new file mode 100644 index 000000000..ac296ba81 --- /dev/null +++ b/src/datadogV2/model/model_incident_search_response_user_facet_data.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Facet data for user attributes of an incident. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentSearchResponseUserFacetData { + /// Count of the facet value appearing in search results. + #[serde(rename = "count")] + pub count: Option, + /// Email of the user. + #[serde(rename = "email")] + pub email: Option, + /// Handle of the user. + #[serde(rename = "handle")] + pub handle: Option, + /// Name of the user. + #[serde(rename = "name")] + pub name: Option, + /// ID of the user. + #[serde(rename = "uuid")] + pub uuid: Option, +} + +impl IncidentSearchResponseUserFacetData { + pub fn new() -> IncidentSearchResponseUserFacetData { + IncidentSearchResponseUserFacetData { + count: None, + email: None, + handle: None, + name: None, + uuid: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_search_results_type.rs b/src/datadogV2/model/model_incident_search_results_type.rs new file mode 100644 index 000000000..f31e44aaa --- /dev/null +++ b/src/datadogV2/model/model_incident_search_results_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentSearchResultsType { + #[serde(rename = "incidents_search_results")] + INCIDENTS_SEARCH_RESULTS, +} + +impl ToString for IncidentSearchResultsType { + fn to_string(&self) -> String { + match self { + Self::INCIDENTS_SEARCH_RESULTS => String::from("incidents_search_results"), + } + } +} diff --git a/src/datadogV2/model/model_incident_search_sort_order.rs b/src/datadogV2/model/model_incident_search_sort_order.rs new file mode 100644 index 000000000..78a45d3cc --- /dev/null +++ b/src/datadogV2/model/model_incident_search_sort_order.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentSearchSortOrder { + #[serde(rename = "created")] + CREATED_ASCENDING, + #[serde(rename = "-created")] + CREATED_DESCENDING, +} + +impl ToString for IncidentSearchSortOrder { + fn to_string(&self) -> String { + match self { + Self::CREATED_ASCENDING => String::from("created"), + Self::CREATED_DESCENDING => String::from("-created"), + } + } +} diff --git a/src/datadogV2/model/model_incident_service_create_attributes.rs b/src/datadogV2/model/model_incident_service_create_attributes.rs new file mode 100644 index 000000000..44d4acda3 --- /dev/null +++ b/src/datadogV2/model/model_incident_service_create_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident service's attributes for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceCreateAttributes { + /// Name of the incident service. + #[serde(rename = "name")] + pub name: String, +} + +impl IncidentServiceCreateAttributes { + pub fn new(name: String) -> IncidentServiceCreateAttributes { + IncidentServiceCreateAttributes { name } + } +} diff --git a/src/datadogV2/model/model_incident_service_create_data.rs b/src/datadogV2/model/model_incident_service_create_data.rs new file mode 100644 index 000000000..ffd205a9f --- /dev/null +++ b/src/datadogV2/model/model_incident_service_create_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident Service payload for create requests. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceCreateData { + /// The incident service's attributes for a create request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident service's relationships. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident service resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentServiceType, +} + +impl IncidentServiceCreateData { + pub fn new(type_: crate::datadogV2::model::IncidentServiceType) -> IncidentServiceCreateData { + IncidentServiceCreateData { + attributes: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_service_create_request.rs b/src/datadogV2/model/model_incident_service_create_request.rs new file mode 100644 index 000000000..aaf4fb890 --- /dev/null +++ b/src/datadogV2/model/model_incident_service_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create request with an incident service payload. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceCreateRequest { + /// Incident Service payload for create requests. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentServiceCreateRequest { + pub fn new( + data: Box, + ) -> IncidentServiceCreateRequest { + IncidentServiceCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_service_included_items.rs b/src/datadogV2/model/model_incident_service_included_items.rs new file mode 100644 index 000000000..234742abb --- /dev/null +++ b/src/datadogV2/model/model_incident_service_included_items.rs @@ -0,0 +1,11 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an incident service which is present in the included payload. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentServiceIncludedItems { + User(Box), +} diff --git a/src/datadogV2/model/model_incident_service_relationships.rs b/src/datadogV2/model/model_incident_service_relationships.rs new file mode 100644 index 000000000..b86b811ce --- /dev/null +++ b/src/datadogV2/model/model_incident_service_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident service's relationships. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceRelationships { + /// Relationship to user. + #[serde(rename = "created_by")] + pub created_by: Option>, + /// Relationship to user. + #[serde(rename = "last_modified_by")] + pub last_modified_by: Option>, +} + +impl IncidentServiceRelationships { + pub fn new() -> IncidentServiceRelationships { + IncidentServiceRelationships { + created_by: None, + last_modified_by: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_service_response.rs b/src/datadogV2/model/model_incident_service_response.rs new file mode 100644 index 000000000..a2b0366bc --- /dev/null +++ b/src/datadogV2/model/model_incident_service_response.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with an incident service payload. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceResponse { + /// Incident Service data from responses. + #[serde(rename = "data")] + pub data: Box, + /// Included objects from relationships. + #[serde(rename = "included")] + pub included: Option>, +} + +impl IncidentServiceResponse { + pub fn new( + data: Box, + ) -> IncidentServiceResponse { + IncidentServiceResponse { + data, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_service_response_attributes.rs b/src/datadogV2/model/model_incident_service_response_attributes.rs new file mode 100644 index 000000000..e1a30facd --- /dev/null +++ b/src/datadogV2/model/model_incident_service_response_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident service's attributes from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceResponseAttributes { + /// Timestamp of when the incident service was created. + #[serde(rename = "created")] + pub created: Option, + /// Timestamp of when the incident service was modified. + #[serde(rename = "modified")] + pub modified: Option, + /// Name of the incident service. + #[serde(rename = "name")] + pub name: Option, +} + +impl IncidentServiceResponseAttributes { + pub fn new() -> IncidentServiceResponseAttributes { + IncidentServiceResponseAttributes { + created: None, + modified: None, + name: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_service_response_data.rs b/src/datadogV2/model/model_incident_service_response_data.rs new file mode 100644 index 000000000..fd2f4afc0 --- /dev/null +++ b/src/datadogV2/model/model_incident_service_response_data.rs @@ -0,0 +1,37 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident Service data from responses. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceResponseData { + /// The incident service's attributes from a response. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident service's ID. + #[serde(rename = "id")] + pub id: String, + /// The incident service's relationships. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident service resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentServiceType, +} + +impl IncidentServiceResponseData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentServiceType, + ) -> IncidentServiceResponseData { + IncidentServiceResponseData { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_service_type.rs b/src/datadogV2/model/model_incident_service_type.rs new file mode 100644 index 000000000..88343bbd1 --- /dev/null +++ b/src/datadogV2/model/model_incident_service_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentServiceType { + #[serde(rename = "services")] + SERVICES, +} + +impl ToString for IncidentServiceType { + fn to_string(&self) -> String { + match self { + Self::SERVICES => String::from("services"), + } + } +} diff --git a/src/datadogV2/model/model_incident_service_update_attributes.rs b/src/datadogV2/model/model_incident_service_update_attributes.rs new file mode 100644 index 000000000..eda012a28 --- /dev/null +++ b/src/datadogV2/model/model_incident_service_update_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident service's attributes for an update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceUpdateAttributes { + /// Name of the incident service. + #[serde(rename = "name")] + pub name: String, +} + +impl IncidentServiceUpdateAttributes { + pub fn new(name: String) -> IncidentServiceUpdateAttributes { + IncidentServiceUpdateAttributes { name } + } +} diff --git a/src/datadogV2/model/model_incident_service_update_data.rs b/src/datadogV2/model/model_incident_service_update_data.rs new file mode 100644 index 000000000..b38b7ddf5 --- /dev/null +++ b/src/datadogV2/model/model_incident_service_update_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident Service payload for update requests. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceUpdateData { + /// The incident service's attributes for an update request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident service's ID. + #[serde(rename = "id")] + pub id: Option, + /// The incident service's relationships. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident service resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentServiceType, +} + +impl IncidentServiceUpdateData { + pub fn new(type_: crate::datadogV2::model::IncidentServiceType) -> IncidentServiceUpdateData { + IncidentServiceUpdateData { + attributes: None, + id: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_service_update_request.rs b/src/datadogV2/model/model_incident_service_update_request.rs new file mode 100644 index 000000000..104963083 --- /dev/null +++ b/src/datadogV2/model/model_incident_service_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update request with an incident service payload. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServiceUpdateRequest { + /// Incident Service payload for update requests. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentServiceUpdateRequest { + pub fn new( + data: Box, + ) -> IncidentServiceUpdateRequest { + IncidentServiceUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_services_response.rs b/src/datadogV2/model/model_incident_services_response.rs new file mode 100644 index 000000000..b8627f356 --- /dev/null +++ b/src/datadogV2/model/model_incident_services_response.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with a list of incident service payloads. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentServicesResponse { + /// An array of incident services. + #[serde(rename = "data")] + pub data: Vec, + /// Included related resources which the user requested. + #[serde(rename = "included")] + pub included: Option>, + /// The metadata object containing pagination metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl IncidentServicesResponse { + pub fn new( + data: Vec, + ) -> IncidentServicesResponse { + IncidentServicesResponse { + data, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_severity.rs b/src/datadogV2/model/model_incident_severity.rs new file mode 100644 index 000000000..87cd51a5d --- /dev/null +++ b/src/datadogV2/model/model_incident_severity.rs @@ -0,0 +1,34 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentSeverity { + #[serde(rename = "UNKNOWN")] + UNKNOWN, + #[serde(rename = "SEV-1")] + SEV_1, + #[serde(rename = "SEV-2")] + SEV_2, + #[serde(rename = "SEV-3")] + SEV_3, + #[serde(rename = "SEV-4")] + SEV_4, + #[serde(rename = "SEV-5")] + SEV_5, +} + +impl ToString for IncidentSeverity { + fn to_string(&self) -> String { + match self { + Self::UNKNOWN => String::from("UNKNOWN"), + Self::SEV_1 => String::from("SEV-1"), + Self::SEV_2 => String::from("SEV-2"), + Self::SEV_3 => String::from("SEV-3"), + Self::SEV_4 => String::from("SEV-4"), + Self::SEV_5 => String::from("SEV-5"), + } + } +} diff --git a/src/datadogV2/model/model_incident_team_create_attributes.rs b/src/datadogV2/model/model_incident_team_create_attributes.rs new file mode 100644 index 000000000..20e939df1 --- /dev/null +++ b/src/datadogV2/model/model_incident_team_create_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident team's attributes for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamCreateAttributes { + /// Name of the incident team. + #[serde(rename = "name")] + pub name: String, +} + +impl IncidentTeamCreateAttributes { + pub fn new(name: String) -> IncidentTeamCreateAttributes { + IncidentTeamCreateAttributes { name } + } +} diff --git a/src/datadogV2/model/model_incident_team_create_data.rs b/src/datadogV2/model/model_incident_team_create_data.rs new file mode 100644 index 000000000..2f2e2618b --- /dev/null +++ b/src/datadogV2/model/model_incident_team_create_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident Team data for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamCreateData { + /// The incident team's attributes for a create request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident team's relationships. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident Team resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentTeamType, +} + +impl IncidentTeamCreateData { + pub fn new(type_: crate::datadogV2::model::IncidentTeamType) -> IncidentTeamCreateData { + IncidentTeamCreateData { + attributes: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_team_create_request.rs b/src/datadogV2/model/model_incident_team_create_request.rs new file mode 100644 index 000000000..e57df0348 --- /dev/null +++ b/src/datadogV2/model/model_incident_team_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create request with an incident team payload. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamCreateRequest { + /// Incident Team data for a create request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentTeamCreateRequest { + pub fn new( + data: Box, + ) -> IncidentTeamCreateRequest { + IncidentTeamCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_team_included_items.rs b/src/datadogV2/model/model_incident_team_included_items.rs new file mode 100644 index 000000000..e94d314e5 --- /dev/null +++ b/src/datadogV2/model/model_incident_team_included_items.rs @@ -0,0 +1,11 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an incident team which is present in the included payload. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentTeamIncludedItems { + User(Box), +} diff --git a/src/datadogV2/model/model_incident_team_relationships.rs b/src/datadogV2/model/model_incident_team_relationships.rs new file mode 100644 index 000000000..f13c7ee86 --- /dev/null +++ b/src/datadogV2/model/model_incident_team_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident team's relationships. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamRelationships { + /// Relationship to user. + #[serde(rename = "created_by")] + pub created_by: Option>, + /// Relationship to user. + #[serde(rename = "last_modified_by")] + pub last_modified_by: Option>, +} + +impl IncidentTeamRelationships { + pub fn new() -> IncidentTeamRelationships { + IncidentTeamRelationships { + created_by: None, + last_modified_by: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_team_response.rs b/src/datadogV2/model/model_incident_team_response.rs new file mode 100644 index 000000000..aa17239cc --- /dev/null +++ b/src/datadogV2/model/model_incident_team_response.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with an incident team payload. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamResponse { + /// Incident Team data from a response. + #[serde(rename = "data")] + pub data: Box, + /// Included objects from relationships. + #[serde(rename = "included")] + pub included: Option>, +} + +impl IncidentTeamResponse { + pub fn new( + data: Box, + ) -> IncidentTeamResponse { + IncidentTeamResponse { + data, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_team_response_attributes.rs b/src/datadogV2/model/model_incident_team_response_attributes.rs new file mode 100644 index 000000000..96f8133a4 --- /dev/null +++ b/src/datadogV2/model/model_incident_team_response_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident team's attributes from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamResponseAttributes { + /// Timestamp of when the incident team was created. + #[serde(rename = "created")] + pub created: Option, + /// Timestamp of when the incident team was modified. + #[serde(rename = "modified")] + pub modified: Option, + /// Name of the incident team. + #[serde(rename = "name")] + pub name: Option, +} + +impl IncidentTeamResponseAttributes { + pub fn new() -> IncidentTeamResponseAttributes { + IncidentTeamResponseAttributes { + created: None, + modified: None, + name: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_team_response_data.rs b/src/datadogV2/model/model_incident_team_response_data.rs new file mode 100644 index 000000000..4d781aa0c --- /dev/null +++ b/src/datadogV2/model/model_incident_team_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident Team data from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamResponseData { + /// The incident team's attributes from a response. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident team's ID. + #[serde(rename = "id")] + pub id: Option, + /// The incident team's relationships. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident Team resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl IncidentTeamResponseData { + pub fn new() -> IncidentTeamResponseData { + IncidentTeamResponseData { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_team_type.rs b/src/datadogV2/model/model_incident_team_type.rs new file mode 100644 index 000000000..6d934a61d --- /dev/null +++ b/src/datadogV2/model/model_incident_team_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentTeamType { + #[serde(rename = "teams")] + TEAMS, +} + +impl ToString for IncidentTeamType { + fn to_string(&self) -> String { + match self { + Self::TEAMS => String::from("teams"), + } + } +} diff --git a/src/datadogV2/model/model_incident_team_update_attributes.rs b/src/datadogV2/model/model_incident_team_update_attributes.rs new file mode 100644 index 000000000..fc5ed8f28 --- /dev/null +++ b/src/datadogV2/model/model_incident_team_update_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident team's attributes for an update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamUpdateAttributes { + /// Name of the incident team. + #[serde(rename = "name")] + pub name: String, +} + +impl IncidentTeamUpdateAttributes { + pub fn new(name: String) -> IncidentTeamUpdateAttributes { + IncidentTeamUpdateAttributes { name } + } +} diff --git a/src/datadogV2/model/model_incident_team_update_data.rs b/src/datadogV2/model/model_incident_team_update_data.rs new file mode 100644 index 000000000..0ecda33d6 --- /dev/null +++ b/src/datadogV2/model/model_incident_team_update_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident Team data for an update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamUpdateData { + /// The incident team's attributes for an update request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident team's ID. + #[serde(rename = "id")] + pub id: Option, + /// The incident team's relationships. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident Team resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentTeamType, +} + +impl IncidentTeamUpdateData { + pub fn new(type_: crate::datadogV2::model::IncidentTeamType) -> IncidentTeamUpdateData { + IncidentTeamUpdateData { + attributes: None, + id: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_team_update_request.rs b/src/datadogV2/model/model_incident_team_update_request.rs new file mode 100644 index 000000000..05cb352bc --- /dev/null +++ b/src/datadogV2/model/model_incident_team_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update request with an incident team payload. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamUpdateRequest { + /// Incident Team data for an update request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentTeamUpdateRequest { + pub fn new( + data: Box, + ) -> IncidentTeamUpdateRequest { + IncidentTeamUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_teams_response.rs b/src/datadogV2/model/model_incident_teams_response.rs new file mode 100644 index 000000000..a7c1cc0df --- /dev/null +++ b/src/datadogV2/model/model_incident_teams_response.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with a list of incident team payloads. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTeamsResponse { + /// An array of incident teams. + #[serde(rename = "data")] + pub data: Vec, + /// Included related resources which the user requested. + #[serde(rename = "included")] + pub included: Option>, + /// The metadata object containing pagination metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl IncidentTeamsResponse { + pub fn new( + data: Vec, + ) -> IncidentTeamsResponse { + IncidentTeamsResponse { + data, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs b/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs new file mode 100644 index 000000000..73af70e87 --- /dev/null +++ b/src/datadogV2/model/model_incident_timeline_cell_create_attributes.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The timeline cell's attributes for a create request. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentTimelineCellCreateAttributes { + IncidentTimelineCellMarkdownCreateAttributes( + Box, + ), +} diff --git a/src/datadogV2/model/model_incident_timeline_cell_markdown_content_type.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_content_type.rs new file mode 100644 index 000000000..4f80dbcb1 --- /dev/null +++ b/src/datadogV2/model/model_incident_timeline_cell_markdown_content_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentTimelineCellMarkdownContentType { + #[serde(rename = "markdown")] + MARKDOWN, +} + +impl ToString for IncidentTimelineCellMarkdownContentType { + fn to_string(&self) -> String { + match self { + Self::MARKDOWN => String::from("markdown"), + } + } +} diff --git a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs new file mode 100644 index 000000000..ba8f3e7e0 --- /dev/null +++ b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Timeline cell data for Markdown timeline cells for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTimelineCellMarkdownCreateAttributes { + /// Type of the Markdown timeline cell. + #[serde(rename = "cell_type")] + pub cell_type: crate::datadogV2::model::IncidentTimelineCellMarkdownContentType, + /// The Markdown timeline cell contents. + #[serde(rename = "content")] + pub content: Box, + /// A flag indicating whether the timeline cell is important and should be highlighted. + #[serde(rename = "important")] + pub important: Option, +} + +impl IncidentTimelineCellMarkdownCreateAttributes { + pub fn new( + cell_type: crate::datadogV2::model::IncidentTimelineCellMarkdownContentType, + content: Box, + ) -> IncidentTimelineCellMarkdownCreateAttributes { + IncidentTimelineCellMarkdownCreateAttributes { + cell_type, + content, + important: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs new file mode 100644 index 000000000..2162eed3b --- /dev/null +++ b/src/datadogV2/model/model_incident_timeline_cell_markdown_create_attributes_content.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The Markdown timeline cell contents. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTimelineCellMarkdownCreateAttributesContent { + /// The Markdown content of the cell. + #[serde(rename = "content")] + pub content: Option, +} + +impl IncidentTimelineCellMarkdownCreateAttributesContent { + pub fn new() -> IncidentTimelineCellMarkdownCreateAttributesContent { + IncidentTimelineCellMarkdownCreateAttributesContent { content: None } + } +} diff --git a/src/datadogV2/model/model_incident_todo_anonymous_assignee.rs b/src/datadogV2/model/model_incident_todo_anonymous_assignee.rs new file mode 100644 index 000000000..7e15d2e18 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_anonymous_assignee.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Anonymous assignee entity. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoAnonymousAssignee { + /// URL for assignee's icon. + #[serde(rename = "icon")] + pub icon: String, + /// Anonymous assignee's ID. + #[serde(rename = "id")] + pub id: String, + /// Assignee's name. + #[serde(rename = "name")] + pub name: String, + /// The source of the anonymous assignee. + #[serde(rename = "source")] + pub source: crate::datadogV2::model::IncidentTodoAnonymousAssigneeSource, +} + +impl IncidentTodoAnonymousAssignee { + pub fn new( + icon: String, + id: String, + name: String, + source: crate::datadogV2::model::IncidentTodoAnonymousAssigneeSource, + ) -> IncidentTodoAnonymousAssignee { + IncidentTodoAnonymousAssignee { + icon, + id, + name, + source, + } + } +} diff --git a/src/datadogV2/model/model_incident_todo_anonymous_assignee_source.rs b/src/datadogV2/model/model_incident_todo_anonymous_assignee_source.rs new file mode 100644 index 000000000..5ee5dfaeb --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_anonymous_assignee_source.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentTodoAnonymousAssigneeSource { + #[serde(rename = "slack")] + SLACK, + #[serde(rename = "microsoft_teams")] + MICROSOFT_TEAMS, +} + +impl ToString for IncidentTodoAnonymousAssigneeSource { + fn to_string(&self) -> String { + match self { + Self::SLACK => String::from("slack"), + Self::MICROSOFT_TEAMS => String::from("microsoft_teams"), + } + } +} diff --git a/src/datadogV2/model/model_incident_todo_assignee.rs b/src/datadogV2/model/model_incident_todo_assignee.rs new file mode 100644 index 000000000..dab06b362 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_assignee.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A todo assignee. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentTodoAssignee { + IncidentTodoAssigneeHandle(Box), + IncidentTodoAnonymousAssignee(Box), +} diff --git a/src/datadogV2/model/model_incident_todo_attributes.rs b/src/datadogV2/model/model_incident_todo_attributes.rs new file mode 100644 index 000000000..deaab79b1 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_attributes.rs @@ -0,0 +1,57 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident todo's attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoAttributes { + /// Array of todo assignees. + #[serde(rename = "assignees")] + pub assignees: Vec, + /// Timestamp when the todo was completed. + #[serde( + rename = "completed", + default, + with = "::serde_with::rust::double_option" + )] + pub completed: Option>, + /// The follow-up task's content. + #[serde(rename = "content")] + pub content: String, + /// Timestamp when the incident todo was created. + #[serde(rename = "created")] + pub created: Option, + /// Timestamp when the todo should be completed by. + #[serde( + rename = "due_date", + default, + with = "::serde_with::rust::double_option" + )] + pub due_date: Option>, + /// UUID of the incident this todo is connected to. + #[serde(rename = "incident_id")] + pub incident_id: Option, + /// Timestamp when the incident todo was last modified. + #[serde(rename = "modified")] + pub modified: Option, +} + +impl IncidentTodoAttributes { + pub fn new( + assignees: Vec, + content: String, + ) -> IncidentTodoAttributes { + IncidentTodoAttributes { + assignees, + completed: None, + content, + created: None, + due_date: None, + incident_id: None, + modified: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_todo_create_data.rs b/src/datadogV2/model/model_incident_todo_create_data.rs new file mode 100644 index 000000000..d35396097 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_create_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident todo data for a create request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoCreateData { + /// Incident todo's attributes. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Todo resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentTodoType, +} + +impl IncidentTodoCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::IncidentTodoType, + ) -> IncidentTodoCreateData { + IncidentTodoCreateData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_incident_todo_create_request.rs b/src/datadogV2/model/model_incident_todo_create_request.rs new file mode 100644 index 000000000..4432cd231 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create request for an incident todo. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoCreateRequest { + /// Incident todo data for a create request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentTodoCreateRequest { + pub fn new( + data: Box, + ) -> IncidentTodoCreateRequest { + IncidentTodoCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_todo_list_response.rs b/src/datadogV2/model/model_incident_todo_list_response.rs new file mode 100644 index 000000000..0c7abfb02 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_list_response.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with a list of incident todos. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoListResponse { + /// An array of incident todos. + #[serde(rename = "data")] + pub data: Vec, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: Option>, + /// The metadata object containing pagination metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl IncidentTodoListResponse { + pub fn new( + data: Vec, + ) -> IncidentTodoListResponse { + IncidentTodoListResponse { + data, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_todo_patch_data.rs b/src/datadogV2/model/model_incident_todo_patch_data.rs new file mode 100644 index 000000000..b9f491306 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_patch_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident todo data for a patch request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoPatchData { + /// Incident todo's attributes. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Todo resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentTodoType, +} + +impl IncidentTodoPatchData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::IncidentTodoType, + ) -> IncidentTodoPatchData { + IncidentTodoPatchData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_incident_todo_patch_request.rs b/src/datadogV2/model/model_incident_todo_patch_request.rs new file mode 100644 index 000000000..429686bef --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_patch_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Patch request for an incident todo. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoPatchRequest { + /// Incident todo data for a patch request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentTodoPatchRequest { + pub fn new( + data: Box, + ) -> IncidentTodoPatchRequest { + IncidentTodoPatchRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_todo_relationships.rs b/src/datadogV2/model/model_incident_todo_relationships.rs new file mode 100644 index 000000000..2e1c12671 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident's relationships from a response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoRelationships { + /// Relationship to user. + #[serde(rename = "created_by_user")] + pub created_by_user: Option>, + /// Relationship to user. + #[serde(rename = "last_modified_by_user")] + pub last_modified_by_user: Option>, +} + +impl IncidentTodoRelationships { + pub fn new() -> IncidentTodoRelationships { + IncidentTodoRelationships { + created_by_user: None, + last_modified_by_user: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_todo_response.rs b/src/datadogV2/model/model_incident_todo_response.rs new file mode 100644 index 000000000..5d7077206 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_response.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with an incident todo. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoResponse { + /// Incident todo response data. + #[serde(rename = "data")] + pub data: Box, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: Option>, +} + +impl IncidentTodoResponse { + pub fn new( + data: Box, + ) -> IncidentTodoResponse { + IncidentTodoResponse { + data, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_todo_response_data.rs b/src/datadogV2/model/model_incident_todo_response_data.rs new file mode 100644 index 000000000..27392cdb5 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_response_data.rs @@ -0,0 +1,37 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident todo response data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentTodoResponseData { + /// Incident todo's attributes. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident todo's ID. + #[serde(rename = "id")] + pub id: String, + /// The incident's relationships from a response. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Todo resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentTodoType, +} + +impl IncidentTodoResponseData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentTodoType, + ) -> IncidentTodoResponseData { + IncidentTodoResponseData { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_todo_response_included_item.rs b/src/datadogV2/model/model_incident_todo_response_included_item.rs new file mode 100644 index 000000000..b12e5eb84 --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_response_included_item.rs @@ -0,0 +1,11 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to an incident todo that is included in the response. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IncidentTodoResponseIncludedItem { + User(Box), +} diff --git a/src/datadogV2/model/model_incident_todo_type.rs b/src/datadogV2/model/model_incident_todo_type.rs new file mode 100644 index 000000000..6023c5d8e --- /dev/null +++ b/src/datadogV2/model/model_incident_todo_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentTodoType { + #[serde(rename = "incident_todos")] + INCIDENT_TODOS, +} + +impl ToString for IncidentTodoType { + fn to_string(&self) -> String { + match self { + Self::INCIDENT_TODOS => String::from("incident_todos"), + } + } +} diff --git a/src/datadogV2/model/model_incident_type.rs b/src/datadogV2/model/model_incident_type.rs new file mode 100644 index 000000000..299410235 --- /dev/null +++ b/src/datadogV2/model/model_incident_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentType { + #[serde(rename = "incidents")] + INCIDENTS, +} + +impl ToString for IncidentType { + fn to_string(&self) -> String { + match self { + Self::INCIDENTS => String::from("incidents"), + } + } +} diff --git a/src/datadogV2/model/model_incident_update_attributes.rs b/src/datadogV2/model/model_incident_update_attributes.rs new file mode 100644 index 000000000..329397b18 --- /dev/null +++ b/src/datadogV2/model/model_incident_update_attributes.rs @@ -0,0 +1,63 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident's attributes for an update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentUpdateAttributes { + /// Timestamp when customers were no longer impacted by the incident. + #[serde( + rename = "customer_impact_end", + default, + with = "::serde_with::rust::double_option" + )] + pub customer_impact_end: Option>, + /// A summary of the impact customers experienced during the incident. + #[serde(rename = "customer_impact_scope")] + pub customer_impact_scope: Option, + /// Timestamp when customers began being impacted by the incident. + #[serde( + rename = "customer_impact_start", + default, + with = "::serde_with::rust::double_option" + )] + pub customer_impact_start: Option>, + /// A flag indicating whether the incident caused customer impact. + #[serde(rename = "customer_impacted")] + pub customer_impacted: Option, + /// Timestamp when the incident was detected. + #[serde( + rename = "detected", + default, + with = "::serde_with::rust::double_option" + )] + pub detected: Option>, + /// A condensed view of the user-defined fields for which to update selections. + #[serde(rename = "fields")] + pub fields: + Option>, + /// Notification handles that will be notified of the incident during update. + #[serde(rename = "notification_handles")] + pub notification_handles: Option>, + /// The title of the incident, which summarizes what happened. + #[serde(rename = "title")] + pub title: Option, +} + +impl IncidentUpdateAttributes { + pub fn new() -> IncidentUpdateAttributes { + IncidentUpdateAttributes { + customer_impact_end: None, + customer_impact_scope: None, + customer_impact_start: None, + customer_impacted: None, + detected: None, + fields: None, + notification_handles: None, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_update_data.rs b/src/datadogV2/model/model_incident_update_data.rs new file mode 100644 index 000000000..68659b80a --- /dev/null +++ b/src/datadogV2/model/model_incident_update_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident data for an update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentUpdateData { + /// The incident's attributes for an update request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The incident's ID. + #[serde(rename = "id")] + pub id: String, + /// The incident's relationships for an update request. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Incident resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentType, +} + +impl IncidentUpdateData { + pub fn new(id: String, type_: crate::datadogV2::model::IncidentType) -> IncidentUpdateData { + IncidentUpdateData { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_incident_update_relationships.rs b/src/datadogV2/model/model_incident_update_relationships.rs new file mode 100644 index 000000000..ecfbfd9d6 --- /dev/null +++ b/src/datadogV2/model/model_incident_update_relationships.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The incident's relationships for an update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentUpdateRelationships { + /// Relationship to user. + #[serde( + rename = "commander_user", + default, + with = "::serde_with::rust::double_option" + )] + pub commander_user: Option>>, + /// A relationship reference for multiple integration metadata objects. + #[serde(rename = "integrations")] + pub integrations: + Option>, + /// A relationship reference for postmortems. + #[serde(rename = "postmortem")] + pub postmortem: Option>, +} + +impl IncidentUpdateRelationships { + pub fn new() -> IncidentUpdateRelationships { + IncidentUpdateRelationships { + commander_user: None, + integrations: None, + postmortem: None, + } + } +} diff --git a/src/datadogV2/model/model_incident_update_request.rs b/src/datadogV2/model/model_incident_update_request.rs new file mode 100644 index 000000000..693cc2377 --- /dev/null +++ b/src/datadogV2/model/model_incident_update_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update request for an incident. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentUpdateRequest { + /// Incident data for an update request. + #[serde(rename = "data")] + pub data: Box, +} + +impl IncidentUpdateRequest { + pub fn new(data: Box) -> IncidentUpdateRequest { + IncidentUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_incident_user_defined_field_type.rs b/src/datadogV2/model/model_incident_user_defined_field_type.rs new file mode 100644 index 000000000..c12c9b4df --- /dev/null +++ b/src/datadogV2/model/model_incident_user_defined_field_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IncidentUserDefinedFieldType { + #[serde(rename = "user_defined_field")] + USER_DEFINED_FIELD, +} + +impl ToString for IncidentUserDefinedFieldType { + fn to_string(&self) -> String { + match self { + Self::USER_DEFINED_FIELD => String::from("user_defined_field"), + } + } +} diff --git a/src/datadogV2/model/model_incidents_response.rs b/src/datadogV2/model/model_incidents_response.rs new file mode 100644 index 000000000..3bd57c7d0 --- /dev/null +++ b/src/datadogV2/model/model_incidents_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with a list of incidents. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct IncidentsResponse { + /// An array of incidents. + #[serde(rename = "data")] + pub data: Vec, + /// Included related resources that the user requested. + #[serde(rename = "included")] + pub included: Option>, + /// The metadata object containing pagination metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl IncidentsResponse { + pub fn new(data: Vec) -> IncidentsResponse { + IncidentsResponse { + data, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_intake_payload_accepted.rs b/src/datadogV2/model/model_intake_payload_accepted.rs index faa397acb..6ba219771 100644 --- a/src/datadogV2/model/model_intake_payload_accepted.rs +++ b/src/datadogV2/model/model_intake_payload_accepted.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The payload accepted for intake. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IntakePayloadAccepted { /// A list of errors. #[serde(rename = "errors")] diff --git a/src/datadogV2/model/model_ip_allowlist_attributes.rs b/src/datadogV2/model/model_ip_allowlist_attributes.rs index 5ee37492b..0794b1a81 100644 --- a/src/datadogV2/model/model_ip_allowlist_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes of the IP allowlist. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPAllowlistAttributes { /// Whether the IP allowlist logic is enabled or not. #[serde(rename = "enabled")] diff --git a/src/datadogV2/model/model_ip_allowlist_data.rs b/src/datadogV2/model/model_ip_allowlist_data.rs index 808caf5ea..606b6e073 100644 --- a/src/datadogV2/model/model_ip_allowlist_data.rs +++ b/src/datadogV2/model/model_ip_allowlist_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// IP allowlist data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPAllowlistData { /// Attributes of the IP allowlist. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_ip_allowlist_entry.rs b/src/datadogV2/model/model_ip_allowlist_entry.rs index 0c19e80dc..8b8e77631 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// IP allowlist entry object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPAllowlistEntry { /// Data of the IP allowlist entry object. #[serde(rename = "data")] @@ -14,9 +14,7 @@ pub struct IPAllowlistEntry { } impl IPAllowlistEntry { - pub fn new(data: crate::datadogV2::model::IPAllowlistEntryData) -> IPAllowlistEntry { - IPAllowlistEntry { - data: Box::new(data), - } + pub fn new(data: Box) -> IPAllowlistEntry { + IPAllowlistEntry { data } } } diff --git a/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs b/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs index 34dfffc52..9bb84e3ea 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes of the IP allowlist entry. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPAllowlistEntryAttributes { /// The CIDR block describing the IP range of the entry. #[serde(rename = "cidr_block")] diff --git a/src/datadogV2/model/model_ip_allowlist_entry_data.rs b/src/datadogV2/model/model_ip_allowlist_entry_data.rs index 735ee24bf..acf5dfeea 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_data.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Data of the IP allowlist entry object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPAllowlistEntryData { /// Attributes of the IP allowlist entry. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_ip_allowlist_entry_type.rs b/src/datadogV2/model/model_ip_allowlist_entry_type.rs index 7f24147e1..9f425f029 100644 --- a/src/datadogV2/model/model_ip_allowlist_entry_type.rs +++ b/src/datadogV2/model/model_ip_allowlist_entry_type.rs @@ -17,9 +17,3 @@ impl ToString for IPAllowlistEntryType { } } } - -impl Default for IPAllowlistEntryType { - fn default() -> IPAllowlistEntryType { - Self::IP_ALLOWLIST_ENTRY - } -} diff --git a/src/datadogV2/model/model_ip_allowlist_response.rs b/src/datadogV2/model/model_ip_allowlist_response.rs index f946ea0ea..0ed989f14 100644 --- a/src/datadogV2/model/model_ip_allowlist_response.rs +++ b/src/datadogV2/model/model_ip_allowlist_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing information about the IP allowlist. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPAllowlistResponse { /// IP allowlist data. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_ip_allowlist_type.rs b/src/datadogV2/model/model_ip_allowlist_type.rs index adbb81a2d..e2847239b 100644 --- a/src/datadogV2/model/model_ip_allowlist_type.rs +++ b/src/datadogV2/model/model_ip_allowlist_type.rs @@ -17,9 +17,3 @@ impl ToString for IPAllowlistType { } } } - -impl Default for IPAllowlistType { - fn default() -> IPAllowlistType { - Self::IP_ALLOWLIST - } -} diff --git a/src/datadogV2/model/model_ip_allowlist_update_request.rs b/src/datadogV2/model/model_ip_allowlist_update_request.rs index ee9c3be01..21fcf3640 100644 --- a/src/datadogV2/model/model_ip_allowlist_update_request.rs +++ b/src/datadogV2/model/model_ip_allowlist_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Update the IP allowlist. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IPAllowlistUpdateRequest { /// IP allowlist data. #[serde(rename = "data")] @@ -14,9 +14,7 @@ pub struct IPAllowlistUpdateRequest { } impl IPAllowlistUpdateRequest { - pub fn new(data: crate::datadogV2::model::IPAllowlistData) -> IPAllowlistUpdateRequest { - IPAllowlistUpdateRequest { - data: Box::new(data), - } + pub fn new(data: Box) -> IPAllowlistUpdateRequest { + IPAllowlistUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_jira_integration_metadata.rs b/src/datadogV2/model/model_jira_integration_metadata.rs new file mode 100644 index 000000000..b75854164 --- /dev/null +++ b/src/datadogV2/model/model_jira_integration_metadata.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident integration metadata for the Jira integration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct JiraIntegrationMetadata { + /// Array of Jira issues in this integration metadata. + #[serde(rename = "issues")] + pub issues: Vec, +} + +impl JiraIntegrationMetadata { + pub fn new( + issues: Vec, + ) -> JiraIntegrationMetadata { + JiraIntegrationMetadata { issues } + } +} diff --git a/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs b/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs new file mode 100644 index 000000000..70fd8bf6e --- /dev/null +++ b/src/datadogV2/model/model_jira_integration_metadata_issues_item.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Item in the Jira integration metadata issue array. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct JiraIntegrationMetadataIssuesItem { + /// URL of issue's Jira account. + #[serde(rename = "account")] + pub account: String, + /// Jira issue's issue key. + #[serde(rename = "issue_key")] + pub issue_key: Option, + /// Jira issue's issue type. + #[serde(rename = "issuetype_id")] + pub issuetype_id: Option, + /// Jira issue's project keys. + #[serde(rename = "project_key")] + pub project_key: String, + /// URL redirecting to the Jira issue. + #[serde(rename = "redirect_url")] + pub redirect_url: Option, +} + +impl JiraIntegrationMetadataIssuesItem { + pub fn new(account: String, project_key: String) -> JiraIntegrationMetadataIssuesItem { + JiraIntegrationMetadataIssuesItem { + account, + issue_key: None, + issuetype_id: None, + project_key, + redirect_url: None, + } + } +} diff --git a/src/datadogV2/model/model_jsonapi_error_item.rs b/src/datadogV2/model/model_jsonapi_error_item.rs index abd2a8ace..d112b2e7d 100644 --- a/src/datadogV2/model/model_jsonapi_error_item.rs +++ b/src/datadogV2/model/model_jsonapi_error_item.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// API error response body #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct JSONAPIErrorItem { /// A human-readable explanation specific to this occurrence of the error. #[serde(rename = "detail")] diff --git a/src/datadogV2/model/model_jsonapi_error_response.rs b/src/datadogV2/model/model_jsonapi_error_response.rs index fda849c60..a915828b2 100644 --- a/src/datadogV2/model/model_jsonapi_error_response.rs +++ b/src/datadogV2/model/model_jsonapi_error_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// API error response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct JSONAPIErrorResponse { /// A list of errors. #[serde(rename = "errors")] diff --git a/src/datadogV2/model/model_list_application_keys_response.rs b/src/datadogV2/model/model_list_application_keys_response.rs new file mode 100644 index 000000000..da73ba46d --- /dev/null +++ b/src/datadogV2/model/model_list_application_keys_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for a list of application keys. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListApplicationKeysResponse { + /// Array of application keys. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the application key. + #[serde(rename = "included")] + pub included: Option>, + /// Additional information related to the application key response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl ListApplicationKeysResponse { + pub fn new() -> ListApplicationKeysResponse { + ListApplicationKeysResponse { + data: None, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_list_downtimes_response.rs b/src/datadogV2/model/model_list_downtimes_response.rs new file mode 100644 index 000000000..20a5956db --- /dev/null +++ b/src/datadogV2/model/model_list_downtimes_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for retrieving all downtimes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListDowntimesResponse { + /// An array of downtimes. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the downtimes. + #[serde(rename = "included")] + pub included: Option>, + /// Pagination metadata returned by the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl ListDowntimesResponse { + pub fn new() -> ListDowntimesResponse { + ListDowntimesResponse { + data: None, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_list_findings_meta.rs b/src/datadogV2/model/model_list_findings_meta.rs index 9c836f4c5..02c11c6a1 100644 --- a/src/datadogV2/model/model_list_findings_meta.rs +++ b/src/datadogV2/model/model_list_findings_meta.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Metadata for pagination. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ListFindingsMeta { /// Pagination and findings count information. #[serde(rename = "page")] diff --git a/src/datadogV2/model/model_list_findings_page.rs b/src/datadogV2/model/model_list_findings_page.rs index 51b988d93..e801febb8 100644 --- a/src/datadogV2/model/model_list_findings_page.rs +++ b/src/datadogV2/model/model_list_findings_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Pagination and findings count information. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ListFindingsPage { /// The cursor used to paginate requests. #[serde(rename = "cursor")] diff --git a/src/datadogV2/model/model_list_findings_response.rs b/src/datadogV2/model/model_list_findings_response.rs index e907c5553..50225234f 100644 --- a/src/datadogV2/model/model_list_findings_response.rs +++ b/src/datadogV2/model/model_list_findings_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The expected response schema when listing findings. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ListFindingsResponse { /// Array of findings. #[serde(rename = "data")] @@ -19,11 +19,8 @@ pub struct ListFindingsResponse { impl ListFindingsResponse { pub fn new( data: Vec, - meta: crate::datadogV2::model::ListFindingsMeta, + meta: Box, ) -> ListFindingsResponse { - ListFindingsResponse { - data, - meta: Box::new(meta), - } + ListFindingsResponse { data, meta } } } diff --git a/src/datadogV2/model/model_list_powerpacks_response.rs b/src/datadogV2/model/model_list_powerpacks_response.rs new file mode 100644 index 000000000..9fb2a2884 --- /dev/null +++ b/src/datadogV2/model/model_list_powerpacks_response.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object which includes all powerpack configurations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListPowerpacksResponse { + /// List of powerpack definitions. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the users. + #[serde(rename = "included")] + pub included: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// Powerpack response metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl ListPowerpacksResponse { + pub fn new() -> ListPowerpacksResponse { + ListPowerpacksResponse { + data: None, + included: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_list_rules_response.rs b/src/datadogV2/model/model_list_rules_response.rs new file mode 100644 index 000000000..9e76a4556 --- /dev/null +++ b/src/datadogV2/model/model_list_rules_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard rules response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListRulesResponse { + /// Array of rule details. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, +} + +impl ListRulesResponse { + pub fn new() -> ListRulesResponse { + ListRulesResponse { + data: None, + links: None, + } + } +} diff --git a/src/datadogV2/model/model_list_rules_response_data_item.rs b/src/datadogV2/model/model_list_rules_response_data_item.rs new file mode 100644 index 000000000..6c9858914 --- /dev/null +++ b/src/datadogV2/model/model_list_rules_response_data_item.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Rule details. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListRulesResponseDataItem { + /// Details of a rule. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique ID for a scorecard rule. + #[serde(rename = "id")] + pub id: Option, + /// Scorecard create rule response relationship. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// The JSON:API type for scorecard rules. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ListRulesResponseDataItem { + pub fn new() -> ListRulesResponseDataItem { + ListRulesResponseDataItem { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_list_rules_response_links.rs b/src/datadogV2/model/model_list_rules_response_links.rs new file mode 100644 index 000000000..f2a8e72d7 --- /dev/null +++ b/src/datadogV2/model/model_list_rules_response_links.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListRulesResponseLinks { + /// Link for the next set of rules. + #[serde(rename = "next")] + pub next: Option, +} + +impl ListRulesResponseLinks { + pub fn new() -> ListRulesResponseLinks { + ListRulesResponseLinks { next: None } + } +} diff --git a/src/datadogV2/model/model_list_teams_include.rs b/src/datadogV2/model/model_list_teams_include.rs new file mode 100644 index 000000000..2f72b4b15 --- /dev/null +++ b/src/datadogV2/model/model_list_teams_include.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ListTeamsInclude { + #[serde(rename = "team_links")] + TEAM_LINKS, + #[serde(rename = "user_team_permissions")] + USER_TEAM_PERMISSIONS, +} + +impl ToString for ListTeamsInclude { + fn to_string(&self) -> String { + match self { + Self::TEAM_LINKS => String::from("team_links"), + Self::USER_TEAM_PERMISSIONS => String::from("user_team_permissions"), + } + } +} diff --git a/src/datadogV2/model/model_list_teams_sort.rs b/src/datadogV2/model/model_list_teams_sort.rs new file mode 100644 index 000000000..83c35a45b --- /dev/null +++ b/src/datadogV2/model/model_list_teams_sort.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ListTeamsSort { + #[serde(rename = "name")] + NAME, + #[serde(rename = "-name")] + _NAME, + #[serde(rename = "user_count")] + USER_COUNT, + #[serde(rename = "-user_count")] + _USER_COUNT, +} + +impl ToString for ListTeamsSort { + fn to_string(&self) -> String { + match self { + Self::NAME => String::from("name"), + Self::_NAME => String::from("-name"), + Self::USER_COUNT => String::from("user_count"), + Self::_USER_COUNT => String::from("-user_count"), + } + } +} diff --git a/src/datadogV2/model/model_log.rs b/src/datadogV2/model/model_log.rs new file mode 100644 index 000000000..c6fac1718 --- /dev/null +++ b/src/datadogV2/model/model_log.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object description of a log after being processed and stored by Datadog. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Log { + /// JSON object containing all log attributes and their associated values. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the Log. + #[serde(rename = "id")] + pub id: Option, + /// Type of the event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl Log { + pub fn new() -> Log { + Log { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_log_attributes.rs b/src/datadogV2/model/model_log_attributes.rs new file mode 100644 index 000000000..921f4c1fe --- /dev/null +++ b/src/datadogV2/model/model_log_attributes.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// JSON object containing all log attributes and their associated values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogAttributes { + /// JSON object of attributes from your log. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Name of the machine from where the logs are being sent. + #[serde(rename = "host")] + pub host: Option, + /// The message [reserved attribute](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes) + /// of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry. + /// That value is then highlighted and displayed in the Logstream, where it is indexed for full text search. + #[serde(rename = "message")] + pub message: Option, + /// The name of the application or service generating the log events. + /// It is used to switch from Logs to APM, so make sure you define the same + /// value when you use both products. + #[serde(rename = "service")] + pub service: Option, + /// Status of the message associated with your log. + #[serde(rename = "status")] + pub status: Option, + /// Array of tags associated with your log. + #[serde(rename = "tags")] + pub tags: Option>, + /// Timestamp of your log. + #[serde(rename = "timestamp")] + pub timestamp: Option, +} + +impl LogAttributes { + pub fn new() -> LogAttributes { + LogAttributes { + attributes: None, + host: None, + message: None, + service: None, + status: None, + tags: None, + timestamp: None, + } + } +} diff --git a/src/datadogV2/model/model_log_type.rs b/src/datadogV2/model/model_log_type.rs new file mode 100644 index 000000000..f977f4344 --- /dev/null +++ b/src/datadogV2/model/model_log_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogType { + #[serde(rename = "log")] + LOG, +} + +impl ToString for LogType { + fn to_string(&self) -> String { + match self { + Self::LOG => String::from("log"), + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_bucket.rs b/src/datadogV2/model/model_logs_aggregate_bucket.rs new file mode 100644 index 000000000..8b0930823 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_bucket.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A bucket values +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateBucket { + /// The key, value pairs for each group by + #[serde(rename = "by")] + pub by: Option< + std::collections::HashMap>, + >, + /// A map of the metric name -> value for regular compute or list of values for a timeseries + #[serde(rename = "computes")] + pub computes: Option< + std::collections::HashMap, + >, +} + +impl LogsAggregateBucket { + pub fn new() -> LogsAggregateBucket { + LogsAggregateBucket { + by: None, + computes: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_bucket_value.rs b/src/datadogV2/model/model_logs_aggregate_bucket_value.rs new file mode 100644 index 000000000..0210b56e3 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_bucket_value.rs @@ -0,0 +1,15 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A bucket value, can be either a timeseries or a single value +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogsAggregateBucketValue { + LogsAggregateBucketValueSingleString(Box), + LogsAggregateBucketValueSingleNumber(Box), + LogsAggregateBucketValueTimeseries( + Box, + ), +} diff --git a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries.rs new file mode 100644 index 000000000..8c1e02424 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries array +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateBucketValueTimeseries {} + +impl LogsAggregateBucketValueTimeseries { + pub fn new() -> LogsAggregateBucketValueTimeseries { + LogsAggregateBucketValueTimeseries {} + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs new file mode 100644 index 000000000..815899e1c --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_bucket_value_timeseries_point.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries point +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateBucketValueTimeseriesPoint { + /// The time value for this point + #[serde(rename = "time")] + pub time: Option, + /// The value for this point + #[serde(rename = "value")] + pub value: Option, +} + +impl LogsAggregateBucketValueTimeseriesPoint { + pub fn new() -> LogsAggregateBucketValueTimeseriesPoint { + LogsAggregateBucketValueTimeseriesPoint { + time: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_request.rs b/src/datadogV2/model/model_logs_aggregate_request.rs new file mode 100644 index 000000000..8db1a6339 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_request.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object sent with the request to retrieve a list of logs from your organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateRequest { + /// The list of metrics or timeseries to compute for the retrieved buckets. + #[serde(rename = "compute")] + pub compute: Option>, + /// The search and filter query settings + #[serde(rename = "filter")] + pub filter: Option>, + /// The rules for the group by + #[serde(rename = "group_by")] + pub group_by: Option>, + /// Global query options that are used during the query. + /// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail. + #[serde(rename = "options")] + pub options: Option>, + /// Paging settings + #[serde(rename = "page")] + pub page: Option>, +} + +impl LogsAggregateRequest { + pub fn new() -> LogsAggregateRequest { + LogsAggregateRequest { + compute: None, + filter: None, + group_by: None, + options: None, + page: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_request_page.rs b/src/datadogV2/model/model_logs_aggregate_request_page.rs new file mode 100644 index 000000000..4c6aaf860 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_request_page.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging settings +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateRequestPage { + /// The returned paging point to use to get the next results. Note: at most 1000 results can be paged. + #[serde(rename = "cursor")] + pub cursor: Option, +} + +impl LogsAggregateRequestPage { + pub fn new() -> LogsAggregateRequestPage { + LogsAggregateRequestPage { cursor: None } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_response.rs b/src/datadogV2/model/model_logs_aggregate_response.rs new file mode 100644 index 000000000..98f69e57b --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object for the logs aggregate API endpoint +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateResponse { + /// The query results + #[serde(rename = "data")] + pub data: Option>, + /// The metadata associated with a request + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl LogsAggregateResponse { + pub fn new() -> LogsAggregateResponse { + LogsAggregateResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_response_data.rs b/src/datadogV2/model/model_logs_aggregate_response_data.rs new file mode 100644 index 000000000..3a9b38a6b --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_response_data.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The query results +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateResponseData { + /// The list of matching buckets, one item per bucket + #[serde(rename = "buckets")] + pub buckets: Option>, +} + +impl LogsAggregateResponseData { + pub fn new() -> LogsAggregateResponseData { + LogsAggregateResponseData { buckets: None } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_response_status.rs b/src/datadogV2/model/model_logs_aggregate_response_status.rs new file mode 100644 index 000000000..cceae06e6 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_response_status.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsAggregateResponseStatus { + #[serde(rename = "done")] + DONE, + #[serde(rename = "timeout")] + TIMEOUT, +} + +impl ToString for LogsAggregateResponseStatus { + fn to_string(&self) -> String { + match self { + Self::DONE => String::from("done"), + Self::TIMEOUT => String::from("timeout"), + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_sort.rs b/src/datadogV2/model/model_logs_aggregate_sort.rs new file mode 100644 index 000000000..244a410d5 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_sort.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A sort rule +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsAggregateSort { + /// An aggregation function + #[serde(rename = "aggregation")] + pub aggregation: Option, + /// The metric to sort by (only used for `type=measure`) + #[serde(rename = "metric")] + pub metric: Option, + /// The order to use, ascending or descending + #[serde(rename = "order")] + pub order: Option, + /// The type of sorting algorithm + #[serde(rename = "type")] + pub type_: Option, +} + +impl LogsAggregateSort { + pub fn new() -> LogsAggregateSort { + LogsAggregateSort { + aggregation: None, + metric: None, + order: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregate_sort_type.rs b/src/datadogV2/model/model_logs_aggregate_sort_type.rs new file mode 100644 index 000000000..2c3e82599 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregate_sort_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsAggregateSortType { + #[serde(rename = "alphabetical")] + ALPHABETICAL, + #[serde(rename = "measure")] + MEASURE, +} + +impl ToString for LogsAggregateSortType { + fn to_string(&self) -> String { + match self { + Self::ALPHABETICAL => String::from("alphabetical"), + Self::MEASURE => String::from("measure"), + } + } +} diff --git a/src/datadogV2/model/model_logs_aggregation_function.rs b/src/datadogV2/model/model_logs_aggregation_function.rs new file mode 100644 index 000000000..eb797b4c6 --- /dev/null +++ b/src/datadogV2/model/model_logs_aggregation_function.rs @@ -0,0 +1,52 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsAggregationFunction { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "pc75")] + PERCENTILE_75, + #[serde(rename = "pc90")] + PERCENTILE_90, + #[serde(rename = "pc95")] + PERCENTILE_95, + #[serde(rename = "pc98")] + PERCENTILE_98, + #[serde(rename = "pc99")] + PERCENTILE_99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, + #[serde(rename = "median")] + MEDIAN, +} + +impl ToString for LogsAggregationFunction { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::PERCENTILE_75 => String::from("pc75"), + Self::PERCENTILE_90 => String::from("pc90"), + Self::PERCENTILE_95 => String::from("pc95"), + Self::PERCENTILE_98 => String::from("pc98"), + Self::PERCENTILE_99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + Self::MEDIAN => String::from("median"), + } + } +} diff --git a/src/datadogV2/model/model_logs_archive.rs b/src/datadogV2/model/model_logs_archive.rs new file mode 100644 index 000000000..6526722b4 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The logs archive. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchive { + /// The definition of an archive. + #[serde(rename = "data")] + pub data: Option>, +} + +impl LogsArchive { + pub fn new() -> LogsArchive { + LogsArchive { data: None } + } +} diff --git a/src/datadogV2/model/model_logs_archive_attributes.rs b/src/datadogV2/model/model_logs_archive_attributes.rs new file mode 100644 index 000000000..2aa0461a7 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes associated with the archive. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveAttributes { + /// An archive's destination. + #[serde(rename = "destination")] + pub destination: Option>, + /// To store the tags in the archive, set the value "true". + /// If it is set to "false", the tags will be deleted when the logs are sent to the archive. + #[serde(rename = "include_tags")] + pub include_tags: Option, + /// The archive name. + #[serde(rename = "name")] + pub name: String, + /// The archive query/filter. Logs matching this query are included in the archive. + #[serde(rename = "query")] + pub query: String, + /// Maximum scan size for rehydration from this archive. + #[serde( + rename = "rehydration_max_scan_size_in_gb", + default, + with = "::serde_with::rust::double_option" + )] + pub rehydration_max_scan_size_in_gb: Option>, + /// An array of tags to add to rehydrated logs from an archive. + #[serde(rename = "rehydration_tags")] + pub rehydration_tags: Option>, + /// The state of the archive. + #[serde(rename = "state")] + pub state: Option, +} + +impl LogsArchiveAttributes { + pub fn new( + destination: Option>, + name: String, + query: String, + ) -> LogsArchiveAttributes { + LogsArchiveAttributes { + destination, + include_tags: None, + name, + query, + rehydration_max_scan_size_in_gb: None, + rehydration_tags: None, + state: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_create_request.rs b/src/datadogV2/model/model_logs_archive_create_request.rs new file mode 100644 index 000000000..92faa5d23 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The logs archive. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveCreateRequest { + /// The definition of an archive. + #[serde(rename = "data")] + pub data: Option>, +} + +impl LogsArchiveCreateRequest { + pub fn new() -> LogsArchiveCreateRequest { + LogsArchiveCreateRequest { data: None } + } +} diff --git a/src/datadogV2/model/model_logs_archive_create_request_attributes.rs b/src/datadogV2/model/model_logs_archive_create_request_attributes.rs new file mode 100644 index 000000000..fd65fafb9 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_create_request_attributes.rs @@ -0,0 +1,51 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes associated with the archive. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveCreateRequestAttributes { + /// An archive's destination. + #[serde(rename = "destination")] + pub destination: Box, + /// To store the tags in the archive, set the value "true". + /// If it is set to "false", the tags will be deleted when the logs are sent to the archive. + #[serde(rename = "include_tags")] + pub include_tags: Option, + /// The archive name. + #[serde(rename = "name")] + pub name: String, + /// The archive query/filter. Logs matching this query are included in the archive. + #[serde(rename = "query")] + pub query: String, + /// Maximum scan size for rehydration from this archive. + #[serde( + rename = "rehydration_max_scan_size_in_gb", + default, + with = "::serde_with::rust::double_option" + )] + pub rehydration_max_scan_size_in_gb: Option>, + /// An array of tags to add to rehydrated logs from an archive. + #[serde(rename = "rehydration_tags")] + pub rehydration_tags: Option>, +} + +impl LogsArchiveCreateRequestAttributes { + pub fn new( + destination: Box, + name: String, + query: String, + ) -> LogsArchiveCreateRequestAttributes { + LogsArchiveCreateRequestAttributes { + destination, + include_tags: None, + name, + query, + rehydration_max_scan_size_in_gb: None, + rehydration_tags: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_create_request_definition.rs b/src/datadogV2/model/model_logs_archive_create_request_definition.rs new file mode 100644 index 000000000..716dea05b --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_create_request_definition.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The definition of an archive. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveCreateRequestDefinition { + /// The attributes associated with the archive. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The type of the resource. The value should always be archives. + #[serde(rename = "type")] + pub type_: String, +} + +impl LogsArchiveCreateRequestDefinition { + pub fn new(type_: String) -> LogsArchiveCreateRequestDefinition { + LogsArchiveCreateRequestDefinition { + attributes: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_create_request_destination.rs b/src/datadogV2/model/model_logs_archive_create_request_destination.rs new file mode 100644 index 000000000..847efce87 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_create_request_destination.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An archive's destination. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogsArchiveCreateRequestDestination { + LogsArchiveDestinationAzure(Box), + LogsArchiveDestinationGCS(Box), + LogsArchiveDestinationS3(Box), +} diff --git a/src/datadogV2/model/model_logs_archive_definition.rs b/src/datadogV2/model/model_logs_archive_definition.rs new file mode 100644 index 000000000..9b7ae925f --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_definition.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The definition of an archive. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveDefinition { + /// The attributes associated with the archive. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The archive ID. + #[serde(rename = "id")] + pub id: Option, + /// The type of the resource. The value should always be archives. + #[serde(rename = "type")] + pub type_: String, +} + +impl LogsArchiveDefinition { + pub fn new(type_: String) -> LogsArchiveDefinition { + LogsArchiveDefinition { + attributes: None, + id: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_destination.rs b/src/datadogV2/model/model_logs_archive_destination.rs new file mode 100644 index 000000000..0d175ae7d --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_destination.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An archive's destination. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogsArchiveDestination { + LogsArchiveDestinationAzure(Box), + LogsArchiveDestinationGCS(Box), + LogsArchiveDestinationS3(Box), +} diff --git a/src/datadogV2/model/model_logs_archive_destination_azure.rs b/src/datadogV2/model/model_logs_archive_destination_azure.rs new file mode 100644 index 000000000..06c5c5d09 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_destination_azure.rs @@ -0,0 +1,47 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The Azure archive destination. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveDestinationAzure { + /// The container where the archive will be stored. + #[serde(rename = "container")] + pub container: String, + /// The Azure archive's integration destination. + #[serde(rename = "integration")] + pub integration: Box, + /// The archive path. + #[serde(rename = "path")] + pub path: Option, + /// The region where the archive will be stored. + #[serde(rename = "region")] + pub region: Option, + /// The associated storage account. + #[serde(rename = "storage_account")] + pub storage_account: String, + /// Type of the Azure archive destination. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::LogsArchiveDestinationAzureType, +} + +impl LogsArchiveDestinationAzure { + pub fn new( + container: String, + integration: Box, + storage_account: String, + type_: crate::datadogV2::model::LogsArchiveDestinationAzureType, + ) -> LogsArchiveDestinationAzure { + LogsArchiveDestinationAzure { + container, + integration, + path: None, + region: None, + storage_account, + type_, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_destination_azure_type.rs b/src/datadogV2/model/model_logs_archive_destination_azure_type.rs new file mode 100644 index 000000000..728c76729 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_destination_azure_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsArchiveDestinationAzureType { + #[serde(rename = "azure")] + AZURE, +} + +impl ToString for LogsArchiveDestinationAzureType { + fn to_string(&self) -> String { + match self { + Self::AZURE => String::from("azure"), + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_destination_gcs.rs b/src/datadogV2/model/model_logs_archive_destination_gcs.rs new file mode 100644 index 000000000..17cf4c2ac --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_destination_gcs.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The GCS archive destination. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveDestinationGCS { + /// The bucket where the archive will be stored. + #[serde(rename = "bucket")] + pub bucket: String, + /// The GCS archive's integration destination. + #[serde(rename = "integration")] + pub integration: Box, + /// The archive path. + #[serde(rename = "path")] + pub path: Option, + /// Type of the GCS archive destination. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::LogsArchiveDestinationGCSType, +} + +impl LogsArchiveDestinationGCS { + pub fn new( + bucket: String, + integration: Box, + type_: crate::datadogV2::model::LogsArchiveDestinationGCSType, + ) -> LogsArchiveDestinationGCS { + LogsArchiveDestinationGCS { + bucket, + integration, + path: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_destination_gcs_type.rs b/src/datadogV2/model/model_logs_archive_destination_gcs_type.rs new file mode 100644 index 000000000..c8051554c --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_destination_gcs_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsArchiveDestinationGCSType { + #[serde(rename = "gcs")] + GCS, +} + +impl ToString for LogsArchiveDestinationGCSType { + fn to_string(&self) -> String { + match self { + Self::GCS => String::from("gcs"), + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_destination_s3.rs b/src/datadogV2/model/model_logs_archive_destination_s3.rs new file mode 100644 index 000000000..cf5b3efbf --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_destination_s3.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The S3 archive destination. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveDestinationS3 { + /// The bucket where the archive will be stored. + #[serde(rename = "bucket")] + pub bucket: String, + /// The S3 Archive's integration destination. + #[serde(rename = "integration")] + pub integration: Box, + /// The archive path. + #[serde(rename = "path")] + pub path: Option, + /// Type of the S3 archive destination. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::LogsArchiveDestinationS3Type, +} + +impl LogsArchiveDestinationS3 { + pub fn new( + bucket: String, + integration: Box, + type_: crate::datadogV2::model::LogsArchiveDestinationS3Type, + ) -> LogsArchiveDestinationS3 { + LogsArchiveDestinationS3 { + bucket, + integration, + path: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_destination_s3_type.rs b/src/datadogV2/model/model_logs_archive_destination_s3_type.rs new file mode 100644 index 000000000..29d0e1347 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_destination_s3_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsArchiveDestinationS3Type { + #[serde(rename = "s3")] + S3, +} + +impl ToString for LogsArchiveDestinationS3Type { + fn to_string(&self) -> String { + match self { + Self::S3 => String::from("s3"), + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_integration_azure.rs b/src/datadogV2/model/model_logs_archive_integration_azure.rs new file mode 100644 index 000000000..260a840ff --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_integration_azure.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The Azure archive's integration destination. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveIntegrationAzure { + /// A client ID. + #[serde(rename = "client_id")] + pub client_id: String, + /// A tenant ID. + #[serde(rename = "tenant_id")] + pub tenant_id: String, +} + +impl LogsArchiveIntegrationAzure { + pub fn new(client_id: String, tenant_id: String) -> LogsArchiveIntegrationAzure { + LogsArchiveIntegrationAzure { + client_id, + tenant_id, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_integration_gcs.rs b/src/datadogV2/model/model_logs_archive_integration_gcs.rs new file mode 100644 index 000000000..7d32af8c6 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_integration_gcs.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The GCS archive's integration destination. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveIntegrationGCS { + /// A client email. + #[serde(rename = "client_email")] + pub client_email: String, + /// A project ID. + #[serde(rename = "project_id")] + pub project_id: String, +} + +impl LogsArchiveIntegrationGCS { + pub fn new(client_email: String, project_id: String) -> LogsArchiveIntegrationGCS { + LogsArchiveIntegrationGCS { + client_email, + project_id, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_integration_s3.rs b/src/datadogV2/model/model_logs_archive_integration_s3.rs new file mode 100644 index 000000000..cd870dea7 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_integration_s3.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The S3 Archive's integration destination. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveIntegrationS3 { + /// The account ID for the integration. + #[serde(rename = "account_id")] + pub account_id: String, + /// The path of the integration. + #[serde(rename = "role_name")] + pub role_name: String, +} + +impl LogsArchiveIntegrationS3 { + pub fn new(account_id: String, role_name: String) -> LogsArchiveIntegrationS3 { + LogsArchiveIntegrationS3 { + account_id, + role_name, + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_order.rs b/src/datadogV2/model/model_logs_archive_order.rs new file mode 100644 index 000000000..9a6875210 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_order.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A ordered list of archive IDs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveOrder { + /// The definition of an archive order. + #[serde(rename = "data")] + pub data: Option>, +} + +impl LogsArchiveOrder { + pub fn new() -> LogsArchiveOrder { + LogsArchiveOrder { data: None } + } +} diff --git a/src/datadogV2/model/model_logs_archive_order_attributes.rs b/src/datadogV2/model/model_logs_archive_order_attributes.rs new file mode 100644 index 000000000..e015e0927 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_order_attributes.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attributes associated with the archive order. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveOrderAttributes { + /// An ordered array of `` strings, the order of archive IDs in the array + /// define the overall archives order for Datadog. + #[serde(rename = "archive_ids")] + pub archive_ids: Vec, +} + +impl LogsArchiveOrderAttributes { + pub fn new(archive_ids: Vec) -> LogsArchiveOrderAttributes { + LogsArchiveOrderAttributes { archive_ids } + } +} diff --git a/src/datadogV2/model/model_logs_archive_order_definition.rs b/src/datadogV2/model/model_logs_archive_order_definition.rs new file mode 100644 index 000000000..d1aae42e3 --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_order_definition.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The definition of an archive order. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchiveOrderDefinition { + /// The attributes associated with the archive order. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Type of the archive order definition. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::LogsArchiveOrderDefinitionType, +} + +impl LogsArchiveOrderDefinition { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::LogsArchiveOrderDefinitionType, + ) -> LogsArchiveOrderDefinition { + LogsArchiveOrderDefinition { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_logs_archive_order_definition_type.rs b/src/datadogV2/model/model_logs_archive_order_definition_type.rs new file mode 100644 index 000000000..1e420cdeb --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_order_definition_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsArchiveOrderDefinitionType { + #[serde(rename = "archive_order")] + ARCHIVE_ORDER, +} + +impl ToString for LogsArchiveOrderDefinitionType { + fn to_string(&self) -> String { + match self { + Self::ARCHIVE_ORDER => String::from("archive_order"), + } + } +} diff --git a/src/datadogV2/model/model_logs_archive_state.rs b/src/datadogV2/model/model_logs_archive_state.rs new file mode 100644 index 000000000..931362ccb --- /dev/null +++ b/src/datadogV2/model/model_logs_archive_state.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsArchiveState { + #[serde(rename = "UNKNOWN")] + UNKNOWN, + #[serde(rename = "WORKING")] + WORKING, + #[serde(rename = "FAILING")] + FAILING, + #[serde(rename = "WORKING_AUTH_LEGACY")] + WORKING_AUTH_LEGACY, +} + +impl ToString for LogsArchiveState { + fn to_string(&self) -> String { + match self { + Self::UNKNOWN => String::from("UNKNOWN"), + Self::WORKING => String::from("WORKING"), + Self::FAILING => String::from("FAILING"), + Self::WORKING_AUTH_LEGACY => String::from("WORKING_AUTH_LEGACY"), + } + } +} diff --git a/src/datadogV2/model/model_logs_archives.rs b/src/datadogV2/model/model_logs_archives.rs new file mode 100644 index 000000000..7c111db3e --- /dev/null +++ b/src/datadogV2/model/model_logs_archives.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The available archives. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsArchives { + /// A list of archives. + #[serde(rename = "data")] + pub data: Option>, +} + +impl LogsArchives { + pub fn new() -> LogsArchives { + LogsArchives { data: None } + } +} diff --git a/src/datadogV2/model/model_logs_compute.rs b/src/datadogV2/model/model_logs_compute.rs new file mode 100644 index 000000000..d22749e0b --- /dev/null +++ b/src/datadogV2/model/model_logs_compute.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A compute rule to compute metrics or timeseries +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsCompute { + /// An aggregation function + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV2::model::LogsAggregationFunction, + /// The time buckets' size (only used for type=timeseries) + /// Defaults to a resolution of 150 points + #[serde(rename = "interval")] + pub interval: Option, + /// The metric to use + #[serde(rename = "metric")] + pub metric: Option, + /// The type of compute + #[serde(rename = "type")] + pub type_: Option, +} + +impl LogsCompute { + pub fn new(aggregation: crate::datadogV2::model::LogsAggregationFunction) -> LogsCompute { + LogsCompute { + aggregation, + interval: None, + metric: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_compute_type.rs b/src/datadogV2/model/model_logs_compute_type.rs new file mode 100644 index 000000000..258d9b646 --- /dev/null +++ b/src/datadogV2/model/model_logs_compute_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsComputeType { + #[serde(rename = "timeseries")] + TIMESERIES, + #[serde(rename = "total")] + TOTAL, +} + +impl ToString for LogsComputeType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES => String::from("timeseries"), + Self::TOTAL => String::from("total"), + } + } +} diff --git a/src/datadogV2/model/model_logs_group_by.rs b/src/datadogV2/model/model_logs_group_by.rs new file mode 100644 index 000000000..a22d150c6 --- /dev/null +++ b/src/datadogV2/model/model_logs_group_by.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A group by rule +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsGroupBy { + /// The name of the facet to use (required) + #[serde(rename = "facet")] + pub facet: String, + /// Used to perform a histogram computation (only for measure facets). + /// Note: at most 100 buckets are allowed, the number of buckets is (max - min)/interval. + #[serde(rename = "histogram")] + pub histogram: Option>, + /// The maximum buckets to return for this group by. Note: at most 10000 buckets are allowed. + /// If grouping by multiple facets, the product of limits must not exceed 10000. + #[serde(rename = "limit")] + pub limit: Option, + /// The value to use for logs that don't have the facet used to group by + #[serde(rename = "missing")] + pub missing: Option>, + /// A sort rule + #[serde(rename = "sort")] + pub sort: Option>, + /// A resulting object to put the given computes in over all the matching records. + #[serde(rename = "total")] + pub total: Option>, +} + +impl LogsGroupBy { + pub fn new(facet: String) -> LogsGroupBy { + LogsGroupBy { + facet, + histogram: None, + limit: None, + missing: None, + sort: None, + total: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_group_by_histogram.rs b/src/datadogV2/model/model_logs_group_by_histogram.rs new file mode 100644 index 000000000..bcab18d86 --- /dev/null +++ b/src/datadogV2/model/model_logs_group_by_histogram.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Used to perform a histogram computation (only for measure facets). +/// Note: at most 100 buckets are allowed, the number of buckets is (max - min)/interval. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsGroupByHistogram { + /// The bin size of the histogram buckets + #[serde(rename = "interval")] + pub interval: f64, + /// The maximum value for the measure used in the histogram + /// (values greater than this one are filtered out) + #[serde(rename = "max")] + pub max: f64, + /// The minimum value for the measure used in the histogram + /// (values smaller than this one are filtered out) + #[serde(rename = "min")] + pub min: f64, +} + +impl LogsGroupByHistogram { + pub fn new(interval: f64, max: f64, min: f64) -> LogsGroupByHistogram { + LogsGroupByHistogram { interval, max, min } + } +} diff --git a/src/datadogV2/model/model_logs_group_by_missing.rs b/src/datadogV2/model/model_logs_group_by_missing.rs new file mode 100644 index 000000000..f812c84c9 --- /dev/null +++ b/src/datadogV2/model/model_logs_group_by_missing.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The value to use for logs that don't have the facet used to group by +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogsGroupByMissing { + LogsGroupByMissingString(Box), + LogsGroupByMissingNumber(Box), +} diff --git a/src/datadogV2/model/model_logs_group_by_total.rs b/src/datadogV2/model/model_logs_group_by_total.rs new file mode 100644 index 000000000..17f963e26 --- /dev/null +++ b/src/datadogV2/model/model_logs_group_by_total.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A resulting object to put the given computes in over all the matching records. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogsGroupByTotal { + LogsGroupByTotalBoolean(Box), + LogsGroupByTotalString(Box), + LogsGroupByTotalNumber(Box), +} diff --git a/src/datadogV2/model/model_logs_list_request.rs b/src/datadogV2/model/model_logs_list_request.rs new file mode 100644 index 000000000..dd4f01cf4 --- /dev/null +++ b/src/datadogV2/model/model_logs_list_request.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The request for a logs list. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsListRequest { + /// The search and filter query settings + #[serde(rename = "filter")] + pub filter: Option>, + /// Global query options that are used during the query. + /// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail. + #[serde(rename = "options")] + pub options: Option>, + /// Paging attributes for listing logs. + #[serde(rename = "page")] + pub page: Option>, + /// Sort parameters when querying logs. + #[serde(rename = "sort")] + pub sort: Option, +} + +impl LogsListRequest { + pub fn new() -> LogsListRequest { + LogsListRequest { + filter: None, + options: None, + page: None, + sort: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_list_request_page.rs b/src/datadogV2/model/model_logs_list_request_page.rs new file mode 100644 index 000000000..cacaab3ee --- /dev/null +++ b/src/datadogV2/model/model_logs_list_request_page.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes for listing logs. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsListRequestPage { + /// List following results with a cursor provided in the previous query. + #[serde(rename = "cursor")] + pub cursor: Option, + /// Maximum number of logs in the response. + #[serde(rename = "limit")] + pub limit: Option, +} + +impl LogsListRequestPage { + pub fn new() -> LogsListRequestPage { + LogsListRequestPage { + cursor: None, + limit: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_list_response.rs b/src/datadogV2/model/model_logs_list_response.rs new file mode 100644 index 000000000..9b55a9a64 --- /dev/null +++ b/src/datadogV2/model/model_logs_list_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object with all logs matching the request and pagination information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsListResponse { + /// Array of logs matching the request. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl LogsListResponse { + pub fn new() -> LogsListResponse { + LogsListResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_list_response_links.rs b/src/datadogV2/model/model_logs_list_response_links.rs new file mode 100644 index 000000000..8b9ea789e --- /dev/null +++ b/src/datadogV2/model/model_logs_list_response_links.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsListResponseLinks { + /// Link for the next set of results. Note that the request can also be made using the + /// POST endpoint. + #[serde(rename = "next")] + pub next: Option, +} + +impl LogsListResponseLinks { + pub fn new() -> LogsListResponseLinks { + LogsListResponseLinks { next: None } + } +} diff --git a/src/datadogV2/model/model_logs_metric_compute.rs b/src/datadogV2/model/model_logs_metric_compute.rs index a59b4a70d..c9338c206 100644 --- a/src/datadogV2/model/model_logs_metric_compute.rs +++ b/src/datadogV2/model/model_logs_metric_compute.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The compute rule to compute the log-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricCompute { /// The type of aggregation to use. #[serde(rename = "aggregation_type")] diff --git a/src/datadogV2/model/model_logs_metric_compute_aggregation_type.rs b/src/datadogV2/model/model_logs_metric_compute_aggregation_type.rs index 713e899dc..51ca261ef 100644 --- a/src/datadogV2/model/model_logs_metric_compute_aggregation_type.rs +++ b/src/datadogV2/model/model_logs_metric_compute_aggregation_type.rs @@ -20,9 +20,3 @@ impl ToString for LogsMetricComputeAggregationType { } } } - -impl Default for LogsMetricComputeAggregationType { - fn default() -> LogsMetricComputeAggregationType { - Self::COUNT - } -} diff --git a/src/datadogV2/model/model_logs_metric_create_attributes.rs b/src/datadogV2/model/model_logs_metric_create_attributes.rs index e983e4628..823f4ab82 100644 --- a/src/datadogV2/model/model_logs_metric_create_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_create_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object describing the Datadog log-based metric to create. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricCreateAttributes { /// The compute rule to compute the log-based metric. #[serde(rename = "compute")] @@ -20,9 +20,11 @@ pub struct LogsMetricCreateAttributes { } impl LogsMetricCreateAttributes { - pub fn new(compute: crate::datadogV2::model::LogsMetricCompute) -> LogsMetricCreateAttributes { + pub fn new( + compute: Box, + ) -> LogsMetricCreateAttributes { LogsMetricCreateAttributes { - compute: Box::new(compute), + compute, filter: None, group_by: None, } diff --git a/src/datadogV2/model/model_logs_metric_create_data.rs b/src/datadogV2/model/model_logs_metric_create_data.rs index 9c69c2bbc..e7fe231ef 100644 --- a/src/datadogV2/model/model_logs_metric_create_data.rs +++ b/src/datadogV2/model/model_logs_metric_create_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new log-based metric properties. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricCreateData { /// The object describing the Datadog log-based metric to create. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct LogsMetricCreateData { impl LogsMetricCreateData { pub fn new( - attributes: crate::datadogV2::model::LogsMetricCreateAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::LogsMetricType, ) -> LogsMetricCreateData { LogsMetricCreateData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_logs_metric_create_request.rs b/src/datadogV2/model/model_logs_metric_create_request.rs index 3d4765cb2..70b601e4b 100644 --- a/src/datadogV2/model/model_logs_metric_create_request.rs +++ b/src/datadogV2/model/model_logs_metric_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new log-based metric body. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricCreateRequest { /// The new log-based metric properties. #[serde(rename = "data")] @@ -14,9 +14,9 @@ pub struct LogsMetricCreateRequest { } impl LogsMetricCreateRequest { - pub fn new(data: crate::datadogV2::model::LogsMetricCreateData) -> LogsMetricCreateRequest { - LogsMetricCreateRequest { - data: Box::new(data), - } + pub fn new( + data: Box, + ) -> LogsMetricCreateRequest { + LogsMetricCreateRequest { data } } } diff --git a/src/datadogV2/model/model_logs_metric_filter.rs b/src/datadogV2/model/model_logs_metric_filter.rs index 6b242af08..10943bff1 100644 --- a/src/datadogV2/model/model_logs_metric_filter.rs +++ b/src/datadogV2/model/model_logs_metric_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The log-based metric filter. Logs matching this filter will be aggregated in this metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricFilter { /// The search query - following the log search syntax. #[serde(rename = "query")] diff --git a/src/datadogV2/model/model_logs_metric_group_by.rs b/src/datadogV2/model/model_logs_metric_group_by.rs index 8d274b1bb..481210362 100644 --- a/src/datadogV2/model/model_logs_metric_group_by.rs +++ b/src/datadogV2/model/model_logs_metric_group_by.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A group by rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricGroupBy { /// The path to the value the log-based metric will be aggregated over. #[serde(rename = "path")] diff --git a/src/datadogV2/model/model_logs_metric_response.rs b/src/datadogV2/model/model_logs_metric_response.rs index af6b689d1..f3b556f28 100644 --- a/src/datadogV2/model/model_logs_metric_response.rs +++ b/src/datadogV2/model/model_logs_metric_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The log-based metric object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricResponse { /// The log-based metric properties. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_logs_metric_response_attributes.rs b/src/datadogV2/model/model_logs_metric_response_attributes.rs index 98dfe6033..00e211168 100644 --- a/src/datadogV2/model/model_logs_metric_response_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object describing a Datadog log-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricResponseAttributes { /// The compute rule to compute the log-based metric. #[serde(rename = "compute")] diff --git a/src/datadogV2/model/model_logs_metric_response_compute.rs b/src/datadogV2/model/model_logs_metric_response_compute.rs index d80c834d2..5e2c63e55 100644 --- a/src/datadogV2/model/model_logs_metric_response_compute.rs +++ b/src/datadogV2/model/model_logs_metric_response_compute.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The compute rule to compute the log-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricResponseCompute { /// The type of aggregation to use. #[serde(rename = "aggregation_type")] diff --git a/src/datadogV2/model/model_logs_metric_response_compute_aggregation_type.rs b/src/datadogV2/model/model_logs_metric_response_compute_aggregation_type.rs index 8f4d6b729..e1995ac6c 100644 --- a/src/datadogV2/model/model_logs_metric_response_compute_aggregation_type.rs +++ b/src/datadogV2/model/model_logs_metric_response_compute_aggregation_type.rs @@ -20,9 +20,3 @@ impl ToString for LogsMetricResponseComputeAggregationType { } } } - -impl Default for LogsMetricResponseComputeAggregationType { - fn default() -> LogsMetricResponseComputeAggregationType { - Self::COUNT - } -} diff --git a/src/datadogV2/model/model_logs_metric_response_data.rs b/src/datadogV2/model/model_logs_metric_response_data.rs index d9252afd9..f8f2637f5 100644 --- a/src/datadogV2/model/model_logs_metric_response_data.rs +++ b/src/datadogV2/model/model_logs_metric_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The log-based metric properties. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricResponseData { /// The object describing a Datadog log-based metric. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_logs_metric_response_filter.rs b/src/datadogV2/model/model_logs_metric_response_filter.rs index 74e5a91bb..dfc6b0b0c 100644 --- a/src/datadogV2/model/model_logs_metric_response_filter.rs +++ b/src/datadogV2/model/model_logs_metric_response_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The log-based metric filter. Logs matching this filter will be aggregated in this metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricResponseFilter { /// The search query - following the log search syntax. #[serde(rename = "query")] diff --git a/src/datadogV2/model/model_logs_metric_response_group_by.rs b/src/datadogV2/model/model_logs_metric_response_group_by.rs index 31cf2a65f..e6d162fea 100644 --- a/src/datadogV2/model/model_logs_metric_response_group_by.rs +++ b/src/datadogV2/model/model_logs_metric_response_group_by.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A group by rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricResponseGroupBy { /// The path to the value the log-based metric will be aggregated over. #[serde(rename = "path")] diff --git a/src/datadogV2/model/model_logs_metric_type.rs b/src/datadogV2/model/model_logs_metric_type.rs index c887ac134..ab4389108 100644 --- a/src/datadogV2/model/model_logs_metric_type.rs +++ b/src/datadogV2/model/model_logs_metric_type.rs @@ -17,9 +17,3 @@ impl ToString for LogsMetricType { } } } - -impl Default for LogsMetricType { - fn default() -> LogsMetricType { - Self::LOGS_METRICS - } -} diff --git a/src/datadogV2/model/model_logs_metric_update_attributes.rs b/src/datadogV2/model/model_logs_metric_update_attributes.rs index 766497015..599573948 100644 --- a/src/datadogV2/model/model_logs_metric_update_attributes.rs +++ b/src/datadogV2/model/model_logs_metric_update_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The log-based metric properties that will be updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricUpdateAttributes { /// The compute rule to compute the log-based metric. #[serde(rename = "compute")] diff --git a/src/datadogV2/model/model_logs_metric_update_compute.rs b/src/datadogV2/model/model_logs_metric_update_compute.rs index 3110b4cad..b4cdd2ff7 100644 --- a/src/datadogV2/model/model_logs_metric_update_compute.rs +++ b/src/datadogV2/model/model_logs_metric_update_compute.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The compute rule to compute the log-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricUpdateCompute { /// Toggle to include or exclude percentile aggregations for distribution metrics. /// Only present when the `aggregation_type` is `distribution`. diff --git a/src/datadogV2/model/model_logs_metric_update_data.rs b/src/datadogV2/model/model_logs_metric_update_data.rs index 4b38ae6fa..a06830815 100644 --- a/src/datadogV2/model/model_logs_metric_update_data.rs +++ b/src/datadogV2/model/model_logs_metric_update_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new log-based metric properties. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricUpdateData { /// The log-based metric properties that will be updated. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct LogsMetricUpdateData { impl LogsMetricUpdateData { pub fn new( - attributes: crate::datadogV2::model::LogsMetricUpdateAttributes, + attributes: Box, type_: crate::datadogV2::model::LogsMetricType, ) -> LogsMetricUpdateData { - LogsMetricUpdateData { - attributes: Box::new(attributes), - type_, - } + LogsMetricUpdateData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_logs_metric_update_request.rs b/src/datadogV2/model/model_logs_metric_update_request.rs index 5cdac0a83..da516b815 100644 --- a/src/datadogV2/model/model_logs_metric_update_request.rs +++ b/src/datadogV2/model/model_logs_metric_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new log-based metric body. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricUpdateRequest { /// The new log-based metric properties. #[serde(rename = "data")] @@ -14,9 +14,9 @@ pub struct LogsMetricUpdateRequest { } impl LogsMetricUpdateRequest { - pub fn new(data: crate::datadogV2::model::LogsMetricUpdateData) -> LogsMetricUpdateRequest { - LogsMetricUpdateRequest { - data: Box::new(data), - } + pub fn new( + data: Box, + ) -> LogsMetricUpdateRequest { + LogsMetricUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_logs_metrics_response.rs b/src/datadogV2/model/model_logs_metrics_response.rs index 1960e5b43..274b4b176 100644 --- a/src/datadogV2/model/model_logs_metrics_response.rs +++ b/src/datadogV2/model/model_logs_metrics_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// All the available log-based metric objects. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LogsMetricsResponse { /// A list of log-based metric objects. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_logs_query_filter.rs b/src/datadogV2/model/model_logs_query_filter.rs new file mode 100644 index 000000000..657c9f189 --- /dev/null +++ b/src/datadogV2/model/model_logs_query_filter.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The search and filter query settings +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsQueryFilter { + /// The minimum time for the requested logs, supports date math and regular timestamps (milliseconds). + #[serde(rename = "from")] + pub from: Option, + /// For customers with multiple indexes, the indexes to search. Defaults to ['*'] which means all indexes. + #[serde(rename = "indexes")] + pub indexes: Option>, + /// The search query - following the log search syntax. + #[serde(rename = "query")] + pub query: Option, + /// Specifies storage type as indexes or online-archives + #[serde(rename = "storage_tier")] + pub storage_tier: Option, + /// The maximum time for the requested logs, supports date math and regular timestamps (milliseconds). + #[serde(rename = "to")] + pub to: Option, +} + +impl LogsQueryFilter { + pub fn new() -> LogsQueryFilter { + LogsQueryFilter { + from: None, + indexes: None, + query: None, + storage_tier: None, + to: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_query_options.rs b/src/datadogV2/model/model_logs_query_options.rs new file mode 100644 index 000000000..9a7877d7c --- /dev/null +++ b/src/datadogV2/model/model_logs_query_options.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Global query options that are used during the query. +/// Note: you should supply either timezone or time offset, but not both. Otherwise, the query will fail. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsQueryOptions { + /// The time offset (in seconds) to apply to the query. + #[serde(rename = "timeOffset")] + pub time_offset: Option, + /// The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl LogsQueryOptions { + pub fn new() -> LogsQueryOptions { + LogsQueryOptions { + time_offset: None, + timezone: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_response_metadata.rs b/src/datadogV2/model/model_logs_response_metadata.rs new file mode 100644 index 000000000..8db78c032 --- /dev/null +++ b/src/datadogV2/model/model_logs_response_metadata.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata associated with a request +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsResponseMetadata { + /// The time elapsed in milliseconds + #[serde(rename = "elapsed")] + pub elapsed: Option, + /// Paging attributes. + #[serde(rename = "page")] + pub page: Option>, + /// The identifier of the request + #[serde(rename = "request_id")] + pub request_id: Option, + /// The status of the response + #[serde(rename = "status")] + pub status: Option, + /// A list of warnings (non fatal errors) encountered, partial results might be returned if + /// warnings are present in the response. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl LogsResponseMetadata { + pub fn new() -> LogsResponseMetadata { + LogsResponseMetadata { + elapsed: None, + page: None, + request_id: None, + status: None, + warnings: None, + } + } +} diff --git a/src/datadogV2/model/model_logs_response_metadata_page.rs b/src/datadogV2/model/model_logs_response_metadata_page.rs new file mode 100644 index 000000000..00ef19e9e --- /dev/null +++ b/src/datadogV2/model/model_logs_response_metadata_page.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsResponseMetadataPage { + /// The cursor to use to get the next results, if any. To make the next request, use the same + /// parameters with the addition of the `page[cursor]`. + #[serde(rename = "after")] + pub after: Option, +} + +impl LogsResponseMetadataPage { + pub fn new() -> LogsResponseMetadataPage { + LogsResponseMetadataPage { after: None } + } +} diff --git a/src/datadogV2/model/model_logs_sort.rs b/src/datadogV2/model/model_logs_sort.rs new file mode 100644 index 000000000..e7dc86fed --- /dev/null +++ b/src/datadogV2/model/model_logs_sort.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsSort { + #[serde(rename = "timestamp")] + TIMESTAMP_ASCENDING, + #[serde(rename = "-timestamp")] + TIMESTAMP_DESCENDING, +} + +impl ToString for LogsSort { + fn to_string(&self) -> String { + match self { + Self::TIMESTAMP_ASCENDING => String::from("timestamp"), + Self::TIMESTAMP_DESCENDING => String::from("-timestamp"), + } + } +} diff --git a/src/datadogV2/model/model_logs_sort_order.rs b/src/datadogV2/model/model_logs_sort_order.rs new file mode 100644 index 000000000..d5bd330ab --- /dev/null +++ b/src/datadogV2/model/model_logs_sort_order.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsSortOrder { + #[serde(rename = "asc")] + ASCENDING, + #[serde(rename = "desc")] + DESCENDING, +} + +impl ToString for LogsSortOrder { + fn to_string(&self) -> String { + match self { + Self::ASCENDING => String::from("asc"), + Self::DESCENDING => String::from("desc"), + } + } +} diff --git a/src/datadogV2/model/model_logs_storage_tier.rs b/src/datadogV2/model/model_logs_storage_tier.rs new file mode 100644 index 000000000..3dd7cf106 --- /dev/null +++ b/src/datadogV2/model/model_logs_storage_tier.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogsStorageTier { + #[serde(rename = "indexes")] + INDEXES, + #[serde(rename = "online-archives")] + ONLINE_ARCHIVES, +} + +impl ToString for LogsStorageTier { + fn to_string(&self) -> String { + match self { + Self::INDEXES => String::from("indexes"), + Self::ONLINE_ARCHIVES => String::from("online-archives"), + } + } +} diff --git a/src/datadogV2/model/model_logs_warning.rs b/src/datadogV2/model/model_logs_warning.rs new file mode 100644 index 000000000..0944c941b --- /dev/null +++ b/src/datadogV2/model/model_logs_warning.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A warning message indicating something that went wrong with the query +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct LogsWarning { + /// A unique code for this type of warning + #[serde(rename = "code")] + pub code: Option, + /// A detailed explanation of this specific warning + #[serde(rename = "detail")] + pub detail: Option, + /// A short human-readable summary of the warning + #[serde(rename = "title")] + pub title: Option, +} + +impl LogsWarning { + pub fn new() -> LogsWarning { + LogsWarning { + code: None, + detail: None, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_metric.rs b/src/datadogV2/model/model_metric.rs new file mode 100644 index 000000000..294ed3741 --- /dev/null +++ b/src/datadogV2/model/model_metric.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single metric tag configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Metric { + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: Option, + /// The metric resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl Metric { + pub fn new() -> Metric { + Metric { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_active_configuration_type.rs b/src/datadogV2/model/model_metric_active_configuration_type.rs new file mode 100644 index 000000000..3edc54b25 --- /dev/null +++ b/src/datadogV2/model/model_metric_active_configuration_type.rs @@ -0,0 +1,21 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricActiveConfigurationType { + #[serde(rename = "actively_queried_configurations")] + ACTIVELY_QUERIED_CONFIGURATIONS, +} + +impl ToString for MetricActiveConfigurationType { + fn to_string(&self) -> String { + match self { + Self::ACTIVELY_QUERIED_CONFIGURATIONS => { + String::from("actively_queried_configurations") + } + } + } +} diff --git a/src/datadogV2/model/model_metric_all_tags.rs b/src/datadogV2/model/model_metric_all_tags.rs new file mode 100644 index 000000000..4cb82b4da --- /dev/null +++ b/src/datadogV2/model/model_metric_all_tags.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single metric's indexed tags. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricAllTags { + /// Object containing the definition of a metric's tags. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: Option, + /// The metric resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MetricAllTags { + pub fn new() -> MetricAllTags { + MetricAllTags { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_all_tags_attributes.rs b/src/datadogV2/model/model_metric_all_tags_attributes.rs new file mode 100644 index 000000000..1c88c5f55 --- /dev/null +++ b/src/datadogV2/model/model_metric_all_tags_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric's tags. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricAllTagsAttributes { + /// List of indexed tag value pairs. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl MetricAllTagsAttributes { + pub fn new() -> MetricAllTagsAttributes { + MetricAllTagsAttributes { tags: None } + } +} diff --git a/src/datadogV2/model/model_metric_all_tags_response.rs b/src/datadogV2/model/model_metric_all_tags_response.rs new file mode 100644 index 000000000..85d5d4500 --- /dev/null +++ b/src/datadogV2/model/model_metric_all_tags_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object that includes a single metric's indexed tags. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricAllTagsResponse { + /// Object for a single metric's indexed tags. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MetricAllTagsResponse { + pub fn new() -> MetricAllTagsResponse { + MetricAllTagsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_configure_tags_type.rs b/src/datadogV2/model/model_metric_bulk_configure_tags_type.rs new file mode 100644 index 000000000..f60f65971 --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_configure_tags_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricBulkConfigureTagsType { + #[serde(rename = "metric_bulk_configure_tags")] + BULK_MANAGE_TAGS, +} + +impl ToString for MetricBulkConfigureTagsType { + fn to_string(&self) -> String { + match self { + Self::BULK_MANAGE_TAGS => String::from("metric_bulk_configure_tags"), + } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create.rs new file mode 100644 index 000000000..24be7fd2e --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request object to bulk configure tags for metrics matching the given prefix. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigCreate { + /// Optional parameters for bulk creating metric tag configurations. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// A text prefix to match against metric names. + #[serde(rename = "id")] + pub id: String, + /// The metric bulk configure tags resource. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::MetricBulkConfigureTagsType, +} + +impl MetricBulkTagConfigCreate { + pub fn new( + id: String, + type_: crate::datadogV2::model::MetricBulkConfigureTagsType, + ) -> MetricBulkTagConfigCreate { + MetricBulkTagConfigCreate { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs new file mode 100644 index 000000000..5c8dbc885 --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create_attributes.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Optional parameters for bulk creating metric tag configurations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigCreateAttributes { + /// A list of account emails to notify when the configuration is applied. + #[serde(rename = "emails")] + pub emails: Option>, + /// When set to true, the configuration will exclude the configured tags and include any other submitted tags. + /// When set to false, the configuration will include the configured tags and exclude any other submitted tags. + /// Defaults to false. + #[serde(rename = "exclude_tags_mode")] + pub exclude_tags_mode: Option, + /// A list of tag names to apply to the configuration. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl MetricBulkTagConfigCreateAttributes { + pub fn new() -> MetricBulkTagConfigCreateAttributes { + MetricBulkTagConfigCreateAttributes { + emails: None, + exclude_tags_mode: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_create_request.rs b/src/datadogV2/model/model_metric_bulk_tag_config_create_request.rs new file mode 100644 index 000000000..eac80b4fb --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Wrapper object for a single bulk tag configuration request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigCreateRequest { + /// Request object to bulk configure tags for metrics matching the given prefix. + #[serde(rename = "data")] + pub data: Box, +} + +impl MetricBulkTagConfigCreateRequest { + pub fn new( + data: Box, + ) -> MetricBulkTagConfigCreateRequest { + MetricBulkTagConfigCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs new file mode 100644 index 000000000..8bf0fd8be --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request object to bulk delete all tag configurations for metrics matching the given prefix. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigDelete { + /// Optional parameters for bulk deleting metric tag configurations. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// A text prefix to match against metric names. + #[serde(rename = "id")] + pub id: String, + /// The metric bulk configure tags resource. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::MetricBulkConfigureTagsType, +} + +impl MetricBulkTagConfigDelete { + pub fn new( + id: String, + type_: crate::datadogV2::model::MetricBulkConfigureTagsType, + ) -> MetricBulkTagConfigDelete { + MetricBulkTagConfigDelete { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs new file mode 100644 index 000000000..e72530f5d --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Optional parameters for bulk deleting metric tag configurations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigDeleteAttributes { + /// A list of account emails to notify when the configuration is applied. + #[serde(rename = "emails")] + pub emails: Option>, +} + +impl MetricBulkTagConfigDeleteAttributes { + pub fn new() -> MetricBulkTagConfigDeleteAttributes { + MetricBulkTagConfigDeleteAttributes { emails: None } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_delete_request.rs b/src/datadogV2/model/model_metric_bulk_tag_config_delete_request.rs new file mode 100644 index 000000000..fea385463 --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_delete_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Wrapper object for a single bulk tag deletion request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigDeleteRequest { + /// Request object to bulk delete all tag configurations for metrics matching the given prefix. + #[serde(rename = "data")] + pub data: Box, +} + +impl MetricBulkTagConfigDeleteRequest { + pub fn new( + data: Box, + ) -> MetricBulkTagConfigDeleteRequest { + MetricBulkTagConfigDeleteRequest { data } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_response.rs b/src/datadogV2/model/model_metric_bulk_tag_config_response.rs new file mode 100644 index 000000000..f4d2b0577 --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_response.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Wrapper for a single bulk tag configuration status response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigResponse { + /// The status of a request to bulk configure metric tags. + /// It contains the fields from the original request for reference. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MetricBulkTagConfigResponse { + pub fn new() -> MetricBulkTagConfigResponse { + MetricBulkTagConfigResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_status.rs b/src/datadogV2/model/model_metric_bulk_tag_config_status.rs new file mode 100644 index 000000000..3c01a11ef --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_status.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The status of a request to bulk configure metric tags. +/// It contains the fields from the original request for reference. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigStatus { + /// Optional attributes for the status of a bulk tag configuration request. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// A text prefix to match against metric names. + #[serde(rename = "id")] + pub id: String, + /// The metric bulk configure tags resource. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::MetricBulkConfigureTagsType, +} + +impl MetricBulkTagConfigStatus { + pub fn new( + id: String, + type_: crate::datadogV2::model::MetricBulkConfigureTagsType, + ) -> MetricBulkTagConfigStatus { + MetricBulkTagConfigStatus { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs b/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs new file mode 100644 index 000000000..20cf23a7d --- /dev/null +++ b/src/datadogV2/model/model_metric_bulk_tag_config_status_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Optional attributes for the status of a bulk tag configuration request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricBulkTagConfigStatusAttributes { + /// A list of account emails to notify when the configuration is applied. + #[serde(rename = "emails")] + pub emails: Option>, + /// When set to true, the configuration will exclude the configured tags and include any other submitted tags. + /// When set to false, the configuration will include the configured tags and exclude any other submitted tags. + #[serde(rename = "exclude_tags_mode")] + pub exclude_tags_mode: Option, + /// The status of the request. + #[serde(rename = "status")] + pub status: Option, + /// A list of tag names to apply to the configuration. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl MetricBulkTagConfigStatusAttributes { + pub fn new() -> MetricBulkTagConfigStatusAttributes { + MetricBulkTagConfigStatusAttributes { + emails: None, + exclude_tags_mode: None, + status: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_content_encoding.rs b/src/datadogV2/model/model_metric_content_encoding.rs index fcad7ad08..b4ad3f8b6 100644 --- a/src/datadogV2/model/model_metric_content_encoding.rs +++ b/src/datadogV2/model/model_metric_content_encoding.rs @@ -23,9 +23,3 @@ impl ToString for MetricContentEncoding { } } } - -impl Default for MetricContentEncoding { - fn default() -> MetricContentEncoding { - Self::DEFLATE - } -} diff --git a/src/datadogV2/model/model_metric_custom_aggregation.rs b/src/datadogV2/model/model_metric_custom_aggregation.rs new file mode 100644 index 000000000..b7099b473 --- /dev/null +++ b/src/datadogV2/model/model_metric_custom_aggregation.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A time and space aggregation combination for use in query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricCustomAggregation { + /// A space aggregation for use in query. + #[serde(rename = "space")] + pub space: crate::datadogV2::model::MetricCustomSpaceAggregation, + /// A time aggregation for use in query. + #[serde(rename = "time")] + pub time: crate::datadogV2::model::MetricCustomTimeAggregation, +} + +impl MetricCustomAggregation { + pub fn new( + space: crate::datadogV2::model::MetricCustomSpaceAggregation, + time: crate::datadogV2::model::MetricCustomTimeAggregation, + ) -> MetricCustomAggregation { + MetricCustomAggregation { space, time } + } +} diff --git a/src/datadogV2/model/model_metric_custom_space_aggregation.rs b/src/datadogV2/model/model_metric_custom_space_aggregation.rs new file mode 100644 index 000000000..578b08515 --- /dev/null +++ b/src/datadogV2/model/model_metric_custom_space_aggregation.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricCustomSpaceAggregation { + #[serde(rename = "avg")] + AVG, + #[serde(rename = "max")] + MAX, + #[serde(rename = "min")] + MIN, + #[serde(rename = "sum")] + SUM, +} + +impl ToString for MetricCustomSpaceAggregation { + fn to_string(&self) -> String { + match self { + Self::AVG => String::from("avg"), + Self::MAX => String::from("max"), + Self::MIN => String::from("min"), + Self::SUM => String::from("sum"), + } + } +} diff --git a/src/datadogV2/model/model_metric_custom_time_aggregation.rs b/src/datadogV2/model/model_metric_custom_time_aggregation.rs new file mode 100644 index 000000000..d86111ec0 --- /dev/null +++ b/src/datadogV2/model/model_metric_custom_time_aggregation.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricCustomTimeAggregation { + #[serde(rename = "avg")] + AVG, + #[serde(rename = "count")] + COUNT, + #[serde(rename = "max")] + MAX, + #[serde(rename = "min")] + MIN, + #[serde(rename = "sum")] + SUM, +} + +impl ToString for MetricCustomTimeAggregation { + fn to_string(&self) -> String { + match self { + Self::AVG => String::from("avg"), + Self::COUNT => String::from("count"), + Self::MAX => String::from("max"), + Self::MIN => String::from("min"), + Self::SUM => String::from("sum"), + } + } +} diff --git a/src/datadogV2/model/model_metric_distinct_volume.rs b/src/datadogV2/model/model_metric_distinct_volume.rs new file mode 100644 index 000000000..9e7c3c9fe --- /dev/null +++ b/src/datadogV2/model/model_metric_distinct_volume.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single metric's distinct volume. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricDistinctVolume { + /// Object containing the definition of a metric's distinct volume. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: Option, + /// The metric distinct volume type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MetricDistinctVolume { + pub fn new() -> MetricDistinctVolume { + MetricDistinctVolume { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_distinct_volume_attributes.rs b/src/datadogV2/model/model_metric_distinct_volume_attributes.rs new file mode 100644 index 000000000..e86dd29c0 --- /dev/null +++ b/src/datadogV2/model/model_metric_distinct_volume_attributes.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric's distinct volume. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricDistinctVolumeAttributes { + /// Distinct volume for the given metric. + #[serde(rename = "distinct_volume")] + pub distinct_volume: Option, +} + +impl MetricDistinctVolumeAttributes { + pub fn new() -> MetricDistinctVolumeAttributes { + MetricDistinctVolumeAttributes { + distinct_volume: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_distinct_volume_type.rs b/src/datadogV2/model/model_metric_distinct_volume_type.rs new file mode 100644 index 000000000..386f42ca3 --- /dev/null +++ b/src/datadogV2/model/model_metric_distinct_volume_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricDistinctVolumeType { + #[serde(rename = "distinct_metric_volumes")] + DISTINCT_METRIC_VOLUMES, +} + +impl ToString for MetricDistinctVolumeType { + fn to_string(&self) -> String { + match self { + Self::DISTINCT_METRIC_VOLUMES => String::from("distinct_metric_volumes"), + } + } +} diff --git a/src/datadogV2/model/model_metric_estimate.rs b/src/datadogV2/model/model_metric_estimate.rs new file mode 100644 index 000000000..d6c8e3a8d --- /dev/null +++ b/src/datadogV2/model/model_metric_estimate.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a metric cardinality estimate. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricEstimate { + /// Object containing the definition of a metric estimate attribute. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: Option, + /// The metric estimate resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MetricEstimate { + pub fn new() -> MetricEstimate { + MetricEstimate { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_estimate_attributes.rs b/src/datadogV2/model/model_metric_estimate_attributes.rs new file mode 100644 index 000000000..faab950e5 --- /dev/null +++ b/src/datadogV2/model/model_metric_estimate_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric estimate attribute. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricEstimateAttributes { + /// Estimate type based on the queried configuration. By default, `count_or_gauge` is returned. `distribution` is returned for distribution metrics without percentiles enabled. Lastly, `percentile` is returned if `filter[pct]=true` is queried with a distribution metric. + #[serde(rename = "estimate_type")] + pub estimate_type: Option, + /// Timestamp when the cardinality estimate was requested. + #[serde(rename = "estimated_at")] + pub estimated_at: Option, + /// Estimated cardinality of the metric based on the queried configuration. + #[serde(rename = "estimated_output_series")] + pub estimated_output_series: Option, +} + +impl MetricEstimateAttributes { + pub fn new() -> MetricEstimateAttributes { + MetricEstimateAttributes { + estimate_type: None, + estimated_at: None, + estimated_output_series: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_estimate_resource_type.rs b/src/datadogV2/model/model_metric_estimate_resource_type.rs new file mode 100644 index 000000000..9b9701638 --- /dev/null +++ b/src/datadogV2/model/model_metric_estimate_resource_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricEstimateResourceType { + #[serde(rename = "metric_cardinality_estimate")] + METRIC_CARDINALITY_ESTIMATE, +} + +impl ToString for MetricEstimateResourceType { + fn to_string(&self) -> String { + match self { + Self::METRIC_CARDINALITY_ESTIMATE => String::from("metric_cardinality_estimate"), + } + } +} diff --git a/src/datadogV2/model/model_metric_estimate_response.rs b/src/datadogV2/model/model_metric_estimate_response.rs new file mode 100644 index 000000000..711e8d343 --- /dev/null +++ b/src/datadogV2/model/model_metric_estimate_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object that includes metric cardinality estimates. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricEstimateResponse { + /// Object for a metric cardinality estimate. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MetricEstimateResponse { + pub fn new() -> MetricEstimateResponse { + MetricEstimateResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_metric_estimate_type.rs b/src/datadogV2/model/model_metric_estimate_type.rs new file mode 100644 index 000000000..49a6fadc5 --- /dev/null +++ b/src/datadogV2/model/model_metric_estimate_type.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricEstimateType { + #[serde(rename = "count_or_gauge")] + COUNT_OR_GAUGE, + #[serde(rename = "distribution")] + DISTRIBUTION, + #[serde(rename = "percentile")] + PERCENTILE, +} + +impl ToString for MetricEstimateType { + fn to_string(&self) -> String { + match self { + Self::COUNT_OR_GAUGE => String::from("count_or_gauge"), + Self::DISTRIBUTION => String::from("distribution"), + Self::PERCENTILE => String::from("percentile"), + } + } +} diff --git a/src/datadogV2/model/model_metric_ingested_indexed_volume.rs b/src/datadogV2/model/model_metric_ingested_indexed_volume.rs new file mode 100644 index 000000000..3fb1d7f22 --- /dev/null +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single metric's ingested and indexed volume. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricIngestedIndexedVolume { + /// Object containing the definition of a metric's ingested and indexed volume. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: Option, + /// The metric ingested and indexed volume type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MetricIngestedIndexedVolume { + pub fn new() -> MetricIngestedIndexedVolume { + MetricIngestedIndexedVolume { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs b/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs new file mode 100644 index 000000000..5bf7bf019 --- /dev/null +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric's ingested and indexed volume. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricIngestedIndexedVolumeAttributes { + /// Indexed volume for the given metric. + #[serde(rename = "indexed_volume")] + pub indexed_volume: Option, + /// Ingested volume for the given metric. + #[serde(rename = "ingested_volume")] + pub ingested_volume: Option, +} + +impl MetricIngestedIndexedVolumeAttributes { + pub fn new() -> MetricIngestedIndexedVolumeAttributes { + MetricIngestedIndexedVolumeAttributes { + indexed_volume: None, + ingested_volume: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_ingested_indexed_volume_type.rs b/src/datadogV2/model/model_metric_ingested_indexed_volume_type.rs new file mode 100644 index 000000000..edf8f3ca7 --- /dev/null +++ b/src/datadogV2/model/model_metric_ingested_indexed_volume_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricIngestedIndexedVolumeType { + #[serde(rename = "metric_volumes")] + METRIC_VOLUMES, +} + +impl ToString for MetricIngestedIndexedVolumeType { + fn to_string(&self) -> String { + match self { + Self::METRIC_VOLUMES => String::from("metric_volumes"), + } + } +} diff --git a/src/datadogV2/model/model_metric_intake_type.rs b/src/datadogV2/model/model_metric_intake_type.rs index 3ef49735e..e6986d245 100644 --- a/src/datadogV2/model/model_metric_intake_type.rs +++ b/src/datadogV2/model/model_metric_intake_type.rs @@ -25,9 +25,3 @@ impl ToString for MetricIntakeType { } } } - -impl Default for MetricIntakeType { - fn default() -> MetricIntakeType { - Self::UNSPECIFIED - } -} diff --git a/src/datadogV2/model/model_metric_metadata.rs b/src/datadogV2/model/model_metric_metadata.rs index 9fcb6c598..719eddada 100644 --- a/src/datadogV2/model/model_metric_metadata.rs +++ b/src/datadogV2/model/model_metric_metadata.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Metadata for the metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricMetadata { /// Metric origin information. #[serde(rename = "origin")] diff --git a/src/datadogV2/model/model_metric_origin.rs b/src/datadogV2/model/model_metric_origin.rs index f6c968801..551210157 100644 --- a/src/datadogV2/model/model_metric_origin.rs +++ b/src/datadogV2/model/model_metric_origin.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Metric origin information. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricOrigin { /// The origin metric type code #[serde(rename = "metric_type")] diff --git a/src/datadogV2/model/model_metric_payload.rs b/src/datadogV2/model/model_metric_payload.rs index e068f8b90..0c4d6e590 100644 --- a/src/datadogV2/model/model_metric_payload.rs +++ b/src/datadogV2/model/model_metric_payload.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The metrics' payload. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricPayload { /// A list of time series to submit to Datadog. #[serde(rename = "series")] diff --git a/src/datadogV2/model/model_metric_point.rs b/src/datadogV2/model/model_metric_point.rs index de8491eaf..08bcdbbec 100644 --- a/src/datadogV2/model/model_metric_point.rs +++ b/src/datadogV2/model/model_metric_point.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A point object is of the form `{POSIX_timestamp, numeric_value}`. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricPoint { /// The timestamp should be in seconds and current. /// Current is defined as not more than 10 minutes in the future or more than 1 hour in the past. diff --git a/src/datadogV2/model/model_metric_resource.rs b/src/datadogV2/model/model_metric_resource.rs index ede87eaed..f99631e66 100644 --- a/src/datadogV2/model/model_metric_resource.rs +++ b/src/datadogV2/model/model_metric_resource.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Metric resource. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricResource { /// The name of the resource. #[serde(rename = "name")] diff --git a/src/datadogV2/model/model_metric_series.rs b/src/datadogV2/model/model_metric_series.rs index f3c8aa0ff..58545d29a 100644 --- a/src/datadogV2/model/model_metric_series.rs +++ b/src/datadogV2/model/model_metric_series.rs @@ -7,7 +7,7 @@ use serde_with::skip_serializing_none; /// A metric to submit to Datadog. /// See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties). #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MetricSeries { /// If the type of the metric is rate or count, define the corresponding interval. #[serde(rename = "interval")] diff --git a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs new file mode 100644 index 000000000..d144ef998 --- /dev/null +++ b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single metric's actively queried tags and aggregations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricSuggestedTagsAndAggregations { + /// Object containing the definition of a metric's actively queried tags and aggregations. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: Option, + /// The metric actively queried configuration resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MetricSuggestedTagsAndAggregations { + pub fn new() -> MetricSuggestedTagsAndAggregations { + MetricSuggestedTagsAndAggregations { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs new file mode 100644 index 000000000..091a0697f --- /dev/null +++ b/src/datadogV2/model/model_metric_suggested_tags_and_aggregations_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object that includes a single metric's actively queried tags and aggregations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricSuggestedTagsAndAggregationsResponse { + /// Object for a single metric's actively queried tags and aggregations. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MetricSuggestedTagsAndAggregationsResponse { + pub fn new() -> MetricSuggestedTagsAndAggregationsResponse { + MetricSuggestedTagsAndAggregationsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_metric_suggested_tags_attributes.rs b/src/datadogV2/model/model_metric_suggested_tags_attributes.rs new file mode 100644 index 000000000..c9f9ab3e4 --- /dev/null +++ b/src/datadogV2/model/model_metric_suggested_tags_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric's actively queried tags and aggregations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricSuggestedTagsAttributes { + /// List of aggregation combinations that have been actively queried. + #[serde(rename = "active_aggregations")] + pub active_aggregations: Option>, + /// List of tag keys that have been actively queried. + #[serde(rename = "active_tags")] + pub active_tags: Option>, +} + +impl MetricSuggestedTagsAttributes { + pub fn new() -> MetricSuggestedTagsAttributes { + MetricSuggestedTagsAttributes { + active_aggregations: None, + active_tags: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration.rs b/src/datadogV2/model/model_metric_tag_configuration.rs new file mode 100644 index 000000000..e38961249 --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single metric tag configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfiguration { + /// Object containing the definition of a metric tag configuration attributes. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: Option, + /// The metric tag configuration resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MetricTagConfiguration { + pub fn new() -> MetricTagConfiguration { + MetricTagConfiguration { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_attributes.rs new file mode 100644 index 000000000..a3e32ae9d --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_attributes.rs @@ -0,0 +1,64 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric tag configuration attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationAttributes { + /// A list of queryable aggregation combinations for a count, rate, or gauge metric. + /// By default, count and rate metrics require the (time: sum, space: sum) aggregation and + /// Gauge metrics require the (time: avg, space: avg) aggregation. + /// Additional time & space combinations are also available: + /// + /// - time: avg, space: avg + /// - time: avg, space: max + /// - time: avg, space: min + /// - time: avg, space: sum + /// - time: count, space: sum + /// - time: max, space: max + /// - time: min, space: min + /// - time: sum, space: avg + /// - time: sum, space: sum + /// + /// Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`. + #[serde(rename = "aggregations")] + pub aggregations: Option>, + /// Timestamp when the tag configuration was created. + #[serde(rename = "created_at")] + pub created_at: Option, + /// When set to true, the configuration will exclude the configured tags and include any other submitted tags. + /// When set to false, the configuration will include the configured tags and exclude any other submitted tags. + /// Defaults to false. Requires `tags` property. + #[serde(rename = "exclude_tags_mode")] + pub exclude_tags_mode: Option, + /// Toggle to include or exclude percentile aggregations for distribution metrics. + /// Only present when the `metric_type` is `distribution`. + #[serde(rename = "include_percentiles")] + pub include_percentiles: Option, + /// The metric's type. + #[serde(rename = "metric_type")] + pub metric_type: Option, + /// Timestamp when the tag configuration was last modified. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// List of tag keys on which to group. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl MetricTagConfigurationAttributes { + pub fn new() -> MetricTagConfigurationAttributes { + MetricTagConfigurationAttributes { + aggregations: None, + created_at: None, + exclude_tags_mode: None, + include_percentiles: None, + metric_type: None, + modified_at: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs new file mode 100644 index 000000000..5f4aba2c0 --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_create_attributes.rs @@ -0,0 +1,59 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric tag configuration to be created. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationCreateAttributes { + /// A list of queryable aggregation combinations for a count, rate, or gauge metric. + /// By default, count and rate metrics require the (time: sum, space: sum) aggregation and + /// Gauge metrics require the (time: avg, space: avg) aggregation. + /// Additional time & space combinations are also available: + /// + /// - time: avg, space: avg + /// - time: avg, space: max + /// - time: avg, space: min + /// - time: avg, space: sum + /// - time: count, space: sum + /// - time: max, space: max + /// - time: min, space: min + /// - time: sum, space: avg + /// - time: sum, space: sum + /// + /// Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`. + #[serde(rename = "aggregations")] + pub aggregations: Option>, + /// When set to true, the configuration will exclude the configured tags and include any other submitted tags. + /// When set to false, the configuration will include the configured tags and exclude any other submitted tags. + /// Defaults to false. Requires `tags` property. + #[serde(rename = "exclude_tags_mode")] + pub exclude_tags_mode: Option, + /// Toggle to include/exclude percentiles for a distribution metric. + /// Defaults to false. Can only be applied to metrics that have a `metric_type` of `distribution`. + #[serde(rename = "include_percentiles")] + pub include_percentiles: Option, + /// The metric's type. + #[serde(rename = "metric_type")] + pub metric_type: crate::datadogV2::model::MetricTagConfigurationMetricTypes, + /// A list of tag keys that will be queryable for your metric. + #[serde(rename = "tags")] + pub tags: Vec, +} + +impl MetricTagConfigurationCreateAttributes { + pub fn new( + metric_type: crate::datadogV2::model::MetricTagConfigurationMetricTypes, + tags: Vec, + ) -> MetricTagConfigurationCreateAttributes { + MetricTagConfigurationCreateAttributes { + aggregations: None, + exclude_tags_mode: None, + include_percentiles: None, + metric_type, + tags, + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_data.rs b/src/datadogV2/model/model_metric_tag_configuration_create_data.rs new file mode 100644 index 000000000..7c48226f0 --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_create_data.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single metric to be configure tags on. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationCreateData { + /// Object containing the definition of a metric tag configuration to be created. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: String, + /// The metric tag configuration resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::MetricTagConfigurationType, +} + +impl MetricTagConfigurationCreateData { + pub fn new( + id: String, + type_: crate::datadogV2::model::MetricTagConfigurationType, + ) -> MetricTagConfigurationCreateData { + MetricTagConfigurationCreateData { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_create_request.rs b/src/datadogV2/model/model_metric_tag_configuration_create_request.rs new file mode 100644 index 000000000..8e2df0c8b --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request object that includes the metric that you would like to configure tags for. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationCreateRequest { + /// Object for a single metric to be configure tags on. + #[serde(rename = "data")] + pub data: Box, +} + +impl MetricTagConfigurationCreateRequest { + pub fn new( + data: Box, + ) -> MetricTagConfigurationCreateRequest { + MetricTagConfigurationCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_metric_types.rs b/src/datadogV2/model/model_metric_tag_configuration_metric_types.rs new file mode 100644 index 000000000..fa5ed06ee --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_metric_types.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricTagConfigurationMetricTypes { + #[serde(rename = "gauge")] + GAUGE, + #[serde(rename = "count")] + COUNT, + #[serde(rename = "rate")] + RATE, + #[serde(rename = "distribution")] + DISTRIBUTION, +} + +impl ToString for MetricTagConfigurationMetricTypes { + fn to_string(&self) -> String { + match self { + Self::GAUGE => String::from("gauge"), + Self::COUNT => String::from("count"), + Self::RATE => String::from("rate"), + Self::DISTRIBUTION => String::from("distribution"), + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_response.rs b/src/datadogV2/model/model_metric_tag_configuration_response.rs new file mode 100644 index 000000000..ec33f5dbf --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object which includes a single metric's tag configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationResponse { + /// Object for a single metric tag configuration. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MetricTagConfigurationResponse { + pub fn new() -> MetricTagConfigurationResponse { + MetricTagConfigurationResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_type.rs b/src/datadogV2/model/model_metric_tag_configuration_type.rs new file mode 100644 index 000000000..993ab81af --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricTagConfigurationType { + #[serde(rename = "manage_tags")] + MANAGE_TAGS, +} + +impl ToString for MetricTagConfigurationType { + fn to_string(&self) -> String { + match self { + Self::MANAGE_TAGS => String::from("manage_tags"), + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs b/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs new file mode 100644 index 000000000..49f60b63c --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_update_attributes.rs @@ -0,0 +1,52 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the definition of a metric tag configuration to be updated. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationUpdateAttributes { + /// A list of queryable aggregation combinations for a count, rate, or gauge metric. + /// By default, count and rate metrics require the (time: sum, space: sum) aggregation and + /// Gauge metrics require the (time: avg, space: avg) aggregation. + /// Additional time & space combinations are also available: + /// + /// - time: avg, space: avg + /// - time: avg, space: max + /// - time: avg, space: min + /// - time: avg, space: sum + /// - time: count, space: sum + /// - time: max, space: max + /// - time: min, space: min + /// - time: sum, space: avg + /// - time: sum, space: sum + /// + /// Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`. + #[serde(rename = "aggregations")] + pub aggregations: Option>, + /// When set to true, the configuration will exclude the configured tags and include any other submitted tags. + /// When set to false, the configuration will include the configured tags and exclude any other submitted tags. + /// Defaults to false. Requires `tags` property. + #[serde(rename = "exclude_tags_mode")] + pub exclude_tags_mode: Option, + /// Toggle to include/exclude percentiles for a distribution metric. + /// Defaults to false. Can only be applied to metrics that have a `metric_type` of `distribution`. + #[serde(rename = "include_percentiles")] + pub include_percentiles: Option, + /// A list of tag keys that will be queryable for your metric. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl MetricTagConfigurationUpdateAttributes { + pub fn new() -> MetricTagConfigurationUpdateAttributes { + MetricTagConfigurationUpdateAttributes { + aggregations: None, + exclude_tags_mode: None, + include_percentiles: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_data.rs b/src/datadogV2/model/model_metric_tag_configuration_update_data.rs new file mode 100644 index 000000000..88158d031 --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_update_data.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single tag configuration to be edited. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationUpdateData { + /// Object containing the definition of a metric tag configuration to be updated. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The metric name for this resource. + #[serde(rename = "id")] + pub id: String, + /// The metric tag configuration resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::MetricTagConfigurationType, +} + +impl MetricTagConfigurationUpdateData { + pub fn new( + id: String, + type_: crate::datadogV2::model::MetricTagConfigurationType, + ) -> MetricTagConfigurationUpdateData { + MetricTagConfigurationUpdateData { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_metric_tag_configuration_update_request.rs b/src/datadogV2/model/model_metric_tag_configuration_update_request.rs new file mode 100644 index 000000000..b8d06f5c4 --- /dev/null +++ b/src/datadogV2/model/model_metric_tag_configuration_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request object that includes the metric that you would like to edit the tag configuration on. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricTagConfigurationUpdateRequest { + /// Object for a single tag configuration to be edited. + #[serde(rename = "data")] + pub data: Box, +} + +impl MetricTagConfigurationUpdateRequest { + pub fn new( + data: Box, + ) -> MetricTagConfigurationUpdateRequest { + MetricTagConfigurationUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_metric_type.rs b/src/datadogV2/model/model_metric_type.rs new file mode 100644 index 000000000..c88b699da --- /dev/null +++ b/src/datadogV2/model/model_metric_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricType { + #[serde(rename = "metrics")] + METRICS, +} + +impl ToString for MetricType { + fn to_string(&self) -> String { + match self { + Self::METRICS => String::from("metrics"), + } + } +} diff --git a/src/datadogV2/model/model_metric_volumes.rs b/src/datadogV2/model/model_metric_volumes.rs new file mode 100644 index 000000000..10bf75ee6 --- /dev/null +++ b/src/datadogV2/model/model_metric_volumes.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Possible response objects for a metric's volume. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MetricVolumes { + MetricDistinctVolume(Box), + MetricIngestedIndexedVolume(Box), +} diff --git a/src/datadogV2/model/model_metric_volumes_response.rs b/src/datadogV2/model/model_metric_volumes_response.rs new file mode 100644 index 000000000..eeb53b678 --- /dev/null +++ b/src/datadogV2/model/model_metric_volumes_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object which includes a single metric's volume. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricVolumesResponse { + /// Possible response objects for a metric's volume. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MetricVolumesResponse { + pub fn new() -> MetricVolumesResponse { + MetricVolumesResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_metrics_aggregator.rs b/src/datadogV2/model/model_metrics_aggregator.rs new file mode 100644 index 000000000..063ca8457 --- /dev/null +++ b/src/datadogV2/model/model_metrics_aggregator.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricsAggregator { + #[serde(rename = "avg")] + AVG, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "last")] + LAST, + #[serde(rename = "percentile")] + PERCENTILE, + #[serde(rename = "mean")] + MEAN, + #[serde(rename = "l2norm")] + L2NORM, + #[serde(rename = "area")] + AREA, +} + +impl ToString for MetricsAggregator { + fn to_string(&self) -> String { + match self { + Self::AVG => String::from("avg"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::SUM => String::from("sum"), + Self::LAST => String::from("last"), + Self::PERCENTILE => String::from("percentile"), + Self::MEAN => String::from("mean"), + Self::L2NORM => String::from("l2norm"), + Self::AREA => String::from("area"), + } + } +} diff --git a/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs b/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs new file mode 100644 index 000000000..68d4e9e68 --- /dev/null +++ b/src/datadogV2/model/model_metrics_and_metric_tag_configurations.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Object for a metrics and metric tag configurations. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MetricsAndMetricTagConfigurations { + Metric(Box), + MetricTagConfiguration(Box), +} diff --git a/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs b/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs new file mode 100644 index 000000000..fbdc63577 --- /dev/null +++ b/src/datadogV2/model/model_metrics_and_metric_tag_configurations_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object that includes metrics and metric tag configurations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricsAndMetricTagConfigurationsResponse { + /// Array of metrics and metric tag configurations. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MetricsAndMetricTagConfigurationsResponse { + pub fn new() -> MetricsAndMetricTagConfigurationsResponse { + MetricsAndMetricTagConfigurationsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_metrics_data_source.rs b/src/datadogV2/model/model_metrics_data_source.rs new file mode 100644 index 000000000..fbb544009 --- /dev/null +++ b/src/datadogV2/model/model_metrics_data_source.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MetricsDataSource { + #[serde(rename = "metrics")] + METRICS, + #[serde(rename = "cloud_cost")] + CLOUD_COST, +} + +impl ToString for MetricsDataSource { + fn to_string(&self) -> String { + match self { + Self::METRICS => String::from("metrics"), + Self::CLOUD_COST => String::from("cloud_cost"), + } + } +} diff --git a/src/datadogV2/model/model_metrics_scalar_query.rs b/src/datadogV2/model/model_metrics_scalar_query.rs new file mode 100644 index 000000000..e9ff4f78d --- /dev/null +++ b/src/datadogV2/model/model_metrics_scalar_query.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An individual scalar metrics query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricsScalarQuery { + /// The type of aggregation that can be performed on metrics-based queries. + #[serde(rename = "aggregator")] + pub aggregator: crate::datadogV2::model::MetricsAggregator, + /// A data source that is powered by the Metrics platform. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV2::model::MetricsDataSource, + /// The variable name for use in formulas. + #[serde(rename = "name")] + pub name: Option, + /// A classic metrics query string. + #[serde(rename = "query")] + pub query: String, +} + +impl MetricsScalarQuery { + pub fn new( + aggregator: crate::datadogV2::model::MetricsAggregator, + data_source: crate::datadogV2::model::MetricsDataSource, + query: String, + ) -> MetricsScalarQuery { + MetricsScalarQuery { + aggregator, + data_source, + name: None, + query, + } + } +} diff --git a/src/datadogV2/model/model_metrics_timeseries_query.rs b/src/datadogV2/model/model_metrics_timeseries_query.rs new file mode 100644 index 000000000..491eace1e --- /dev/null +++ b/src/datadogV2/model/model_metrics_timeseries_query.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// An individual timeseries metrics query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MetricsTimeseriesQuery { + /// A data source that is powered by the Metrics platform. + #[serde(rename = "data_source")] + pub data_source: crate::datadogV2::model::MetricsDataSource, + /// The variable name for use in formulas. + #[serde(rename = "name")] + pub name: Option, + /// A classic metrics query string. + #[serde(rename = "query")] + pub query: String, +} + +impl MetricsTimeseriesQuery { + pub fn new( + data_source: crate::datadogV2::model::MetricsDataSource, + query: String, + ) -> MetricsTimeseriesQuery { + MetricsTimeseriesQuery { + data_source, + name: None, + query, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_attribute_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_attribute_create_request.rs new file mode 100644 index 000000000..f5682382a --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_attribute_create_request.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Policy and policy type for a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyAttributeCreateRequest { + /// Configuration for the policy. + #[serde(rename = "policy")] + pub policy: Box, + /// The monitor configuration policy type. + #[serde(rename = "policy_type")] + pub policy_type: crate::datadogV2::model::MonitorConfigPolicyType, +} + +impl MonitorConfigPolicyAttributeCreateRequest { + pub fn new( + policy: Box, + policy_type: crate::datadogV2::model::MonitorConfigPolicyType, + ) -> MonitorConfigPolicyAttributeCreateRequest { + MonitorConfigPolicyAttributeCreateRequest { + policy, + policy_type, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_attribute_edit_request.rs b/src/datadogV2/model/model_monitor_config_policy_attribute_edit_request.rs new file mode 100644 index 000000000..1a8c1c772 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_attribute_edit_request.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Policy and policy type for a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyAttributeEditRequest { + /// Configuration for the policy. + #[serde(rename = "policy")] + pub policy: Box, + /// The monitor configuration policy type. + #[serde(rename = "policy_type")] + pub policy_type: crate::datadogV2::model::MonitorConfigPolicyType, +} + +impl MonitorConfigPolicyAttributeEditRequest { + pub fn new( + policy: Box, + policy_type: crate::datadogV2::model::MonitorConfigPolicyType, + ) -> MonitorConfigPolicyAttributeEditRequest { + MonitorConfigPolicyAttributeEditRequest { + policy, + policy_type, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs b/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs new file mode 100644 index 000000000..708a5736b --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_attribute_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Policy and policy type for a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyAttributeResponse { + /// Configuration for the policy. + #[serde(rename = "policy")] + pub policy: Option>, + /// The monitor configuration policy type. + #[serde(rename = "policy_type")] + pub policy_type: Option, +} + +impl MonitorConfigPolicyAttributeResponse { + pub fn new() -> MonitorConfigPolicyAttributeResponse { + MonitorConfigPolicyAttributeResponse { + policy: None, + policy_type: None, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_create_data.rs b/src/datadogV2/model/model_monitor_config_policy_create_data.rs new file mode 100644 index 000000000..038f85e93 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_create_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A monitor configuration policy data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyCreateData { + /// Policy and policy type for a monitor configuration policy. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Monitor configuration policy resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::MonitorConfigPolicyResourceType, +} + +impl MonitorConfigPolicyCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::MonitorConfigPolicyResourceType, + ) -> MonitorConfigPolicyCreateData { + MonitorConfigPolicyCreateData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_create_request.rs new file mode 100644 index 000000000..819277994 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request for creating a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyCreateRequest { + /// A monitor configuration policy data. + #[serde(rename = "data")] + pub data: Box, +} + +impl MonitorConfigPolicyCreateRequest { + pub fn new( + data: Box, + ) -> MonitorConfigPolicyCreateRequest { + MonitorConfigPolicyCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_edit_data.rs b/src/datadogV2/model/model_monitor_config_policy_edit_data.rs new file mode 100644 index 000000000..b6e7c2201 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_edit_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A monitor configuration policy data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyEditData { + /// Policy and policy type for a monitor configuration policy. + #[serde(rename = "attributes")] + pub attributes: Box, + /// ID of this monitor configuration policy. + #[serde(rename = "id")] + pub id: String, + /// Monitor configuration policy resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::MonitorConfigPolicyResourceType, +} + +impl MonitorConfigPolicyEditData { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::MonitorConfigPolicyResourceType, + ) -> MonitorConfigPolicyEditData { + MonitorConfigPolicyEditData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_edit_request.rs b/src/datadogV2/model/model_monitor_config_policy_edit_request.rs new file mode 100644 index 000000000..4151a3b0c --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_edit_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request for editing a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyEditRequest { + /// A monitor configuration policy data. + #[serde(rename = "data")] + pub data: Box, +} + +impl MonitorConfigPolicyEditRequest { + pub fn new( + data: Box, + ) -> MonitorConfigPolicyEditRequest { + MonitorConfigPolicyEditRequest { data } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_list_response.rs b/src/datadogV2/model/model_monitor_config_policy_list_response.rs new file mode 100644 index 000000000..346e8f910 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_list_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for retrieving all monitor configuration policies. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyListResponse { + /// An array of monitor configuration policies. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MonitorConfigPolicyListResponse { + pub fn new() -> MonitorConfigPolicyListResponse { + MonitorConfigPolicyListResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_policy.rs b/src/datadogV2/model/model_monitor_config_policy_policy.rs new file mode 100644 index 000000000..0a0dc53a2 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_policy.rs @@ -0,0 +1,11 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Configuration for the policy. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MonitorConfigPolicyPolicy { + MonitorConfigPolicyTagPolicy(Box), +} diff --git a/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs new file mode 100644 index 000000000..c0624ff85 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_policy_create_request.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Configuration for the policy. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum MonitorConfigPolicyPolicyCreateRequest { + MonitorConfigPolicyTagPolicyCreateRequest( + Box, + ), +} diff --git a/src/datadogV2/model/model_monitor_config_policy_resource_type.rs b/src/datadogV2/model/model_monitor_config_policy_resource_type.rs new file mode 100644 index 000000000..2feb3b696 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_resource_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorConfigPolicyResourceType { + #[serde(rename = "monitor-config-policy")] + MONITOR_CONFIG_POLICY, +} + +impl ToString for MonitorConfigPolicyResourceType { + fn to_string(&self) -> String { + match self { + Self::MONITOR_CONFIG_POLICY => String::from("monitor-config-policy"), + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_response.rs b/src/datadogV2/model/model_monitor_config_policy_response.rs new file mode 100644 index 000000000..0283c6c12 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for retrieving a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyResponse { + /// A monitor configuration policy data. + #[serde(rename = "data")] + pub data: Option>, +} + +impl MonitorConfigPolicyResponse { + pub fn new() -> MonitorConfigPolicyResponse { + MonitorConfigPolicyResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_response_data.rs b/src/datadogV2/model/model_monitor_config_policy_response_data.rs new file mode 100644 index 000000000..4597156c6 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_response_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A monitor configuration policy data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyResponseData { + /// Policy and policy type for a monitor configuration policy. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of this monitor configuration policy. + #[serde(rename = "id")] + pub id: Option, + /// Monitor configuration policy resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MonitorConfigPolicyResponseData { + pub fn new() -> MonitorConfigPolicyResponseData { + MonitorConfigPolicyResponseData { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs b/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs new file mode 100644 index 000000000..2d2381453 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_tag_policy.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Tag attributes of a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyTagPolicy { + /// The key of the tag. + #[serde(rename = "tag_key")] + pub tag_key: Option, + /// If a tag key is required for monitor creation. + #[serde(rename = "tag_key_required")] + pub tag_key_required: Option, + /// Valid values for the tag. + #[serde(rename = "valid_tag_values")] + pub valid_tag_values: Option>, +} + +impl MonitorConfigPolicyTagPolicy { + pub fn new() -> MonitorConfigPolicyTagPolicy { + MonitorConfigPolicyTagPolicy { + tag_key: None, + tag_key_required: None, + valid_tag_values: None, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_tag_policy_create_request.rs b/src/datadogV2/model/model_monitor_config_policy_tag_policy_create_request.rs new file mode 100644 index 000000000..1151e9dbd --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_tag_policy_create_request.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Tag attributes of a monitor configuration policy. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorConfigPolicyTagPolicyCreateRequest { + /// The key of the tag. + #[serde(rename = "tag_key")] + pub tag_key: String, + /// If a tag key is required for monitor creation. + #[serde(rename = "tag_key_required")] + pub tag_key_required: bool, + /// Valid values for the tag. + #[serde(rename = "valid_tag_values")] + pub valid_tag_values: Vec, +} + +impl MonitorConfigPolicyTagPolicyCreateRequest { + pub fn new( + tag_key: String, + tag_key_required: bool, + valid_tag_values: Vec, + ) -> MonitorConfigPolicyTagPolicyCreateRequest { + MonitorConfigPolicyTagPolicyCreateRequest { + tag_key, + tag_key_required, + valid_tag_values, + } + } +} diff --git a/src/datadogV2/model/model_monitor_config_policy_type.rs b/src/datadogV2/model/model_monitor_config_policy_type.rs new file mode 100644 index 000000000..b56d0f061 --- /dev/null +++ b/src/datadogV2/model/model_monitor_config_policy_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorConfigPolicyType { + #[serde(rename = "tag")] + TAG, +} + +impl ToString for MonitorConfigPolicyType { + fn to_string(&self) -> String { + match self { + Self::TAG => String::from("tag"), + } + } +} diff --git a/src/datadogV2/model/model_monitor_downtime_match_resource_type.rs b/src/datadogV2/model/model_monitor_downtime_match_resource_type.rs new file mode 100644 index 000000000..4f264c2d7 --- /dev/null +++ b/src/datadogV2/model/model_monitor_downtime_match_resource_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum MonitorDowntimeMatchResourceType { + #[serde(rename = "downtime_match")] + DOWNTIME_MATCH, +} + +impl ToString for MonitorDowntimeMatchResourceType { + fn to_string(&self) -> String { + match self { + Self::DOWNTIME_MATCH => String::from("downtime_match"), + } + } +} diff --git a/src/datadogV2/model/model_monitor_downtime_match_response.rs b/src/datadogV2/model/model_monitor_downtime_match_response.rs new file mode 100644 index 000000000..1f56c8006 --- /dev/null +++ b/src/datadogV2/model/model_monitor_downtime_match_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for retrieving all downtime matches for a monitor. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorDowntimeMatchResponse { + /// An array of downtime matches. + #[serde(rename = "data")] + pub data: Option>, + /// Pagination metadata returned by the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl MonitorDowntimeMatchResponse { + pub fn new() -> MonitorDowntimeMatchResponse { + MonitorDowntimeMatchResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs b/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs new file mode 100644 index 000000000..ee412af6b --- /dev/null +++ b/src/datadogV2/model/model_monitor_downtime_match_response_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Downtime match details. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorDowntimeMatchResponseAttributes { + /// The end of the downtime. + #[serde(rename = "end", default, with = "::serde_with::rust::double_option")] + pub end: Option>, + /// An array of groups associated with the downtime. + #[serde(rename = "groups")] + pub groups: Option>, + /// The scope to which the downtime applies. Must follow the [common search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). + #[serde(rename = "scope")] + pub scope: Option, + /// The start of the downtime. + #[serde(rename = "start")] + pub start: Option, +} + +impl MonitorDowntimeMatchResponseAttributes { + pub fn new() -> MonitorDowntimeMatchResponseAttributes { + MonitorDowntimeMatchResponseAttributes { + end: None, + groups: None, + scope: None, + start: None, + } + } +} diff --git a/src/datadogV2/model/model_monitor_downtime_match_response_data.rs b/src/datadogV2/model/model_monitor_downtime_match_response_data.rs new file mode 100644 index 000000000..7d0fb6262 --- /dev/null +++ b/src/datadogV2/model/model_monitor_downtime_match_response_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A downtime match. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonitorDowntimeMatchResponseData { + /// Downtime match details. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The downtime ID. + #[serde(rename = "id", default, with = "::serde_with::rust::double_option")] + pub id: Option>, + /// Monitor Downtime Match resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MonitorDowntimeMatchResponseData { + pub fn new() -> MonitorDowntimeMatchResponseData { + MonitorDowntimeMatchResponseData { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_monitor_type.rs b/src/datadogV2/model/model_monitor_type.rs index 9a2741cf8..a70f307ba 100644 --- a/src/datadogV2/model/model_monitor_type.rs +++ b/src/datadogV2/model/model_monitor_type.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes from the monitor that triggered the event. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MonitorType { /// The POSIX timestamp of the monitor's creation in nanoseconds. #[serde(rename = "created_at")] diff --git a/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs b/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs new file mode 100644 index 000000000..704c6a87f --- /dev/null +++ b/src/datadogV2/model/model_monthly_cost_attribution_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Cost Attribution by Tag for a given organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonthlyCostAttributionAttributes { + /// Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`. + #[serde(rename = "month")] + pub month: Option, + /// The name of the organization. + #[serde(rename = "org_name")] + pub org_name: Option, + /// The organization public ID. + #[serde(rename = "public_id")] + pub public_id: Option, + /// The source of the cost attribution tag configuration and the selected tags in the format `::://////`. + #[serde(rename = "tag_config_source")] + pub tag_config_source: Option, + /// Tag keys and values. + /// A `null` value here means that the requested tag breakdown cannot be applied because it does not match the [tags + /// configured for usage attribution](https://docs.datadoghq.com/account_management/billing/usage_attribution/#getting-started). + /// In this scenario the API returns the total cost, not broken down by tags. + #[serde(rename = "tags", default, with = "::serde_with::rust::double_option")] + pub tags: Option>>>>, + /// Shows the most recent hour in the current months for all organizations for which all costs were calculated. + #[serde(rename = "updated_at")] + pub updated_at: Option, + /// Fields in Cost Attribution by tag(s). Example: `infra_host_on_demand_cost`, `infra_host_committed_cost`, `infra_host_total_cost`, `infra_host_percentage_in_org`, `infra_host_percentage_in_account`. + #[serde(rename = "values")] + pub values: Option>, +} + +impl MonthlyCostAttributionAttributes { + pub fn new() -> MonthlyCostAttributionAttributes { + MonthlyCostAttributionAttributes { + month: None, + org_name: None, + public_id: None, + tag_config_source: None, + tags: None, + updated_at: None, + values: None, + } + } +} diff --git a/src/datadogV2/model/model_monthly_cost_attribution_body.rs b/src/datadogV2/model/model_monthly_cost_attribution_body.rs new file mode 100644 index 000000000..22eeb7238 --- /dev/null +++ b/src/datadogV2/model/model_monthly_cost_attribution_body.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Cost data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonthlyCostAttributionBody { + /// Cost Attribution by Tag for a given organization. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the response. + #[serde(rename = "id")] + pub id: Option, + /// Type of cost attribution data. + #[serde(rename = "type")] + pub type_: Option, +} + +impl MonthlyCostAttributionBody { + pub fn new() -> MonthlyCostAttributionBody { + MonthlyCostAttributionBody { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_monthly_cost_attribution_meta.rs b/src/datadogV2/model/model_monthly_cost_attribution_meta.rs new file mode 100644 index 000000000..ebe2440af --- /dev/null +++ b/src/datadogV2/model/model_monthly_cost_attribution_meta.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object containing document metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonthlyCostAttributionMeta { + /// An array of available aggregates. + #[serde(rename = "aggregates")] + pub aggregates: Option>, + /// The metadata for the current pagination. + #[serde(rename = "pagination")] + pub pagination: Option>, +} + +impl MonthlyCostAttributionMeta { + pub fn new() -> MonthlyCostAttributionMeta { + MonthlyCostAttributionMeta { + aggregates: None, + pagination: None, + } + } +} diff --git a/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs b/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs new file mode 100644 index 000000000..9bffdd618 --- /dev/null +++ b/src/datadogV2/model/model_monthly_cost_attribution_pagination.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata for the current pagination. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonthlyCostAttributionPagination { + /// The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of the `next_record_id`. + #[serde( + rename = "next_record_id", + default, + with = "::serde_with::rust::double_option" + )] + pub next_record_id: Option>, +} + +impl MonthlyCostAttributionPagination { + pub fn new() -> MonthlyCostAttributionPagination { + MonthlyCostAttributionPagination { + next_record_id: None, + } + } +} diff --git a/src/datadogV2/model/model_monthly_cost_attribution_response.rs b/src/datadogV2/model/model_monthly_cost_attribution_response.rs new file mode 100644 index 000000000..416b84b2e --- /dev/null +++ b/src/datadogV2/model/model_monthly_cost_attribution_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing the monthly cost attribution by tag(s). +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct MonthlyCostAttributionResponse { + /// Response containing cost attribution. + #[serde(rename = "data")] + pub data: Option>, + /// The object containing document metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl MonthlyCostAttributionResponse { + pub fn new() -> MonthlyCostAttributionResponse { + MonthlyCostAttributionResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_mute_finding_request_data.rs b/src/datadogV2/model/model_mute_finding_request_data.rs deleted file mode 100644 index 362fbcbde..000000000 --- a/src/datadogV2/model/model_mute_finding_request_data.rs +++ /dev/null @@ -1,34 +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. -use serde::{Deserialize, Serialize}; -use serde_with::skip_serializing_none; - -/// Data object containing the new mute properties of the finding. -#[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingRequestData { - /// The mute properties to be updated. - #[serde(rename = "attributes")] - pub attributes: Box, - /// The unique ID for this finding. - #[serde(rename = "id")] - pub id: String, - /// The JSON:API type for findings. - #[serde(rename = "type")] - pub type_: crate::datadogV2::model::FindingType, -} - -impl MuteFindingRequestData { - pub fn new( - attributes: crate::datadogV2::model::MuteFindingRequestAttributes, - id: String, - type_: crate::datadogV2::model::FindingType, - ) -> MuteFindingRequestData { - MuteFindingRequestData { - attributes: Box::new(attributes), - id, - type_, - } - } -} diff --git a/src/datadogV2/model/model_mute_finding_response.rs b/src/datadogV2/model/model_mute_finding_response.rs deleted file mode 100644 index 21d1cc33d..000000000 --- a/src/datadogV2/model/model_mute_finding_response.rs +++ /dev/null @@ -1,22 +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. -use serde::{Deserialize, Serialize}; -use serde_with::skip_serializing_none; - -/// The expected response schema. -#[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingResponse { - /// Data object containing the updated finding. - #[serde(rename = "data")] - pub data: Box, -} - -impl MuteFindingResponse { - pub fn new(data: crate::datadogV2::model::MuteFindingResponseData) -> MuteFindingResponse { - MuteFindingResponse { - data: Box::new(data), - } - } -} diff --git a/src/datadogV2/model/model_mute_finding_response_attributes.rs b/src/datadogV2/model/model_mute_finding_response_attributes.rs deleted file mode 100644 index 05b01984d..000000000 --- a/src/datadogV2/model/model_mute_finding_response_attributes.rs +++ /dev/null @@ -1,54 +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. -use serde::{Deserialize, Serialize}; -use serde_with::skip_serializing_none; - -/// The JSON:API attributes of the finding. -#[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingResponseAttributes { - /// The evaluation of the finding. - #[serde(rename = "evaluation")] - pub evaluation: Option, - /// The date on which the evaluation for this finding changed (Unix ms). - #[serde(rename = "evaluation_changed_at")] - pub evaluation_changed_at: Option, - /// Information about the mute status of this finding. - #[serde(rename = "mute")] - pub mute: Option>, - /// The resource name of this finding. - #[serde(rename = "resource")] - pub resource: Option, - /// The date on which the resource was discovered (Unix ms). - #[serde(rename = "resource_discovery_date")] - pub resource_discovery_date: Option, - /// The resource type of this finding. - #[serde(rename = "resource_type")] - pub resource_type: Option, - /// The rule that triggered this finding. - #[serde(rename = "rule")] - pub rule: Option>, - /// The status of the finding. - #[serde(rename = "status")] - pub status: Option, - /// The tags associated with this finding. - #[serde(rename = "tags")] - pub tags: Option>, -} - -impl MuteFindingResponseAttributes { - pub fn new() -> MuteFindingResponseAttributes { - MuteFindingResponseAttributes { - evaluation: None, - evaluation_changed_at: None, - mute: None, - resource: None, - resource_discovery_date: None, - resource_type: None, - rule: None, - status: None, - tags: None, - } - } -} diff --git a/src/datadogV2/model/model_mute_finding_response_properties.rs b/src/datadogV2/model/model_mute_finding_response_properties.rs deleted file mode 100644 index 381c33b4b..000000000 --- a/src/datadogV2/model/model_mute_finding_response_properties.rs +++ /dev/null @@ -1,38 +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. -use serde::{Deserialize, Serialize}; -use serde_with::skip_serializing_none; - -/// Information about the mute status of this finding. -#[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] -pub struct MuteFindingResponseProperties { - /// Additional information about the reason why this finding is muted or unmuted. - /// This attribute will not be included in the response if the description is not provided in the request body. - /// - #[serde(rename = "description")] - pub description: Option, - /// The expiration date of the mute or unmute action. - /// If the expiration date is not provided in the request body, this attribute will not be included in the response and the finding will be muted or unmuted indefinitely. - /// - #[serde(rename = "expiration_date")] - pub expiration_date: Option, - /// Whether this finding is muted or unmuted. - #[serde(rename = "muted")] - pub muted: Option, - /// The reason why this finding is muted or unmuted. - #[serde(rename = "reason")] - pub reason: Option, -} - -impl MuteFindingResponseProperties { - pub fn new() -> MuteFindingResponseProperties { - MuteFindingResponseProperties { - description: None, - expiration_date: None, - muted: None, - reason: None, - } - } -} diff --git a/src/datadogV2/model/model_nullable_relationship_to_user.rs b/src/datadogV2/model/model_nullable_relationship_to_user.rs new file mode 100644 index 000000000..b3c343c6e --- /dev/null +++ b/src/datadogV2/model/model_nullable_relationship_to_user.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NullableRelationshipToUser { + /// Relationship to user object. + #[serde(rename = "data")] + pub data: Option>, +} + +impl NullableRelationshipToUser { + pub fn new( + data: Option>, + ) -> NullableRelationshipToUser { + NullableRelationshipToUser { data } + } +} diff --git a/src/datadogV2/model/model_nullable_relationship_to_user_data.rs b/src/datadogV2/model/model_nullable_relationship_to_user_data.rs new file mode 100644 index 000000000..d28857503 --- /dev/null +++ b/src/datadogV2/model/model_nullable_relationship_to_user_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to user object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct NullableRelationshipToUserData { + /// A unique identifier that represents the user. + #[serde(rename = "id")] + pub id: String, + /// Users resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UsersType, +} + +impl NullableRelationshipToUserData { + pub fn new( + id: String, + type_: crate::datadogV2::model::UsersType, + ) -> NullableRelationshipToUserData { + NullableRelationshipToUserData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_okta_account.rs b/src/datadogV2/model/model_okta_account.rs new file mode 100644 index 000000000..06ce4daec --- /dev/null +++ b/src/datadogV2/model/model_okta_account.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Schema for an Okta account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccount { + /// Attributes object for an Okta account. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The ID of the Okta account, a UUID hash of the account name. + #[serde(rename = "id")] + pub id: Option, + /// Account type for an Okta account. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::OktaAccountType, +} + +impl OktaAccount { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::OktaAccountType, + ) -> OktaAccount { + OktaAccount { + attributes, + id: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_okta_account_attributes.rs b/src/datadogV2/model/model_okta_account_attributes.rs new file mode 100644 index 000000000..a41b42cd1 --- /dev/null +++ b/src/datadogV2/model/model_okta_account_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes object for an Okta account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountAttributes { + /// The API key of the Okta account. + #[serde(rename = "api_key")] + pub api_key: Option, + /// The authorization method for an Okta account. + #[serde(rename = "auth_method")] + pub auth_method: String, + /// The Client ID of an Okta app integration. + #[serde(rename = "client_id")] + pub client_id: Option, + /// The client secret of an Okta app integration. + #[serde(rename = "client_secret")] + pub client_secret: Option, + /// The domain of the Okta account. + #[serde(rename = "domain")] + pub domain: String, + /// The name of the Okta account. + #[serde(rename = "name")] + pub name: String, +} + +impl OktaAccountAttributes { + pub fn new(auth_method: String, domain: String, name: String) -> OktaAccountAttributes { + OktaAccountAttributes { + api_key: None, + auth_method, + client_id: None, + client_secret: None, + domain, + name, + } + } +} diff --git a/src/datadogV2/model/model_okta_account_request.rs b/src/datadogV2/model/model_okta_account_request.rs new file mode 100644 index 000000000..955a8204e --- /dev/null +++ b/src/datadogV2/model/model_okta_account_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request object for an Okta account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountRequest { + /// Schema for an Okta account. + #[serde(rename = "data")] + pub data: Box, +} + +impl OktaAccountRequest { + pub fn new(data: Box) -> OktaAccountRequest { + OktaAccountRequest { data } + } +} diff --git a/src/datadogV2/model/model_okta_account_response.rs b/src/datadogV2/model/model_okta_account_response.rs new file mode 100644 index 000000000..737213e0a --- /dev/null +++ b/src/datadogV2/model/model_okta_account_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object for an Okta account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountResponse { + /// Schema for an Okta account. + #[serde(rename = "data")] + pub data: Option>, +} + +impl OktaAccountResponse { + pub fn new() -> OktaAccountResponse { + OktaAccountResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_okta_account_response_data.rs b/src/datadogV2/model/model_okta_account_response_data.rs new file mode 100644 index 000000000..ac892ecc6 --- /dev/null +++ b/src/datadogV2/model/model_okta_account_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data object of an Okta account +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountResponseData { + /// Attributes object for an Okta account. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The ID of the Okta account, a UUID hash of the account name. + #[serde(rename = "id")] + pub id: String, + /// Account type for an Okta account. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::OktaAccountType, +} + +impl OktaAccountResponseData { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::OktaAccountType, + ) -> OktaAccountResponseData { + OktaAccountResponseData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_okta_account_type.rs b/src/datadogV2/model/model_okta_account_type.rs new file mode 100644 index 000000000..172d71a7f --- /dev/null +++ b/src/datadogV2/model/model_okta_account_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OktaAccountType { + #[serde(rename = "okta-accounts")] + OKTA_ACCOUNTS, +} + +impl ToString for OktaAccountType { + fn to_string(&self) -> String { + match self { + Self::OKTA_ACCOUNTS => String::from("okta-accounts"), + } + } +} diff --git a/src/datadogV2/model/model_okta_account_update_request.rs b/src/datadogV2/model/model_okta_account_update_request.rs new file mode 100644 index 000000000..d2f0be69c --- /dev/null +++ b/src/datadogV2/model/model_okta_account_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Payload schema when updating an Okta account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountUpdateRequest { + /// Data object for updating an Okta account. + #[serde(rename = "data")] + pub data: Box, +} + +impl OktaAccountUpdateRequest { + pub fn new( + data: Box, + ) -> OktaAccountUpdateRequest { + OktaAccountUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_okta_account_update_request_attributes.rs b/src/datadogV2/model/model_okta_account_update_request_attributes.rs new file mode 100644 index 000000000..ccd62c76a --- /dev/null +++ b/src/datadogV2/model/model_okta_account_update_request_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes object for updating an Okta account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountUpdateRequestAttributes { + /// The API key of the Okta account. + #[serde(rename = "api_key")] + pub api_key: Option, + /// The authorization method for an Okta account. + #[serde(rename = "auth_method")] + pub auth_method: String, + /// The Client ID of an Okta app integration. + #[serde(rename = "client_id")] + pub client_id: Option, + /// The client secret of an Okta app integration. + #[serde(rename = "client_secret")] + pub client_secret: Option, + /// The domain associated with an Okta account. + #[serde(rename = "domain")] + pub domain: String, +} + +impl OktaAccountUpdateRequestAttributes { + pub fn new(auth_method: String, domain: String) -> OktaAccountUpdateRequestAttributes { + OktaAccountUpdateRequestAttributes { + api_key: None, + auth_method, + client_id: None, + client_secret: None, + domain, + } + } +} diff --git a/src/datadogV2/model/model_okta_account_update_request_data.rs b/src/datadogV2/model/model_okta_account_update_request_data.rs new file mode 100644 index 000000000..7d9f64a85 --- /dev/null +++ b/src/datadogV2/model/model_okta_account_update_request_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data object for updating an Okta account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountUpdateRequestData { + /// Attributes object for updating an Okta account. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Account type for an Okta account. + #[serde(rename = "type")] + pub type_: Option, +} + +impl OktaAccountUpdateRequestData { + pub fn new() -> OktaAccountUpdateRequestData { + OktaAccountUpdateRequestData { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_okta_accounts_response.rs b/src/datadogV2/model/model_okta_accounts_response.rs new file mode 100644 index 000000000..47b498f83 --- /dev/null +++ b/src/datadogV2/model/model_okta_accounts_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The expected response schema when getting Okta accounts. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OktaAccountsResponse { + /// List of Okta accounts. + #[serde(rename = "data")] + pub data: Option>, +} + +impl OktaAccountsResponse { + pub fn new() -> OktaAccountsResponse { + OktaAccountsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap.rs b/src/datadogV2/model/model_on_demand_concurrency_cap.rs index 503c5b49c..579a6ee59 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// On-demand concurrency cap. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OnDemandConcurrencyCap { /// On-demand concurrency cap attributes. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs b/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs index 423583282..a57407888 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// On-demand concurrency cap attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OnDemandConcurrencyCapAttributes { /// Value of the on-demand concurrency cap. #[serde(rename = "on_demand_concurrency_cap")] diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs b/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs index 1ccf0d506..6ea49e200 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// On-demand concurrency cap response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OnDemandConcurrencyCapResponse { /// On-demand concurrency cap. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_on_demand_concurrency_cap_type.rs b/src/datadogV2/model/model_on_demand_concurrency_cap_type.rs index 5fcdb2a37..fdd0a29ae 100644 --- a/src/datadogV2/model/model_on_demand_concurrency_cap_type.rs +++ b/src/datadogV2/model/model_on_demand_concurrency_cap_type.rs @@ -17,9 +17,3 @@ impl ToString for OnDemandConcurrencyCapType { } } } - -impl Default for OnDemandConcurrencyCapType { - fn default() -> OnDemandConcurrencyCapType { - Self::ON_DEMAND_CONCURRENCY_CAP - } -} diff --git a/src/datadogV2/model/model_opsgenie_service_create_attributes.rs b/src/datadogV2/model/model_opsgenie_service_create_attributes.rs index 796f77718..7c19fb874 100644 --- a/src/datadogV2/model/model_opsgenie_service_create_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_create_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The Opsgenie service attributes for a create request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceCreateAttributes { /// The custom URL for a custom region. #[serde(rename = "custom_url")] diff --git a/src/datadogV2/model/model_opsgenie_service_create_data.rs b/src/datadogV2/model/model_opsgenie_service_create_data.rs index e027dcdaa..c8e9ae3fa 100644 --- a/src/datadogV2/model/model_opsgenie_service_create_data.rs +++ b/src/datadogV2/model/model_opsgenie_service_create_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Opsgenie service data for a create request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceCreateData { /// The Opsgenie service attributes for a create request. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct OpsgenieServiceCreateData { impl OpsgenieServiceCreateData { pub fn new( - attributes: crate::datadogV2::model::OpsgenieServiceCreateAttributes, + attributes: Box, type_: crate::datadogV2::model::OpsgenieServiceType, ) -> OpsgenieServiceCreateData { - OpsgenieServiceCreateData { - attributes: Box::new(attributes), - type_, - } + OpsgenieServiceCreateData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_opsgenie_service_create_request.rs b/src/datadogV2/model/model_opsgenie_service_create_request.rs index e9e8700cd..1cb606280 100644 --- a/src/datadogV2/model/model_opsgenie_service_create_request.rs +++ b/src/datadogV2/model/model_opsgenie_service_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Create request for an Opsgenie service. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceCreateRequest { /// Opsgenie service data for a create request. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct OpsgenieServiceCreateRequest { impl OpsgenieServiceCreateRequest { pub fn new( - data: crate::datadogV2::model::OpsgenieServiceCreateData, + data: Box, ) -> OpsgenieServiceCreateRequest { - OpsgenieServiceCreateRequest { - data: Box::new(data), - } + OpsgenieServiceCreateRequest { data } } } diff --git a/src/datadogV2/model/model_opsgenie_service_region_type.rs b/src/datadogV2/model/model_opsgenie_service_region_type.rs index 40dd27549..f3382d263 100644 --- a/src/datadogV2/model/model_opsgenie_service_region_type.rs +++ b/src/datadogV2/model/model_opsgenie_service_region_type.rs @@ -23,9 +23,3 @@ impl ToString for OpsgenieServiceRegionType { } } } - -impl Default for OpsgenieServiceRegionType { - fn default() -> OpsgenieServiceRegionType { - Self::US - } -} diff --git a/src/datadogV2/model/model_opsgenie_service_response.rs b/src/datadogV2/model/model_opsgenie_service_response.rs index 7027edc3e..7f2e94a78 100644 --- a/src/datadogV2/model/model_opsgenie_service_response.rs +++ b/src/datadogV2/model/model_opsgenie_service_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response of an Opsgenie service. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceResponse { /// Opsgenie service data from a response. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct OpsgenieServiceResponse { impl OpsgenieServiceResponse { pub fn new( - data: crate::datadogV2::model::OpsgenieServiceResponseData, + data: Box, ) -> OpsgenieServiceResponse { - OpsgenieServiceResponse { - data: Box::new(data), - } + OpsgenieServiceResponse { data } } } diff --git a/src/datadogV2/model/model_opsgenie_service_response_attributes.rs b/src/datadogV2/model/model_opsgenie_service_response_attributes.rs index ddcbc71e3..46211581a 100644 --- a/src/datadogV2/model/model_opsgenie_service_response_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attributes from an Opsgenie service response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceResponseAttributes { /// The custom URL for a custom region. #[serde( diff --git a/src/datadogV2/model/model_opsgenie_service_response_data.rs b/src/datadogV2/model/model_opsgenie_service_response_data.rs index 7fb22c6c6..fcbc4f64a 100644 --- a/src/datadogV2/model/model_opsgenie_service_response_data.rs +++ b/src/datadogV2/model/model_opsgenie_service_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Opsgenie service data from a response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceResponseData { /// The attributes from an Opsgenie service response. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct OpsgenieServiceResponseData { impl OpsgenieServiceResponseData { pub fn new( - attributes: crate::datadogV2::model::OpsgenieServiceResponseAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::OpsgenieServiceType, ) -> OpsgenieServiceResponseData { OpsgenieServiceResponseData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_opsgenie_service_type.rs b/src/datadogV2/model/model_opsgenie_service_type.rs index d1117a560..452fdc446 100644 --- a/src/datadogV2/model/model_opsgenie_service_type.rs +++ b/src/datadogV2/model/model_opsgenie_service_type.rs @@ -17,9 +17,3 @@ impl ToString for OpsgenieServiceType { } } } - -impl Default for OpsgenieServiceType { - fn default() -> OpsgenieServiceType { - Self::OPSGENIE_SERVICE - } -} diff --git a/src/datadogV2/model/model_opsgenie_service_update_attributes.rs b/src/datadogV2/model/model_opsgenie_service_update_attributes.rs index 825f82bd8..fb61555f4 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_attributes.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The Opsgenie service attributes for an update request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceUpdateAttributes { /// The custom URL for a custom region. #[serde( diff --git a/src/datadogV2/model/model_opsgenie_service_update_data.rs b/src/datadogV2/model/model_opsgenie_service_update_data.rs index ce278edc8..202200ebc 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_data.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Opsgenie service for an update request. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceUpdateData { /// The Opsgenie service attributes for an update request. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct OpsgenieServiceUpdateData { impl OpsgenieServiceUpdateData { pub fn new( - attributes: crate::datadogV2::model::OpsgenieServiceUpdateAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::OpsgenieServiceType, ) -> OpsgenieServiceUpdateData { OpsgenieServiceUpdateData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_opsgenie_service_update_request.rs b/src/datadogV2/model/model_opsgenie_service_update_request.rs index c00ef6bb2..c63010534 100644 --- a/src/datadogV2/model/model_opsgenie_service_update_request.rs +++ b/src/datadogV2/model/model_opsgenie_service_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Update request for an Opsgenie service. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServiceUpdateRequest { /// Opsgenie service for an update request. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct OpsgenieServiceUpdateRequest { impl OpsgenieServiceUpdateRequest { pub fn new( - data: crate::datadogV2::model::OpsgenieServiceUpdateData, + data: Box, ) -> OpsgenieServiceUpdateRequest { - OpsgenieServiceUpdateRequest { - data: Box::new(data), - } + OpsgenieServiceUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_opsgenie_services_response.rs b/src/datadogV2/model/model_opsgenie_services_response.rs index 82128808a..5e403e817 100644 --- a/src/datadogV2/model/model_opsgenie_services_response.rs +++ b/src/datadogV2/model/model_opsgenie_services_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response with a list of Opsgenie services. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OpsgenieServicesResponse { /// An array of Opsgenie services. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_organization.rs b/src/datadogV2/model/model_organization.rs new file mode 100644 index 000000000..4d01e0b6f --- /dev/null +++ b/src/datadogV2/model/model_organization.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Organization object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Organization { + /// Attributes of the organization. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the organization. + #[serde(rename = "id")] + pub id: Option, + /// Organizations resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::OrganizationsType, +} + +impl Organization { + pub fn new(type_: crate::datadogV2::model::OrganizationsType) -> Organization { + Organization { + attributes: None, + id: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_organization_attributes.rs b/src/datadogV2/model/model_organization_attributes.rs new file mode 100644 index 000000000..de3521384 --- /dev/null +++ b/src/datadogV2/model/model_organization_attributes.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OrganizationAttributes { + /// Creation time of the organization. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Description of the organization. + #[serde(rename = "description")] + pub description: Option, + /// Whether or not the organization is disabled. + #[serde(rename = "disabled")] + pub disabled: Option, + /// Time of last organization modification. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Name of the organization. + #[serde(rename = "name")] + pub name: Option, + /// Public ID of the organization. + #[serde(rename = "public_id")] + pub public_id: Option, + /// Sharing type of the organization. + #[serde(rename = "sharing")] + pub sharing: Option, + /// URL of the site that this organization exists at. + #[serde(rename = "url")] + pub url: Option, +} + +impl OrganizationAttributes { + pub fn new() -> OrganizationAttributes { + OrganizationAttributes { + created_at: None, + description: None, + disabled: None, + modified_at: None, + name: None, + public_id: None, + sharing: None, + url: None, + } + } +} diff --git a/src/datadogV2/model/model_organizations_type.rs b/src/datadogV2/model/model_organizations_type.rs new file mode 100644 index 000000000..75d2f7261 --- /dev/null +++ b/src/datadogV2/model/model_organizations_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OrganizationsType { + #[serde(rename = "orgs")] + ORGS, +} + +impl ToString for OrganizationsType { + fn to_string(&self) -> String { + match self { + Self::ORGS => String::from("orgs"), + } + } +} diff --git a/src/datadogV2/model/model_outcome_type.rs b/src/datadogV2/model/model_outcome_type.rs new file mode 100644 index 000000000..acd4e146c --- /dev/null +++ b/src/datadogV2/model/model_outcome_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OutcomeType { + #[serde(rename = "outcome")] + OUTCOME, +} + +impl ToString for OutcomeType { + fn to_string(&self) -> String { + match self { + Self::OUTCOME => String::from("outcome"), + } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_attributes.rs b/src/datadogV2/model/model_outcomes_batch_attributes.rs new file mode 100644 index 000000000..17f4a6521 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API attributes for a batched set of scorecard outcomes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesBatchAttributes { + /// Set of scorecard outcomes to update. + #[serde(rename = "results")] + pub results: Option>, +} + +impl OutcomesBatchAttributes { + pub fn new() -> OutcomesBatchAttributes { + OutcomesBatchAttributes { results: None } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_request.rs b/src/datadogV2/model/model_outcomes_batch_request.rs new file mode 100644 index 000000000..1abc03df8 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard outcomes batch request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesBatchRequest { + /// Scorecard outcomes batch request data. + #[serde(rename = "data")] + pub data: Option>, +} + +impl OutcomesBatchRequest { + pub fn new() -> OutcomesBatchRequest { + OutcomesBatchRequest { data: None } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_request_data.rs b/src/datadogV2/model/model_outcomes_batch_request_data.rs new file mode 100644 index 000000000..dea5d9bae --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_request_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard outcomes batch request data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesBatchRequestData { + /// The JSON:API attributes for a batched set of scorecard outcomes. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The JSON:API type for scorecard outcomes. + #[serde(rename = "type")] + pub type_: Option, +} + +impl OutcomesBatchRequestData { + pub fn new() -> OutcomesBatchRequestData { + OutcomesBatchRequestData { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_request_item.rs b/src/datadogV2/model/model_outcomes_batch_request_item.rs new file mode 100644 index 000000000..eb0210a61 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_request_item.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard outcome for a specific rule, for a given service within a batched update. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesBatchRequestItem { + /// Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks. + #[serde(rename = "remarks")] + pub remarks: Option, + /// The unique ID for a scorecard rule. + #[serde(rename = "rule_id")] + pub rule_id: String, + /// The unique name for a service in the catalog. + #[serde(rename = "service_name")] + pub service_name: String, + /// The state of the rule evaluation. + #[serde(rename = "state")] + pub state: crate::datadogV2::model::State, +} + +impl OutcomesBatchRequestItem { + pub fn new( + rule_id: String, + service_name: String, + state: crate::datadogV2::model::State, + ) -> OutcomesBatchRequestItem { + OutcomesBatchRequestItem { + remarks: None, + rule_id, + service_name, + state, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_response.rs b/src/datadogV2/model/model_outcomes_batch_response.rs new file mode 100644 index 000000000..53b3af544 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard outcomes batch response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesBatchResponse { + /// List of rule outcomes which were affected during the bulk operation. + #[serde(rename = "data")] + pub data: Vec, + /// Metadata pertaining to the bulk operation. + #[serde(rename = "meta")] + pub meta: Box, +} + +impl OutcomesBatchResponse { + pub fn new( + data: Vec, + meta: Box, + ) -> OutcomesBatchResponse { + OutcomesBatchResponse { data, meta } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_response_attributes.rs b/src/datadogV2/model/model_outcomes_batch_response_attributes.rs new file mode 100644 index 000000000..72b3d59ca --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_response_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API attributes for an outcome. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesBatchResponseAttributes { + /// Creation time of the rule outcome. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Time of last rule outcome modification. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks. + #[serde(rename = "remarks")] + pub remarks: Option, + /// The unique name for a service in the catalog. + #[serde(rename = "service_name")] + pub service_name: Option, + /// The state of the rule evaluation. + #[serde(rename = "state")] + pub state: Option, +} + +impl OutcomesBatchResponseAttributes { + pub fn new() -> OutcomesBatchResponseAttributes { + OutcomesBatchResponseAttributes { + created_at: None, + modified_at: None, + remarks: None, + service_name: None, + state: None, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_response_meta.rs b/src/datadogV2/model/model_outcomes_batch_response_meta.rs new file mode 100644 index 000000000..419168f69 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_response_meta.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Metadata pertaining to the bulk operation. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesBatchResponseMeta { + /// Total number of scorecard results received during the bulk operation. + #[serde(rename = "total_received")] + pub total_received: Option, + /// Total number of scorecard results modified during the bulk operation. + #[serde(rename = "total_updated")] + pub total_updated: Option, +} + +impl OutcomesBatchResponseMeta { + pub fn new() -> OutcomesBatchResponseMeta { + OutcomesBatchResponseMeta { + total_received: None, + total_updated: None, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_batch_type.rs b/src/datadogV2/model/model_outcomes_batch_type.rs new file mode 100644 index 000000000..f8c41f3a8 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_batch_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OutcomesBatchType { + #[serde(rename = "batched-outcome")] + BATCHED_OUTCOME, +} + +impl ToString for OutcomesBatchType { + fn to_string(&self) -> String { + match self { + Self::BATCHED_OUTCOME => String::from("batched-outcome"), + } + } +} diff --git a/src/datadogV2/model/model_outcomes_response.rs b/src/datadogV2/model/model_outcomes_response.rs new file mode 100644 index 000000000..66b3b22ed --- /dev/null +++ b/src/datadogV2/model/model_outcomes_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard outcomes - the result of a rule for a service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesResponse { + /// List of rule outcomes. + #[serde(rename = "data")] + pub data: Option>, + /// Array of rule details. + #[serde(rename = "included")] + pub included: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, +} + +impl OutcomesResponse { + pub fn new() -> OutcomesResponse { + OutcomesResponse { + data: None, + included: None, + links: None, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_response_data_item.rs b/src/datadogV2/model/model_outcomes_response_data_item.rs new file mode 100644 index 000000000..5eb25f914 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_response_data_item.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single rule outcome. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesResponseDataItem { + /// The JSON:API attributes for an outcome. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique ID for a rule outcome. + #[serde(rename = "id")] + pub id: Option, + /// The JSON:API relationship to a scorecard rule. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// The JSON:API type for an outcome. + #[serde(rename = "type")] + pub type_: Option, +} + +impl OutcomesResponseDataItem { + pub fn new() -> OutcomesResponseDataItem { + OutcomesResponseDataItem { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_response_included_item.rs b/src/datadogV2/model/model_outcomes_response_included_item.rs new file mode 100644 index 000000000..adc557f0d --- /dev/null +++ b/src/datadogV2/model/model_outcomes_response_included_item.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the included rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesResponseIncludedItem { + /// Details of a rule. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique ID for a scorecard rule. + #[serde(rename = "id")] + pub id: Option, + /// The JSON:API type for scorecard rules. + #[serde(rename = "type")] + pub type_: Option, +} + +impl OutcomesResponseIncludedItem { + pub fn new() -> OutcomesResponseIncludedItem { + OutcomesResponseIncludedItem { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs b/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs new file mode 100644 index 000000000..6eb44a9ef --- /dev/null +++ b/src/datadogV2/model/model_outcomes_response_included_rule_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details of a rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesResponseIncludedRuleAttributes { + /// Name of the rule. + #[serde(rename = "name")] + pub name: Option, + /// The scorecard name to which this rule must belong. + #[serde(rename = "scorecard_name")] + pub scorecard_name: Option, +} + +impl OutcomesResponseIncludedRuleAttributes { + pub fn new() -> OutcomesResponseIncludedRuleAttributes { + OutcomesResponseIncludedRuleAttributes { + name: None, + scorecard_name: None, + } + } +} diff --git a/src/datadogV2/model/model_outcomes_response_links.rs b/src/datadogV2/model/model_outcomes_response_links.rs new file mode 100644 index 000000000..ba2284f77 --- /dev/null +++ b/src/datadogV2/model/model_outcomes_response_links.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OutcomesResponseLinks { + /// Link for the next set of results. + #[serde(rename = "next")] + pub next: Option, +} + +impl OutcomesResponseLinks { + pub fn new() -> OutcomesResponseLinks { + OutcomesResponseLinks { next: None } + } +} diff --git a/src/datadogV2/model/model_pagination.rs b/src/datadogV2/model/model_pagination.rs new file mode 100644 index 000000000..45b6502d2 --- /dev/null +++ b/src/datadogV2/model/model_pagination.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Pagination object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Pagination { + /// Total count. + #[serde(rename = "total_count")] + pub total_count: Option, + /// Total count of elements matched by the filter. + #[serde(rename = "total_filtered_count")] + pub total_filtered_count: Option, +} + +impl Pagination { + pub fn new() -> Pagination { + Pagination { + total_count: None, + total_filtered_count: None, + } + } +} diff --git a/src/datadogV2/model/model_partial_api_key.rs b/src/datadogV2/model/model_partial_api_key.rs new file mode 100644 index 000000000..776c0d0a5 --- /dev/null +++ b/src/datadogV2/model/model_partial_api_key.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Partial Datadog API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PartialAPIKey { + /// Attributes of a partial API key. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the API key. + #[serde(rename = "id")] + pub id: Option, + /// Resources related to the API key. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// API Keys resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl PartialAPIKey { + pub fn new() -> PartialAPIKey { + PartialAPIKey { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_partial_api_key_attributes.rs b/src/datadogV2/model/model_partial_api_key_attributes.rs new file mode 100644 index 000000000..6ae3c3dee --- /dev/null +++ b/src/datadogV2/model/model_partial_api_key_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of a partial API key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PartialAPIKeyAttributes { + /// The category of the API key. + #[serde(rename = "category")] + pub category: Option, + /// Creation date of the API key. + #[serde(rename = "created_at")] + pub created_at: Option, + /// The last four characters of the API key. + #[serde(rename = "last4")] + pub last4: Option, + /// Date the API key was last modified. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Name of the API key. + #[serde(rename = "name")] + pub name: Option, + /// The remote config read enabled status. + #[serde(rename = "remote_config_read_enabled")] + pub remote_config_read_enabled: Option, +} + +impl PartialAPIKeyAttributes { + pub fn new() -> PartialAPIKeyAttributes { + PartialAPIKeyAttributes { + category: None, + created_at: None, + last4: None, + modified_at: None, + name: None, + remote_config_read_enabled: None, + } + } +} diff --git a/src/datadogV2/model/model_partial_application_key.rs b/src/datadogV2/model/model_partial_application_key.rs new file mode 100644 index 000000000..6bb9c4764 --- /dev/null +++ b/src/datadogV2/model/model_partial_application_key.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Partial Datadog application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PartialApplicationKey { + /// Attributes of a partial application key. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the application key. + #[serde(rename = "id")] + pub id: Option, + /// Resources related to the application key. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Application Keys resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl PartialApplicationKey { + pub fn new() -> PartialApplicationKey { + PartialApplicationKey { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_partial_application_key_attributes.rs b/src/datadogV2/model/model_partial_application_key_attributes.rs new file mode 100644 index 000000000..4eade8b6a --- /dev/null +++ b/src/datadogV2/model/model_partial_application_key_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of a partial application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PartialApplicationKeyAttributes { + /// Creation date of the application key. + #[serde(rename = "created_at")] + pub created_at: Option, + /// The last four characters of the application key. + #[serde(rename = "last4")] + pub last4: Option, + /// Name of the application key. + #[serde(rename = "name")] + pub name: Option, + /// Array of scopes to grant the application key. + #[serde(rename = "scopes", default, with = "::serde_with::rust::double_option")] + pub scopes: Option>>, +} + +impl PartialApplicationKeyAttributes { + pub fn new() -> PartialApplicationKeyAttributes { + PartialApplicationKeyAttributes { + created_at: None, + last4: None, + name: None, + scopes: None, + } + } +} diff --git a/src/datadogV2/model/model_partial_application_key_response.rs b/src/datadogV2/model/model_partial_application_key_response.rs new file mode 100644 index 000000000..81f837f97 --- /dev/null +++ b/src/datadogV2/model/model_partial_application_key_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response for retrieving a partial application key. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PartialApplicationKeyResponse { + /// Partial Datadog application key. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the application key. + #[serde(rename = "included")] + pub included: Option>, +} + +impl PartialApplicationKeyResponse { + pub fn new() -> PartialApplicationKeyResponse { + PartialApplicationKeyResponse { + data: None, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_permission.rs b/src/datadogV2/model/model_permission.rs index ecd9d0fd8..f329df766 100644 --- a/src/datadogV2/model/model_permission.rs +++ b/src/datadogV2/model/model_permission.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Permission object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Permission { /// Attributes of a permission. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_permission_attributes.rs b/src/datadogV2/model/model_permission_attributes.rs index 4ee5e6928..5d39cc4e7 100644 --- a/src/datadogV2/model/model_permission_attributes.rs +++ b/src/datadogV2/model/model_permission_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes of a permission. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PermissionAttributes { /// Creation time of the permission. #[serde(rename = "created")] diff --git a/src/datadogV2/model/model_permissions_response.rs b/src/datadogV2/model/model_permissions_response.rs index 469ed1c1f..3b283f892 100644 --- a/src/datadogV2/model/model_permissions_response.rs +++ b/src/datadogV2/model/model_permissions_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Payload with API-returned permissions. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PermissionsResponse { /// Array of permissions. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_permissions_type.rs b/src/datadogV2/model/model_permissions_type.rs index 318f3f720..1ec221a29 100644 --- a/src/datadogV2/model/model_permissions_type.rs +++ b/src/datadogV2/model/model_permissions_type.rs @@ -17,9 +17,3 @@ impl ToString for PermissionsType { } } } - -impl Default for PermissionsType { - fn default() -> PermissionsType { - Self::PERMISSIONS - } -} diff --git a/src/datadogV2/model/model_powerpack.rs b/src/datadogV2/model/model_powerpack.rs new file mode 100644 index 000000000..69e906c7f --- /dev/null +++ b/src/datadogV2/model/model_powerpack.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpacks are templated groups of dashboard widgets you can save from an existing dashboard and turn into reusable packs in the widget tray. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Powerpack { + /// Powerpack data object. + #[serde(rename = "data")] + pub data: Option>, +} + +impl Powerpack { + pub fn new() -> Powerpack { + Powerpack { data: None } + } +} diff --git a/src/datadogV2/model/model_powerpack_attributes.rs b/src/datadogV2/model/model_powerpack_attributes.rs new file mode 100644 index 000000000..ff311864d --- /dev/null +++ b/src/datadogV2/model/model_powerpack_attributes.rs @@ -0,0 +1,41 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack attribute object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackAttributes { + /// Description of this powerpack. + #[serde(rename = "description")] + pub description: Option, + /// Powerpack group widget definition object. + #[serde(rename = "group_widget")] + pub group_widget: Box, + /// Name of the powerpack. + #[serde(rename = "name")] + pub name: String, + /// List of tags to identify this powerpack. + #[serde(rename = "tags")] + pub tags: Option>, + /// List of template variables for this powerpack. + #[serde(rename = "template_variables")] + pub template_variables: Option>, +} + +impl PowerpackAttributes { + pub fn new( + group_widget: Box, + name: String, + ) -> PowerpackAttributes { + PowerpackAttributes { + description: None, + group_widget, + name, + tags: None, + template_variables: None, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_data.rs b/src/datadogV2/model/model_powerpack_data.rs new file mode 100644 index 000000000..f4a0d316b --- /dev/null +++ b/src/datadogV2/model/model_powerpack_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack data object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackData { + /// Powerpack attribute object. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the powerpack. + #[serde(rename = "id")] + pub id: Option, + /// Powerpack relationship object. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Type of widget, must be powerpack. + #[serde(rename = "type")] + pub type_: Option, +} + +impl PowerpackData { + pub fn new() -> PowerpackData { + PowerpackData { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_group_widget.rs b/src/datadogV2/model/model_powerpack_group_widget.rs new file mode 100644 index 000000000..f0aaddbf5 --- /dev/null +++ b/src/datadogV2/model/model_powerpack_group_widget.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack group widget definition object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackGroupWidget { + /// Powerpack group widget object. + #[serde(rename = "definition")] + pub definition: Box, + /// Powerpack group widget layout. + #[serde(rename = "layout")] + pub layout: Option>, + /// The available timeframes depend on the widget you are using. + #[serde(rename = "live_span")] + pub live_span: Option, +} + +impl PowerpackGroupWidget { + pub fn new( + definition: Box, + ) -> PowerpackGroupWidget { + PowerpackGroupWidget { + definition, + layout: None, + live_span: None, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_group_widget_definition.rs b/src/datadogV2/model/model_powerpack_group_widget_definition.rs new file mode 100644 index 000000000..ff20d1426 --- /dev/null +++ b/src/datadogV2/model/model_powerpack_group_widget_definition.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack group widget object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackGroupWidgetDefinition { + /// Layout type of widgets. + #[serde(rename = "layout_type")] + pub layout_type: String, + /// Boolean indicating whether powerpack group title should be visible or not. + #[serde(rename = "show_title")] + pub show_title: Option, + /// Name for the group widget. + #[serde(rename = "title")] + pub title: Option, + /// Type of widget, must be group. + #[serde(rename = "type")] + pub type_: String, + /// Widgets inside the powerpack. + #[serde(rename = "widgets")] + pub widgets: Vec, +} + +impl PowerpackGroupWidgetDefinition { + pub fn new( + layout_type: String, + type_: String, + widgets: Vec, + ) -> PowerpackGroupWidgetDefinition { + PowerpackGroupWidgetDefinition { + layout_type, + show_title: None, + title: None, + type_, + widgets, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_group_widget_layout.rs b/src/datadogV2/model/model_powerpack_group_widget_layout.rs new file mode 100644 index 000000000..a55c2388a --- /dev/null +++ b/src/datadogV2/model/model_powerpack_group_widget_layout.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack group widget layout. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackGroupWidgetLayout { + /// The height of the widget. Should be a non-negative integer. + #[serde(rename = "height")] + pub height: i64, + /// The width of the widget. Should be a non-negative integer. + #[serde(rename = "width")] + pub width: i64, + /// The position of the widget on the x (horizontal) axis. Should be a non-negative integer. + #[serde(rename = "x")] + pub x: i64, + /// The position of the widget on the y (vertical) axis. Should be a non-negative integer. + #[serde(rename = "y")] + pub y: i64, +} + +impl PowerpackGroupWidgetLayout { + pub fn new(height: i64, width: i64, x: i64, y: i64) -> PowerpackGroupWidgetLayout { + PowerpackGroupWidgetLayout { + height, + width, + x, + y, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_inner_widget_layout.rs b/src/datadogV2/model/model_powerpack_inner_widget_layout.rs new file mode 100644 index 000000000..6c2ad2bd3 --- /dev/null +++ b/src/datadogV2/model/model_powerpack_inner_widget_layout.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack inner widget layout. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackInnerWidgetLayout { + /// The height of the widget. Should be a non-negative integer. + #[serde(rename = "height")] + pub height: i64, + /// The width of the widget. Should be a non-negative integer. + #[serde(rename = "width")] + pub width: i64, + /// The position of the widget on the x (horizontal) axis. Should be a non-negative integer. + #[serde(rename = "x")] + pub x: i64, + /// The position of the widget on the y (vertical) axis. Should be a non-negative integer. + #[serde(rename = "y")] + pub y: i64, +} + +impl PowerpackInnerWidgetLayout { + pub fn new(height: i64, width: i64, x: i64, y: i64) -> PowerpackInnerWidgetLayout { + PowerpackInnerWidgetLayout { + height, + width, + x, + y, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_inner_widgets.rs b/src/datadogV2/model/model_powerpack_inner_widgets.rs new file mode 100644 index 000000000..d3026fa37 --- /dev/null +++ b/src/datadogV2/model/model_powerpack_inner_widgets.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack group widget definition of individual widgets. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackInnerWidgets { + /// Information about widget. + #[serde(rename = "definition")] + pub definition: std::collections::HashMap, + /// Powerpack inner widget layout. + #[serde(rename = "layout")] + pub layout: Option>, +} + +impl PowerpackInnerWidgets { + pub fn new( + definition: std::collections::HashMap, + ) -> PowerpackInnerWidgets { + PowerpackInnerWidgets { + definition, + layout: None, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_relationships.rs b/src/datadogV2/model/model_powerpack_relationships.rs new file mode 100644 index 000000000..68647581f --- /dev/null +++ b/src/datadogV2/model/model_powerpack_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack relationship object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackRelationships { + /// Relationship to user. + #[serde(rename = "author")] + pub author: Option>, +} + +impl PowerpackRelationships { + pub fn new() -> PowerpackRelationships { + PowerpackRelationships { author: None } + } +} diff --git a/src/datadogV2/model/model_powerpack_response.rs b/src/datadogV2/model/model_powerpack_response.rs new file mode 100644 index 000000000..62bd55356 --- /dev/null +++ b/src/datadogV2/model/model_powerpack_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object which includes a single powerpack configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackResponse { + /// Powerpack data object. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the users. + #[serde(rename = "included")] + pub included: Option>, +} + +impl PowerpackResponse { + pub fn new() -> PowerpackResponse { + PowerpackResponse { + data: None, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_response_links.rs b/src/datadogV2/model/model_powerpack_response_links.rs new file mode 100644 index 000000000..1189e5376 --- /dev/null +++ b/src/datadogV2/model/model_powerpack_response_links.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackResponseLinks { + /// Link to last page. + #[serde(rename = "first")] + pub first: Option, + /// Link to first page. + #[serde(rename = "last", default, with = "::serde_with::rust::double_option")] + pub last: Option>, + /// Link for the next set of results. + #[serde(rename = "next")] + pub next: Option, + /// Link for the previous set of results. + #[serde(rename = "prev", default, with = "::serde_with::rust::double_option")] + pub prev: Option>, + /// Link to current page. + #[serde(rename = "self")] + pub self_: Option, +} + +impl PowerpackResponseLinks { + pub fn new() -> PowerpackResponseLinks { + PowerpackResponseLinks { + first: None, + last: None, + next: None, + prev: None, + self_: None, + } + } +} diff --git a/src/datadogV2/model/model_powerpack_template_variable.rs b/src/datadogV2/model/model_powerpack_template_variable.rs new file mode 100644 index 000000000..005cd3b74 --- /dev/null +++ b/src/datadogV2/model/model_powerpack_template_variable.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack template variables. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpackTemplateVariable { + /// One or many template variable default values within the saved view, which are unioned together using `OR` if more than one is specified. + #[serde(rename = "defaults")] + pub defaults: Option>, + /// The name of the variable. + #[serde(rename = "name")] + pub name: String, +} + +impl PowerpackTemplateVariable { + pub fn new(name: String) -> PowerpackTemplateVariable { + PowerpackTemplateVariable { + defaults: None, + name, + } + } +} diff --git a/src/datadogV2/model/model_powerpacks_response_meta.rs b/src/datadogV2/model/model_powerpacks_response_meta.rs new file mode 100644 index 000000000..0f218f39b --- /dev/null +++ b/src/datadogV2/model/model_powerpacks_response_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack response metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpacksResponseMeta { + /// Powerpack response pagination metadata. + #[serde(rename = "pagination")] + pub pagination: Option>, +} + +impl PowerpacksResponseMeta { + pub fn new() -> PowerpacksResponseMeta { + PowerpacksResponseMeta { pagination: None } + } +} diff --git a/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs b/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs new file mode 100644 index 000000000..b4a25a33e --- /dev/null +++ b/src/datadogV2/model/model_powerpacks_response_meta_pagination.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Powerpack response pagination metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct PowerpacksResponseMetaPagination { + /// The first offset. + #[serde(rename = "first_offset")] + pub first_offset: Option, + /// The last offset. + #[serde( + rename = "last_offset", + default, + with = "::serde_with::rust::double_option" + )] + pub last_offset: Option>, + /// Pagination limit. + #[serde(rename = "limit")] + pub limit: Option, + /// The next offset. + #[serde(rename = "next_offset")] + pub next_offset: Option, + /// The offset. + #[serde(rename = "offset")] + pub offset: Option, + /// The previous offset. + #[serde(rename = "prev_offset")] + pub prev_offset: Option, + /// Total results. + #[serde(rename = "total")] + pub total: Option, + /// Offset type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl PowerpacksResponseMetaPagination { + pub fn new() -> PowerpacksResponseMetaPagination { + PowerpacksResponseMetaPagination { + first_offset: None, + last_offset: None, + limit: None, + next_offset: None, + offset: None, + prev_offset: None, + total: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_process_summaries_meta.rs b/src/datadogV2/model/model_process_summaries_meta.rs index 5df66e149..8bdc9969c 100644 --- a/src/datadogV2/model/model_process_summaries_meta.rs +++ b/src/datadogV2/model/model_process_summaries_meta.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response metadata object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ProcessSummariesMeta { /// Paging attributes. #[serde(rename = "page")] diff --git a/src/datadogV2/model/model_process_summaries_meta_page.rs b/src/datadogV2/model/model_process_summaries_meta_page.rs index 4dd01e35b..142da700c 100644 --- a/src/datadogV2/model/model_process_summaries_meta_page.rs +++ b/src/datadogV2/model/model_process_summaries_meta_page.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Paging attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ProcessSummariesMetaPage { /// The cursor used to get the next results, if any. To make the next request, use the same /// parameters with the addition of the `page[cursor]`. diff --git a/src/datadogV2/model/model_process_summaries_response.rs b/src/datadogV2/model/model_process_summaries_response.rs index 58d81fd7e..3eb046906 100644 --- a/src/datadogV2/model/model_process_summaries_response.rs +++ b/src/datadogV2/model/model_process_summaries_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// List of process summaries. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ProcessSummariesResponse { /// Array of process summary objects. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_process_summary.rs b/src/datadogV2/model/model_process_summary.rs index 6f36d3f23..3282ae756 100644 --- a/src/datadogV2/model/model_process_summary.rs +++ b/src/datadogV2/model/model_process_summary.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Process summary object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ProcessSummary { /// Attributes for a process summary. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_process_summary_attributes.rs b/src/datadogV2/model/model_process_summary_attributes.rs index 231bdbfda..bde414681 100644 --- a/src/datadogV2/model/model_process_summary_attributes.rs +++ b/src/datadogV2/model/model_process_summary_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Attributes for a process summary. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ProcessSummaryAttributes { /// Process command line. #[serde(rename = "cmdline")] diff --git a/src/datadogV2/model/model_process_summary_type.rs b/src/datadogV2/model/model_process_summary_type.rs index 849989dad..cb2fe0bdf 100644 --- a/src/datadogV2/model/model_process_summary_type.rs +++ b/src/datadogV2/model/model_process_summary_type.rs @@ -17,9 +17,3 @@ impl ToString for ProcessSummaryType { } } } - -impl Default for ProcessSummaryType { - fn default() -> ProcessSummaryType { - Self::PROCESS - } -} diff --git a/src/datadogV2/model/model_projected_cost.rs b/src/datadogV2/model/model_projected_cost.rs new file mode 100644 index 000000000..43e4ca895 --- /dev/null +++ b/src/datadogV2/model/model_projected_cost.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Projected Cost data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectedCost { + /// Projected Cost attributes data. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the response. + #[serde(rename = "id")] + pub id: Option, + /// Type of cost data. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ProjectedCost { + pub fn new() -> ProjectedCost { + ProjectedCost { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_projected_cost_attributes.rs b/src/datadogV2/model/model_projected_cost_attributes.rs new file mode 100644 index 000000000..9e469f1b6 --- /dev/null +++ b/src/datadogV2/model/model_projected_cost_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Projected Cost attributes data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectedCostAttributes { + /// List of charges data reported for the requested month. + #[serde(rename = "charges")] + pub charges: Option>, + /// The month requested. + #[serde(rename = "date")] + pub date: Option, + /// The organization name. + #[serde(rename = "org_name")] + pub org_name: Option, + /// The total projected cost of products for the month. + #[serde(rename = "projected_total_cost")] + pub projected_total_cost: Option, + /// The organization public ID. + #[serde(rename = "public_id")] + pub public_id: Option, + /// The region of the Datadog instance that the organization belongs to. + #[serde(rename = "region")] + pub region: Option, +} + +impl ProjectedCostAttributes { + pub fn new() -> ProjectedCostAttributes { + ProjectedCostAttributes { + charges: None, + date: None, + org_name: None, + projected_total_cost: None, + public_id: None, + region: None, + } + } +} diff --git a/src/datadogV2/model/model_projected_cost_response.rs b/src/datadogV2/model/model_projected_cost_response.rs new file mode 100644 index 000000000..f8359df45 --- /dev/null +++ b/src/datadogV2/model/model_projected_cost_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Projected Cost response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ProjectedCostResponse { + /// Response containing Projected Cost. + #[serde(rename = "data")] + pub data: Option>, +} + +impl ProjectedCostResponse { + pub fn new() -> ProjectedCostResponse { + ProjectedCostResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_projected_cost_type.rs b/src/datadogV2/model/model_projected_cost_type.rs new file mode 100644 index 000000000..d823e9fa6 --- /dev/null +++ b/src/datadogV2/model/model_projected_cost_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ProjectedCostType { + #[serde(rename = "projected_cost")] + PROJECt_COST, +} + +impl ToString for ProjectedCostType { + fn to_string(&self) -> String { + match self { + Self::PROJECt_COST => String::from("projected_cost"), + } + } +} diff --git a/src/datadogV2/model/model_query_formula.rs b/src/datadogV2/model/model_query_formula.rs new file mode 100644 index 000000000..9ee7eb1db --- /dev/null +++ b/src/datadogV2/model/model_query_formula.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A formula for calculation based on one or more queries. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct QueryFormula { + /// Formula string, referencing one or more queries with their name property. + #[serde(rename = "formula")] + pub formula: String, + /// Message for specifying limits to the number of values returned by a query. + /// This limit is only for scalar queries and has no effect on timeseries queries. + #[serde(rename = "limit")] + pub limit: Option>, +} + +impl QueryFormula { + pub fn new(formula: String) -> QueryFormula { + QueryFormula { + formula, + limit: None, + } + } +} diff --git a/src/datadogV2/model/model_query_sort_order.rs b/src/datadogV2/model/model_query_sort_order.rs new file mode 100644 index 000000000..ca93f5703 --- /dev/null +++ b/src/datadogV2/model/model_query_sort_order.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum QuerySortOrder { + #[serde(rename = "asc")] + ASC, + #[serde(rename = "desc")] + DESC, +} + +impl ToString for QuerySortOrder { + fn to_string(&self) -> String { + match self { + Self::ASC => String::from("asc"), + Self::DESC => String::from("desc"), + } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_attachment.rs b/src/datadogV2/model/model_relationship_to_incident_attachment.rs new file mode 100644 index 000000000..909396623 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_attachment.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A relationship reference for attachments. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentAttachment { + /// An array of incident attachments. + #[serde(rename = "data")] + pub data: Vec, +} + +impl RelationshipToIncidentAttachment { + pub fn new( + data: Vec, + ) -> RelationshipToIncidentAttachment { + RelationshipToIncidentAttachment { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_attachment_data.rs b/src/datadogV2/model/model_relationship_to_incident_attachment_data.rs new file mode 100644 index 000000000..032f49fa1 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_attachment_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The attachment relationship data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentAttachmentData { + /// A unique identifier that represents the attachment. + #[serde(rename = "id")] + pub id: String, + /// The incident attachment resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentAttachmentType, +} + +impl RelationshipToIncidentAttachmentData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentAttachmentType, + ) -> RelationshipToIncidentAttachmentData { + RelationshipToIncidentAttachmentData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_impact_data.rs b/src/datadogV2/model/model_relationship_to_incident_impact_data.rs new file mode 100644 index 000000000..6f02f3edf --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_impact_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to impact object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentImpactData { + /// A unique identifier that represents the impact. + #[serde(rename = "id")] + pub id: String, + /// The incident impacts type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentImpactsType, +} + +impl RelationshipToIncidentImpactData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentImpactsType, + ) -> RelationshipToIncidentImpactData { + RelationshipToIncidentImpactData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_impacts.rs b/src/datadogV2/model/model_relationship_to_incident_impacts.rs new file mode 100644 index 000000000..404d30879 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_impacts.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to impacts. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentImpacts { + /// An array of incident impacts. + #[serde(rename = "data")] + pub data: Vec, +} + +impl RelationshipToIncidentImpacts { + pub fn new( + data: Vec, + ) -> RelationshipToIncidentImpacts { + RelationshipToIncidentImpacts { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_integration_metadata_data.rs b/src/datadogV2/model/model_relationship_to_incident_integration_metadata_data.rs new file mode 100644 index 000000000..9974c2be8 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_integration_metadata_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A relationship reference for an integration metadata object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentIntegrationMetadataData { + /// A unique identifier that represents the integration metadata. + #[serde(rename = "id")] + pub id: String, + /// Integration metadata resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentIntegrationMetadataType, +} + +impl RelationshipToIncidentIntegrationMetadataData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentIntegrationMetadataType, + ) -> RelationshipToIncidentIntegrationMetadataData { + RelationshipToIncidentIntegrationMetadataData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_integration_metadatas.rs b/src/datadogV2/model/model_relationship_to_incident_integration_metadatas.rs new file mode 100644 index 000000000..68560796d --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_integration_metadatas.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A relationship reference for multiple integration metadata objects. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentIntegrationMetadatas { + /// Integration metadata relationship array + #[serde(rename = "data")] + pub data: Vec, +} + +impl RelationshipToIncidentIntegrationMetadatas { + pub fn new( + data: Vec, + ) -> RelationshipToIncidentIntegrationMetadatas { + RelationshipToIncidentIntegrationMetadatas { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_postmortem.rs b/src/datadogV2/model/model_relationship_to_incident_postmortem.rs new file mode 100644 index 000000000..63f0d9096 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_postmortem.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A relationship reference for postmortems. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentPostmortem { + /// The postmortem relationship data. + #[serde(rename = "data")] + pub data: Box, +} + +impl RelationshipToIncidentPostmortem { + pub fn new( + data: Box, + ) -> RelationshipToIncidentPostmortem { + RelationshipToIncidentPostmortem { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_postmortem_data.rs b/src/datadogV2/model/model_relationship_to_incident_postmortem_data.rs new file mode 100644 index 000000000..c1345dde1 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_postmortem_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The postmortem relationship data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentPostmortemData { + /// A unique identifier that represents the postmortem. + #[serde(rename = "id")] + pub id: String, + /// Incident postmortem resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentPostmortemType, +} + +impl RelationshipToIncidentPostmortemData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentPostmortemType, + ) -> RelationshipToIncidentPostmortemData { + RelationshipToIncidentPostmortemData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_responder_data.rs b/src/datadogV2/model/model_relationship_to_incident_responder_data.rs new file mode 100644 index 000000000..8f38dce5a --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_responder_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to impact object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentResponderData { + /// A unique identifier that represents the responder. + #[serde(rename = "id")] + pub id: String, + /// The incident responders type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentRespondersType, +} + +impl RelationshipToIncidentResponderData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentRespondersType, + ) -> RelationshipToIncidentResponderData { + RelationshipToIncidentResponderData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_responders.rs b/src/datadogV2/model/model_relationship_to_incident_responders.rs new file mode 100644 index 000000000..230a1e592 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_responders.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to incident responders. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentResponders { + /// An array of incident responders. + #[serde(rename = "data")] + pub data: Vec, +} + +impl RelationshipToIncidentResponders { + pub fn new( + data: Vec, + ) -> RelationshipToIncidentResponders { + RelationshipToIncidentResponders { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_user_defined_field_data.rs b/src/datadogV2/model/model_relationship_to_incident_user_defined_field_data.rs new file mode 100644 index 000000000..842fa3a27 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_user_defined_field_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to impact object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentUserDefinedFieldData { + /// A unique identifier that represents the responder. + #[serde(rename = "id")] + pub id: String, + /// The incident user defined fields type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::IncidentUserDefinedFieldType, +} + +impl RelationshipToIncidentUserDefinedFieldData { + pub fn new( + id: String, + type_: crate::datadogV2::model::IncidentUserDefinedFieldType, + ) -> RelationshipToIncidentUserDefinedFieldData { + RelationshipToIncidentUserDefinedFieldData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_incident_user_defined_fields.rs b/src/datadogV2/model/model_relationship_to_incident_user_defined_fields.rs new file mode 100644 index 000000000..a1970f2d9 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_incident_user_defined_fields.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to incident user defined fields. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToIncidentUserDefinedFields { + /// An array of user defined fields. + #[serde(rename = "data")] + pub data: Vec, +} + +impl RelationshipToIncidentUserDefinedFields { + pub fn new( + data: Vec, + ) -> RelationshipToIncidentUserDefinedFields { + RelationshipToIncidentUserDefinedFields { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_organization.rs b/src/datadogV2/model/model_relationship_to_organization.rs new file mode 100644 index 000000000..ec8d5293c --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_organization.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to an organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToOrganization { + /// Relationship to organization object. + #[serde(rename = "data")] + pub data: Box, +} + +impl RelationshipToOrganization { + pub fn new( + data: Box, + ) -> RelationshipToOrganization { + RelationshipToOrganization { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_organization_data.rs b/src/datadogV2/model/model_relationship_to_organization_data.rs new file mode 100644 index 000000000..9fe4d32af --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_organization_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to organization object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToOrganizationData { + /// ID of the organization. + #[serde(rename = "id")] + pub id: String, + /// Organizations resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::OrganizationsType, +} + +impl RelationshipToOrganizationData { + pub fn new( + id: String, + type_: crate::datadogV2::model::OrganizationsType, + ) -> RelationshipToOrganizationData { + RelationshipToOrganizationData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_organizations.rs b/src/datadogV2/model/model_relationship_to_organizations.rs new file mode 100644 index 000000000..fc286a9e7 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_organizations.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to organizations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToOrganizations { + /// Relationships to organization objects. + #[serde(rename = "data")] + pub data: Vec, +} + +impl RelationshipToOrganizations { + pub fn new( + data: Vec, + ) -> RelationshipToOrganizations { + RelationshipToOrganizations { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_outcome.rs b/src/datadogV2/model/model_relationship_to_outcome.rs new file mode 100644 index 000000000..d354e5994 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_outcome.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API relationship to a scorecard outcome. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToOutcome { + /// The JSON:API relationship to an outcome, which returns the related rule id. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RelationshipToOutcome { + pub fn new() -> RelationshipToOutcome { + RelationshipToOutcome { data: None } + } +} diff --git a/src/datadogV2/model/model_relationship_to_outcome_data.rs b/src/datadogV2/model/model_relationship_to_outcome_data.rs new file mode 100644 index 000000000..ac90d5ee8 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_outcome_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API relationship to an outcome, which returns the related rule id. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToOutcomeData { + /// The unique ID for a scorecard rule. + #[serde(rename = "id")] + pub id: Option, + /// The JSON:API type for scorecard rules. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RelationshipToOutcomeData { + pub fn new() -> RelationshipToOutcomeData { + RelationshipToOutcomeData { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_relationship_to_permission.rs b/src/datadogV2/model/model_relationship_to_permission.rs new file mode 100644 index 000000000..1870e06ad --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_permission.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to a permissions object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToPermission { + /// Relationship to permission object. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RelationshipToPermission { + pub fn new() -> RelationshipToPermission { + RelationshipToPermission { data: None } + } +} diff --git a/src/datadogV2/model/model_relationship_to_permission_data.rs b/src/datadogV2/model/model_relationship_to_permission_data.rs new file mode 100644 index 000000000..4dc9c0514 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_permission_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to permission object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToPermissionData { + /// ID of the permission. + #[serde(rename = "id")] + pub id: Option, + /// Permissions resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RelationshipToPermissionData { + pub fn new() -> RelationshipToPermissionData { + RelationshipToPermissionData { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_relationship_to_permissions.rs b/src/datadogV2/model/model_relationship_to_permissions.rs new file mode 100644 index 000000000..a7e0d3d54 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_permissions.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to multiple permissions objects. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToPermissions { + /// Relationships to permission objects. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RelationshipToPermissions { + pub fn new() -> RelationshipToPermissions { + RelationshipToPermissions { data: None } + } +} diff --git a/src/datadogV2/model/model_relationship_to_role.rs b/src/datadogV2/model/model_relationship_to_role.rs new file mode 100644 index 000000000..576663ffa --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_role.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToRole { + /// Relationship to role object. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RelationshipToRole { + pub fn new() -> RelationshipToRole { + RelationshipToRole { data: None } + } +} diff --git a/src/datadogV2/model/model_relationship_to_role_data.rs b/src/datadogV2/model/model_relationship_to_role_data.rs new file mode 100644 index 000000000..e1da5cb19 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_role_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to role object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToRoleData { + /// The unique identifier of the role. + #[serde(rename = "id")] + pub id: Option, + /// Roles type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RelationshipToRoleData { + pub fn new() -> RelationshipToRoleData { + RelationshipToRoleData { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_relationship_to_roles.rs b/src/datadogV2/model/model_relationship_to_roles.rs new file mode 100644 index 000000000..c1792e7b3 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_roles.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to roles. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToRoles { + /// An array containing type and the unique identifier of a role. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RelationshipToRoles { + pub fn new() -> RelationshipToRoles { + RelationshipToRoles { data: None } + } +} diff --git a/src/datadogV2/model/model_relationship_to_rule.rs b/src/datadogV2/model/model_relationship_to_rule.rs new file mode 100644 index 000000000..7274169ad --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_rule.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Scorecard create rule response relationship. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToRule { + /// Relationship data for a rule. + #[serde(rename = "scorecard")] + pub scorecard: Option>, +} + +impl RelationshipToRule { + pub fn new() -> RelationshipToRule { + RelationshipToRule { scorecard: None } + } +} diff --git a/src/datadogV2/model/model_relationship_to_rule_data.rs b/src/datadogV2/model/model_relationship_to_rule_data.rs new file mode 100644 index 000000000..ff55a9236 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_rule_data.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship data for a rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToRuleData { + /// Rule relationship data. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RelationshipToRuleData { + pub fn new() -> RelationshipToRuleData { + RelationshipToRuleData { data: None } + } +} diff --git a/src/datadogV2/model/model_relationship_to_rule_data_object.rs b/src/datadogV2/model/model_relationship_to_rule_data_object.rs new file mode 100644 index 000000000..681b5579c --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_rule_data_object.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Rule relationship data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToRuleDataObject { + /// The unique ID for a scorecard. + #[serde(rename = "id")] + pub id: Option, + /// The JSON:API type for scorecard. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RelationshipToRuleDataObject { + pub fn new() -> RelationshipToRuleDataObject { + RelationshipToRuleDataObject { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_relationship_to_saml_assertion_attribute.rs b/src/datadogV2/model/model_relationship_to_saml_assertion_attribute.rs new file mode 100644 index 000000000..8538ad043 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_saml_assertion_attribute.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// AuthN Mapping relationship to SAML Assertion Attribute. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToSAMLAssertionAttribute { + /// Data of AuthN Mapping relationship to SAML Assertion Attribute. + #[serde(rename = "data")] + pub data: Box, +} + +impl RelationshipToSAMLAssertionAttribute { + pub fn new( + data: Box, + ) -> RelationshipToSAMLAssertionAttribute { + RelationshipToSAMLAssertionAttribute { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_saml_assertion_attribute_data.rs b/src/datadogV2/model/model_relationship_to_saml_assertion_attribute_data.rs new file mode 100644 index 000000000..a63780c4b --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_saml_assertion_attribute_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data of AuthN Mapping relationship to SAML Assertion Attribute. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToSAMLAssertionAttributeData { + /// The ID of the SAML assertion attribute. + #[serde(rename = "id")] + pub id: String, + /// SAML assertion attributes resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::SAMLAssertionAttributesType, +} + +impl RelationshipToSAMLAssertionAttributeData { + pub fn new( + id: String, + type_: crate::datadogV2::model::SAMLAssertionAttributesType, + ) -> RelationshipToSAMLAssertionAttributeData { + RelationshipToSAMLAssertionAttributeData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_team_link_data.rs b/src/datadogV2/model/model_relationship_to_team_link_data.rs new file mode 100644 index 000000000..99729c282 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_team_link_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship between a link and a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToTeamLinkData { + /// The team link's identifier + #[serde(rename = "id")] + pub id: String, + /// Team link type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamLinkType, +} + +impl RelationshipToTeamLinkData { + pub fn new( + id: String, + type_: crate::datadogV2::model::TeamLinkType, + ) -> RelationshipToTeamLinkData { + RelationshipToTeamLinkData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_team_links.rs b/src/datadogV2/model/model_relationship_to_team_links.rs new file mode 100644 index 000000000..594732b1b --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_team_links.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship between a team and a team link +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToTeamLinks { + /// Related team links + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, +} + +impl RelationshipToTeamLinks { + pub fn new() -> RelationshipToTeamLinks { + RelationshipToTeamLinks { + data: None, + links: None, + } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user.rs b/src/datadogV2/model/model_relationship_to_user.rs new file mode 100644 index 000000000..3e8cc3999 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUser { + /// Relationship to user object. + #[serde(rename = "data")] + pub data: Box, +} + +impl RelationshipToUser { + pub fn new(data: Box) -> RelationshipToUser { + RelationshipToUser { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user_data.rs b/src/datadogV2/model/model_relationship_to_user_data.rs new file mode 100644 index 000000000..6303997d6 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user_data.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to user object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUserData { + /// A unique identifier that represents the user. + #[serde(rename = "id")] + pub id: String, + /// Users resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UsersType, +} + +impl RelationshipToUserData { + pub fn new(id: String, type_: crate::datadogV2::model::UsersType) -> RelationshipToUserData { + RelationshipToUserData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user_team_permission.rs b/src/datadogV2/model/model_relationship_to_user_team_permission.rs new file mode 100644 index 000000000..6eb7d7a63 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user_team_permission.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship between a user team permission and a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUserTeamPermission { + /// Related user team permission data + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, +} + +impl RelationshipToUserTeamPermission { + pub fn new() -> RelationshipToUserTeamPermission { + RelationshipToUserTeamPermission { + data: None, + links: None, + } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user_team_permission_data.rs b/src/datadogV2/model/model_relationship_to_user_team_permission_data.rs new file mode 100644 index 000000000..1de5ac79d --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user_team_permission_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Related user team permission data +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUserTeamPermissionData { + /// The ID of the user team permission + #[serde(rename = "id")] + pub id: String, + /// User team permission type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserTeamPermissionType, +} + +impl RelationshipToUserTeamPermissionData { + pub fn new( + id: String, + type_: crate::datadogV2::model::UserTeamPermissionType, + ) -> RelationshipToUserTeamPermissionData { + RelationshipToUserTeamPermissionData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user_team_team.rs b/src/datadogV2/model/model_relationship_to_user_team_team.rs new file mode 100644 index 000000000..9afa45c4e --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user_team_team.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship between team membership and team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUserTeamTeam { + /// The team associated with the membership + #[serde(rename = "data")] + pub data: Box, +} + +impl RelationshipToUserTeamTeam { + pub fn new( + data: Box, + ) -> RelationshipToUserTeamTeam { + RelationshipToUserTeamTeam { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user_team_team_data.rs b/src/datadogV2/model/model_relationship_to_user_team_team_data.rs new file mode 100644 index 000000000..631205a22 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user_team_team_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The team associated with the membership +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUserTeamTeamData { + /// The ID of the team associated with the membership + #[serde(rename = "id")] + pub id: String, + /// User team team type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserTeamTeamType, +} + +impl RelationshipToUserTeamTeamData { + pub fn new( + id: String, + type_: crate::datadogV2::model::UserTeamTeamType, + ) -> RelationshipToUserTeamTeamData { + RelationshipToUserTeamTeamData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user_team_user.rs b/src/datadogV2/model/model_relationship_to_user_team_user.rs new file mode 100644 index 000000000..986dfcb21 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user_team_user.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship between team membership and user +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUserTeamUser { + /// A user's relationship with a team + #[serde(rename = "data")] + pub data: Box, +} + +impl RelationshipToUserTeamUser { + pub fn new( + data: Box, + ) -> RelationshipToUserTeamUser { + RelationshipToUserTeamUser { data } + } +} diff --git a/src/datadogV2/model/model_relationship_to_user_team_user_data.rs b/src/datadogV2/model/model_relationship_to_user_team_user_data.rs new file mode 100644 index 000000000..ac4eb1a07 --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_user_team_user_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A user's relationship with a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUserTeamUserData { + /// The ID of the user associated with the team + #[serde(rename = "id")] + pub id: String, + /// User team user type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserTeamUserType, +} + +impl RelationshipToUserTeamUserData { + pub fn new( + id: String, + type_: crate::datadogV2::model::UserTeamUserType, + ) -> RelationshipToUserTeamUserData { + RelationshipToUserTeamUserData { id, type_ } + } +} diff --git a/src/datadogV2/model/model_relationship_to_users.rs b/src/datadogV2/model/model_relationship_to_users.rs new file mode 100644 index 000000000..2ad4a12ef --- /dev/null +++ b/src/datadogV2/model/model_relationship_to_users.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship to users. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RelationshipToUsers { + /// Relationships to user objects. + #[serde(rename = "data")] + pub data: Vec, +} + +impl RelationshipToUsers { + pub fn new(data: Vec) -> RelationshipToUsers { + RelationshipToUsers { data } + } +} diff --git a/src/datadogV2/model/model_reorder_retention_filters_request.rs b/src/datadogV2/model/model_reorder_retention_filters_request.rs index 0c9b27610..6946c4f2f 100644 --- a/src/datadogV2/model/model_reorder_retention_filters_request.rs +++ b/src/datadogV2/model/model_reorder_retention_filters_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A list of retention filters to reorder. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ReorderRetentionFiltersRequest { /// A list of retention filters objects. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_response_meta_attributes.rs b/src/datadogV2/model/model_response_meta_attributes.rs new file mode 100644 index 000000000..1e7c77cab --- /dev/null +++ b/src/datadogV2/model/model_response_meta_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing meta attributes of response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ResponseMetaAttributes { + /// Pagination object. + #[serde(rename = "page")] + pub page: Option>, +} + +impl ResponseMetaAttributes { + pub fn new() -> ResponseMetaAttributes { + ResponseMetaAttributes { page: None } + } +} diff --git a/src/datadogV2/model/model_restriction_policy.rs b/src/datadogV2/model/model_restriction_policy.rs index 3f2d655a1..cabfac8b6 100644 --- a/src/datadogV2/model/model_restriction_policy.rs +++ b/src/datadogV2/model/model_restriction_policy.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Restriction policy object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RestrictionPolicy { /// Restriction policy attributes. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct RestrictionPolicy { impl RestrictionPolicy { pub fn new( - attributes: crate::datadogV2::model::RestrictionPolicyAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::RestrictionPolicyType, ) -> RestrictionPolicy { RestrictionPolicy { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_restriction_policy_attributes.rs b/src/datadogV2/model/model_restriction_policy_attributes.rs index 65129711d..10d5ee29d 100644 --- a/src/datadogV2/model/model_restriction_policy_attributes.rs +++ b/src/datadogV2/model/model_restriction_policy_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Restriction policy attributes. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RestrictionPolicyAttributes { /// An array of bindings. #[serde(rename = "bindings")] diff --git a/src/datadogV2/model/model_restriction_policy_binding.rs b/src/datadogV2/model/model_restriction_policy_binding.rs index c2cdcceff..3ed71ebd4 100644 --- a/src/datadogV2/model/model_restriction_policy_binding.rs +++ b/src/datadogV2/model/model_restriction_policy_binding.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Specifies which principals are associated with a relation. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RestrictionPolicyBinding { /// An array of principals. A principal is a subject or group of subjects. /// Each principal is formatted as `type:id`. Supported types: `role`, `team`, `user`, and `org`. diff --git a/src/datadogV2/model/model_restriction_policy_response.rs b/src/datadogV2/model/model_restriction_policy_response.rs index 5d4fbeda5..05334bb4d 100644 --- a/src/datadogV2/model/model_restriction_policy_response.rs +++ b/src/datadogV2/model/model_restriction_policy_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Response containing information about a single restriction policy. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RestrictionPolicyResponse { /// Restriction policy object. #[serde(rename = "data")] @@ -14,9 +14,7 @@ pub struct RestrictionPolicyResponse { } impl RestrictionPolicyResponse { - pub fn new(data: crate::datadogV2::model::RestrictionPolicy) -> RestrictionPolicyResponse { - RestrictionPolicyResponse { - data: Box::new(data), - } + pub fn new(data: Box) -> RestrictionPolicyResponse { + RestrictionPolicyResponse { data } } } diff --git a/src/datadogV2/model/model_restriction_policy_type.rs b/src/datadogV2/model/model_restriction_policy_type.rs index 6bb097846..409bc8848 100644 --- a/src/datadogV2/model/model_restriction_policy_type.rs +++ b/src/datadogV2/model/model_restriction_policy_type.rs @@ -17,9 +17,3 @@ impl ToString for RestrictionPolicyType { } } } - -impl Default for RestrictionPolicyType { - fn default() -> RestrictionPolicyType { - Self::RESTRICTION_POLICY - } -} diff --git a/src/datadogV2/model/model_restriction_policy_update_request.rs b/src/datadogV2/model/model_restriction_policy_update_request.rs index db83b2ad1..94988d043 100644 --- a/src/datadogV2/model/model_restriction_policy_update_request.rs +++ b/src/datadogV2/model/model_restriction_policy_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Update request for a restriction policy. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RestrictionPolicyUpdateRequest { /// Restriction policy object. #[serde(rename = "data")] @@ -14,9 +14,9 @@ pub struct RestrictionPolicyUpdateRequest { } impl RestrictionPolicyUpdateRequest { - pub fn new(data: crate::datadogV2::model::RestrictionPolicy) -> RestrictionPolicyUpdateRequest { - RestrictionPolicyUpdateRequest { - data: Box::new(data), - } + pub fn new( + data: Box, + ) -> RestrictionPolicyUpdateRequest { + RestrictionPolicyUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_retention_filter.rs b/src/datadogV2/model/model_retention_filter.rs index b81df6b53..b37813a98 100644 --- a/src/datadogV2/model/model_retention_filter.rs +++ b/src/datadogV2/model/model_retention_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The definition of the retention filter. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilter { /// The attributes of the retention filter. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct RetentionFilter { impl RetentionFilter { pub fn new( - attributes: crate::datadogV2::model::RetentionFilterAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilter { RetentionFilter { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_retention_filter_all.rs b/src/datadogV2/model/model_retention_filter_all.rs index beb178263..2a7dc7f07 100644 --- a/src/datadogV2/model/model_retention_filter_all.rs +++ b/src/datadogV2/model/model_retention_filter_all.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The definition of the retention filter. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterAll { /// The attributes of the retention filter. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct RetentionFilterAll { impl RetentionFilterAll { pub fn new( - attributes: crate::datadogV2::model::RetentionFilterAllAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilterAll { RetentionFilterAll { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_retention_filter_all_attributes.rs b/src/datadogV2/model/model_retention_filter_all_attributes.rs index d7230ddb3..dc1ddb6b3 100644 --- a/src/datadogV2/model/model_retention_filter_all_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_all_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attributes of the retention filter. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterAllAttributes { /// The creation timestamp of the retention filter. #[serde(rename = "created_at")] diff --git a/src/datadogV2/model/model_retention_filter_all_type.rs b/src/datadogV2/model/model_retention_filter_all_type.rs index 48d37f945..710a8e458 100644 --- a/src/datadogV2/model/model_retention_filter_all_type.rs +++ b/src/datadogV2/model/model_retention_filter_all_type.rs @@ -27,9 +27,3 @@ impl ToString for RetentionFilterAllType { } } } - -impl Default for RetentionFilterAllType { - fn default() -> RetentionFilterAllType { - Self::SPANS_SAMPLING_PROCESSOR - } -} diff --git a/src/datadogV2/model/model_retention_filter_attributes.rs b/src/datadogV2/model/model_retention_filter_attributes.rs index 6a6427ebb..b7766974e 100644 --- a/src/datadogV2/model/model_retention_filter_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The attributes of the retention filter. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterAttributes { /// The creation timestamp of the retention filter. #[serde(rename = "created_at")] diff --git a/src/datadogV2/model/model_retention_filter_create_attributes.rs b/src/datadogV2/model/model_retention_filter_create_attributes.rs index 6775f240a..954431a8f 100644 --- a/src/datadogV2/model/model_retention_filter_create_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_create_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object describing the configuration of the retention filter to create/update. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterCreateAttributes { /// Enable/Disable the retention filter. #[serde(rename = "enabled")] @@ -29,14 +29,14 @@ pub struct RetentionFilterCreateAttributes { impl RetentionFilterCreateAttributes { pub fn new( enabled: bool, - filter: crate::datadogV2::model::SpansFilterCreate, + filter: Box, filter_type: crate::datadogV2::model::RetentionFilterType, name: String, rate: f64, ) -> RetentionFilterCreateAttributes { RetentionFilterCreateAttributes { enabled, - filter: Box::new(filter), + filter, filter_type, name, rate, diff --git a/src/datadogV2/model/model_retention_filter_create_data.rs b/src/datadogV2/model/model_retention_filter_create_data.rs index fd7ac5725..d6ed36445 100644 --- a/src/datadogV2/model/model_retention_filter_create_data.rs +++ b/src/datadogV2/model/model_retention_filter_create_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The body of the retention filter to be created. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterCreateData { /// The object describing the configuration of the retention filter to create/update. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct RetentionFilterCreateData { impl RetentionFilterCreateData { pub fn new( - attributes: crate::datadogV2::model::RetentionFilterCreateAttributes, + attributes: Box, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilterCreateData { - RetentionFilterCreateData { - attributes: Box::new(attributes), - type_, - } + RetentionFilterCreateData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_retention_filter_create_request.rs b/src/datadogV2/model/model_retention_filter_create_request.rs index d07839020..af5108287 100644 --- a/src/datadogV2/model/model_retention_filter_create_request.rs +++ b/src/datadogV2/model/model_retention_filter_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The body of the retention filter to be created. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterCreateRequest { /// The body of the retention filter to be created. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct RetentionFilterCreateRequest { impl RetentionFilterCreateRequest { pub fn new( - data: crate::datadogV2::model::RetentionFilterCreateData, + data: Box, ) -> RetentionFilterCreateRequest { - RetentionFilterCreateRequest { - data: Box::new(data), - } + RetentionFilterCreateRequest { data } } } diff --git a/src/datadogV2/model/model_retention_filter_response.rs b/src/datadogV2/model/model_retention_filter_response.rs index b4c4c12bb..661229d88 100644 --- a/src/datadogV2/model/model_retention_filter_response.rs +++ b/src/datadogV2/model/model_retention_filter_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The retention filters definition. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterResponse { /// The definition of the retention filter. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_retention_filter_type.rs b/src/datadogV2/model/model_retention_filter_type.rs index bb2e9ce90..6508a0d33 100644 --- a/src/datadogV2/model/model_retention_filter_type.rs +++ b/src/datadogV2/model/model_retention_filter_type.rs @@ -17,9 +17,3 @@ impl ToString for RetentionFilterType { } } } - -impl Default for RetentionFilterType { - fn default() -> RetentionFilterType { - Self::SPANS_SAMPLING_PROCESSOR - } -} diff --git a/src/datadogV2/model/model_retention_filter_update_data.rs b/src/datadogV2/model/model_retention_filter_update_data.rs index bb080d4bd..4512a8255 100644 --- a/src/datadogV2/model/model_retention_filter_update_data.rs +++ b/src/datadogV2/model/model_retention_filter_update_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The body of the retention filter to be updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterUpdateData { /// The object describing the configuration of the retention filter to create/update. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct RetentionFilterUpdateData { impl RetentionFilterUpdateData { pub fn new( - attributes: crate::datadogV2::model::RetentionFilterCreateAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::ApmRetentionFilterType, ) -> RetentionFilterUpdateData { RetentionFilterUpdateData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_retention_filter_update_request.rs b/src/datadogV2/model/model_retention_filter_update_request.rs index b5f10d9e4..a09e0ffb8 100644 --- a/src/datadogV2/model/model_retention_filter_update_request.rs +++ b/src/datadogV2/model/model_retention_filter_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The body of the retention filter to be updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterUpdateRequest { /// The body of the retention filter to be updated. #[serde(rename = "data")] @@ -15,10 +15,8 @@ pub struct RetentionFilterUpdateRequest { impl RetentionFilterUpdateRequest { pub fn new( - data: crate::datadogV2::model::RetentionFilterUpdateData, + data: Box, ) -> RetentionFilterUpdateRequest { - RetentionFilterUpdateRequest { - data: Box::new(data), - } + RetentionFilterUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_retention_filter_without_attributes.rs b/src/datadogV2/model/model_retention_filter_without_attributes.rs index 7dc7ba97c..d332e4173 100644 --- a/src/datadogV2/model/model_retention_filter_without_attributes.rs +++ b/src/datadogV2/model/model_retention_filter_without_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The retention filter object . #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFilterWithoutAttributes { /// The ID of the retention filter. #[serde(rename = "id")] diff --git a/src/datadogV2/model/model_retention_filters_response.rs b/src/datadogV2/model/model_retention_filters_response.rs index 5b163f0ae..40583facb 100644 --- a/src/datadogV2/model/model_retention_filters_response.rs +++ b/src/datadogV2/model/model_retention_filters_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// An ordered list of retention filters. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RetentionFiltersResponse { /// A list of retention filters objects. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_role.rs b/src/datadogV2/model/model_role.rs new file mode 100644 index 000000000..3180494fe --- /dev/null +++ b/src/datadogV2/model/model_role.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Role object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Role { + /// Attributes of the role. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique identifier of the role. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the role object returned by the API. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Roles type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RolesType, +} + +impl Role { + pub fn new(type_: crate::datadogV2::model::RolesType) -> Role { + Role { + attributes: None, + id: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_role_attributes.rs b/src/datadogV2/model/model_role_attributes.rs new file mode 100644 index 000000000..17781e556 --- /dev/null +++ b/src/datadogV2/model/model_role_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleAttributes { + /// Creation time of the role. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Time of last role modification. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// The name of the role. The name is neither unique nor a stable identifier of the role. + #[serde(rename = "name")] + pub name: Option, + /// Number of users with that role. + #[serde(rename = "user_count")] + pub user_count: Option, +} + +impl RoleAttributes { + pub fn new() -> RoleAttributes { + RoleAttributes { + created_at: None, + modified_at: None, + name: None, + user_count: None, + } + } +} diff --git a/src/datadogV2/model/model_role_clone.rs b/src/datadogV2/model/model_role_clone.rs new file mode 100644 index 000000000..4043cd252 --- /dev/null +++ b/src/datadogV2/model/model_role_clone.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data for the clone role request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleClone { + /// Attributes required to create a new role by cloning an existing one. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Roles type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RolesType, +} + +impl RoleClone { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::RolesType, + ) -> RoleClone { + RoleClone { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_role_clone_attributes.rs b/src/datadogV2/model/model_role_clone_attributes.rs new file mode 100644 index 000000000..983e5d096 --- /dev/null +++ b/src/datadogV2/model/model_role_clone_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes required to create a new role by cloning an existing one. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleCloneAttributes { + /// Name of the new role that is cloned. + #[serde(rename = "name")] + pub name: String, +} + +impl RoleCloneAttributes { + pub fn new(name: String) -> RoleCloneAttributes { + RoleCloneAttributes { name } + } +} diff --git a/src/datadogV2/model/model_role_clone_request.rs b/src/datadogV2/model/model_role_clone_request.rs new file mode 100644 index 000000000..96898ecc4 --- /dev/null +++ b/src/datadogV2/model/model_role_clone_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request to create a role by cloning an existing role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleCloneRequest { + /// Data for the clone role request. + #[serde(rename = "data")] + pub data: Box, +} + +impl RoleCloneRequest { + pub fn new(data: Box) -> RoleCloneRequest { + RoleCloneRequest { data } + } +} diff --git a/src/datadogV2/model/model_role_create_attributes.rs b/src/datadogV2/model/model_role_create_attributes.rs new file mode 100644 index 000000000..0e90428a3 --- /dev/null +++ b/src/datadogV2/model/model_role_create_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the created role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleCreateAttributes { + /// Creation time of the role. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Time of last role modification. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Name of the role. + #[serde(rename = "name")] + pub name: String, +} + +impl RoleCreateAttributes { + pub fn new(name: String) -> RoleCreateAttributes { + RoleCreateAttributes { + created_at: None, + modified_at: None, + name, + } + } +} diff --git a/src/datadogV2/model/model_role_create_data.rs b/src/datadogV2/model/model_role_create_data.rs new file mode 100644 index 000000000..59475842d --- /dev/null +++ b/src/datadogV2/model/model_role_create_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to the creation of a role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleCreateData { + /// Attributes of the created role. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Relationships of the role object. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Roles type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RoleCreateData { + pub fn new(attributes: Box) -> RoleCreateData { + RoleCreateData { + attributes, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_role_create_request.rs b/src/datadogV2/model/model_role_create_request.rs new file mode 100644 index 000000000..bdd541a67 --- /dev/null +++ b/src/datadogV2/model/model_role_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create a role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleCreateRequest { + /// Data related to the creation of a role. + #[serde(rename = "data")] + pub data: Box, +} + +impl RoleCreateRequest { + pub fn new(data: Box) -> RoleCreateRequest { + RoleCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_role_create_response.rs b/src/datadogV2/model/model_role_create_response.rs new file mode 100644 index 000000000..659afc3c8 --- /dev/null +++ b/src/datadogV2/model/model_role_create_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing information about a created role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleCreateResponse { + /// Role object returned by the API. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RoleCreateResponse { + pub fn new() -> RoleCreateResponse { + RoleCreateResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_role_create_response_data.rs b/src/datadogV2/model/model_role_create_response_data.rs new file mode 100644 index 000000000..570f9b201 --- /dev/null +++ b/src/datadogV2/model/model_role_create_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Role object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleCreateResponseData { + /// Attributes of the created role. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique identifier of the role. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the role object returned by the API. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Roles type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RolesType, +} + +impl RoleCreateResponseData { + pub fn new(type_: crate::datadogV2::model::RolesType) -> RoleCreateResponseData { + RoleCreateResponseData { + attributes: None, + id: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_role_relationships.rs b/src/datadogV2/model/model_role_relationships.rs new file mode 100644 index 000000000..adebaaa5e --- /dev/null +++ b/src/datadogV2/model/model_role_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships of the role object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleRelationships { + /// Relationship to multiple permissions objects. + #[serde(rename = "permissions")] + pub permissions: Option>, + /// Relationship to users. + #[serde(rename = "users")] + pub users: Option>, +} + +impl RoleRelationships { + pub fn new() -> RoleRelationships { + RoleRelationships { + permissions: None, + users: None, + } + } +} diff --git a/src/datadogV2/model/model_role_response.rs b/src/datadogV2/model/model_role_response.rs new file mode 100644 index 000000000..e2572699e --- /dev/null +++ b/src/datadogV2/model/model_role_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing information about a single role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleResponse { + /// Role object returned by the API. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RoleResponse { + pub fn new() -> RoleResponse { + RoleResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_role_response_relationships.rs b/src/datadogV2/model/model_role_response_relationships.rs new file mode 100644 index 000000000..d480ac0a5 --- /dev/null +++ b/src/datadogV2/model/model_role_response_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships of the role object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleResponseRelationships { + /// Relationship to multiple permissions objects. + #[serde(rename = "permissions")] + pub permissions: Option>, +} + +impl RoleResponseRelationships { + pub fn new() -> RoleResponseRelationships { + RoleResponseRelationships { permissions: None } + } +} diff --git a/src/datadogV2/model/model_role_update_attributes.rs b/src/datadogV2/model/model_role_update_attributes.rs new file mode 100644 index 000000000..7cbf920cf --- /dev/null +++ b/src/datadogV2/model/model_role_update_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleUpdateAttributes { + /// Creation time of the role. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Time of last role modification. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Name of the role. + #[serde(rename = "name")] + pub name: Option, +} + +impl RoleUpdateAttributes { + pub fn new() -> RoleUpdateAttributes { + RoleUpdateAttributes { + created_at: None, + modified_at: None, + name: None, + } + } +} diff --git a/src/datadogV2/model/model_role_update_data.rs b/src/datadogV2/model/model_role_update_data.rs new file mode 100644 index 000000000..73823c007 --- /dev/null +++ b/src/datadogV2/model/model_role_update_data.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to the update of a role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleUpdateData { + /// Attributes of the role. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The unique identifier of the role. + #[serde(rename = "id")] + pub id: String, + /// Relationships of the role object. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Roles type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RolesType, +} + +impl RoleUpdateData { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::RolesType, + ) -> RoleUpdateData { + RoleUpdateData { + attributes, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_role_update_request.rs b/src/datadogV2/model/model_role_update_request.rs new file mode 100644 index 000000000..b2881f5d1 --- /dev/null +++ b/src/datadogV2/model/model_role_update_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update a role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleUpdateRequest { + /// Data related to the update of a role. + #[serde(rename = "data")] + pub data: Box, +} + +impl RoleUpdateRequest { + pub fn new(data: Box) -> RoleUpdateRequest { + RoleUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_role_update_response.rs b/src/datadogV2/model/model_role_update_response.rs new file mode 100644 index 000000000..3f4e57247 --- /dev/null +++ b/src/datadogV2/model/model_role_update_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing information about an updated role. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleUpdateResponse { + /// Role object returned by the API. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RoleUpdateResponse { + pub fn new() -> RoleUpdateResponse { + RoleUpdateResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_role_update_response_data.rs b/src/datadogV2/model/model_role_update_response_data.rs new file mode 100644 index 000000000..ac5728afd --- /dev/null +++ b/src/datadogV2/model/model_role_update_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Role object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleUpdateResponseData { + /// Attributes of the role. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique identifier of the role. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the role object returned by the API. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Roles type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RolesType, +} + +impl RoleUpdateResponseData { + pub fn new(type_: crate::datadogV2::model::RolesType) -> RoleUpdateResponseData { + RoleUpdateResponseData { + attributes: None, + id: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_roles_response.rs b/src/datadogV2/model/model_roles_response.rs new file mode 100644 index 000000000..dc12d7034 --- /dev/null +++ b/src/datadogV2/model/model_roles_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing information about multiple roles. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RolesResponse { + /// Array of returned roles. + #[serde(rename = "data")] + pub data: Option>, + /// Object describing meta attributes of response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl RolesResponse { + pub fn new() -> RolesResponse { + RolesResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_roles_sort.rs b/src/datadogV2/model/model_roles_sort.rs new file mode 100644 index 000000000..102507772 --- /dev/null +++ b/src/datadogV2/model/model_roles_sort.rs @@ -0,0 +1,34 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RolesSort { + #[serde(rename = "name")] + NAME_ASCENDING, + #[serde(rename = "-name")] + NAME_DESCENDING, + #[serde(rename = "modified_at")] + MODIFIED_AT_ASCENDING, + #[serde(rename = "-modified_at")] + MODIFIED_AT_DESCENDING, + #[serde(rename = "user_count")] + USER_COUNT_ASCENDING, + #[serde(rename = "-user_count")] + USER_COUNT_DESCENDING, +} + +impl ToString for RolesSort { + fn to_string(&self) -> String { + match self { + Self::NAME_ASCENDING => String::from("name"), + Self::NAME_DESCENDING => String::from("-name"), + Self::MODIFIED_AT_ASCENDING => String::from("modified_at"), + Self::MODIFIED_AT_DESCENDING => String::from("-modified_at"), + Self::USER_COUNT_ASCENDING => String::from("user_count"), + Self::USER_COUNT_DESCENDING => String::from("-user_count"), + } + } +} diff --git a/src/datadogV2/model/model_roles_type.rs b/src/datadogV2/model/model_roles_type.rs new file mode 100644 index 000000000..5f7591521 --- /dev/null +++ b/src/datadogV2/model/model_roles_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RolesType { + #[serde(rename = "roles")] + ROLES, +} + +impl ToString for RolesType { + fn to_string(&self) -> String { + match self { + Self::ROLES => String::from("roles"), + } + } +} diff --git a/src/datadogV2/model/model_rule_attributes.rs b/src/datadogV2/model/model_rule_attributes.rs new file mode 100644 index 000000000..7b4ed3c85 --- /dev/null +++ b/src/datadogV2/model/model_rule_attributes.rs @@ -0,0 +1,56 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Details of a rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RuleAttributes { + /// The scorecard name to which this rule must belong. + #[deprecated] + #[serde(rename = "category")] + pub category: Option, + /// Creation time of the rule outcome. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Defines if the rule is a custom rule. + #[serde(rename = "custom")] + pub custom: Option, + /// Explanation of the rule. + #[serde(rename = "description")] + pub description: Option, + /// If enabled, the rule is calculated as part of the score. + #[serde(rename = "enabled")] + pub enabled: Option, + /// Time of the last rule outcome modification. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Name of the rule. + #[serde(rename = "name")] + pub name: Option, + /// Owner of the rule. + #[serde(rename = "owner")] + pub owner: Option, + /// The scorecard name to which this rule must belong. + #[serde(rename = "scorecard_name")] + pub scorecard_name: Option, +} + +impl RuleAttributes { + pub fn new() -> RuleAttributes { + #[allow(deprecated)] + RuleAttributes { + category: None, + created_at: None, + custom: None, + description: None, + enabled: None, + modified_at: None, + name: None, + owner: None, + scorecard_name: None, + } + } +} diff --git a/src/datadogV2/model/model_rule_outcome_relationships.rs b/src/datadogV2/model/model_rule_outcome_relationships.rs new file mode 100644 index 000000000..fac3fb6a4 --- /dev/null +++ b/src/datadogV2/model/model_rule_outcome_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The JSON:API relationship to a scorecard rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RuleOutcomeRelationships { + /// The JSON:API relationship to a scorecard outcome. + #[serde(rename = "rule")] + pub rule: Option>, +} + +impl RuleOutcomeRelationships { + pub fn new() -> RuleOutcomeRelationships { + RuleOutcomeRelationships { rule: None } + } +} diff --git a/src/datadogV2/model/model_rule_type.rs b/src/datadogV2/model/model_rule_type.rs new file mode 100644 index 000000000..5395d3ea3 --- /dev/null +++ b/src/datadogV2/model/model_rule_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RuleType { + #[serde(rename = "rule")] + RULE, +} + +impl ToString for RuleType { + fn to_string(&self) -> String { + match self { + Self::RULE => String::from("rule"), + } + } +} diff --git a/src/datadogV2/model/model_rum_aggregate_bucket_value.rs b/src/datadogV2/model/model_rum_aggregate_bucket_value.rs new file mode 100644 index 000000000..bc6ac235c --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregate_bucket_value.rs @@ -0,0 +1,15 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A bucket value, can be either a timeseries or a single value. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RUMAggregateBucketValue { + RUMAggregateBucketValueSingleString(Box), + RUMAggregateBucketValueSingleNumber(Box), + RUMAggregateBucketValueTimeseries( + Box, + ), +} diff --git a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries.rs new file mode 100644 index 000000000..f6a40aca9 --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries array. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMAggregateBucketValueTimeseries {} + +impl RUMAggregateBucketValueTimeseries { + pub fn new() -> RUMAggregateBucketValueTimeseries { + RUMAggregateBucketValueTimeseries {} + } +} diff --git a/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs new file mode 100644 index 000000000..986ad15d1 --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregate_bucket_value_timeseries_point.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries point. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMAggregateBucketValueTimeseriesPoint { + /// The time value for this point. + #[serde(rename = "time")] + pub time: Option, + /// The value for this point. + #[serde(rename = "value")] + pub value: Option, +} + +impl RUMAggregateBucketValueTimeseriesPoint { + pub fn new() -> RUMAggregateBucketValueTimeseriesPoint { + RUMAggregateBucketValueTimeseriesPoint { + time: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_aggregate_request.rs b/src/datadogV2/model/model_rum_aggregate_request.rs new file mode 100644 index 000000000..8d9cf50ea --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregate_request.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object sent with the request to retrieve aggregation buckets of RUM events from your organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMAggregateRequest { + /// The list of metrics or timeseries to compute for the retrieved buckets. + #[serde(rename = "compute")] + pub compute: Option>, + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// The rules for the group by. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// Global query options that are used during the query. + /// Note: Only supply timezone or time offset, not both. Otherwise, the query fails. + #[serde(rename = "options")] + pub options: Option>, + /// Paging attributes for listing events. + #[serde(rename = "page")] + pub page: Option>, +} + +impl RUMAggregateRequest { + pub fn new() -> RUMAggregateRequest { + RUMAggregateRequest { + compute: None, + filter: None, + group_by: None, + options: None, + page: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_aggregate_sort.rs b/src/datadogV2/model/model_rum_aggregate_sort.rs new file mode 100644 index 000000000..d87065928 --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregate_sort.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A sort rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMAggregateSort { + /// An aggregation function. + #[serde(rename = "aggregation")] + pub aggregation: Option, + /// The metric to sort by (only used for `type=measure`). + #[serde(rename = "metric")] + pub metric: Option, + /// The order to use, ascending or descending. + #[serde(rename = "order")] + pub order: Option, + /// The type of sorting algorithm. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RUMAggregateSort { + pub fn new() -> RUMAggregateSort { + RUMAggregateSort { + aggregation: None, + metric: None, + order: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_aggregate_sort_type.rs b/src/datadogV2/model/model_rum_aggregate_sort_type.rs new file mode 100644 index 000000000..cc0213f0c --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregate_sort_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMAggregateSortType { + #[serde(rename = "alphabetical")] + ALPHABETICAL, + #[serde(rename = "measure")] + MEASURE, +} + +impl ToString for RUMAggregateSortType { + fn to_string(&self) -> String { + match self { + Self::ALPHABETICAL => String::from("alphabetical"), + Self::MEASURE => String::from("measure"), + } + } +} diff --git a/src/datadogV2/model/model_rum_aggregation_buckets_response.rs b/src/datadogV2/model/model_rum_aggregation_buckets_response.rs new file mode 100644 index 000000000..c745d7ffe --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregation_buckets_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The query results. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMAggregationBucketsResponse { + /// The list of matching buckets, one item per bucket. + #[serde(rename = "buckets")] + pub buckets: Option>, +} + +impl RUMAggregationBucketsResponse { + pub fn new() -> RUMAggregationBucketsResponse { + RUMAggregationBucketsResponse { buckets: None } + } +} diff --git a/src/datadogV2/model/model_rum_aggregation_function.rs b/src/datadogV2/model/model_rum_aggregation_function.rs new file mode 100644 index 000000000..3cc356643 --- /dev/null +++ b/src/datadogV2/model/model_rum_aggregation_function.rs @@ -0,0 +1,52 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMAggregationFunction { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "pc75")] + PERCENTILE_75, + #[serde(rename = "pc90")] + PERCENTILE_90, + #[serde(rename = "pc95")] + PERCENTILE_95, + #[serde(rename = "pc98")] + PERCENTILE_98, + #[serde(rename = "pc99")] + PERCENTILE_99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, + #[serde(rename = "median")] + MEDIAN, +} + +impl ToString for RUMAggregationFunction { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::PERCENTILE_75 => String::from("pc75"), + Self::PERCENTILE_90 => String::from("pc90"), + Self::PERCENTILE_95 => String::from("pc95"), + Self::PERCENTILE_98 => String::from("pc98"), + Self::PERCENTILE_99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + Self::MEDIAN => String::from("median"), + } + } +} diff --git a/src/datadogV2/model/model_rum_analytics_aggregate_response.rs b/src/datadogV2/model/model_rum_analytics_aggregate_response.rs new file mode 100644 index 000000000..0afe5bcbc --- /dev/null +++ b/src/datadogV2/model/model_rum_analytics_aggregate_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object for the RUM events aggregate API endpoint. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMAnalyticsAggregateResponse { + /// The query results. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl RUMAnalyticsAggregateResponse { + pub fn new() -> RUMAnalyticsAggregateResponse { + RUMAnalyticsAggregateResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_application.rs b/src/datadogV2/model/model_rum_application.rs new file mode 100644 index 000000000..62df96ebf --- /dev/null +++ b/src/datadogV2/model/model_rum_application.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplication { + /// RUM application attributes. + #[serde(rename = "attributes")] + pub attributes: Box, + /// RUM application ID. + #[serde(rename = "id")] + pub id: String, + /// RUM application response type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RUMApplicationType, +} + +impl RUMApplication { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::RUMApplicationType, + ) -> RUMApplication { + RUMApplication { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_rum_application_attributes.rs b/src/datadogV2/model/model_rum_application_attributes.rs new file mode 100644 index 000000000..42c18e2b4 --- /dev/null +++ b/src/datadogV2/model/model_rum_application_attributes.rs @@ -0,0 +1,72 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationAttributes { + /// ID of the RUM application. + #[serde(rename = "application_id")] + pub application_id: String, + /// Client token of the RUM application. + #[serde(rename = "client_token")] + pub client_token: String, + /// Timestamp in ms of the creation date. + #[serde(rename = "created_at")] + pub created_at: i64, + /// Handle of the creator user. + #[serde(rename = "created_by_handle")] + pub created_by_handle: String, + /// Hash of the RUM application. Optional. + #[serde(rename = "hash")] + pub hash: Option, + /// Indicates if the RUM application is active. + #[serde(rename = "is_active")] + pub is_active: Option, + /// Name of the RUM application. + #[serde(rename = "name")] + pub name: String, + /// Org ID of the RUM application. + #[serde(rename = "org_id")] + pub org_id: i32, + /// Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`. + #[serde(rename = "type")] + pub type_: String, + /// Timestamp in ms of the last update date. + #[serde(rename = "updated_at")] + pub updated_at: i64, + /// Handle of the updater user. + #[serde(rename = "updated_by_handle")] + pub updated_by_handle: String, +} + +impl RUMApplicationAttributes { + pub fn new( + application_id: String, + client_token: String, + created_at: i64, + created_by_handle: String, + name: String, + org_id: i32, + type_: String, + updated_at: i64, + updated_by_handle: String, + ) -> RUMApplicationAttributes { + RUMApplicationAttributes { + application_id, + client_token, + created_at, + created_by_handle, + hash: None, + is_active: None, + name, + org_id, + type_, + updated_at, + updated_by_handle, + } + } +} diff --git a/src/datadogV2/model/model_rum_application_create.rs b/src/datadogV2/model/model_rum_application_create.rs new file mode 100644 index 000000000..cf5f97f07 --- /dev/null +++ b/src/datadogV2/model/model_rum_application_create.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application creation. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationCreate { + /// RUM application creation attributes. + #[serde(rename = "attributes")] + pub attributes: Box, + /// RUM application creation type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RUMApplicationCreateType, +} + +impl RUMApplicationCreate { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::RUMApplicationCreateType, + ) -> RUMApplicationCreate { + RUMApplicationCreate { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_rum_application_create_attributes.rs b/src/datadogV2/model/model_rum_application_create_attributes.rs new file mode 100644 index 000000000..165a859d2 --- /dev/null +++ b/src/datadogV2/model/model_rum_application_create_attributes.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application creation attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationCreateAttributes { + /// Name of the RUM application. + #[serde(rename = "name")] + pub name: String, + /// Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RUMApplicationCreateAttributes { + pub fn new(name: String) -> RUMApplicationCreateAttributes { + RUMApplicationCreateAttributes { name, type_: None } + } +} diff --git a/src/datadogV2/model/model_rum_application_create_request.rs b/src/datadogV2/model/model_rum_application_create_request.rs new file mode 100644 index 000000000..63a992fd5 --- /dev/null +++ b/src/datadogV2/model/model_rum_application_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application creation request attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationCreateRequest { + /// RUM application creation. + #[serde(rename = "data")] + pub data: Box, +} + +impl RUMApplicationCreateRequest { + pub fn new( + data: Box, + ) -> RUMApplicationCreateRequest { + RUMApplicationCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_rum_application_create_type.rs b/src/datadogV2/model/model_rum_application_create_type.rs new file mode 100644 index 000000000..565488fda --- /dev/null +++ b/src/datadogV2/model/model_rum_application_create_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMApplicationCreateType { + #[serde(rename = "rum_application_create")] + RUM_APPLICATION_CREATE, +} + +impl ToString for RUMApplicationCreateType { + fn to_string(&self) -> String { + match self { + Self::RUM_APPLICATION_CREATE => String::from("rum_application_create"), + } + } +} diff --git a/src/datadogV2/model/model_rum_application_list.rs b/src/datadogV2/model/model_rum_application_list.rs new file mode 100644 index 000000000..75290485f --- /dev/null +++ b/src/datadogV2/model/model_rum_application_list.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application list. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationList { + /// RUM application list attributes. + #[serde(rename = "attributes")] + pub attributes: Box, + /// RUM application ID. + #[serde(rename = "id")] + pub id: Option, + /// RUM application list type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RUMApplicationListType, +} + +impl RUMApplicationList { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::RUMApplicationListType, + ) -> RUMApplicationList { + RUMApplicationList { + attributes, + id: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_rum_application_list_attributes.rs b/src/datadogV2/model/model_rum_application_list_attributes.rs new file mode 100644 index 000000000..176500626 --- /dev/null +++ b/src/datadogV2/model/model_rum_application_list_attributes.rs @@ -0,0 +1,67 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application list attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationListAttributes { + /// ID of the RUM application. + #[serde(rename = "application_id")] + pub application_id: String, + /// Timestamp in ms of the creation date. + #[serde(rename = "created_at")] + pub created_at: i64, + /// Handle of the creator user. + #[serde(rename = "created_by_handle")] + pub created_by_handle: String, + /// Hash of the RUM application. Optional. + #[serde(rename = "hash")] + pub hash: Option, + /// Indicates if the RUM application is active. + #[serde(rename = "is_active")] + pub is_active: Option, + /// Name of the RUM application. + #[serde(rename = "name")] + pub name: String, + /// Org ID of the RUM application. + #[serde(rename = "org_id")] + pub org_id: i32, + /// Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`. + #[serde(rename = "type")] + pub type_: String, + /// Timestamp in ms of the last update date. + #[serde(rename = "updated_at")] + pub updated_at: i64, + /// Handle of the updater user. + #[serde(rename = "updated_by_handle")] + pub updated_by_handle: String, +} + +impl RUMApplicationListAttributes { + pub fn new( + application_id: String, + created_at: i64, + created_by_handle: String, + name: String, + org_id: i32, + type_: String, + updated_at: i64, + updated_by_handle: String, + ) -> RUMApplicationListAttributes { + RUMApplicationListAttributes { + application_id, + created_at, + created_by_handle, + hash: None, + is_active: None, + name, + org_id, + type_, + updated_at, + updated_by_handle, + } + } +} diff --git a/src/datadogV2/model/model_rum_application_list_type.rs b/src/datadogV2/model/model_rum_application_list_type.rs new file mode 100644 index 000000000..ce9cbcf9c --- /dev/null +++ b/src/datadogV2/model/model_rum_application_list_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMApplicationListType { + #[serde(rename = "rum_application")] + RUM_APPLICATION, +} + +impl ToString for RUMApplicationListType { + fn to_string(&self) -> String { + match self { + Self::RUM_APPLICATION => String::from("rum_application"), + } + } +} diff --git a/src/datadogV2/model/model_rum_application_response.rs b/src/datadogV2/model/model_rum_application_response.rs new file mode 100644 index 000000000..b1a7c092b --- /dev/null +++ b/src/datadogV2/model/model_rum_application_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationResponse { + /// RUM application. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RUMApplicationResponse { + pub fn new() -> RUMApplicationResponse { + RUMApplicationResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_rum_application_type.rs b/src/datadogV2/model/model_rum_application_type.rs new file mode 100644 index 000000000..37e7c8ca3 --- /dev/null +++ b/src/datadogV2/model/model_rum_application_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMApplicationType { + #[serde(rename = "rum_application")] + RUM_APPLICATION, +} + +impl ToString for RUMApplicationType { + fn to_string(&self) -> String { + match self { + Self::RUM_APPLICATION => String::from("rum_application"), + } + } +} diff --git a/src/datadogV2/model/model_rum_application_update.rs b/src/datadogV2/model/model_rum_application_update.rs new file mode 100644 index 000000000..be5da2dbb --- /dev/null +++ b/src/datadogV2/model/model_rum_application_update.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application update. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationUpdate { + /// RUM application update attributes. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// RUM application ID. + #[serde(rename = "id")] + pub id: String, + /// RUM application update type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::RUMApplicationUpdateType, +} + +impl RUMApplicationUpdate { + pub fn new( + id: String, + type_: crate::datadogV2::model::RUMApplicationUpdateType, + ) -> RUMApplicationUpdate { + RUMApplicationUpdate { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_rum_application_update_attributes.rs b/src/datadogV2/model/model_rum_application_update_attributes.rs new file mode 100644 index 000000000..ab3c6cbaa --- /dev/null +++ b/src/datadogV2/model/model_rum_application_update_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application update attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationUpdateAttributes { + /// Name of the RUM application. + #[serde(rename = "name")] + pub name: Option, + /// Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RUMApplicationUpdateAttributes { + pub fn new() -> RUMApplicationUpdateAttributes { + RUMApplicationUpdateAttributes { + name: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_application_update_request.rs b/src/datadogV2/model/model_rum_application_update_request.rs new file mode 100644 index 000000000..570937246 --- /dev/null +++ b/src/datadogV2/model/model_rum_application_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM application update request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationUpdateRequest { + /// RUM application update. + #[serde(rename = "data")] + pub data: Box, +} + +impl RUMApplicationUpdateRequest { + pub fn new( + data: Box, + ) -> RUMApplicationUpdateRequest { + RUMApplicationUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_rum_application_update_type.rs b/src/datadogV2/model/model_rum_application_update_type.rs new file mode 100644 index 000000000..3552e911b --- /dev/null +++ b/src/datadogV2/model/model_rum_application_update_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMApplicationUpdateType { + #[serde(rename = "rum_application_update")] + RUM_APPLICATION_UPDATE, +} + +impl ToString for RUMApplicationUpdateType { + fn to_string(&self) -> String { + match self { + Self::RUM_APPLICATION_UPDATE => String::from("rum_application_update"), + } + } +} diff --git a/src/datadogV2/model/model_rum_applications_response.rs b/src/datadogV2/model/model_rum_applications_response.rs new file mode 100644 index 000000000..df68e8f95 --- /dev/null +++ b/src/datadogV2/model/model_rum_applications_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// RUM applications response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMApplicationsResponse { + /// RUM applications array response. + #[serde(rename = "data")] + pub data: Option>, +} + +impl RUMApplicationsResponse { + pub fn new() -> RUMApplicationsResponse { + RUMApplicationsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_rum_bucket_response.rs b/src/datadogV2/model/model_rum_bucket_response.rs new file mode 100644 index 000000000..f7d61cefa --- /dev/null +++ b/src/datadogV2/model/model_rum_bucket_response.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Bucket values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMBucketResponse { + /// The key-value pairs for each group-by. + #[serde(rename = "by")] + pub by: Option>, + /// A map of the metric name to value for regular compute, or a list of values for a timeseries. + #[serde(rename = "computes")] + pub computes: + Option>, +} + +impl RUMBucketResponse { + pub fn new() -> RUMBucketResponse { + RUMBucketResponse { + by: None, + computes: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_compute.rs b/src/datadogV2/model/model_rum_compute.rs new file mode 100644 index 000000000..885b1fa40 --- /dev/null +++ b/src/datadogV2/model/model_rum_compute.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A compute rule to compute metrics or timeseries. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMCompute { + /// An aggregation function. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV2::model::RUMAggregationFunction, + /// The time buckets' size (only used for type=timeseries) + /// Defaults to a resolution of 150 points. + #[serde(rename = "interval")] + pub interval: Option, + /// The metric to use. + #[serde(rename = "metric")] + pub metric: Option, + /// The type of compute. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RUMCompute { + pub fn new(aggregation: crate::datadogV2::model::RUMAggregationFunction) -> RUMCompute { + RUMCompute { + aggregation, + interval: None, + metric: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_compute_type.rs b/src/datadogV2/model/model_rum_compute_type.rs new file mode 100644 index 000000000..5b6ee1379 --- /dev/null +++ b/src/datadogV2/model/model_rum_compute_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMComputeType { + #[serde(rename = "timeseries")] + TIMESERIES, + #[serde(rename = "total")] + TOTAL, +} + +impl ToString for RUMComputeType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES => String::from("timeseries"), + Self::TOTAL => String::from("total"), + } + } +} diff --git a/src/datadogV2/model/model_rum_event.rs b/src/datadogV2/model/model_rum_event.rs new file mode 100644 index 000000000..175bcdf73 --- /dev/null +++ b/src/datadogV2/model/model_rum_event.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object description of a RUM event after being processed and stored by Datadog. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMEvent { + /// JSON object containing all event attributes and their associated values. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the event. + #[serde(rename = "id")] + pub id: Option, + /// Type of the event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl RUMEvent { + pub fn new() -> RUMEvent { + RUMEvent { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_event_attributes.rs b/src/datadogV2/model/model_rum_event_attributes.rs new file mode 100644 index 000000000..4449404f3 --- /dev/null +++ b/src/datadogV2/model/model_rum_event_attributes.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// JSON object containing all event attributes and their associated values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMEventAttributes { + /// JSON object of attributes from RUM events. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The name of the application or service generating RUM events. + /// It is used to switch from RUM to APM, so make sure you define the same + /// value when you use both products. + #[serde(rename = "service")] + pub service: Option, + /// Array of tags associated with your event. + #[serde(rename = "tags")] + pub tags: Option>, + /// Timestamp of your event. + #[serde(rename = "timestamp")] + pub timestamp: Option, +} + +impl RUMEventAttributes { + pub fn new() -> RUMEventAttributes { + RUMEventAttributes { + attributes: None, + service: None, + tags: None, + timestamp: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_event_type.rs b/src/datadogV2/model/model_rum_event_type.rs new file mode 100644 index 000000000..e79d58ddf --- /dev/null +++ b/src/datadogV2/model/model_rum_event_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMEventType { + #[serde(rename = "rum")] + RUM, +} + +impl ToString for RUMEventType { + fn to_string(&self) -> String { + match self { + Self::RUM => String::from("rum"), + } + } +} diff --git a/src/datadogV2/model/model_rum_events_response.rs b/src/datadogV2/model/model_rum_events_response.rs new file mode 100644 index 000000000..69ff6cbf3 --- /dev/null +++ b/src/datadogV2/model/model_rum_events_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object with all events matching the request and pagination information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMEventsResponse { + /// Array of events matching the request. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl RUMEventsResponse { + pub fn new() -> RUMEventsResponse { + RUMEventsResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_group_by.rs b/src/datadogV2/model/model_rum_group_by.rs new file mode 100644 index 000000000..6023f0d61 --- /dev/null +++ b/src/datadogV2/model/model_rum_group_by.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A group-by rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMGroupBy { + /// The name of the facet to use (required). + #[serde(rename = "facet")] + pub facet: String, + /// Used to perform a histogram computation (only for measure facets). + /// Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval. + #[serde(rename = "histogram")] + pub histogram: Option>, + /// The maximum buckets to return for this group-by. + #[serde(rename = "limit")] + pub limit: Option, + /// The value to use for logs that don't have the facet used to group by. + #[serde(rename = "missing")] + pub missing: Option>, + /// A sort rule. + #[serde(rename = "sort")] + pub sort: Option>, + /// A resulting object to put the given computes in over all the matching records. + #[serde(rename = "total")] + pub total: Option>, +} + +impl RUMGroupBy { + pub fn new(facet: String) -> RUMGroupBy { + RUMGroupBy { + facet, + histogram: None, + limit: None, + missing: None, + sort: None, + total: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_group_by_histogram.rs b/src/datadogV2/model/model_rum_group_by_histogram.rs new file mode 100644 index 000000000..38370a011 --- /dev/null +++ b/src/datadogV2/model/model_rum_group_by_histogram.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Used to perform a histogram computation (only for measure facets). +/// Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMGroupByHistogram { + /// The bin size of the histogram buckets. + #[serde(rename = "interval")] + pub interval: f64, + /// The maximum value for the measure used in the histogram + /// (values greater than this one are filtered out). + #[serde(rename = "max")] + pub max: f64, + /// The minimum value for the measure used in the histogram + /// (values smaller than this one are filtered out). + #[serde(rename = "min")] + pub min: f64, +} + +impl RUMGroupByHistogram { + pub fn new(interval: f64, max: f64, min: f64) -> RUMGroupByHistogram { + RUMGroupByHistogram { interval, max, min } + } +} diff --git a/src/datadogV2/model/model_rum_group_by_missing.rs b/src/datadogV2/model/model_rum_group_by_missing.rs new file mode 100644 index 000000000..7644bf2b7 --- /dev/null +++ b/src/datadogV2/model/model_rum_group_by_missing.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The value to use for logs that don't have the facet used to group by. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RUMGroupByMissing { + RUMGroupByMissingString(Box), + RUMGroupByMissingNumber(Box), +} diff --git a/src/datadogV2/model/model_rum_group_by_total.rs b/src/datadogV2/model/model_rum_group_by_total.rs new file mode 100644 index 000000000..16f704b95 --- /dev/null +++ b/src/datadogV2/model/model_rum_group_by_total.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A resulting object to put the given computes in over all the matching records. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RUMGroupByTotal { + RUMGroupByTotalBoolean(Box), + RUMGroupByTotalString(Box), + RUMGroupByTotalNumber(Box), +} diff --git a/src/datadogV2/model/model_rum_query_filter.rs b/src/datadogV2/model/model_rum_query_filter.rs new file mode 100644 index 000000000..dc620d8e6 --- /dev/null +++ b/src/datadogV2/model/model_rum_query_filter.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The search and filter query settings. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMQueryFilter { + /// The minimum time for the requested events; supports date (in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + #[serde(rename = "from")] + pub from: Option, + /// The search query following the RUM search syntax. + #[serde(rename = "query")] + pub query: Option, + /// The maximum time for the requested events; supports date (in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + #[serde(rename = "to")] + pub to: Option, +} + +impl RUMQueryFilter { + pub fn new() -> RUMQueryFilter { + RUMQueryFilter { + from: None, + query: None, + to: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_query_options.rs b/src/datadogV2/model/model_rum_query_options.rs new file mode 100644 index 000000000..a7f567b9e --- /dev/null +++ b/src/datadogV2/model/model_rum_query_options.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Global query options that are used during the query. +/// Note: Only supply timezone or time offset, not both. Otherwise, the query fails. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMQueryOptions { + /// The time offset (in seconds) to apply to the query. + #[serde(rename = "time_offset")] + pub time_offset: Option, + /// The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl RUMQueryOptions { + pub fn new() -> RUMQueryOptions { + RUMQueryOptions { + time_offset: None, + timezone: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_query_page_options.rs b/src/datadogV2/model/model_rum_query_page_options.rs new file mode 100644 index 000000000..0786cb39a --- /dev/null +++ b/src/datadogV2/model/model_rum_query_page_options.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes for listing events. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMQueryPageOptions { + /// List following results with a cursor provided in the previous query. + #[serde(rename = "cursor")] + pub cursor: Option, + /// Maximum number of events in the response. + #[serde(rename = "limit")] + pub limit: Option, +} + +impl RUMQueryPageOptions { + pub fn new() -> RUMQueryPageOptions { + RUMQueryPageOptions { + cursor: None, + limit: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_response_links.rs b/src/datadogV2/model/model_rum_response_links.rs new file mode 100644 index 000000000..434c41361 --- /dev/null +++ b/src/datadogV2/model/model_rum_response_links.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMResponseLinks { + /// Link for the next set of results. Note that the request can also be made using the + /// POST endpoint. + #[serde(rename = "next")] + pub next: Option, +} + +impl RUMResponseLinks { + pub fn new() -> RUMResponseLinks { + RUMResponseLinks { next: None } + } +} diff --git a/src/datadogV2/model/model_rum_response_metadata.rs b/src/datadogV2/model/model_rum_response_metadata.rs new file mode 100644 index 000000000..6bf22757a --- /dev/null +++ b/src/datadogV2/model/model_rum_response_metadata.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata associated with a request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMResponseMetadata { + /// The time elapsed in milliseconds. + #[serde(rename = "elapsed")] + pub elapsed: Option, + /// Paging attributes. + #[serde(rename = "page")] + pub page: Option>, + /// The identifier of the request. + #[serde(rename = "request_id")] + pub request_id: Option, + /// The status of the response. + #[serde(rename = "status")] + pub status: Option, + /// A list of warnings (non-fatal errors) encountered. Partial results may return if + /// warnings are present in the response. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl RUMResponseMetadata { + pub fn new() -> RUMResponseMetadata { + RUMResponseMetadata { + elapsed: None, + page: None, + request_id: None, + status: None, + warnings: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_response_page.rs b/src/datadogV2/model/model_rum_response_page.rs new file mode 100644 index 000000000..867526686 --- /dev/null +++ b/src/datadogV2/model/model_rum_response_page.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMResponsePage { + /// The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. + #[serde(rename = "after")] + pub after: Option, +} + +impl RUMResponsePage { + pub fn new() -> RUMResponsePage { + RUMResponsePage { after: None } + } +} diff --git a/src/datadogV2/model/model_rum_response_status.rs b/src/datadogV2/model/model_rum_response_status.rs new file mode 100644 index 000000000..e33ed4372 --- /dev/null +++ b/src/datadogV2/model/model_rum_response_status.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMResponseStatus { + #[serde(rename = "done")] + DONE, + #[serde(rename = "timeout")] + TIMEOUT, +} + +impl ToString for RUMResponseStatus { + fn to_string(&self) -> String { + match self { + Self::DONE => String::from("done"), + Self::TIMEOUT => String::from("timeout"), + } + } +} diff --git a/src/datadogV2/model/model_rum_search_events_request.rs b/src/datadogV2/model/model_rum_search_events_request.rs new file mode 100644 index 000000000..16cb1e151 --- /dev/null +++ b/src/datadogV2/model/model_rum_search_events_request.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The request for a RUM events list. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMSearchEventsRequest { + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// Global query options that are used during the query. + /// Note: Only supply timezone or time offset, not both. Otherwise, the query fails. + #[serde(rename = "options")] + pub options: Option>, + /// Paging attributes for listing events. + #[serde(rename = "page")] + pub page: Option>, + /// Sort parameters when querying events. + #[serde(rename = "sort")] + pub sort: Option, +} + +impl RUMSearchEventsRequest { + pub fn new() -> RUMSearchEventsRequest { + RUMSearchEventsRequest { + filter: None, + options: None, + page: None, + sort: None, + } + } +} diff --git a/src/datadogV2/model/model_rum_sort.rs b/src/datadogV2/model/model_rum_sort.rs new file mode 100644 index 000000000..95903a8ea --- /dev/null +++ b/src/datadogV2/model/model_rum_sort.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMSort { + #[serde(rename = "timestamp")] + TIMESTAMP_ASCENDING, + #[serde(rename = "-timestamp")] + TIMESTAMP_DESCENDING, +} + +impl ToString for RUMSort { + fn to_string(&self) -> String { + match self { + Self::TIMESTAMP_ASCENDING => String::from("timestamp"), + Self::TIMESTAMP_DESCENDING => String::from("-timestamp"), + } + } +} diff --git a/src/datadogV2/model/model_rum_sort_order.rs b/src/datadogV2/model/model_rum_sort_order.rs new file mode 100644 index 000000000..9c3c8494b --- /dev/null +++ b/src/datadogV2/model/model_rum_sort_order.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum RUMSortOrder { + #[serde(rename = "asc")] + ASCENDING, + #[serde(rename = "desc")] + DESCENDING, +} + +impl ToString for RUMSortOrder { + fn to_string(&self) -> String { + match self { + Self::ASCENDING => String::from("asc"), + Self::DESCENDING => String::from("desc"), + } + } +} diff --git a/src/datadogV2/model/model_rum_warning.rs b/src/datadogV2/model/model_rum_warning.rs new file mode 100644 index 000000000..50bd1b72e --- /dev/null +++ b/src/datadogV2/model/model_rum_warning.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A warning message indicating something that went wrong with the query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct RUMWarning { + /// A unique code for this type of warning. + #[serde(rename = "code")] + pub code: Option, + /// A detailed explanation of this specific warning. + #[serde(rename = "detail")] + pub detail: Option, + /// A short human-readable summary of the warning. + #[serde(rename = "title")] + pub title: Option, +} + +impl RUMWarning { + pub fn new() -> RUMWarning { + RUMWarning { + code: None, + detail: None, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_saml_assertion_attribute.rs b/src/datadogV2/model/model_saml_assertion_attribute.rs new file mode 100644 index 000000000..01c96c017 --- /dev/null +++ b/src/datadogV2/model/model_saml_assertion_attribute.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// SAML assertion attribute. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SAMLAssertionAttribute { + /// Key/Value pair of attributes used in SAML assertion attributes. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The ID of the SAML assertion attribute. + #[serde(rename = "id")] + pub id: String, + /// SAML assertion attributes resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::SAMLAssertionAttributesType, +} + +impl SAMLAssertionAttribute { + pub fn new( + id: String, + type_: crate::datadogV2::model::SAMLAssertionAttributesType, + ) -> SAMLAssertionAttribute { + SAMLAssertionAttribute { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs b/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs new file mode 100644 index 000000000..93573f926 --- /dev/null +++ b/src/datadogV2/model/model_saml_assertion_attribute_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Key/Value pair of attributes used in SAML assertion attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SAMLAssertionAttributeAttributes { + /// Key portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_key")] + pub attribute_key: Option, + /// Value portion of a key/value pair of the attribute sent from the Identity Provider. + #[serde(rename = "attribute_value")] + pub attribute_value: Option, +} + +impl SAMLAssertionAttributeAttributes { + pub fn new() -> SAMLAssertionAttributeAttributes { + SAMLAssertionAttributeAttributes { + attribute_key: None, + attribute_value: None, + } + } +} diff --git a/src/datadogV2/model/model_saml_assertion_attributes_type.rs b/src/datadogV2/model/model_saml_assertion_attributes_type.rs new file mode 100644 index 000000000..3d6c20ce3 --- /dev/null +++ b/src/datadogV2/model/model_saml_assertion_attributes_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SAMLAssertionAttributesType { + #[serde(rename = "saml_assertion_attributes")] + SAML_ASSERTION_ATTRIBUTES, +} + +impl ToString for SAMLAssertionAttributesType { + fn to_string(&self) -> String { + match self { + Self::SAML_ASSERTION_ATTRIBUTES => String::from("saml_assertion_attributes"), + } + } +} diff --git a/src/datadogV2/model/model_scalar_column.rs b/src/datadogV2/model/model_scalar_column.rs new file mode 100644 index 000000000..c841a07b6 --- /dev/null +++ b/src/datadogV2/model/model_scalar_column.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A single column in a scalar query response. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ScalarColumn { + GroupScalarColumn(Box), + DataScalarColumn(Box), +} diff --git a/src/datadogV2/model/model_scalar_column_type_group.rs b/src/datadogV2/model/model_scalar_column_type_group.rs new file mode 100644 index 000000000..3c5566b57 --- /dev/null +++ b/src/datadogV2/model/model_scalar_column_type_group.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScalarColumnTypeGroup { + #[serde(rename = "group")] + GROUP, +} + +impl ToString for ScalarColumnTypeGroup { + fn to_string(&self) -> String { + match self { + Self::GROUP => String::from("group"), + } + } +} diff --git a/src/datadogV2/model/model_scalar_column_type_number.rs b/src/datadogV2/model/model_scalar_column_type_number.rs new file mode 100644 index 000000000..b66c7e5d1 --- /dev/null +++ b/src/datadogV2/model/model_scalar_column_type_number.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScalarColumnTypeNumber { + #[serde(rename = "number")] + NUMBER, +} + +impl ToString for ScalarColumnTypeNumber { + fn to_string(&self) -> String { + match self { + Self::NUMBER => String::from("number"), + } + } +} diff --git a/src/datadogV2/model/model_scalar_formula_query_request.rs b/src/datadogV2/model/model_scalar_formula_query_request.rs new file mode 100644 index 000000000..98e30d432 --- /dev/null +++ b/src/datadogV2/model/model_scalar_formula_query_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A wrapper request around one scalar query to be executed. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScalarFormulaQueryRequest { + /// A single scalar query to be executed. + #[serde(rename = "data")] + pub data: Box, +} + +impl ScalarFormulaQueryRequest { + pub fn new( + data: Box, + ) -> ScalarFormulaQueryRequest { + ScalarFormulaQueryRequest { data } + } +} diff --git a/src/datadogV2/model/model_scalar_formula_query_response.rs b/src/datadogV2/model/model_scalar_formula_query_response.rs new file mode 100644 index 000000000..ceb1d20d0 --- /dev/null +++ b/src/datadogV2/model/model_scalar_formula_query_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A message containing one or more responses to scalar queries. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScalarFormulaQueryResponse { + /// A message containing the response to a scalar query. + #[serde(rename = "data")] + pub data: Option>, + /// An error generated when processing a request. + #[serde(rename = "errors")] + pub errors: Option, +} + +impl ScalarFormulaQueryResponse { + pub fn new() -> ScalarFormulaQueryResponse { + ScalarFormulaQueryResponse { + data: None, + errors: None, + } + } +} diff --git a/src/datadogV2/model/model_scalar_formula_request.rs b/src/datadogV2/model/model_scalar_formula_request.rs new file mode 100644 index 000000000..a85fc28b0 --- /dev/null +++ b/src/datadogV2/model/model_scalar_formula_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single scalar query to be executed. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScalarFormulaRequest { + /// The object describing a scalar formula request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The type of the resource. The value should always be scalar_request. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ScalarFormulaRequestType, +} + +impl ScalarFormulaRequest { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::ScalarFormulaRequestType, + ) -> ScalarFormulaRequest { + ScalarFormulaRequest { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_scalar_formula_request_attributes.rs b/src/datadogV2/model/model_scalar_formula_request_attributes.rs new file mode 100644 index 000000000..e6591334c --- /dev/null +++ b/src/datadogV2/model/model_scalar_formula_request_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object describing a scalar formula request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScalarFormulaRequestAttributes { + /// List of formulas to be calculated and returned as responses. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// Start date (inclusive) of the query in milliseconds since the Unix epoch. + #[serde(rename = "from")] + pub from: i64, + /// List of queries to be run and used as inputs to the formulas. + #[serde(rename = "queries")] + pub queries: Vec, + /// End date (exclusive) of the query in milliseconds since the Unix epoch. + #[serde(rename = "to")] + pub to: i64, +} + +impl ScalarFormulaRequestAttributes { + pub fn new( + from: i64, + queries: Vec, + to: i64, + ) -> ScalarFormulaRequestAttributes { + ScalarFormulaRequestAttributes { + formulas: None, + from, + queries, + to, + } + } +} diff --git a/src/datadogV2/model/model_scalar_formula_request_type.rs b/src/datadogV2/model/model_scalar_formula_request_type.rs new file mode 100644 index 000000000..3a53f3436 --- /dev/null +++ b/src/datadogV2/model/model_scalar_formula_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScalarFormulaRequestType { + #[serde(rename = "scalar_request")] + SCALAR_REQUEST, +} + +impl ToString for ScalarFormulaRequestType { + fn to_string(&self) -> String { + match self { + Self::SCALAR_REQUEST => String::from("scalar_request"), + } + } +} diff --git a/src/datadogV2/model/model_scalar_formula_response_atrributes.rs b/src/datadogV2/model/model_scalar_formula_response_atrributes.rs new file mode 100644 index 000000000..aada13ef3 --- /dev/null +++ b/src/datadogV2/model/model_scalar_formula_response_atrributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object describing a scalar response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScalarFormulaResponseAtrributes { + /// List of response columns, each corresponding to an individual formula or query in the request and with values in parallel arrays matching the series list. + #[serde(rename = "columns")] + pub columns: Option>, +} + +impl ScalarFormulaResponseAtrributes { + pub fn new() -> ScalarFormulaResponseAtrributes { + ScalarFormulaResponseAtrributes { columns: None } + } +} diff --git a/src/datadogV2/model/model_scalar_formula_response_type.rs b/src/datadogV2/model/model_scalar_formula_response_type.rs new file mode 100644 index 000000000..b9bfe7cbc --- /dev/null +++ b/src/datadogV2/model/model_scalar_formula_response_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScalarFormulaResponseType { + #[serde(rename = "scalar_response")] + SCALAR_RESPONSE, +} + +impl ToString for ScalarFormulaResponseType { + fn to_string(&self) -> String { + match self { + Self::SCALAR_RESPONSE => String::from("scalar_response"), + } + } +} diff --git a/src/datadogV2/model/model_scalar_meta.rs b/src/datadogV2/model/model_scalar_meta.rs new file mode 100644 index 000000000..b9b698518 --- /dev/null +++ b/src/datadogV2/model/model_scalar_meta.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Metadata for the resulting numerical values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScalarMeta { + /// Detailed information about the unit. + /// First element describes the "primary unit" (for example, `bytes` in `bytes per second`). + /// The second element describes the "per unit" (for example, `second` in `bytes per second`). + /// If the second element is not present, the API returns null. + #[serde(rename = "unit", default, with = "::serde_with::rust::double_option")] + pub unit: Option>>>, +} + +impl ScalarMeta { + pub fn new() -> ScalarMeta { + ScalarMeta { unit: None } + } +} diff --git a/src/datadogV2/model/model_scalar_query.rs b/src/datadogV2/model/model_scalar_query.rs new file mode 100644 index 000000000..d79190a48 --- /dev/null +++ b/src/datadogV2/model/model_scalar_query.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An individual scalar query to one of the basic Datadog data sources. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ScalarQuery { + MetricsScalarQuery(Box), + EventsScalarQuery(Box), +} diff --git a/src/datadogV2/model/model_scalar_response.rs b/src/datadogV2/model/model_scalar_response.rs new file mode 100644 index 000000000..9a54b2473 --- /dev/null +++ b/src/datadogV2/model/model_scalar_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A message containing the response to a scalar query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ScalarResponse { + /// The object describing a scalar response. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The type of the resource. The value should always be scalar_response. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ScalarResponse { + pub fn new() -> ScalarResponse { + ScalarResponse { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_scorecard_type.rs b/src/datadogV2/model/model_scorecard_type.rs new file mode 100644 index 000000000..35758a01e --- /dev/null +++ b/src/datadogV2/model/model_scorecard_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ScorecardType { + #[serde(rename = "scorecard")] + SCORECARD, +} + +impl ToString for ScorecardType { + fn to_string(&self) -> String { + match self { + Self::SCORECARD => String::from("scorecard"), + } + } +} diff --git a/src/datadogV2/model/model_security_filter.rs b/src/datadogV2/model/model_security_filter.rs new file mode 100644 index 000000000..8f2ea549a --- /dev/null +++ b/src/datadogV2/model/model_security_filter.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The security filter's properties. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilter { + /// The object describing a security filter. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The ID of the security filter. + #[serde(rename = "id")] + pub id: Option, + /// The type of the resource. The value should always be `security_filters`. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SecurityFilter { + pub fn new() -> SecurityFilter { + SecurityFilter { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_security_filter_attributes.rs b/src/datadogV2/model/model_security_filter_attributes.rs new file mode 100644 index 000000000..96702618f --- /dev/null +++ b/src/datadogV2/model/model_security_filter_attributes.rs @@ -0,0 +1,47 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object describing a security filter. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterAttributes { + /// The list of exclusion filters applied in this security filter. + #[serde(rename = "exclusion_filters")] + pub exclusion_filters: + Option>, + /// The filtered data type. + #[serde(rename = "filtered_data_type")] + pub filtered_data_type: Option, + /// Whether the security filter is the built-in filter. + #[serde(rename = "is_builtin")] + pub is_builtin: Option, + /// Whether the security filter is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// The security filter name. + #[serde(rename = "name")] + pub name: Option, + /// The security filter query. Logs accepted by this query will be accepted by this filter. + #[serde(rename = "query")] + pub query: Option, + /// The version of the security filter. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityFilterAttributes { + pub fn new() -> SecurityFilterAttributes { + SecurityFilterAttributes { + exclusion_filters: None, + filtered_data_type: None, + is_builtin: None, + is_enabled: None, + name: None, + query: None, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_filter_create_attributes.rs b/src/datadogV2/model/model_security_filter_create_attributes.rs new file mode 100644 index 000000000..ac43fbd4b --- /dev/null +++ b/src/datadogV2/model/model_security_filter_create_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the attributes of the security filter to be created. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterCreateAttributes { + /// Exclusion filters to exclude some logs from the security filter. + #[serde(rename = "exclusion_filters")] + pub exclusion_filters: Vec, + /// The filtered data type. + #[serde(rename = "filtered_data_type")] + pub filtered_data_type: crate::datadogV2::model::SecurityFilterFilteredDataType, + /// Whether the security filter is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: bool, + /// The name of the security filter. + #[serde(rename = "name")] + pub name: String, + /// The query of the security filter. + #[serde(rename = "query")] + pub query: String, +} + +impl SecurityFilterCreateAttributes { + pub fn new( + exclusion_filters: Vec, + filtered_data_type: crate::datadogV2::model::SecurityFilterFilteredDataType, + is_enabled: bool, + name: String, + query: String, + ) -> SecurityFilterCreateAttributes { + SecurityFilterCreateAttributes { + exclusion_filters, + filtered_data_type, + is_enabled, + name, + query, + } + } +} diff --git a/src/datadogV2/model/model_security_filter_create_data.rs b/src/datadogV2/model/model_security_filter_create_data.rs new file mode 100644 index 000000000..f03a05769 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_create_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object for a single security filter. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterCreateData { + /// Object containing the attributes of the security filter to be created. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The type of the resource. The value should always be `security_filters`. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::SecurityFilterType, +} + +impl SecurityFilterCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::SecurityFilterType, + ) -> SecurityFilterCreateData { + SecurityFilterCreateData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_security_filter_create_request.rs b/src/datadogV2/model/model_security_filter_create_request.rs new file mode 100644 index 000000000..a54cd056d --- /dev/null +++ b/src/datadogV2/model/model_security_filter_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request object that includes the security filter that you would like to create. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterCreateRequest { + /// Object for a single security filter. + #[serde(rename = "data")] + pub data: Box, +} + +impl SecurityFilterCreateRequest { + pub fn new( + data: Box, + ) -> SecurityFilterCreateRequest { + SecurityFilterCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_security_filter_exclusion_filter.rs b/src/datadogV2/model/model_security_filter_exclusion_filter.rs new file mode 100644 index 000000000..506423a40 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_exclusion_filter.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Exclusion filter for the security filter. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterExclusionFilter { + /// Exclusion filter name. + #[serde(rename = "name")] + pub name: String, + /// Exclusion filter query. Logs that match this query are excluded from the security filter. + #[serde(rename = "query")] + pub query: String, +} + +impl SecurityFilterExclusionFilter { + pub fn new(name: String, query: String) -> SecurityFilterExclusionFilter { + SecurityFilterExclusionFilter { name, query } + } +} diff --git a/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs b/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs new file mode 100644 index 000000000..442905197 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_exclusion_filter_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single exclusion filter. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterExclusionFilterResponse { + /// The exclusion filter name. + #[serde(rename = "name")] + pub name: Option, + /// The exclusion filter query. + #[serde(rename = "query")] + pub query: Option, +} + +impl SecurityFilterExclusionFilterResponse { + pub fn new() -> SecurityFilterExclusionFilterResponse { + SecurityFilterExclusionFilterResponse { + name: None, + query: None, + } + } +} diff --git a/src/datadogV2/model/model_security_filter_filtered_data_type.rs b/src/datadogV2/model/model_security_filter_filtered_data_type.rs new file mode 100644 index 000000000..6c2856757 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_filtered_data_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityFilterFilteredDataType { + #[serde(rename = "logs")] + LOGS, +} + +impl ToString for SecurityFilterFilteredDataType { + fn to_string(&self) -> String { + match self { + Self::LOGS => String::from("logs"), + } + } +} diff --git a/src/datadogV2/model/model_security_filter_meta.rs b/src/datadogV2/model/model_security_filter_meta.rs new file mode 100644 index 000000000..cadd57e73 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Optional metadata associated to the response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterMeta { + /// A warning message. + #[serde(rename = "warning")] + pub warning: Option, +} + +impl SecurityFilterMeta { + pub fn new() -> SecurityFilterMeta { + SecurityFilterMeta { warning: None } + } +} diff --git a/src/datadogV2/model/model_security_filter_response.rs b/src/datadogV2/model/model_security_filter_response.rs new file mode 100644 index 000000000..83a0486aa --- /dev/null +++ b/src/datadogV2/model/model_security_filter_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object which includes a single security filter. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterResponse { + /// The security filter's properties. + #[serde(rename = "data")] + pub data: Option>, + /// Optional metadata associated to the response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SecurityFilterResponse { + pub fn new() -> SecurityFilterResponse { + SecurityFilterResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_security_filter_type.rs b/src/datadogV2/model/model_security_filter_type.rs new file mode 100644 index 000000000..6f60abe86 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityFilterType { + #[serde(rename = "security_filters")] + SECURITY_FILTERS, +} + +impl ToString for SecurityFilterType { + fn to_string(&self) -> String { + match self { + Self::SECURITY_FILTERS => String::from("security_filters"), + } + } +} diff --git a/src/datadogV2/model/model_security_filter_update_attributes.rs b/src/datadogV2/model/model_security_filter_update_attributes.rs new file mode 100644 index 000000000..b55bb0d42 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_update_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The security filters properties to be updated. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterUpdateAttributes { + /// Exclusion filters to exclude some logs from the security filter. + #[serde(rename = "exclusion_filters")] + pub exclusion_filters: Option>, + /// The filtered data type. + #[serde(rename = "filtered_data_type")] + pub filtered_data_type: Option, + /// Whether the security filter is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// The name of the security filter. + #[serde(rename = "name")] + pub name: Option, + /// The query of the security filter. + #[serde(rename = "query")] + pub query: Option, + /// The version of the security filter to update. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityFilterUpdateAttributes { + pub fn new() -> SecurityFilterUpdateAttributes { + SecurityFilterUpdateAttributes { + exclusion_filters: None, + filtered_data_type: None, + is_enabled: None, + name: None, + query: None, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_filter_update_data.rs b/src/datadogV2/model/model_security_filter_update_data.rs new file mode 100644 index 000000000..760c5ed34 --- /dev/null +++ b/src/datadogV2/model/model_security_filter_update_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The new security filter properties. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterUpdateData { + /// The security filters properties to be updated. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The type of the resource. The value should always be `security_filters`. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::SecurityFilterType, +} + +impl SecurityFilterUpdateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::SecurityFilterType, + ) -> SecurityFilterUpdateData { + SecurityFilterUpdateData { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_security_filter_update_request.rs b/src/datadogV2/model/model_security_filter_update_request.rs new file mode 100644 index 000000000..a2f2ba2ab --- /dev/null +++ b/src/datadogV2/model/model_security_filter_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The new security filter body. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFilterUpdateRequest { + /// The new security filter properties. + #[serde(rename = "data")] + pub data: Box, +} + +impl SecurityFilterUpdateRequest { + pub fn new( + data: Box, + ) -> SecurityFilterUpdateRequest { + SecurityFilterUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_security_filters_response.rs b/src/datadogV2/model/model_security_filters_response.rs new file mode 100644 index 000000000..2e3dbe775 --- /dev/null +++ b/src/datadogV2/model/model_security_filters_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// All the available security filters objects. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityFiltersResponse { + /// A list of security filters objects. + #[serde(rename = "data")] + pub data: Option>, + /// Optional metadata associated to the response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SecurityFiltersResponse { + pub fn new() -> SecurityFiltersResponse { + SecurityFiltersResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_filter.rs b/src/datadogV2/model/model_security_monitoring_filter.rs new file mode 100644 index 000000000..b5ff87c88 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_filter.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The rule's suppression filter. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringFilter { + /// The type of filtering action. + #[serde(rename = "action")] + pub action: Option, + /// Query for selecting logs to apply the filtering action. + #[serde(rename = "query")] + pub query: Option, +} + +impl SecurityMonitoringFilter { + pub fn new() -> SecurityMonitoringFilter { + SecurityMonitoringFilter { + action: None, + query: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_filter_action.rs b/src/datadogV2/model/model_security_monitoring_filter_action.rs new file mode 100644 index 000000000..e9477810b --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_filter_action.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringFilterAction { + #[serde(rename = "require")] + REQUIRE, + #[serde(rename = "suppress")] + SUPPRESS, +} + +impl ToString for SecurityMonitoringFilterAction { + fn to_string(&self) -> String { + match self { + Self::REQUIRE => String::from("require"), + Self::SUPPRESS => String::from("suppress"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_list_rules_response.rs b/src/datadogV2/model/model_security_monitoring_list_rules_response.rs new file mode 100644 index 000000000..0ed95ea58 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_list_rules_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of rules. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringListRulesResponse { + /// Array containing the list of rules. + #[serde(rename = "data")] + pub data: Option>, + /// Object describing meta attributes of response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SecurityMonitoringListRulesResponse { + pub fn new() -> SecurityMonitoringListRulesResponse { + SecurityMonitoringListRulesResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_case.rs b/src/datadogV2/model/model_security_monitoring_rule_case.rs new file mode 100644 index 000000000..39e1407f7 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_case.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Case when signal is generated. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringRuleCase { + /// A rule case contains logical operations (`>`,`>=`, `&&`, `||`) to determine if a signal should be generated + /// based on the event counts in the previously defined queries. + #[serde(rename = "condition")] + pub condition: Option, + /// Name of the case. + #[serde(rename = "name")] + pub name: Option, + /// Notification targets for each rule case. + #[serde(rename = "notifications")] + pub notifications: Option>, + /// Severity of the Security Signal. + #[serde(rename = "status")] + pub status: Option, +} + +impl SecurityMonitoringRuleCase { + pub fn new() -> SecurityMonitoringRuleCase { + SecurityMonitoringRuleCase { + condition: None, + name: None, + notifications: None, + status: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_case_create.rs b/src/datadogV2/model/model_security_monitoring_rule_case_create.rs new file mode 100644 index 000000000..e1e88f038 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_case_create.rs @@ -0,0 +1,37 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Case when signal is generated. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringRuleCaseCreate { + /// A rule case contains logical operations (`>`,`>=`, `&&`, `||`) to determine if a signal should be generated + /// based on the event counts in the previously defined queries. + #[serde(rename = "condition")] + pub condition: Option, + /// Name of the case. + #[serde(rename = "name")] + pub name: Option, + /// Notification targets for each rule case. + #[serde(rename = "notifications")] + pub notifications: Option>, + /// Severity of the Security Signal. + #[serde(rename = "status")] + pub status: crate::datadogV2::model::SecurityMonitoringRuleSeverity, +} + +impl SecurityMonitoringRuleCaseCreate { + pub fn new( + status: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> SecurityMonitoringRuleCaseCreate { + SecurityMonitoringRuleCaseCreate { + condition: None, + name: None, + notifications: None, + status, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs new file mode 100644 index 000000000..47d9a883a --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_create_payload.rs @@ -0,0 +1,19 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Create a new rule. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SecurityMonitoringRuleCreatePayload { + SecurityMonitoringStandardRuleCreatePayload( + Box, + ), + SecurityMonitoringSignalRuleCreatePayload( + Box, + ), + CloudConfigurationRuleCreatePayload( + Box, + ), +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_detection_method.rs b/src/datadogV2/model/model_security_monitoring_rule_detection_method.rs new file mode 100644 index 000000000..a5889df99 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_detection_method.rs @@ -0,0 +1,34 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringRuleDetectionMethod { + #[serde(rename = "threshold")] + THRESHOLD, + #[serde(rename = "new_value")] + NEW_VALUE, + #[serde(rename = "anomaly_detection")] + ANOMALY_DETECTION, + #[serde(rename = "impossible_travel")] + IMPOSSIBLE_TRAVEL, + #[serde(rename = "hardcoded")] + HARDCODED, + #[serde(rename = "third_party")] + THIRD_PARTY, +} + +impl ToString for SecurityMonitoringRuleDetectionMethod { + fn to_string(&self) -> String { + match self { + Self::THRESHOLD => String::from("threshold"), + Self::NEW_VALUE => String::from("new_value"), + Self::ANOMALY_DETECTION => String::from("anomaly_detection"), + Self::IMPOSSIBLE_TRAVEL => String::from("impossible_travel"), + Self::HARDCODED => String::from("hardcoded"), + Self::THIRD_PARTY => String::from("third_party"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_evaluation_window.rs b/src/datadogV2/model/model_security_monitoring_rule_evaluation_window.rs new file mode 100644 index 000000000..0c6adc939 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_evaluation_window.rs @@ -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. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i32)] +pub enum SecurityMonitoringRuleEvaluationWindow { + ZERO_MINUTES = 0, + ONE_MINUTE = 60, + FIVE_MINUTES = 300, + TEN_MINUTES = 600, + FIFTEEN_MINUTES = 900, + THIRTY_MINUTES = 1800, + ONE_HOUR = 3600, + TWO_HOURS = 7200, +} + +impl ToString for SecurityMonitoringRuleEvaluationWindow { + fn to_string(&self) -> String { + match self { + Self::ZERO_MINUTES => String::from("0"), + Self::ONE_MINUTE => String::from("60"), + Self::FIVE_MINUTES => String::from("300"), + Self::TEN_MINUTES => String::from("600"), + Self::FIFTEEN_MINUTES => String::from("900"), + Self::THIRTY_MINUTES => String::from("1800"), + Self::ONE_HOUR => String::from("3600"), + Self::TWO_HOURS => String::from("7200"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_hardcoded_evaluator_type.rs b/src/datadogV2/model/model_security_monitoring_rule_hardcoded_evaluator_type.rs new file mode 100644 index 000000000..98af49a6e --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_hardcoded_evaluator_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringRuleHardcodedEvaluatorType { + #[serde(rename = "log4shell")] + LOG4SHELL, +} + +impl ToString for SecurityMonitoringRuleHardcodedEvaluatorType { + fn to_string(&self) -> String { + match self { + Self::LOG4SHELL => String::from("log4shell"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs b/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs new file mode 100644 index 000000000..286ab218c --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_impossible_travel_options.rs @@ -0,0 +1,23 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options on impossible travel rules. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringRuleImpossibleTravelOptions { + /// If true, signals are suppressed for the first 24 hours. In that time, Datadog learns the user's regular + /// access locations. This can be helpful to reduce noise and infer VPN usage or credentialed API access. + #[serde(rename = "baselineUserLocations")] + pub baseline_user_locations: Option, +} + +impl SecurityMonitoringRuleImpossibleTravelOptions { + pub fn new() -> SecurityMonitoringRuleImpossibleTravelOptions { + SecurityMonitoringRuleImpossibleTravelOptions { + baseline_user_locations: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_keep_alive.rs b/src/datadogV2/model/model_security_monitoring_rule_keep_alive.rs new file mode 100644 index 000000000..8781611c9 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_keep_alive.rs @@ -0,0 +1,39 @@ +// 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. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i32)] +pub enum SecurityMonitoringRuleKeepAlive { + ZERO_MINUTES = 0, + ONE_MINUTE = 60, + FIVE_MINUTES = 300, + TEN_MINUTES = 600, + FIFTEEN_MINUTES = 900, + THIRTY_MINUTES = 1800, + ONE_HOUR = 3600, + TWO_HOURS = 7200, + THREE_HOURS = 10800, + SIX_HOURS = 21600, +} + +impl ToString for SecurityMonitoringRuleKeepAlive { + fn to_string(&self) -> String { + match self { + Self::ZERO_MINUTES => String::from("0"), + Self::ONE_MINUTE => String::from("60"), + Self::FIVE_MINUTES => String::from("300"), + Self::TEN_MINUTES => String::from("600"), + Self::FIFTEEN_MINUTES => String::from("900"), + Self::THIRTY_MINUTES => String::from("1800"), + Self::ONE_HOUR => String::from("3600"), + Self::TWO_HOURS => String::from("7200"), + Self::THREE_HOURS => String::from("10800"), + Self::SIX_HOURS => String::from("21600"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_max_signal_duration.rs b/src/datadogV2/model/model_security_monitoring_rule_max_signal_duration.rs new file mode 100644 index 000000000..2a7cc8dc2 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_max_signal_duration.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i32)] +pub enum SecurityMonitoringRuleMaxSignalDuration { + ZERO_MINUTES = 0, + ONE_MINUTE = 60, + FIVE_MINUTES = 300, + TEN_MINUTES = 600, + FIFTEEN_MINUTES = 900, + THIRTY_MINUTES = 1800, + ONE_HOUR = 3600, + TWO_HOURS = 7200, + THREE_HOURS = 10800, + SIX_HOURS = 21600, + TWELVE_HOURS = 43200, + ONE_DAY = 86400, +} + +impl ToString for SecurityMonitoringRuleMaxSignalDuration { + fn to_string(&self) -> String { + match self { + Self::ZERO_MINUTES => String::from("0"), + Self::ONE_MINUTE => String::from("60"), + Self::FIVE_MINUTES => String::from("300"), + Self::TEN_MINUTES => String::from("600"), + Self::FIFTEEN_MINUTES => String::from("900"), + Self::THIRTY_MINUTES => String::from("1800"), + Self::ONE_HOUR => String::from("3600"), + Self::TWO_HOURS => String::from("7200"), + Self::THREE_HOURS => String::from("10800"), + Self::SIX_HOURS => String::from("21600"), + Self::TWELVE_HOURS => String::from("43200"), + Self::ONE_DAY => String::from("86400"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs b/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs new file mode 100644 index 000000000..b98f25852 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_new_value_options.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options on new value rules. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringRuleNewValueOptions { + /// The duration in days after which a learned value is forgotten. + #[serde(rename = "forgetAfter")] + pub forget_after: + Option, + /// The duration in days during which values are learned, and after which signals will be generated for values that + /// weren't learned. If set to 0, a signal will be generated for all new values after the first value is learned. + #[serde(rename = "learningDuration")] + pub learning_duration: + Option, + /// The learning method used to determine when signals should be generated for values that weren't learned. + #[serde(rename = "learningMethod")] + pub learning_method: + Option, + /// A number of occurrences after which signals will be generated for values that weren't learned. + #[serde(rename = "learningThreshold")] + pub learning_threshold: + Option, +} + +impl SecurityMonitoringRuleNewValueOptions { + pub fn new() -> SecurityMonitoringRuleNewValueOptions { + SecurityMonitoringRuleNewValueOptions { + forget_after: None, + learning_duration: None, + learning_method: None, + learning_threshold: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_new_value_options_forget_after.rs b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_forget_after.rs new file mode 100644 index 000000000..831ecc59b --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_forget_after.rs @@ -0,0 +1,31 @@ +// 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. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i32)] +pub enum SecurityMonitoringRuleNewValueOptionsForgetAfter { + ONE_DAY = 1, + TWO_DAYS = 2, + ONE_WEEK = 7, + TWO_WEEKS = 14, + THREE_WEEKS = 21, + FOUR_WEEKS = 28, +} + +impl ToString for SecurityMonitoringRuleNewValueOptionsForgetAfter { + fn to_string(&self) -> String { + match self { + Self::ONE_DAY => String::from("1"), + Self::TWO_DAYS => String::from("2"), + Self::ONE_WEEK => String::from("7"), + Self::TWO_WEEKS => String::from("14"), + Self::THREE_WEEKS => String::from("21"), + Self::FOUR_WEEKS => String::from("28"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_duration.rs b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_duration.rs new file mode 100644 index 000000000..18c6ee5d1 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_duration.rs @@ -0,0 +1,25 @@ +// 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. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i32)] +pub enum SecurityMonitoringRuleNewValueOptionsLearningDuration { + ZERO_DAYS = 0, + ONE_DAY = 1, + SEVEN_DAYS = 7, +} + +impl ToString for SecurityMonitoringRuleNewValueOptionsLearningDuration { + fn to_string(&self) -> String { + match self { + Self::ZERO_DAYS => String::from("0"), + Self::ONE_DAY => String::from("1"), + Self::SEVEN_DAYS => String::from("7"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_method.rs b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_method.rs new file mode 100644 index 000000000..b6c035f31 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_method.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringRuleNewValueOptionsLearningMethod { + #[serde(rename = "duration")] + DURATION, + #[serde(rename = "threshold")] + THRESHOLD, +} + +impl ToString for SecurityMonitoringRuleNewValueOptionsLearningMethod { + fn to_string(&self) -> String { + match self { + Self::DURATION => String::from("duration"), + Self::THRESHOLD => String::from("threshold"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_threshold.rs b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_threshold.rs new file mode 100644 index 000000000..e8259e5bd --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_new_value_options_learning_threshold.rs @@ -0,0 +1,23 @@ +// 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. + +use serde_repr::{Deserialize_repr, Serialize_repr}; + +#[derive( + Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, +)] +#[repr(i32)] +pub enum SecurityMonitoringRuleNewValueOptionsLearningThreshold { + ZERO_OCCURRENCES = 0, + ONE_OCCURRENCE = 1, +} + +impl ToString for SecurityMonitoringRuleNewValueOptionsLearningThreshold { + fn to_string(&self) -> String { + match self { + Self::ZERO_OCCURRENCES => String::from("0"), + Self::ONE_OCCURRENCE => String::from("1"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_options.rs b/src/datadogV2/model/model_security_monitoring_rule_options.rs new file mode 100644 index 000000000..812ef6f2b --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_options.rs @@ -0,0 +1,71 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options on rules. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringRuleOptions { + /// Options for cloud_configuration rules. + /// Fields `resourceType` and `regoRule` are mandatory when managing custom `cloud_configuration` rules. + /// + #[serde(rename = "complianceRuleOptions")] + pub compliance_rule_options: + Option>, + /// If true, signals in non-production environments have a lower severity than what is defined by the rule case, which can reduce signal noise. + /// The severity is decreased by one level: `CRITICAL` in production becomes `HIGH` in non-production, `HIGH` becomes `MEDIUM` and so on. `INFO` remains `INFO`. + /// The decrement is applied when the environment tag of the signal starts with `staging`, `test` or `dev`. + #[serde(rename = "decreaseCriticalityBasedOnEnv")] + pub decrease_criticality_based_on_env: Option, + /// The detection method. + #[serde(rename = "detectionMethod")] + pub detection_method: Option, + /// A time window is specified to match when at least one of the cases matches true. This is a sliding window + /// and evaluates in real time. + #[serde(rename = "evaluationWindow")] + pub evaluation_window: Option, + /// Hardcoded evaluator type. + #[serde(rename = "hardcodedEvaluatorType")] + pub hardcoded_evaluator_type: + Option, + /// Options on impossible travel rules. + #[serde(rename = "impossibleTravelOptions")] + pub impossible_travel_options: + Option>, + /// Once a signal is generated, the signal will remain “open” if a case is matched at least once within + /// this keep alive window. + #[serde(rename = "keepAlive")] + pub keep_alive: Option, + /// A signal will “close” regardless of the query being matched once the time exceeds the maximum duration. + /// This time is calculated from the first seen timestamp. + #[serde(rename = "maxSignalDuration")] + pub max_signal_duration: + Option, + /// Options on new value rules. + #[serde(rename = "newValueOptions")] + pub new_value_options: + Option>, + /// Options on third party rules. + #[serde(rename = "thirdPartyRuleOptions")] + pub third_party_rule_options: + Option>, +} + +impl SecurityMonitoringRuleOptions { + pub fn new() -> SecurityMonitoringRuleOptions { + SecurityMonitoringRuleOptions { + compliance_rule_options: None, + decrease_criticality_based_on_env: None, + detection_method: None, + evaluation_window: None, + hardcoded_evaluator_type: None, + impossible_travel_options: None, + keep_alive: None, + max_signal_duration: None, + new_value_options: None, + third_party_rule_options: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_query.rs b/src/datadogV2/model/model_security_monitoring_rule_query.rs new file mode 100644 index 000000000..7de2724ea --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_query.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Query for matching rule. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SecurityMonitoringRuleQuery { + SecurityMonitoringStandardRuleQuery( + Box, + ), + SecurityMonitoringSignalRuleQuery( + Box, + ), +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_query_aggregation.rs b/src/datadogV2/model/model_security_monitoring_rule_query_aggregation.rs new file mode 100644 index 000000000..3e401fc84 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_query_aggregation.rs @@ -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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringRuleQueryAggregation { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "max")] + MAX, + #[serde(rename = "new_value")] + NEW_VALUE, + #[serde(rename = "geo_data")] + GEO_DATA, + #[serde(rename = "event_count")] + EVENT_COUNT, + #[serde(rename = "none")] + NONE, +} + +impl ToString for SecurityMonitoringRuleQueryAggregation { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::SUM => String::from("sum"), + Self::MAX => String::from("max"), + Self::NEW_VALUE => String::from("new_value"), + Self::GEO_DATA => String::from("geo_data"), + Self::EVENT_COUNT => String::from("event_count"), + Self::NONE => String::from("none"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_response.rs b/src/datadogV2/model/model_security_monitoring_rule_response.rs new file mode 100644 index 000000000..1064bb086 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_response.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Create a new rule. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SecurityMonitoringRuleResponse { + SecurityMonitoringStandardRuleResponse( + Box, + ), + SecurityMonitoringSignalRuleResponse( + Box, + ), +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_severity.rs b/src/datadogV2/model/model_security_monitoring_rule_severity.rs new file mode 100644 index 000000000..586cc170a --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_severity.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringRuleSeverity { + #[serde(rename = "info")] + INFO, + #[serde(rename = "low")] + LOW, + #[serde(rename = "medium")] + MEDIUM, + #[serde(rename = "high")] + HIGH, + #[serde(rename = "critical")] + CRITICAL, +} + +impl ToString for SecurityMonitoringRuleSeverity { + fn to_string(&self) -> String { + match self { + Self::INFO => String::from("info"), + Self::LOW => String::from("low"), + Self::MEDIUM => String::from("medium"), + Self::HIGH => String::from("high"), + Self::CRITICAL => String::from("critical"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs b/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs new file mode 100644 index 000000000..e2c926903 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_third_party_options.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Options on third party rules. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringRuleThirdPartyOptions { + /// Notification targets for the logs that do not correspond to any of the cases. + #[serde(rename = "defaultNotifications")] + pub default_notifications: Option>, + /// Severity of the Security Signal. + #[serde(rename = "defaultStatus")] + pub default_status: Option, + /// Queries to be combined with third party case queries. Each of them can have different group by fields, to aggregate differently based on the type of alert. + #[serde(rename = "rootQueries")] + pub root_queries: Option>, + /// A template for the signal title; if omitted, the title is generated based on the case name. + #[serde(rename = "signalTitleTemplate")] + pub signal_title_template: Option, +} + +impl SecurityMonitoringRuleThirdPartyOptions { + pub fn new() -> SecurityMonitoringRuleThirdPartyOptions { + SecurityMonitoringRuleThirdPartyOptions { + default_notifications: None, + default_status: None, + root_queries: None, + signal_title_template: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_type_create.rs b/src/datadogV2/model/model_security_monitoring_rule_type_create.rs new file mode 100644 index 000000000..043239ec2 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_type_create.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringRuleTypeCreate { + #[serde(rename = "application_security")] + APPLICATION_SECURITY, + #[serde(rename = "log_detection")] + LOG_DETECTION, + #[serde(rename = "workload_security")] + WORKLOAD_SECURITY, +} + +impl ToString for SecurityMonitoringRuleTypeCreate { + fn to_string(&self) -> String { + match self { + Self::APPLICATION_SECURITY => String::from("application_security"), + Self::LOG_DETECTION => String::from("log_detection"), + Self::WORKLOAD_SECURITY => String::from("workload_security"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_type_read.rs b/src/datadogV2/model/model_security_monitoring_rule_type_read.rs new file mode 100644 index 000000000..43c5b936b --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_type_read.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringRuleTypeRead { + #[serde(rename = "log_detection")] + LOG_DETECTION, + #[serde(rename = "infrastructure_configuration")] + INFRASTRUCTURE_CONFIGURATION, + #[serde(rename = "workload_security")] + WORKLOAD_SECURITY, + #[serde(rename = "cloud_configuration")] + CLOUD_CONFIGURATION, + #[serde(rename = "application_security")] + APPLICATION_SECURITY, +} + +impl ToString for SecurityMonitoringRuleTypeRead { + fn to_string(&self) -> String { + match self { + Self::LOG_DETECTION => String::from("log_detection"), + Self::INFRASTRUCTURE_CONFIGURATION => String::from("infrastructure_configuration"), + Self::WORKLOAD_SECURITY => String::from("workload_security"), + Self::CLOUD_CONFIGURATION => String::from("cloud_configuration"), + Self::APPLICATION_SECURITY => String::from("application_security"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs b/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs new file mode 100644 index 000000000..014221836 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_rule_update_payload.rs @@ -0,0 +1,68 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update an existing rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringRuleUpdatePayload { + /// Cases for generating signals. + #[serde(rename = "cases")] + pub cases: Option>, + /// How to generate compliance signals. Useful for cloud_configuration rules only. + #[serde(rename = "complianceSignalOptions")] + pub compliance_signal_options: + Option>, + /// Additional queries to filter matched events before they are processed. + #[serde(rename = "filters")] + pub filters: Option>, + /// Whether the notifications include the triggering group-by values in their title. + #[serde(rename = "hasExtendedTitle")] + pub has_extended_title: Option, + /// Whether the rule is enabled. + #[serde(rename = "isEnabled")] + pub is_enabled: Option, + /// Message for generated signals. + #[serde(rename = "message")] + pub message: Option, + /// Name of the rule. + #[serde(rename = "name")] + pub name: Option, + /// Options on rules. + #[serde(rename = "options")] + pub options: Option>, + /// Queries for selecting logs which are part of the rule. + #[serde(rename = "queries")] + pub queries: Option>, + /// Tags for generated signals. + #[serde(rename = "tags")] + pub tags: Option>, + /// Cases for generating signals from third party rules. Only available for third party rules. + #[serde(rename = "thirdPartyCases")] + pub third_party_cases: + Option>, + /// The version of the rule being updated. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityMonitoringRuleUpdatePayload { + pub fn new() -> SecurityMonitoringRuleUpdatePayload { + SecurityMonitoringRuleUpdatePayload { + cases: None, + compliance_signal_options: None, + filters: None, + has_extended_title: None, + is_enabled: None, + message: None, + name: None, + options: None, + queries: None, + tags: None, + third_party_cases: None, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal.rs b/src/datadogV2/model/model_security_monitoring_signal.rs new file mode 100644 index 000000000..e40a92372 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal.rs @@ -0,0 +1,31 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object description of a security signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignal { + /// The object containing all signal attributes and their + /// associated values. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique ID of the security signal. + #[serde(rename = "id")] + pub id: Option, + /// The type of event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SecurityMonitoringSignal { + pub fn new() -> SecurityMonitoringSignal { + SecurityMonitoringSignal { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_archive_reason.rs b/src/datadogV2/model/model_security_monitoring_signal_archive_reason.rs new file mode 100644 index 000000000..04ac19405 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_archive_reason.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringSignalArchiveReason { + #[serde(rename = "none")] + NONE, + #[serde(rename = "false_positive")] + FALSE_POSITIVE, + #[serde(rename = "testing_or_maintenance")] + TESTING_OR_MAINTENANCE, + #[serde(rename = "investigated_case_opened")] + INVESTIGATED_CASE_OPENED, + #[serde(rename = "other")] + OTHER, +} + +impl ToString for SecurityMonitoringSignalArchiveReason { + fn to_string(&self) -> String { + match self { + Self::NONE => String::from("none"), + Self::FALSE_POSITIVE => String::from("false_positive"), + Self::TESTING_OR_MAINTENANCE => String::from("testing_or_maintenance"), + Self::INVESTIGATED_CASE_OPENED => String::from("investigated_case_opened"), + Self::OTHER => String::from("other"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs new file mode 100644 index 000000000..5f2c5f897 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_attributes.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes describing the new assignee of a security signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalAssigneeUpdateAttributes { + /// Object representing a given user entity. + #[serde(rename = "assignee")] + pub assignee: Box, + /// Version of the updated signal. If server side version is higher, update will be rejected. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityMonitoringSignalAssigneeUpdateAttributes { + pub fn new( + assignee: Box, + ) -> SecurityMonitoringSignalAssigneeUpdateAttributes { + SecurityMonitoringSignalAssigneeUpdateAttributes { + assignee, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_data.rs new file mode 100644 index 000000000..f5f6684e8 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_data.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data containing the patch for changing the assignee of a signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalAssigneeUpdateData { + /// Attributes describing the new assignee of a security signal. + #[serde(rename = "attributes")] + pub attributes: Box, +} + +impl SecurityMonitoringSignalAssigneeUpdateData { + pub fn new( + attributes: Box, + ) -> SecurityMonitoringSignalAssigneeUpdateData { + SecurityMonitoringSignalAssigneeUpdateData { attributes } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_assignee_update_request.rs b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_request.rs new file mode 100644 index 000000000..7dff2da20 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_assignee_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request body for changing the assignee of a given security monitoring signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalAssigneeUpdateRequest { + /// Data containing the patch for changing the assignee of a signal. + #[serde(rename = "data")] + pub data: Box, +} + +impl SecurityMonitoringSignalAssigneeUpdateRequest { + pub fn new( + data: Box, + ) -> SecurityMonitoringSignalAssigneeUpdateRequest { + SecurityMonitoringSignalAssigneeUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_attributes.rs new file mode 100644 index 000000000..1b707291a --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object containing all signal attributes and their +/// associated values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalAttributes { + /// A JSON object of attributes in the security signal. + #[serde(rename = "custom")] + pub custom: Option>, + /// The message in the security signal defined by the rule that generated the signal. + #[serde(rename = "message")] + pub message: Option, + /// An array of tags associated with the security signal. + #[serde(rename = "tags")] + pub tags: Option>, + /// The timestamp of the security signal. + #[serde(rename = "timestamp")] + pub timestamp: Option, + #[serde(flatten)] + pub additional_properties: std::collections::HashMap, +} + +impl SecurityMonitoringSignalAttributes { + pub fn new() -> SecurityMonitoringSignalAttributes { + SecurityMonitoringSignalAttributes { + custom: None, + message: None, + tags: None, + timestamp: None, + additional_properties: std::collections::HashMap::new(), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs new file mode 100644 index 000000000..50d077f70 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes describing the new list of related signals for a security signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalIncidentsUpdateAttributes { + /// Array of incidents that are associated with this signal. + #[serde(rename = "incident_ids")] + pub incident_ids: Vec, + /// Version of the updated signal. If server side version is higher, update will be rejected. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityMonitoringSignalIncidentsUpdateAttributes { + pub fn new(incident_ids: Vec) -> SecurityMonitoringSignalIncidentsUpdateAttributes { + SecurityMonitoringSignalIncidentsUpdateAttributes { + incident_ids, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_data.rs new file mode 100644 index 000000000..929c25161 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_data.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data containing the patch for changing the related incidents of a signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalIncidentsUpdateData { + /// Attributes describing the new list of related signals for a security signal. + #[serde(rename = "attributes")] + pub attributes: Box, +} + +impl SecurityMonitoringSignalIncidentsUpdateData { + pub fn new( + attributes: Box, + ) -> SecurityMonitoringSignalIncidentsUpdateData { + SecurityMonitoringSignalIncidentsUpdateData { attributes } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_incidents_update_request.rs b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_request.rs new file mode 100644 index 000000000..61d6ebe32 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_incidents_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request body for changing the related incidents of a given security monitoring signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalIncidentsUpdateRequest { + /// Data containing the patch for changing the related incidents of a signal. + #[serde(rename = "data")] + pub data: Box, +} + +impl SecurityMonitoringSignalIncidentsUpdateRequest { + pub fn new( + data: Box, + ) -> SecurityMonitoringSignalIncidentsUpdateRequest { + SecurityMonitoringSignalIncidentsUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request.rs new file mode 100644 index 000000000..8ac71fa24 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The request for a security signal list. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalListRequest { + /// Search filters for listing security signals. + #[serde(rename = "filter")] + pub filter: Option>, + /// The paging attributes for listing security signals. + #[serde(rename = "page")] + pub page: Option>, + /// The sort parameters used for querying security signals. + #[serde(rename = "sort")] + pub sort: Option, +} + +impl SecurityMonitoringSignalListRequest { + pub fn new() -> SecurityMonitoringSignalListRequest { + SecurityMonitoringSignalListRequest { + filter: None, + page: None, + sort: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs new file mode 100644 index 000000000..8aabd32f6 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request_filter.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Search filters for listing security signals. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalListRequestFilter { + /// The minimum timestamp for requested security signals. + #[serde(rename = "from")] + pub from: Option, + /// Search query for listing security signals. + #[serde(rename = "query")] + pub query: Option, + /// The maximum timestamp for requested security signals. + #[serde(rename = "to")] + pub to: Option, +} + +impl SecurityMonitoringSignalListRequestFilter { + pub fn new() -> SecurityMonitoringSignalListRequestFilter { + SecurityMonitoringSignalListRequestFilter { + from: None, + query: None, + to: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs b/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs new file mode 100644 index 000000000..8dbaefe21 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_list_request_page.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The paging attributes for listing security signals. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalListRequestPage { + /// A list of results using the cursor provided in the previous query. + #[serde(rename = "cursor")] + pub cursor: Option, + /// The maximum number of security signals in the response. + #[serde(rename = "limit")] + pub limit: Option, +} + +impl SecurityMonitoringSignalListRequestPage { + pub fn new() -> SecurityMonitoringSignalListRequestPage { + SecurityMonitoringSignalListRequestPage { + cursor: None, + limit: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_metadata_type.rs b/src/datadogV2/model/model_security_monitoring_signal_metadata_type.rs new file mode 100644 index 000000000..4407426aa --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_metadata_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringSignalMetadataType { + #[serde(rename = "signal_metadata")] + SIGNAL_METADATA, +} + +impl ToString for SecurityMonitoringSignalMetadataType { + fn to_string(&self) -> String { + match self { + Self::SIGNAL_METADATA => String::from("signal_metadata"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_response.rs b/src/datadogV2/model/model_security_monitoring_signal_response.rs new file mode 100644 index 000000000..05cc9fa87 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Security Signal response data object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalResponse { + /// Object description of a security signal. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SecurityMonitoringSignalResponse { + pub fn new() -> SecurityMonitoringSignalResponse { + SecurityMonitoringSignalResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs new file mode 100644 index 000000000..9925f1cf5 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_create_payload.rs @@ -0,0 +1,65 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create a new signal correlation rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalRuleCreatePayload { + /// Cases for generating signals. + #[serde(rename = "cases")] + pub cases: Vec, + /// Additional queries to filter matched events before they are processed. + #[serde(rename = "filters")] + pub filters: Option>, + /// Whether the notifications include the triggering group-by values in their title. + #[serde(rename = "hasExtendedTitle")] + pub has_extended_title: Option, + /// Whether the rule is enabled. + #[serde(rename = "isEnabled")] + pub is_enabled: bool, + /// Message for generated signals. + #[serde(rename = "message")] + pub message: String, + /// The name of the rule. + #[serde(rename = "name")] + pub name: String, + /// Options on rules. + #[serde(rename = "options")] + pub options: Box, + /// Queries for selecting signals which are part of the rule. + #[serde(rename = "queries")] + pub queries: Vec, + /// Tags for generated signals. + #[serde(rename = "tags")] + pub tags: Option>, + /// The rule type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SecurityMonitoringSignalRuleCreatePayload { + pub fn new( + cases: Vec, + is_enabled: bool, + message: String, + name: String, + options: Box, + queries: Vec, + ) -> SecurityMonitoringSignalRuleCreatePayload { + SecurityMonitoringSignalRuleCreatePayload { + cases, + filters: None, + has_extended_title: None, + is_enabled, + message, + name, + options, + queries, + tags: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs new file mode 100644 index 000000000..7d80ed772 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_query.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Query for matching rule on signals. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalRuleQuery { + /// The aggregation type. + #[serde(rename = "aggregation")] + pub aggregation: Option, + /// Fields to group by. + #[serde(rename = "correlatedByFields")] + pub correlated_by_fields: Option>, + /// Index of the rule query used to retrieve the correlated field. + #[serde(rename = "correlatedQueryIndex")] + pub correlated_query_index: Option, + /// Group of target fields to aggregate over. + #[serde(rename = "metrics")] + pub metrics: Option>, + /// Name of the query. + #[serde(rename = "name")] + pub name: Option, + /// Rule ID to match on signals. + #[serde(rename = "ruleId")] + pub rule_id: String, +} + +impl SecurityMonitoringSignalRuleQuery { + pub fn new(rule_id: String) -> SecurityMonitoringSignalRuleQuery { + SecurityMonitoringSignalRuleQuery { + aggregation: None, + correlated_by_fields: None, + correlated_query_index: None, + metrics: None, + name: None, + rule_id, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs new file mode 100644 index 000000000..85aaefa42 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_response.rs @@ -0,0 +1,90 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalRuleResponse { + /// Cases for generating signals. + #[serde(rename = "cases")] + pub cases: Option>, + /// When the rule was created, timestamp in milliseconds. + #[serde(rename = "createdAt")] + pub created_at: Option, + /// User ID of the user who created the rule. + #[serde(rename = "creationAuthorId")] + pub creation_author_id: Option, + /// When the rule will be deprecated, timestamp in milliseconds. + #[serde(rename = "deprecationDate")] + pub deprecation_date: Option, + /// Additional queries to filter matched events before they are processed. + #[serde(rename = "filters")] + pub filters: Option>, + /// Whether the notifications include the triggering group-by values in their title. + #[serde(rename = "hasExtendedTitle")] + pub has_extended_title: Option, + /// The ID of the rule. + #[serde(rename = "id")] + pub id: Option, + /// Whether the rule is included by default. + #[serde(rename = "isDefault")] + pub is_default: Option, + /// Whether the rule has been deleted. + #[serde(rename = "isDeleted")] + pub is_deleted: Option, + /// Whether the rule is enabled. + #[serde(rename = "isEnabled")] + pub is_enabled: Option, + /// Message for generated signals. + #[serde(rename = "message")] + pub message: Option, + /// The name of the rule. + #[serde(rename = "name")] + pub name: Option, + /// Options on rules. + #[serde(rename = "options")] + pub options: Option>, + /// Queries for selecting logs which are part of the rule. + #[serde(rename = "queries")] + pub queries: Option>, + /// Tags for generated signals. + #[serde(rename = "tags")] + pub tags: Option>, + /// The rule type. + #[serde(rename = "type")] + pub type_: Option, + /// User ID of the user who updated the rule. + #[serde(rename = "updateAuthorId")] + pub update_author_id: Option, + /// The version of the rule. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityMonitoringSignalRuleResponse { + pub fn new() -> SecurityMonitoringSignalRuleResponse { + SecurityMonitoringSignalRuleResponse { + cases: None, + created_at: None, + creation_author_id: None, + deprecation_date: None, + filters: None, + has_extended_title: None, + id: None, + is_default: None, + is_deleted: None, + is_enabled: None, + message: None, + name: None, + options: None, + queries: None, + tags: None, + type_: None, + update_author_id: None, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs new file mode 100644 index 000000000..706deb6d6 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_response_query.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Query for matching rule on signals. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalRuleResponseQuery { + /// The aggregation type. + #[serde(rename = "aggregation")] + pub aggregation: Option, + /// Fields to correlate by. + #[serde(rename = "correlatedByFields")] + pub correlated_by_fields: Option>, + /// Index of the rule query used to retrieve the correlated field. + #[serde(rename = "correlatedQueryIndex")] + pub correlated_query_index: Option, + /// Default Rule ID to match on signals. + #[serde(rename = "defaultRuleId")] + pub default_rule_id: Option, + /// Field for which the cardinality is measured. Sent as an array. + #[serde(rename = "distinctFields")] + pub distinct_fields: Option>, + /// Fields to group by. + #[serde(rename = "groupByFields")] + pub group_by_fields: Option>, + /// Group of target fields to aggregate over. + #[serde(rename = "metrics")] + pub metrics: Option>, + /// Name of the query. + #[serde(rename = "name")] + pub name: Option, + /// Rule ID to match on signals. + #[serde(rename = "ruleId")] + pub rule_id: Option, +} + +impl SecurityMonitoringSignalRuleResponseQuery { + pub fn new() -> SecurityMonitoringSignalRuleResponseQuery { + SecurityMonitoringSignalRuleResponseQuery { + aggregation: None, + correlated_by_fields: None, + correlated_query_index: None, + default_rule_id: None, + distinct_fields: None, + group_by_fields: None, + metrics: None, + name: None, + rule_id: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_rule_type.rs b/src/datadogV2/model/model_security_monitoring_signal_rule_type.rs new file mode 100644 index 000000000..4bbb9a52c --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_rule_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringSignalRuleType { + #[serde(rename = "signal_correlation")] + SIGNAL_CORRELATION, +} + +impl ToString for SecurityMonitoringSignalRuleType { + fn to_string(&self) -> String { + match self { + Self::SIGNAL_CORRELATION => String::from("signal_correlation"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_state.rs b/src/datadogV2/model/model_security_monitoring_signal_state.rs new file mode 100644 index 000000000..447c7bdbc --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_state.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringSignalState { + #[serde(rename = "open")] + OPEN, + #[serde(rename = "archived")] + ARCHIVED, + #[serde(rename = "under_review")] + UNDER_REVIEW, +} + +impl ToString for SecurityMonitoringSignalState { + fn to_string(&self) -> String { + match self { + Self::OPEN => String::from("open"), + Self::ARCHIVED => String::from("archived"), + Self::UNDER_REVIEW => String::from("under_review"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs new file mode 100644 index 000000000..e81910d66 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_attributes.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes describing the change of state of a security signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalStateUpdateAttributes { + /// Optional comment to display on archived signals. + #[serde(rename = "archive_comment")] + pub archive_comment: Option, + /// Reason a signal is archived. + #[serde(rename = "archive_reason")] + pub archive_reason: Option, + /// The new triage state of the signal. + #[serde(rename = "state")] + pub state: crate::datadogV2::model::SecurityMonitoringSignalState, + /// Version of the updated signal. If server side version is higher, update will be rejected. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityMonitoringSignalStateUpdateAttributes { + pub fn new( + state: crate::datadogV2::model::SecurityMonitoringSignalState, + ) -> SecurityMonitoringSignalStateUpdateAttributes { + SecurityMonitoringSignalStateUpdateAttributes { + archive_comment: None, + archive_reason: None, + state, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs new file mode 100644 index 000000000..154204666 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_data.rs @@ -0,0 +1,32 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data containing the patch for changing the state of a signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalStateUpdateData { + /// Attributes describing the change of state of a security signal. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The unique ID of the security signal. + #[serde(rename = "id")] + pub id: Option>, + /// The type of event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SecurityMonitoringSignalStateUpdateData { + pub fn new( + attributes: Box, + ) -> SecurityMonitoringSignalStateUpdateData { + SecurityMonitoringSignalStateUpdateData { + attributes, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_state_update_request.rs b/src/datadogV2/model/model_security_monitoring_signal_state_update_request.rs new file mode 100644 index 000000000..fd2fde31d --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_state_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request body for changing the state of a given security monitoring signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalStateUpdateRequest { + /// Data containing the patch for changing the state of a signal. + #[serde(rename = "data")] + pub data: Box, +} + +impl SecurityMonitoringSignalStateUpdateRequest { + pub fn new( + data: Box, + ) -> SecurityMonitoringSignalStateUpdateRequest { + SecurityMonitoringSignalStateUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs new file mode 100644 index 000000000..968f25ed0 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_attributes.rs @@ -0,0 +1,58 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes describing a triage state update operation over a security signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalTriageAttributes { + /// Optional comment to display on archived signals. + #[serde(rename = "archive_comment")] + pub archive_comment: Option, + /// Timestamp of the last edit to the comment. + #[serde(rename = "archive_comment_timestamp")] + pub archive_comment_timestamp: Option, + /// Object representing a given user entity. + #[serde(rename = "archive_comment_user")] + pub archive_comment_user: Option>, + /// Reason a signal is archived. + #[serde(rename = "archive_reason")] + pub archive_reason: Option, + /// Object representing a given user entity. + #[serde(rename = "assignee")] + pub assignee: Box, + /// Array of incidents that are associated with this signal. + #[serde(rename = "incident_ids")] + pub incident_ids: Vec, + /// The new triage state of the signal. + #[serde(rename = "state")] + pub state: crate::datadogV2::model::SecurityMonitoringSignalState, + /// Timestamp of the last update to the signal state. + #[serde(rename = "state_update_timestamp")] + pub state_update_timestamp: Option, + /// Object representing a given user entity. + #[serde(rename = "state_update_user")] + pub state_update_user: Option>, +} + +impl SecurityMonitoringSignalTriageAttributes { + pub fn new( + assignee: Box, + incident_ids: Vec, + state: crate::datadogV2::model::SecurityMonitoringSignalState, + ) -> SecurityMonitoringSignalTriageAttributes { + SecurityMonitoringSignalTriageAttributes { + archive_comment: None, + archive_comment_timestamp: None, + archive_comment_user: None, + archive_reason: None, + assignee, + incident_ids, + state, + state_update_timestamp: None, + state_update_user: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs new file mode 100644 index 000000000..364ee75ec --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_update_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data containing the updated triage attributes of the signal. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalTriageUpdateData { + /// Attributes describing a triage state update operation over a security signal. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The unique ID of the security signal. + #[serde(rename = "id")] + pub id: Option, + /// The type of event. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SecurityMonitoringSignalTriageUpdateData { + pub fn new() -> SecurityMonitoringSignalTriageUpdateData { + SecurityMonitoringSignalTriageUpdateData { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_triage_update_response.rs b/src/datadogV2/model/model_security_monitoring_signal_triage_update_response.rs new file mode 100644 index 000000000..2decb268e --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_triage_update_response.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response returned after all triage operations, containing the updated signal triage data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalTriageUpdateResponse { + /// Data containing the updated triage attributes of the signal. + #[serde(rename = "data")] + pub data: Box, +} + +impl SecurityMonitoringSignalTriageUpdateResponse { + pub fn new( + data: Box, + ) -> SecurityMonitoringSignalTriageUpdateResponse { + SecurityMonitoringSignalTriageUpdateResponse { data } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signal_type.rs b/src/datadogV2/model/model_security_monitoring_signal_type.rs new file mode 100644 index 000000000..46c005b09 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signal_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringSignalType { + #[serde(rename = "signal")] + SIGNAL, +} + +impl ToString for SecurityMonitoringSignalType { + fn to_string(&self) -> String { + match self { + Self::SIGNAL => String::from("signal"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response.rs new file mode 100644 index 000000000..075c08708 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response.rs @@ -0,0 +1,31 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object with all security signals matching the request +/// and pagination information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalsListResponse { + /// An array of security signals matching the request. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// Meta attributes. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SecurityMonitoringSignalsListResponse { + pub fn new() -> SecurityMonitoringSignalsListResponse { + SecurityMonitoringSignalsListResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs new file mode 100644 index 000000000..ca4bfd615 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_links.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalsListResponseLinks { + /// The link for the next set of results. **Note**: The request can also be made using the + /// POST endpoint. + #[serde(rename = "next")] + pub next: Option, +} + +impl SecurityMonitoringSignalsListResponseLinks { + pub fn new() -> SecurityMonitoringSignalsListResponseLinks { + SecurityMonitoringSignalsListResponseLinks { next: None } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs new file mode 100644 index 000000000..d1e47110b --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Meta attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalsListResponseMeta { + /// Paging attributes. + #[serde(rename = "page")] + pub page: Option>, +} + +impl SecurityMonitoringSignalsListResponseMeta { + pub fn new() -> SecurityMonitoringSignalsListResponseMeta { + SecurityMonitoringSignalsListResponseMeta { page: None } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs new file mode 100644 index 000000000..005215d6b --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signals_list_response_meta_page.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringSignalsListResponseMetaPage { + /// The cursor used to get the next results, if any. To make the next request, use the same + /// parameters with the addition of the `page[cursor]`. + #[serde(rename = "after")] + pub after: Option, +} + +impl SecurityMonitoringSignalsListResponseMetaPage { + pub fn new() -> SecurityMonitoringSignalsListResponseMetaPage { + SecurityMonitoringSignalsListResponseMetaPage { after: None } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_signals_sort.rs b/src/datadogV2/model/model_security_monitoring_signals_sort.rs new file mode 100644 index 000000000..ef1f761e4 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_signals_sort.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SecurityMonitoringSignalsSort { + #[serde(rename = "timestamp")] + TIMESTAMP_ASCENDING, + #[serde(rename = "-timestamp")] + TIMESTAMP_DESCENDING, +} + +impl ToString for SecurityMonitoringSignalsSort { + fn to_string(&self) -> String { + match self { + Self::TIMESTAMP_ASCENDING => String::from("timestamp"), + Self::TIMESTAMP_DESCENDING => String::from("-timestamp"), + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs new file mode 100644 index 000000000..b722be536 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_create_payload.rs @@ -0,0 +1,70 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create a new rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringStandardRuleCreatePayload { + /// Cases for generating signals. + #[serde(rename = "cases")] + pub cases: Vec, + /// Additional queries to filter matched events before they are processed. + #[serde(rename = "filters")] + pub filters: Option>, + /// Whether the notifications include the triggering group-by values in their title. + #[serde(rename = "hasExtendedTitle")] + pub has_extended_title: Option, + /// Whether the rule is enabled. + #[serde(rename = "isEnabled")] + pub is_enabled: bool, + /// Message for generated signals. + #[serde(rename = "message")] + pub message: String, + /// The name of the rule. + #[serde(rename = "name")] + pub name: String, + /// Options on rules. + #[serde(rename = "options")] + pub options: Box, + /// Queries for selecting logs which are part of the rule. + #[serde(rename = "queries")] + pub queries: Vec, + /// Tags for generated signals. + #[serde(rename = "tags")] + pub tags: Option>, + /// Cases for generating signals from third party rules. Only available for third party rules. + #[serde(rename = "thirdPartyCases")] + pub third_party_cases: + Option>, + /// The rule type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SecurityMonitoringStandardRuleCreatePayload { + pub fn new( + cases: Vec, + is_enabled: bool, + message: String, + name: String, + options: Box, + queries: Vec, + ) -> SecurityMonitoringStandardRuleCreatePayload { + SecurityMonitoringStandardRuleCreatePayload { + cases, + filters: None, + has_extended_title: None, + is_enabled, + message, + name, + options, + queries, + tags: None, + third_party_cases: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs new file mode 100644 index 000000000..3d937a411 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_query.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Query for matching rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringStandardRuleQuery { + /// The aggregation type. + #[serde(rename = "aggregation")] + pub aggregation: Option, + /// Field for which the cardinality is measured. Sent as an array. + #[serde(rename = "distinctFields")] + pub distinct_fields: Option>, + /// Fields to group by. + #[serde(rename = "groupByFields")] + pub group_by_fields: Option>, + /// When false, events without a group-by value are ignored by the rule. When true, events with missing group-by fields are processed with `N/A`, replacing the missing values. + #[serde(rename = "hasOptionalGroupByFields")] + pub has_optional_group_by_fields: Option, + /// (Deprecated) The target field to aggregate over when using the sum or max + /// aggregations. `metrics` field should be used instead. + #[deprecated] + #[serde(rename = "metric")] + pub metric: Option, + /// Group of target fields to aggregate over when using the sum, max, geo data, or new value aggregations. The sum, max, and geo data aggregations only accept one value in this list, whereas the new value aggregation accepts up to five values. + #[serde(rename = "metrics")] + pub metrics: Option>, + /// Name of the query. + #[serde(rename = "name")] + pub name: Option, + /// Query to run on logs. + #[serde(rename = "query")] + pub query: Option, +} + +impl SecurityMonitoringStandardRuleQuery { + pub fn new() -> SecurityMonitoringStandardRuleQuery { + #[allow(deprecated)] + SecurityMonitoringStandardRuleQuery { + aggregation: None, + distinct_fields: None, + group_by_fields: None, + has_optional_group_by_fields: None, + metric: None, + metrics: None, + name: None, + query: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs b/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs new file mode 100644 index 000000000..ac7a86b5b --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_standard_rule_response.rs @@ -0,0 +1,100 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringStandardRuleResponse { + /// Cases for generating signals. + #[serde(rename = "cases")] + pub cases: Option>, + /// How to generate compliance signals. Useful for cloud_configuration rules only. + #[serde(rename = "complianceSignalOptions")] + pub compliance_signal_options: + Option>, + /// When the rule was created, timestamp in milliseconds. + #[serde(rename = "createdAt")] + pub created_at: Option, + /// User ID of the user who created the rule. + #[serde(rename = "creationAuthorId")] + pub creation_author_id: Option, + /// When the rule will be deprecated, timestamp in milliseconds. + #[serde(rename = "deprecationDate")] + pub deprecation_date: Option, + /// Additional queries to filter matched events before they are processed. + #[serde(rename = "filters")] + pub filters: Option>, + /// Whether the notifications include the triggering group-by values in their title. + #[serde(rename = "hasExtendedTitle")] + pub has_extended_title: Option, + /// The ID of the rule. + #[serde(rename = "id")] + pub id: Option, + /// Whether the rule is included by default. + #[serde(rename = "isDefault")] + pub is_default: Option, + /// Whether the rule has been deleted. + #[serde(rename = "isDeleted")] + pub is_deleted: Option, + /// Whether the rule is enabled. + #[serde(rename = "isEnabled")] + pub is_enabled: Option, + /// Message for generated signals. + #[serde(rename = "message")] + pub message: Option, + /// The name of the rule. + #[serde(rename = "name")] + pub name: Option, + /// Options on rules. + #[serde(rename = "options")] + pub options: Option>, + /// Queries for selecting logs which are part of the rule. + #[serde(rename = "queries")] + pub queries: Option>, + /// Tags for generated signals. + #[serde(rename = "tags")] + pub tags: Option>, + /// Cases for generating signals from third party rules. Only available for third party rules. + #[serde(rename = "thirdPartyCases")] + pub third_party_cases: + Option>, + /// The rule type. + #[serde(rename = "type")] + pub type_: Option, + /// User ID of the user who updated the rule. + #[serde(rename = "updateAuthorId")] + pub update_author_id: Option, + /// The version of the rule. + #[serde(rename = "version")] + pub version: Option, +} + +impl SecurityMonitoringStandardRuleResponse { + pub fn new() -> SecurityMonitoringStandardRuleResponse { + SecurityMonitoringStandardRuleResponse { + cases: None, + compliance_signal_options: None, + created_at: None, + creation_author_id: None, + deprecation_date: None, + filters: None, + has_extended_title: None, + id: None, + is_default: None, + is_deleted: None, + is_enabled: None, + message: None, + name: None, + options: None, + queries: None, + tags: None, + third_party_cases: None, + type_: None, + update_author_id: None, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs b/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs new file mode 100644 index 000000000..1c9a8a758 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_third_party_root_query.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A query to be combined with the third party case query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringThirdPartyRootQuery { + /// Fields to group by. + #[serde(rename = "groupByFields")] + pub group_by_fields: Option>, + /// Query to run on logs. + #[serde(rename = "query")] + pub query: Option, +} + +impl SecurityMonitoringThirdPartyRootQuery { + pub fn new() -> SecurityMonitoringThirdPartyRootQuery { + SecurityMonitoringThirdPartyRootQuery { + group_by_fields: None, + query: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs b/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs new file mode 100644 index 000000000..59f8804af --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_third_party_rule_case.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Case when signal is generated by a third party rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringThirdPartyRuleCase { + /// Name of the case. + #[serde(rename = "name")] + pub name: Option, + /// Notification targets for each rule case. + #[serde(rename = "notifications")] + pub notifications: Option>, + /// A query to map a third party event to this case. + #[serde(rename = "query")] + pub query: Option, + /// Severity of the Security Signal. + #[serde(rename = "status")] + pub status: Option, +} + +impl SecurityMonitoringThirdPartyRuleCase { + pub fn new() -> SecurityMonitoringThirdPartyRuleCase { + SecurityMonitoringThirdPartyRuleCase { + name: None, + notifications: None, + query: None, + status: None, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs b/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs new file mode 100644 index 000000000..f1614d102 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_third_party_rule_case_create.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Case when a signal is generated by a third party rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringThirdPartyRuleCaseCreate { + /// Name of the case. + #[serde(rename = "name")] + pub name: Option, + /// Notification targets for each rule case. + #[serde(rename = "notifications")] + pub notifications: Option>, + /// A query to map a third party event to this case. + #[serde(rename = "query")] + pub query: Option, + /// Severity of the Security Signal. + #[serde(rename = "status")] + pub status: crate::datadogV2::model::SecurityMonitoringRuleSeverity, +} + +impl SecurityMonitoringThirdPartyRuleCaseCreate { + pub fn new( + status: crate::datadogV2::model::SecurityMonitoringRuleSeverity, + ) -> SecurityMonitoringThirdPartyRuleCaseCreate { + SecurityMonitoringThirdPartyRuleCaseCreate { + name: None, + notifications: None, + query: None, + status, + } + } +} diff --git a/src/datadogV2/model/model_security_monitoring_triage_user.rs b/src/datadogV2/model/model_security_monitoring_triage_user.rs new file mode 100644 index 000000000..e5700cb31 --- /dev/null +++ b/src/datadogV2/model/model_security_monitoring_triage_user.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object representing a given user entity. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SecurityMonitoringTriageUser { + /// The handle for this user account. + #[serde(rename = "handle")] + pub handle: Option, + /// Gravatar icon associated to the user. + #[serde(rename = "icon")] + pub icon: Option, + /// Numerical ID assigned by Datadog to this user account. + #[serde(rename = "id")] + pub id: Option, + /// The name for this user account. + #[serde(rename = "name", default, with = "::serde_with::rust::double_option")] + pub name: Option>, + /// UUID assigned by Datadog to this user account. + #[serde(rename = "uuid")] + pub uuid: String, +} + +impl SecurityMonitoringTriageUser { + pub fn new(uuid: String) -> SecurityMonitoringTriageUser { + SecurityMonitoringTriageUser { + handle: None, + icon: None, + id: None, + name: None, + uuid, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_config_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_config_request.rs new file mode 100644 index 000000000..470364052 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_config_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Group reorder request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerConfigRequest { + /// Data related to the reordering of scanning groups. + #[serde(rename = "data")] + pub data: Box, + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Box, +} + +impl SensitiveDataScannerConfigRequest { + pub fn new( + data: Box, + meta: Box, + ) -> SensitiveDataScannerConfigRequest { + SensitiveDataScannerConfigRequest { data, meta } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs new file mode 100644 index 000000000..e28bf844d --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A Sensitive Data Scanner configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerConfiguration { + /// ID of the configuration. + #[serde(rename = "id")] + pub id: Option, + /// Sensitive Data Scanner configuration type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerConfiguration { + pub fn new() -> SensitiveDataScannerConfiguration { + SensitiveDataScannerConfiguration { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs new file mode 100644 index 000000000..39fd25c91 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_data.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A Sensitive Data Scanner configuration data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerConfigurationData { + /// A Sensitive Data Scanner configuration. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SensitiveDataScannerConfigurationData { + pub fn new() -> SensitiveDataScannerConfigurationData { + SensitiveDataScannerConfigurationData { data: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs new file mode 100644 index 000000000..5516ac45b --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships of the configuration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerConfigurationRelationships { + /// List of groups, ordered. + #[serde(rename = "groups")] + pub groups: Option>, +} + +impl SensitiveDataScannerConfigurationRelationships { + pub fn new() -> SensitiveDataScannerConfigurationRelationships { + SensitiveDataScannerConfigurationRelationships { groups: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_configuration_type.rs b/src/datadogV2/model/model_sensitive_data_scanner_configuration_type.rs new file mode 100644 index 000000000..40740a33b --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_configuration_type.rs @@ -0,0 +1,21 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SensitiveDataScannerConfigurationType { + #[serde(rename = "sensitive_data_scanner_configuration")] + SENSITIVE_DATA_SCANNER_CONFIGURATIONS, +} + +impl ToString for SensitiveDataScannerConfigurationType { + fn to_string(&self) -> String { + match self { + Self::SENSITIVE_DATA_SCANNER_CONFIGURATIONS => { + String::from("sensitive_data_scanner_configuration") + } + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs new file mode 100644 index 000000000..b07a8f86d --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_create_group_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create group response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerCreateGroupResponse { + /// Response data related to the creation of a group. + #[serde(rename = "data")] + pub data: Option>, + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerCreateGroupResponse { + pub fn new() -> SensitiveDataScannerCreateGroupResponse { + SensitiveDataScannerCreateGroupResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs new file mode 100644 index 000000000..7f6315ec1 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_create_rule_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create rule response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerCreateRuleResponse { + /// Response data related to the creation of a rule. + #[serde(rename = "data")] + pub data: Option>, + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerCreateRuleResponse { + pub fn new() -> SensitiveDataScannerCreateRuleResponse { + SensitiveDataScannerCreateRuleResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_filter.rs b/src/datadogV2/model/model_sensitive_data_scanner_filter.rs new file mode 100644 index 000000000..ed4898d77 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_filter.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Filter for the Scanning Group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerFilter { + /// Query to filter the events. + #[serde(rename = "query")] + pub query: Option, +} + +impl SensitiveDataScannerFilter { + pub fn new() -> SensitiveDataScannerFilter { + SensitiveDataScannerFilter { query: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs new file mode 100644 index 000000000..0f02c538b --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_included_item.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to the configuration. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SensitiveDataScannerGetConfigIncludedItem { + SensitiveDataScannerRuleIncludedItem( + Box, + ), + SensitiveDataScannerGroupIncludedItem( + Box, + ), +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs new file mode 100644 index 000000000..663932e4c --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Get all groups response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGetConfigResponse { + /// Response data related to the scanning groups. + #[serde(rename = "data")] + pub data: Option>, + /// Included objects from relationships. + #[serde(rename = "included")] + pub included: Option>, + /// Meta response containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerGetConfigResponse { + pub fn new() -> SensitiveDataScannerGetConfigResponse { + SensitiveDataScannerGetConfigResponse { + data: None, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs new file mode 100644 index 000000000..e8ee90170 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_get_config_response_data.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response data related to the scanning groups. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGetConfigResponseData { + /// Attributes of the Sensitive Data configuration. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the configuration. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the configuration. + #[serde(rename = "relationships")] + pub relationships: + Option>, + /// Sensitive Data Scanner configuration type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerGetConfigResponseData { + pub fn new() -> SensitiveDataScannerGetConfigResponseData { + SensitiveDataScannerGetConfigResponseData { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group.rs b/src/datadogV2/model/model_sensitive_data_scanner_group.rs new file mode 100644 index 000000000..da9a8efcb --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A scanning group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroup { + /// ID of the group. + #[serde(rename = "id")] + pub id: Option, + /// Sensitive Data Scanner group type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerGroup { + pub fn new() -> SensitiveDataScannerGroup { + SensitiveDataScannerGroup { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs new file mode 100644 index 000000000..9632ec388 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the Sensitive Data Scanner group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupAttributes { + /// Description of the group. + #[serde(rename = "description")] + pub description: Option, + /// Filter for the Scanning Group. + #[serde(rename = "filter")] + pub filter: Option>, + /// Whether or not the group is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the group. + #[serde(rename = "name")] + pub name: Option, + /// List of products the scanning group applies. + #[serde(rename = "product_list")] + pub product_list: Option>, +} + +impl SensitiveDataScannerGroupAttributes { + pub fn new() -> SensitiveDataScannerGroupAttributes { + SensitiveDataScannerGroupAttributes { + description: None, + filter: None, + is_enabled: None, + name: None, + product_list: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs new file mode 100644 index 000000000..453253fa4 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_create.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to the creation of a group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupCreate { + /// Attributes of the Sensitive Data Scanner group. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Relationships of the group. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Sensitive Data Scanner group type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::SensitiveDataScannerGroupType, +} + +impl SensitiveDataScannerGroupCreate { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::SensitiveDataScannerGroupType, + ) -> SensitiveDataScannerGroupCreate { + SensitiveDataScannerGroupCreate { + attributes, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs new file mode 100644 index 000000000..ed316c537 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_create_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create group request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupCreateRequest { + /// Data related to the creation of a group. + #[serde(rename = "data")] + pub data: Option>, + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerGroupCreateRequest { + pub fn new() -> SensitiveDataScannerGroupCreateRequest { + SensitiveDataScannerGroupCreateRequest { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs new file mode 100644 index 000000000..2ef31a24b --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_data.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A scanning group data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupData { + /// A scanning group. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SensitiveDataScannerGroupData { + pub fn new() -> SensitiveDataScannerGroupData { + SensitiveDataScannerGroupData { data: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_request.rs new file mode 100644 index 000000000..f308626db --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Delete group request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupDeleteRequest { + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Box, +} + +impl SensitiveDataScannerGroupDeleteRequest { + pub fn new( + meta: Box, + ) -> SensitiveDataScannerGroupDeleteRequest { + SensitiveDataScannerGroupDeleteRequest { meta } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs new file mode 100644 index 000000000..b64c6ad34 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_delete_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Delete group response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupDeleteResponse { + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerGroupDeleteResponse { + pub fn new() -> SensitiveDataScannerGroupDeleteResponse { + SensitiveDataScannerGroupDeleteResponse { meta: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs new file mode 100644 index 000000000..a761b5cb2 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_included_item.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A Scanning Group included item. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupIncludedItem { + /// Attributes of the Sensitive Data Scanner group. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the group. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the group. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Sensitive Data Scanner group type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerGroupIncludedItem { + pub fn new() -> SensitiveDataScannerGroupIncludedItem { + SensitiveDataScannerGroupIncludedItem { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs new file mode 100644 index 000000000..2fe8a5e34 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_item.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to a Sensitive Data Scanner Group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupItem { + /// ID of the group. + #[serde(rename = "id")] + pub id: Option, + /// Sensitive Data Scanner group type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerGroupItem { + pub fn new() -> SensitiveDataScannerGroupItem { + SensitiveDataScannerGroupItem { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs new file mode 100644 index 000000000..9dc7b4aaa --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_list.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List of groups, ordered. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupList { + /// List of groups. The order is important. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SensitiveDataScannerGroupList { + pub fn new() -> SensitiveDataScannerGroupList { + SensitiveDataScannerGroupList { data: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs new file mode 100644 index 000000000..a741f1fa4 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships of the group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupRelationships { + /// A Sensitive Data Scanner configuration data. + #[serde(rename = "configuration")] + pub configuration: Option>, + /// Rules included in the group. + #[serde(rename = "rules")] + pub rules: Option>, +} + +impl SensitiveDataScannerGroupRelationships { + pub fn new() -> SensitiveDataScannerGroupRelationships { + SensitiveDataScannerGroupRelationships { + configuration: None, + rules: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs new file mode 100644 index 000000000..5c0f7a6b1 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_response.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response data related to the creation of a group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupResponse { + /// Attributes of the Sensitive Data Scanner group. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the group. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the group. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Sensitive Data Scanner group type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerGroupResponse { + pub fn new() -> SensitiveDataScannerGroupResponse { + SensitiveDataScannerGroupResponse { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_type.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_type.rs new file mode 100644 index 000000000..d35090f8d --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SensitiveDataScannerGroupType { + #[serde(rename = "sensitive_data_scanner_group")] + SENSITIVE_DATA_SCANNER_GROUP, +} + +impl ToString for SensitiveDataScannerGroupType { + fn to_string(&self) -> String { + match self { + Self::SENSITIVE_DATA_SCANNER_GROUP => String::from("sensitive_data_scanner_group"), + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs new file mode 100644 index 000000000..157b1e34c --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to the update of a group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupUpdate { + /// Attributes of the Sensitive Data Scanner group. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the group. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the group. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Sensitive Data Scanner group type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerGroupUpdate { + pub fn new() -> SensitiveDataScannerGroupUpdate { + SensitiveDataScannerGroupUpdate { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update_request.rs new file mode 100644 index 000000000..ca7cdc83b --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update group request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupUpdateRequest { + /// Data related to the update of a group. + #[serde(rename = "data")] + pub data: Box, + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Box, +} + +impl SensitiveDataScannerGroupUpdateRequest { + pub fn new( + data: Box, + meta: Box, + ) -> SensitiveDataScannerGroupUpdateRequest { + SensitiveDataScannerGroupUpdateRequest { data, meta } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs new file mode 100644 index 000000000..d5feff8e3 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_group_update_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update group response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerGroupUpdateResponse { + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerGroupUpdateResponse { + pub fn new() -> SensitiveDataScannerGroupUpdateResponse { + SensitiveDataScannerGroupUpdateResponse { meta: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_meta.rs b/src/datadogV2/model/model_sensitive_data_scanner_meta.rs new file mode 100644 index 000000000..d949fec11 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_meta.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Meta response containing information about the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerMeta { + /// Maximum number of scanning rules allowed for the org. + #[serde(rename = "count_limit")] + pub count_limit: Option, + /// Maximum number of scanning groups allowed for the org. + #[serde(rename = "group_count_limit")] + pub group_count_limit: Option, + /// Whether or not scanned events are highlighted in Logs or RUM for the org. + #[serde(rename = "has_highlight_enabled")] + pub has_highlight_enabled: Option, + /// Whether or not scanned events have multi-pass enabled. + #[serde(rename = "has_multi_pass_enabled")] + pub has_multi_pass_enabled: Option, + /// Whether or not the org is compliant to the payment card industry standard. + #[serde(rename = "is_pci_compliant")] + pub is_pci_compliant: Option, + /// Version of the API. + #[serde(rename = "version")] + pub version: Option, +} + +impl SensitiveDataScannerMeta { + pub fn new() -> SensitiveDataScannerMeta { + SensitiveDataScannerMeta { + count_limit: None, + group_count_limit: None, + has_highlight_enabled: None, + has_multi_pass_enabled: None, + is_pci_compliant: None, + version: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs b/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs new file mode 100644 index 000000000..4544639b6 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_meta_version_only.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Meta payload containing information about the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerMetaVersionOnly { + /// Version of the API (optional). + #[serde(rename = "version")] + pub version: Option, +} + +impl SensitiveDataScannerMetaVersionOnly { + pub fn new() -> SensitiveDataScannerMetaVersionOnly { + SensitiveDataScannerMetaVersionOnly { version: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_product.rs b/src/datadogV2/model/model_sensitive_data_scanner_product.rs new file mode 100644 index 000000000..ed5ece4fc --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_product.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SensitiveDataScannerProduct { + #[serde(rename = "logs")] + LOGS, + #[serde(rename = "rum")] + RUM, + #[serde(rename = "events")] + EVENTS, + #[serde(rename = "apm")] + APM, +} + +impl ToString for SensitiveDataScannerProduct { + fn to_string(&self) -> String { + match self { + Self::LOGS => String::from("logs"), + Self::RUM => String::from("rum"), + Self::EVENTS => String::from("events"), + Self::APM => String::from("apm"), + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs b/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs new file mode 100644 index 000000000..95f3dba62 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_reorder_config.rs @@ -0,0 +1,31 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to the reordering of scanning groups. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerReorderConfig { + /// ID of the configuration. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the configuration. + #[serde(rename = "relationships")] + pub relationships: + Option>, + /// Sensitive Data Scanner configuration type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerReorderConfig { + pub fn new() -> SensitiveDataScannerReorderConfig { + SensitiveDataScannerReorderConfig { + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs new file mode 100644 index 000000000..87d17c3bd --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_reorder_groups_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Group reorder response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerReorderGroupsResponse { + /// Meta response containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerReorderGroupsResponse { + pub fn new() -> SensitiveDataScannerReorderGroupsResponse { + SensitiveDataScannerReorderGroupsResponse { meta: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule.rs new file mode 100644 index 000000000..a4ebbaed2 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Rule item included in the group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRule { + /// ID of the rule. + #[serde(rename = "id")] + pub id: Option, + /// Sensitive Data Scanner rule type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerRule { + pub fn new() -> SensitiveDataScannerRule { + SensitiveDataScannerRule { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs new file mode 100644 index 000000000..9896b4191 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the Sensitive Data Scanner rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleAttributes { + /// Description of the rule. + #[serde(rename = "description")] + pub description: Option, + /// Attributes excluded from the scan. If namespaces is provided, it has to be a sub-path of the namespaces array. + #[serde(rename = "excluded_namespaces")] + pub excluded_namespaces: Option>, + /// Whether or not the rule is enabled. + #[serde(rename = "is_enabled")] + pub is_enabled: Option, + /// Name of the rule. + #[serde(rename = "name")] + pub name: Option, + /// Attributes included in the scan. If namespaces is empty or missing, all attributes except excluded_namespaces are scanned. + /// If both are missing the whole event is scanned. + #[serde(rename = "namespaces")] + pub namespaces: Option>, + /// Not included if there is a relationship to a standard pattern. + #[serde(rename = "pattern")] + pub pattern: Option, + /// Integer from 1 (high) to 5 (low) indicating rule issue severity. + #[serde(rename = "priority")] + pub priority: Option, + /// List of tags. + #[serde(rename = "tags")] + pub tags: Option>, + /// Object describing how the scanned event will be replaced. + #[serde(rename = "text_replacement")] + pub text_replacement: Option>, +} + +impl SensitiveDataScannerRuleAttributes { + pub fn new() -> SensitiveDataScannerRuleAttributes { + SensitiveDataScannerRuleAttributes { + description: None, + excluded_namespaces: None, + is_enabled: None, + name: None, + namespaces: None, + pattern: None, + priority: None, + tags: None, + text_replacement: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_create.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_create.rs new file mode 100644 index 000000000..e9289ae06 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_create.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to the creation of a rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleCreate { + /// Attributes of the Sensitive Data Scanner rule. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Relationships of a scanning rule. + #[serde(rename = "relationships")] + pub relationships: Box, + /// Sensitive Data Scanner rule type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::SensitiveDataScannerRuleType, +} + +impl SensitiveDataScannerRuleCreate { + pub fn new( + attributes: Box, + relationships: Box, + type_: crate::datadogV2::model::SensitiveDataScannerRuleType, + ) -> SensitiveDataScannerRuleCreate { + SensitiveDataScannerRuleCreate { + attributes, + relationships, + type_, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_create_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_create_request.rs new file mode 100644 index 000000000..b789d0d3a --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_create_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create rule request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleCreateRequest { + /// Data related to the creation of a rule. + #[serde(rename = "data")] + pub data: Box, + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Box, +} + +impl SensitiveDataScannerRuleCreateRequest { + pub fn new( + data: Box, + meta: Box, + ) -> SensitiveDataScannerRuleCreateRequest { + SensitiveDataScannerRuleCreateRequest { data, meta } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs new file mode 100644 index 000000000..51e7d6137 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_data.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Rules included in the group. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleData { + /// Rules included in the group. The order is important. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SensitiveDataScannerRuleData { + pub fn new() -> SensitiveDataScannerRuleData { + SensitiveDataScannerRuleData { data: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_request.rs new file mode 100644 index 000000000..cca5b5238 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Delete rule request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleDeleteRequest { + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Box, +} + +impl SensitiveDataScannerRuleDeleteRequest { + pub fn new( + meta: Box, + ) -> SensitiveDataScannerRuleDeleteRequest { + SensitiveDataScannerRuleDeleteRequest { meta } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs new file mode 100644 index 000000000..375a3db5e --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_delete_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Delete rule response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleDeleteResponse { + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerRuleDeleteResponse { + pub fn new() -> SensitiveDataScannerRuleDeleteResponse { + SensitiveDataScannerRuleDeleteResponse { meta: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs new file mode 100644 index 000000000..47fb9df16 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_included_item.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A Scanning Rule included item. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleIncludedItem { + /// Attributes of the Sensitive Data Scanner rule. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the rule. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of a scanning rule. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Sensitive Data Scanner rule type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerRuleIncludedItem { + pub fn new() -> SensitiveDataScannerRuleIncludedItem { + SensitiveDataScannerRuleIncludedItem { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs new file mode 100644 index 000000000..99ce54e7a --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_relationships.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships of a scanning rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleRelationships { + /// A scanning group data. + #[serde(rename = "group")] + pub group: Option>, + /// A standard pattern. + #[serde(rename = "standard_pattern")] + pub standard_pattern: + Option>, +} + +impl SensitiveDataScannerRuleRelationships { + pub fn new() -> SensitiveDataScannerRuleRelationships { + SensitiveDataScannerRuleRelationships { + group: None, + standard_pattern: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs new file mode 100644 index 000000000..ff50b35f4 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_response.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response data related to the creation of a rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleResponse { + /// Attributes of the Sensitive Data Scanner rule. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the rule. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of a scanning rule. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Sensitive Data Scanner rule type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerRuleResponse { + pub fn new() -> SensitiveDataScannerRuleResponse { + SensitiveDataScannerRuleResponse { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_type.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_type.rs new file mode 100644 index 000000000..a00b7ee2c --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SensitiveDataScannerRuleType { + #[serde(rename = "sensitive_data_scanner_rule")] + SENSITIVE_DATA_SCANNER_RULE, +} + +impl ToString for SensitiveDataScannerRuleType { + fn to_string(&self) -> String { + match self { + Self::SENSITIVE_DATA_SCANNER_RULE => String::from("sensitive_data_scanner_rule"), + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs new file mode 100644 index 000000000..be29964a7 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data related to the update of a rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleUpdate { + /// Attributes of the Sensitive Data Scanner rule. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the rule. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of a scanning rule. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Sensitive Data Scanner rule type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerRuleUpdate { + pub fn new() -> SensitiveDataScannerRuleUpdate { + SensitiveDataScannerRuleUpdate { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_request.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_request.rs new file mode 100644 index 000000000..7a41f74ed --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update rule request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleUpdateRequest { + /// Data related to the update of a rule. + #[serde(rename = "data")] + pub data: Box, + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Box, +} + +impl SensitiveDataScannerRuleUpdateRequest { + pub fn new( + data: Box, + meta: Box, + ) -> SensitiveDataScannerRuleUpdateRequest { + SensitiveDataScannerRuleUpdateRequest { data, meta } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs new file mode 100644 index 000000000..cf8de6152 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_rule_update_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update rule response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerRuleUpdateResponse { + /// Meta payload containing information about the API. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SensitiveDataScannerRuleUpdateResponse { + pub fn new() -> SensitiveDataScannerRuleUpdateResponse { + SensitiveDataScannerRuleUpdateResponse { meta: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs new file mode 100644 index 000000000..d58a5748d --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Data containing the standard pattern id. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerStandardPattern { + /// ID of the standard pattern. + #[serde(rename = "id")] + pub id: Option, + /// Sensitive Data Scanner standard pattern type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerStandardPattern { + pub fn new() -> SensitiveDataScannerStandardPattern { + SensitiveDataScannerStandardPattern { + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs new file mode 100644 index 000000000..b99435632 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the Sensitive Data Scanner standard pattern. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerStandardPatternAttributes { + /// Description of the standard pattern. + #[serde(rename = "description")] + pub description: Option, + /// List of included keywords. + #[serde(rename = "included_keywords")] + pub included_keywords: Option>, + /// Name of the standard pattern. + #[serde(rename = "name")] + pub name: Option, + /// Regex to match. + #[serde(rename = "pattern")] + pub pattern: Option, + /// Integer from 1 (high) to 5 (low) indicating standard pattern issue severity. + #[serde(rename = "priority")] + pub priority: Option, + /// List of tags. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl SensitiveDataScannerStandardPatternAttributes { + pub fn new() -> SensitiveDataScannerStandardPatternAttributes { + SensitiveDataScannerStandardPatternAttributes { + description: None, + included_keywords: None, + name: None, + pattern: None, + priority: None, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs new file mode 100644 index 000000000..710ec712a --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_data.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A standard pattern. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerStandardPatternData { + /// Data containing the standard pattern id. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SensitiveDataScannerStandardPatternData { + pub fn new() -> SensitiveDataScannerStandardPatternData { + SensitiveDataScannerStandardPatternData { data: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_type.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_type.rs new file mode 100644 index 000000000..a1e80519c --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_pattern_type.rs @@ -0,0 +1,21 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SensitiveDataScannerStandardPatternType { + #[serde(rename = "sensitive_data_scanner_standard_pattern")] + SENSITIVE_DATA_SCANNER_STANDARD_PATTERN, +} + +impl ToString for SensitiveDataScannerStandardPatternType { + fn to_string(&self) -> String { + match self { + Self::SENSITIVE_DATA_SCANNER_STANDARD_PATTERN => { + String::from("sensitive_data_scanner_standard_pattern") + } + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs new file mode 100644 index 000000000..625de22bf --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_data.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// List Standard patterns response data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerStandardPatternsResponseData { + /// List Standard patterns response. + #[serde(rename = "data")] + pub data: + Option>, +} + +impl SensitiveDataScannerStandardPatternsResponseData { + pub fn new() -> SensitiveDataScannerStandardPatternsResponseData { + SensitiveDataScannerStandardPatternsResponseData { data: None } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs new file mode 100644 index 000000000..b3ae2e94d --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_standard_patterns_response_item.rs @@ -0,0 +1,31 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Standard pattern item. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerStandardPatternsResponseItem { + /// Attributes of the Sensitive Data Scanner standard pattern. + #[serde(rename = "attributes")] + pub attributes: + Option>, + /// ID of the standard pattern. + #[serde(rename = "id")] + pub id: Option, + /// Sensitive Data Scanner standard pattern type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerStandardPatternsResponseItem { + pub fn new() -> SensitiveDataScannerStandardPatternsResponseItem { + SensitiveDataScannerStandardPatternsResponseItem { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs new file mode 100644 index 000000000..8dc35746e --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement.rs @@ -0,0 +1,36 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object describing how the scanned event will be replaced. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SensitiveDataScannerTextReplacement { + /// Required if type == 'partial_replacement_from_beginning' + /// or 'partial_replacement_from_end'. It must be > 0. + #[serde(rename = "number_of_chars")] + pub number_of_chars: Option, + /// Required if type == 'replacement_string'. + #[serde(rename = "replacement_string")] + pub replacement_string: Option, + /// Type of the replacement text. None means no replacement. + /// hash means the data will be stubbed. replacement_string means that + /// one can chose a text to replace the data. partial_replacement_from_beginning + /// allows a user to partially replace the data from the beginning, and + /// partial_replacement_from_end on the other hand, allows to replace data from + /// the end. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SensitiveDataScannerTextReplacement { + pub fn new() -> SensitiveDataScannerTextReplacement { + SensitiveDataScannerTextReplacement { + number_of_chars: None, + replacement_string: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_sensitive_data_scanner_text_replacement_type.rs b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement_type.rs new file mode 100644 index 000000000..d89493725 --- /dev/null +++ b/src/datadogV2/model/model_sensitive_data_scanner_text_replacement_type.rs @@ -0,0 +1,33 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SensitiveDataScannerTextReplacementType { + #[serde(rename = "none")] + NONE, + #[serde(rename = "hash")] + HASH, + #[serde(rename = "replacement_string")] + REPLACEMENT_STRING, + #[serde(rename = "partial_replacement_from_beginning")] + PARTIAL_REPLACEMENT_FROM_BEGINNING, + #[serde(rename = "partial_replacement_from_end")] + PARTIAL_REPLACEMENT_FROM_END, +} + +impl ToString for SensitiveDataScannerTextReplacementType { + fn to_string(&self) -> String { + match self { + Self::NONE => String::from("none"), + Self::HASH => String::from("hash"), + Self::REPLACEMENT_STRING => String::from("replacement_string"), + Self::PARTIAL_REPLACEMENT_FROM_BEGINNING => { + String::from("partial_replacement_from_beginning") + } + Self::PARTIAL_REPLACEMENT_FROM_END => String::from("partial_replacement_from_end"), + } + } +} diff --git a/src/datadogV2/model/model_service_account_create_attributes.rs b/src/datadogV2/model/model_service_account_create_attributes.rs new file mode 100644 index 000000000..3f7943c0c --- /dev/null +++ b/src/datadogV2/model/model_service_account_create_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the created user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceAccountCreateAttributes { + /// The email of the user. + #[serde(rename = "email")] + pub email: String, + /// The name of the user. + #[serde(rename = "name")] + pub name: Option, + /// Whether the user is a service account. Must be true. + #[serde(rename = "service_account")] + pub service_account: bool, + /// The title of the user. + #[serde(rename = "title")] + pub title: Option, +} + +impl ServiceAccountCreateAttributes { + pub fn new(email: String, service_account: bool) -> ServiceAccountCreateAttributes { + ServiceAccountCreateAttributes { + email, + name: None, + service_account, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_service_account_create_data.rs b/src/datadogV2/model/model_service_account_create_data.rs new file mode 100644 index 000000000..276690dbe --- /dev/null +++ b/src/datadogV2/model/model_service_account_create_data.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to create a service account User. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceAccountCreateData { + /// Attributes of the created user. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Relationships of the user object. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Users resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UsersType, +} + +impl ServiceAccountCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::UsersType, + ) -> ServiceAccountCreateData { + ServiceAccountCreateData { + attributes, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_account_create_request.rs b/src/datadogV2/model/model_service_account_create_request.rs new file mode 100644 index 000000000..f3c31c4f7 --- /dev/null +++ b/src/datadogV2/model/model_service_account_create_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create a service account. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceAccountCreateRequest { + /// Object to create a service account User. + #[serde(rename = "data")] + pub data: Box, +} + +impl ServiceAccountCreateRequest { + pub fn new( + data: Box, + ) -> ServiceAccountCreateRequest { + ServiceAccountCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_service_definition_create_response.rs b/src/datadogV2/model/model_service_definition_create_response.rs new file mode 100644 index 000000000..8015cbb32 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_create_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create service definitions response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionCreateResponse { + /// Create service definitions response payload. + #[serde(rename = "data")] + pub data: Option>, +} + +impl ServiceDefinitionCreateResponse { + pub fn new() -> ServiceDefinitionCreateResponse { + ServiceDefinitionCreateResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_service_definition_data.rs b/src/datadogV2/model/model_service_definition_data.rs new file mode 100644 index 000000000..6a999992f --- /dev/null +++ b/src/datadogV2/model/model_service_definition_data.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service definition data. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionData { + /// Service definition attributes. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Service definition id. + #[serde(rename = "id")] + pub id: Option, + /// Service definition type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ServiceDefinitionData { + pub fn new() -> ServiceDefinitionData { + ServiceDefinitionData { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_data_attributes.rs b/src/datadogV2/model/model_service_definition_data_attributes.rs new file mode 100644 index 000000000..22b5fb27b --- /dev/null +++ b/src/datadogV2/model/model_service_definition_data_attributes.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service definition attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionDataAttributes { + /// Metadata about a service definition. + #[serde(rename = "meta")] + pub meta: Option>, + /// Service definition schema. + #[serde(rename = "schema")] + pub schema: Option>, +} + +impl ServiceDefinitionDataAttributes { + pub fn new() -> ServiceDefinitionDataAttributes { + ServiceDefinitionDataAttributes { + meta: None, + schema: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_get_response.rs b/src/datadogV2/model/model_service_definition_get_response.rs new file mode 100644 index 000000000..9e9065072 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_get_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Get service definition response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionGetResponse { + /// Service definition data. + #[serde(rename = "data")] + pub data: Option>, +} + +impl ServiceDefinitionGetResponse { + pub fn new() -> ServiceDefinitionGetResponse { + ServiceDefinitionGetResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_service_definition_meta.rs b/src/datadogV2/model/model_service_definition_meta.rs new file mode 100644 index 000000000..1f3462123 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_meta.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Metadata about a service definition. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionMeta { + /// GitHub HTML URL. + #[serde(rename = "github-html-url")] + pub github_html_url: Option, + /// Ingestion schema version. + #[serde(rename = "ingested-schema-version")] + pub ingested_schema_version: Option, + /// Ingestion source of the service definition. + #[serde(rename = "ingestion-source")] + pub ingestion_source: Option, + /// Last modified time of the service definition. + #[serde(rename = "last-modified-time")] + pub last_modified_time: Option, + /// User defined origin of the service definition. + #[serde(rename = "origin")] + pub origin: Option, + /// User defined origin's detail of the service definition. + #[serde(rename = "origin-detail")] + pub origin_detail: Option, + /// A list of schema validation warnings. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl ServiceDefinitionMeta { + pub fn new() -> ServiceDefinitionMeta { + ServiceDefinitionMeta { + github_html_url: None, + ingested_schema_version: None, + ingestion_source: None, + last_modified_time: None, + origin: None, + origin_detail: None, + warnings: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_meta_warnings.rs b/src/datadogV2/model/model_service_definition_meta_warnings.rs new file mode 100644 index 000000000..7433f48f1 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_meta_warnings.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Schema validation warnings. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionMetaWarnings { + /// The warning instance location. + #[serde(rename = "instance-location")] + pub instance_location: Option, + /// The warning keyword location. + #[serde(rename = "keyword-location")] + pub keyword_location: Option, + /// The warning message. + #[serde(rename = "message")] + pub message: Option, +} + +impl ServiceDefinitionMetaWarnings { + pub fn new() -> ServiceDefinitionMetaWarnings { + ServiceDefinitionMetaWarnings { + instance_location: None, + keyword_location: None, + message: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_schema.rs b/src/datadogV2/model/model_service_definition_schema.rs new file mode 100644 index 000000000..7f53271ea --- /dev/null +++ b/src/datadogV2/model/model_service_definition_schema.rs @@ -0,0 +1,14 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; + +/// Service definition schema. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ServiceDefinitionSchema { + ServiceDefinitionV1(Box), + ServiceDefinitionV2(Box), + ServiceDefinitionV2Dot1(Box), + ServiceDefinitionV2Dot2(Box), +} diff --git a/src/datadogV2/model/model_service_definition_schema_versions.rs b/src/datadogV2/model/model_service_definition_schema_versions.rs new file mode 100644 index 000000000..df45b3586 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_schema_versions.rs @@ -0,0 +1,28 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionSchemaVersions { + #[serde(rename = "v1")] + V1, + #[serde(rename = "v2")] + V2, + #[serde(rename = "v2.1")] + V2_1, + #[serde(rename = "v2.2")] + V2_2, +} + +impl ToString for ServiceDefinitionSchemaVersions { + fn to_string(&self) -> String { + match self { + Self::V1 => String::from("v1"), + Self::V2 => String::from("v2"), + Self::V2_1 => String::from("v2.1"), + Self::V2_2 => String::from("v2.2"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1.rs b/src/datadogV2/model/model_service_definition_v1.rs new file mode 100644 index 000000000..04d5cc347 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1.rs @@ -0,0 +1,53 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Deprecated - Service definition V1 for providing additional service metadata and integrations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV1 { + /// Contact information about the service. + #[serde(rename = "contact")] + pub contact: Option>, + /// Extensions to V1 schema. + #[serde(rename = "extensions")] + pub extensions: Option>, + /// A list of external links related to the services. + #[serde(rename = "external-resources")] + pub external_resources: Option>, + /// Basic information about a service. + #[serde(rename = "info")] + pub info: Box, + /// Third party integrations that Datadog supports. + #[serde(rename = "integrations")] + pub integrations: Option>, + /// Org related information about the service. + #[serde(rename = "org")] + pub org: Option>, + /// Schema version being used. + #[serde(rename = "schema-version")] + pub schema_version: crate::datadogV2::model::ServiceDefinitionV1Version, + /// A set of custom tags. + #[serde(rename = "tags")] + pub tags: Option>, +} + +impl ServiceDefinitionV1 { + pub fn new( + info: Box, + schema_version: crate::datadogV2::model::ServiceDefinitionV1Version, + ) -> ServiceDefinitionV1 { + ServiceDefinitionV1 { + contact: None, + extensions: None, + external_resources: None, + info, + integrations: None, + org: None, + schema_version, + tags: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1_contact.rs b/src/datadogV2/model/model_service_definition_v1_contact.rs new file mode 100644 index 000000000..e860f5684 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1_contact.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Contact information about the service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV1Contact { + /// Service owner’s email. + #[serde(rename = "email")] + pub email: Option, + /// Service owner’s Slack channel. + #[serde(rename = "slack")] + pub slack: Option, +} + +impl ServiceDefinitionV1Contact { + pub fn new() -> ServiceDefinitionV1Contact { + ServiceDefinitionV1Contact { + email: None, + slack: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1_info.rs b/src/datadogV2/model/model_service_definition_v1_info.rs new file mode 100644 index 000000000..fd192451d --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1_info.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Basic information about a service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV1Info { + /// Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog. + #[serde(rename = "dd-service")] + pub dd_service: String, + /// A short description of the service. + #[serde(rename = "description")] + pub description: Option, + /// A friendly name of the service. + #[serde(rename = "display-name")] + pub display_name: Option, + /// Service tier. + #[serde(rename = "service-tier")] + pub service_tier: Option, +} + +impl ServiceDefinitionV1Info { + pub fn new(dd_service: String) -> ServiceDefinitionV1Info { + ServiceDefinitionV1Info { + dd_service, + description: None, + display_name: None, + service_tier: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1_integrations.rs b/src/datadogV2/model/model_service_definition_v1_integrations.rs new file mode 100644 index 000000000..243444e6a --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1_integrations.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Third party integrations that Datadog supports. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV1Integrations { + /// PagerDuty service URL for the service. + #[serde(rename = "pagerduty")] + pub pagerduty: Option, +} + +impl ServiceDefinitionV1Integrations { + pub fn new() -> ServiceDefinitionV1Integrations { + ServiceDefinitionV1Integrations { pagerduty: None } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1_org.rs b/src/datadogV2/model/model_service_definition_v1_org.rs new file mode 100644 index 000000000..b879929f2 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1_org.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Org related information about the service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV1Org { + /// App feature this service supports. + #[serde(rename = "application")] + pub application: Option, + /// Team that owns the service. + #[serde(rename = "team")] + pub team: Option, +} + +impl ServiceDefinitionV1Org { + pub fn new() -> ServiceDefinitionV1Org { + ServiceDefinitionV1Org { + application: None, + team: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1_resource.rs b/src/datadogV2/model/model_service_definition_v1_resource.rs new file mode 100644 index 000000000..b150328d5 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1_resource.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service's external links. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV1Resource { + /// Link name. + #[serde(rename = "name")] + pub name: String, + /// Link type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV1ResourceType, + /// Link URL. + #[serde(rename = "url")] + pub url: String, +} + +impl ServiceDefinitionV1Resource { + pub fn new( + name: String, + type_: crate::datadogV2::model::ServiceDefinitionV1ResourceType, + url: String, + ) -> ServiceDefinitionV1Resource { + ServiceDefinitionV1Resource { name, type_, url } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1_resource_type.rs b/src/datadogV2/model/model_service_definition_v1_resource_type.rs new file mode 100644 index 000000000..a17071e11 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1_resource_type.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV1ResourceType { + #[serde(rename = "doc")] + DOC, + #[serde(rename = "wiki")] + WIKI, + #[serde(rename = "runbook")] + RUNBOOK, + #[serde(rename = "url")] + URL, + #[serde(rename = "repo")] + REPO, + #[serde(rename = "dashboard")] + DASHBOARD, + #[serde(rename = "oncall")] + ONCALL, + #[serde(rename = "code")] + CODE, + #[serde(rename = "link")] + LINK, +} + +impl ToString for ServiceDefinitionV1ResourceType { + fn to_string(&self) -> String { + match self { + Self::DOC => String::from("doc"), + Self::WIKI => String::from("wiki"), + Self::RUNBOOK => String::from("runbook"), + Self::URL => String::from("url"), + Self::REPO => String::from("repo"), + Self::DASHBOARD => String::from("dashboard"), + Self::ONCALL => String::from("oncall"), + Self::CODE => String::from("code"), + Self::LINK => String::from("link"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v1_version.rs b/src/datadogV2/model/model_service_definition_v1_version.rs new file mode 100644 index 000000000..6ba9ac1c5 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v1_version.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV1Version { + #[serde(rename = "v1")] + V1, +} + +impl ToString for ServiceDefinitionV1Version { + fn to_string(&self) -> String { + match self { + Self::V1 => String::from("v1"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2.rs b/src/datadogV2/model/model_service_definition_v2.rs new file mode 100644 index 000000000..67f8f1afa --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2.rs @@ -0,0 +1,65 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service definition V2 for providing service metadata and integrations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2 { + /// A list of contacts related to the services. + #[serde(rename = "contacts")] + pub contacts: Option>, + /// Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog. + #[serde(rename = "dd-service")] + pub dd_service: String, + /// Experimental feature. A Team handle that matches a Team in the Datadog Teams product. + #[serde(rename = "dd-team")] + pub dd_team: Option, + /// A list of documentation related to the services. + #[serde(rename = "docs")] + pub docs: Option>, + /// Extensions to V2 schema. + #[serde(rename = "extensions")] + pub extensions: Option>, + /// Third party integrations that Datadog supports. + #[serde(rename = "integrations")] + pub integrations: Option>, + /// A list of links related to the services. + #[serde(rename = "links")] + pub links: Option>, + /// A list of code repositories related to the services. + #[serde(rename = "repos")] + pub repos: Option>, + /// Schema version being used. + #[serde(rename = "schema-version")] + pub schema_version: crate::datadogV2::model::ServiceDefinitionV2Version, + /// A set of custom tags. + #[serde(rename = "tags")] + pub tags: Option>, + /// Team that owns the service. + #[serde(rename = "team")] + pub team: Option, +} + +impl ServiceDefinitionV2 { + pub fn new( + dd_service: String, + schema_version: crate::datadogV2::model::ServiceDefinitionV2Version, + ) -> ServiceDefinitionV2 { + ServiceDefinitionV2 { + contacts: None, + dd_service, + dd_team: None, + docs: None, + extensions: None, + integrations: None, + links: None, + repos: None, + schema_version, + tags: None, + team: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_contact.rs b/src/datadogV2/model/model_service_definition_v2_contact.rs new file mode 100644 index 000000000..82dfb76f9 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_contact.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Service owner's contacts information. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ServiceDefinitionV2Contact { + ServiceDefinitionV2Email(Box), + ServiceDefinitionV2Slack(Box), + ServiceDefinitionV2MSTeams(Box), +} diff --git a/src/datadogV2/model/model_service_definition_v2_doc.rs b/src/datadogV2/model/model_service_definition_v2_doc.rs new file mode 100644 index 000000000..74a2f5a3b --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_doc.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service documents. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Doc { + /// Document name. + #[serde(rename = "name")] + pub name: String, + /// Document provider. + #[serde(rename = "provider")] + pub provider: Option, + /// Document URL. + #[serde(rename = "url")] + pub url: String, +} + +impl ServiceDefinitionV2Doc { + pub fn new(name: String, url: String) -> ServiceDefinitionV2Doc { + ServiceDefinitionV2Doc { + name, + provider: None, + url, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1.rs b/src/datadogV2/model/model_service_definition_v2_dot1.rs new file mode 100644 index 000000000..32ed69335 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1.rs @@ -0,0 +1,69 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service definition v2.1 for providing service metadata and integrations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1 { + /// Identifier for a group of related services serving a product feature, which the service is a part of. + #[serde(rename = "application")] + pub application: Option, + /// A list of contacts related to the services. + #[serde(rename = "contacts")] + pub contacts: Option>, + /// Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog. + #[serde(rename = "dd-service")] + pub dd_service: String, + /// A short description of the service. + #[serde(rename = "description")] + pub description: Option, + /// Extensions to v2.1 schema. + #[serde(rename = "extensions")] + pub extensions: Option>, + /// Third party integrations that Datadog supports. + #[serde(rename = "integrations")] + pub integrations: Option>, + /// The current life cycle phase of the service. + #[serde(rename = "lifecycle")] + pub lifecycle: Option, + /// A list of links related to the services. + #[serde(rename = "links")] + pub links: Option>, + /// Schema version being used. + #[serde(rename = "schema-version")] + pub schema_version: crate::datadogV2::model::ServiceDefinitionV2Dot1Version, + /// A set of custom tags. + #[serde(rename = "tags")] + pub tags: Option>, + /// Team that owns the service. It is used to locate a team defined in Datadog Teams if it exists. + #[serde(rename = "team")] + pub team: Option, + /// Importance of the service. + #[serde(rename = "tier")] + pub tier: Option, +} + +impl ServiceDefinitionV2Dot1 { + pub fn new( + dd_service: String, + schema_version: crate::datadogV2::model::ServiceDefinitionV2Dot1Version, + ) -> ServiceDefinitionV2Dot1 { + ServiceDefinitionV2Dot1 { + application: None, + contacts: None, + dd_service, + description: None, + extensions: None, + integrations: None, + lifecycle: None, + links: None, + schema_version, + tags: None, + team: None, + tier: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs b/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs new file mode 100644 index 000000000..5dd9ad082 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_contact.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Service owner's contacts information. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ServiceDefinitionV2Dot1Contact { + ServiceDefinitionV2Dot1Email(Box), + ServiceDefinitionV2Dot1Slack(Box), + ServiceDefinitionV2Dot1MSTeams(Box), +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_email.rs b/src/datadogV2/model/model_service_definition_v2_dot1_email.rs new file mode 100644 index 000000000..832b85448 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_email.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service owner's email. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1Email { + /// Contact value. + #[serde(rename = "contact")] + pub contact: String, + /// Contact email. + #[serde(rename = "name")] + pub name: Option, + /// Contact type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2Dot1EmailType, +} + +impl ServiceDefinitionV2Dot1Email { + pub fn new( + contact: String, + type_: crate::datadogV2::model::ServiceDefinitionV2Dot1EmailType, + ) -> ServiceDefinitionV2Dot1Email { + ServiceDefinitionV2Dot1Email { + contact, + name: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_email_type.rs b/src/datadogV2/model/model_service_definition_v2_dot1_email_type.rs new file mode 100644 index 000000000..9da2676e7 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_email_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot1EmailType { + #[serde(rename = "email")] + EMAIL, +} + +impl ToString for ServiceDefinitionV2Dot1EmailType { + fn to_string(&self) -> String { + match self { + Self::EMAIL => String::from("email"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs b/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs new file mode 100644 index 000000000..9de5a7799 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_integrations.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Third party integrations that Datadog supports. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1Integrations { + /// Opsgenie integration for the service. + #[serde(rename = "opsgenie")] + pub opsgenie: Option>, + /// PagerDuty integration for the service. + #[serde(rename = "pagerduty")] + pub pagerduty: Option>, +} + +impl ServiceDefinitionV2Dot1Integrations { + pub fn new() -> ServiceDefinitionV2Dot1Integrations { + ServiceDefinitionV2Dot1Integrations { + opsgenie: None, + pagerduty: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_link.rs b/src/datadogV2/model/model_service_definition_v2_dot1_link.rs new file mode 100644 index 000000000..148efd729 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_link.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service's external links. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1Link { + /// Link name. + #[serde(rename = "name")] + pub name: String, + /// Link provider. + #[serde(rename = "provider")] + pub provider: Option, + /// Link type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2Dot1LinkType, + /// Link URL. + #[serde(rename = "url")] + pub url: String, +} + +impl ServiceDefinitionV2Dot1Link { + pub fn new( + name: String, + type_: crate::datadogV2::model::ServiceDefinitionV2Dot1LinkType, + url: String, + ) -> ServiceDefinitionV2Dot1Link { + ServiceDefinitionV2Dot1Link { + name, + provider: None, + type_, + url, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_link_type.rs b/src/datadogV2/model/model_service_definition_v2_dot1_link_type.rs new file mode 100644 index 000000000..eef9f9e38 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_link_type.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot1LinkType { + #[serde(rename = "doc")] + DOC, + #[serde(rename = "repo")] + REPO, + #[serde(rename = "runbook")] + RUNBOOK, + #[serde(rename = "dashboard")] + DASHBOARD, + #[serde(rename = "other")] + OTHER, +} + +impl ToString for ServiceDefinitionV2Dot1LinkType { + fn to_string(&self) -> String { + match self { + Self::DOC => String::from("doc"), + Self::REPO => String::from("repo"), + Self::RUNBOOK => String::from("runbook"), + Self::DASHBOARD => String::from("dashboard"), + Self::OTHER => String::from("other"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs new file mode 100644 index 000000000..b9b27d257 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service owner's Microsoft Teams. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1MSTeams { + /// Contact value. + #[serde(rename = "contact")] + pub contact: String, + /// Contact Microsoft Teams. + #[serde(rename = "name")] + pub name: Option, + /// Contact type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2Dot1MSTeamsType, +} + +impl ServiceDefinitionV2Dot1MSTeams { + pub fn new( + contact: String, + type_: crate::datadogV2::model::ServiceDefinitionV2Dot1MSTeamsType, + ) -> ServiceDefinitionV2Dot1MSTeams { + ServiceDefinitionV2Dot1MSTeams { + contact, + name: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams_type.rs b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams_type.rs new file mode 100644 index 000000000..fc351be0b --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_ms_teams_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot1MSTeamsType { + #[serde(rename = "microsoft-teams")] + MICROSOFT_TEAMS, +} + +impl ToString for ServiceDefinitionV2Dot1MSTeamsType { + fn to_string(&self) -> String { + match self { + Self::MICROSOFT_TEAMS => String::from("microsoft-teams"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs new file mode 100644 index 000000000..5d56866e7 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Opsgenie integration for the service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1Opsgenie { + /// Opsgenie instance region. + #[serde(rename = "region")] + pub region: Option, + /// Opsgenie service url. + #[serde(rename = "service-url")] + pub service_url: String, +} + +impl ServiceDefinitionV2Dot1Opsgenie { + pub fn new(service_url: String) -> ServiceDefinitionV2Dot1Opsgenie { + ServiceDefinitionV2Dot1Opsgenie { + region: None, + service_url, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie_region.rs b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie_region.rs new file mode 100644 index 000000000..6b963f044 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_opsgenie_region.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot1OpsgenieRegion { + #[serde(rename = "US")] + US, + #[serde(rename = "EU")] + EU, +} + +impl ToString for ServiceDefinitionV2Dot1OpsgenieRegion { + fn to_string(&self) -> String { + match self { + Self::US => String::from("US"), + Self::EU => String::from("EU"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs b/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs new file mode 100644 index 000000000..1d6c9a1c9 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_pagerduty.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// PagerDuty integration for the service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1Pagerduty { + /// PagerDuty service url. + #[serde(rename = "service-url")] + pub service_url: Option, +} + +impl ServiceDefinitionV2Dot1Pagerduty { + pub fn new() -> ServiceDefinitionV2Dot1Pagerduty { + ServiceDefinitionV2Dot1Pagerduty { service_url: None } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs b/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs new file mode 100644 index 000000000..7539fb877 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_slack.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service owner's Slack channel. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot1Slack { + /// Slack Channel. + #[serde(rename = "contact")] + pub contact: String, + /// Contact Slack. + #[serde(rename = "name")] + pub name: Option, + /// Contact type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2Dot1SlackType, +} + +impl ServiceDefinitionV2Dot1Slack { + pub fn new( + contact: String, + type_: crate::datadogV2::model::ServiceDefinitionV2Dot1SlackType, + ) -> ServiceDefinitionV2Dot1Slack { + ServiceDefinitionV2Dot1Slack { + contact, + name: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_slack_type.rs b/src/datadogV2/model/model_service_definition_v2_dot1_slack_type.rs new file mode 100644 index 000000000..1cd9fbbae --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_slack_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot1SlackType { + #[serde(rename = "slack")] + SLACK, +} + +impl ToString for ServiceDefinitionV2Dot1SlackType { + fn to_string(&self) -> String { + match self { + Self::SLACK => String::from("slack"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot1_version.rs b/src/datadogV2/model/model_service_definition_v2_dot1_version.rs new file mode 100644 index 000000000..42ecaadab --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot1_version.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot1Version { + #[serde(rename = "v2.1")] + V2_1, +} + +impl ToString for ServiceDefinitionV2Dot1Version { + fn to_string(&self) -> String { + match self { + Self::V2_1 => String::from("v2.1"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2.rs b/src/datadogV2/model/model_service_definition_v2_dot2.rs new file mode 100644 index 000000000..3b60d67e0 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2.rs @@ -0,0 +1,77 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service definition v2.2 for providing service metadata and integrations. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot2 { + /// Identifier for a group of related services serving a product feature, which the service is a part of. + #[serde(rename = "application")] + pub application: Option, + /// A list of contacts related to the services. + #[serde(rename = "contacts")] + pub contacts: Option>, + /// Unique identifier of the service. Must be unique across all services and is used to match with a service in Datadog. + #[serde(rename = "dd-service")] + pub dd_service: String, + /// A short description of the service. + #[serde(rename = "description")] + pub description: Option, + /// Extensions to v2.2 schema. + #[serde(rename = "extensions")] + pub extensions: Option>, + /// Third party integrations that Datadog supports. + #[serde(rename = "integrations")] + pub integrations: Option>, + /// The service's programming language. Datadog recognizes the following languages: `dotnet`, `go`, `java`, `js`, `php`, `python`, `ruby`, and `c++`. + #[serde(rename = "languages")] + pub languages: Option>, + /// The current life cycle phase of the service. + #[serde(rename = "lifecycle")] + pub lifecycle: Option, + /// A list of links related to the services. + #[serde(rename = "links")] + pub links: Option>, + /// Schema version being used. + #[serde(rename = "schema-version")] + pub schema_version: crate::datadogV2::model::ServiceDefinitionV2Dot2Version, + /// A set of custom tags. + #[serde(rename = "tags")] + pub tags: Option>, + /// Team that owns the service. It is used to locate a team defined in Datadog Teams if it exists. + #[serde(rename = "team")] + pub team: Option, + /// Importance of the service. + #[serde(rename = "tier")] + pub tier: Option, + /// The type of service. + #[serde(rename = "type")] + pub type_: Option, +} + +impl ServiceDefinitionV2Dot2 { + pub fn new( + dd_service: String, + schema_version: crate::datadogV2::model::ServiceDefinitionV2Dot2Version, + ) -> ServiceDefinitionV2Dot2 { + ServiceDefinitionV2Dot2 { + application: None, + contacts: None, + dd_service, + description: None, + extensions: None, + integrations: None, + languages: None, + lifecycle: None, + links: None, + schema_version, + tags: None, + team: None, + tier: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs b/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs new file mode 100644 index 000000000..729927489 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_contact.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service owner's contacts information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot2Contact { + /// Contact value. + #[serde(rename = "contact")] + pub contact: String, + /// Contact Name. + #[serde(rename = "name")] + pub name: Option, + /// Contact type. Datadog recognizes the following types: `email`, `slack`, and `microsoft-teams`. + #[serde(rename = "type")] + pub type_: String, +} + +impl ServiceDefinitionV2Dot2Contact { + pub fn new(contact: String, type_: String) -> ServiceDefinitionV2Dot2Contact { + ServiceDefinitionV2Dot2Contact { + contact, + name: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs b/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs new file mode 100644 index 000000000..ab052076b --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_integrations.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Third party integrations that Datadog supports. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot2Integrations { + /// Opsgenie integration for the service. + #[serde(rename = "opsgenie")] + pub opsgenie: Option>, + /// PagerDuty integration for the service. + #[serde(rename = "pagerduty")] + pub pagerduty: Option>, +} + +impl ServiceDefinitionV2Dot2Integrations { + pub fn new() -> ServiceDefinitionV2Dot2Integrations { + ServiceDefinitionV2Dot2Integrations { + opsgenie: None, + pagerduty: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_link.rs b/src/datadogV2/model/model_service_definition_v2_dot2_link.rs new file mode 100644 index 000000000..b4260c1e3 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_link.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service's external links. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot2Link { + /// Link name. + #[serde(rename = "name")] + pub name: String, + /// Link provider. + #[serde(rename = "provider")] + pub provider: Option, + /// Link type. Datadog recognizes the following types: `runbook`, `doc`, `repo`, `dashboard`, and `other`. + #[serde(rename = "type")] + pub type_: String, + /// Link URL. + #[serde(rename = "url")] + pub url: String, +} + +impl ServiceDefinitionV2Dot2Link { + pub fn new(name: String, type_: String, url: String) -> ServiceDefinitionV2Dot2Link { + ServiceDefinitionV2Dot2Link { + name, + provider: None, + type_, + url, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs new file mode 100644 index 000000000..39788e383 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Opsgenie integration for the service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot2Opsgenie { + /// Opsgenie instance region. + #[serde(rename = "region")] + pub region: Option, + /// Opsgenie service url. + #[serde(rename = "service-url")] + pub service_url: String, +} + +impl ServiceDefinitionV2Dot2Opsgenie { + pub fn new(service_url: String) -> ServiceDefinitionV2Dot2Opsgenie { + ServiceDefinitionV2Dot2Opsgenie { + region: None, + service_url, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie_region.rs b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie_region.rs new file mode 100644 index 000000000..39f078a4c --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_opsgenie_region.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot2OpsgenieRegion { + #[serde(rename = "US")] + US, + #[serde(rename = "EU")] + EU, +} + +impl ToString for ServiceDefinitionV2Dot2OpsgenieRegion { + fn to_string(&self) -> String { + match self { + Self::US => String::from("US"), + Self::EU => String::from("EU"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs b/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs new file mode 100644 index 000000000..491619bdb --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_pagerduty.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// PagerDuty integration for the service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Dot2Pagerduty { + /// PagerDuty service url. + #[serde(rename = "service-url")] + pub service_url: Option, +} + +impl ServiceDefinitionV2Dot2Pagerduty { + pub fn new() -> ServiceDefinitionV2Dot2Pagerduty { + ServiceDefinitionV2Dot2Pagerduty { service_url: None } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_type.rs b/src/datadogV2/model/model_service_definition_v2_dot2_type.rs new file mode 100644 index 000000000..3adbbba98 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_type.rs @@ -0,0 +1,37 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot2Type { + #[serde(rename = "web")] + WEB, + #[serde(rename = "db")] + DB, + #[serde(rename = "cache")] + CACHE, + #[serde(rename = "function")] + FUNCTION, + #[serde(rename = "browser")] + BROSWER, + #[serde(rename = "mobile")] + MOBILE, + #[serde(rename = "custom")] + CUSTOM, +} + +impl ToString for ServiceDefinitionV2Dot2Type { + fn to_string(&self) -> String { + match self { + Self::WEB => String::from("web"), + Self::DB => String::from("db"), + Self::CACHE => String::from("cache"), + Self::FUNCTION => String::from("function"), + Self::BROSWER => String::from("browser"), + Self::MOBILE => String::from("mobile"), + Self::CUSTOM => String::from("custom"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_dot2_version.rs b/src/datadogV2/model/model_service_definition_v2_dot2_version.rs new file mode 100644 index 000000000..bb9da8c94 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_dot2_version.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Dot2Version { + #[serde(rename = "v2.2")] + V2_2, +} + +impl ToString for ServiceDefinitionV2Dot2Version { + fn to_string(&self) -> String { + match self { + Self::V2_2 => String::from("v2.2"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_email.rs b/src/datadogV2/model/model_service_definition_v2_email.rs new file mode 100644 index 000000000..d20dad5ec --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_email.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service owner's email. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Email { + /// Contact value. + #[serde(rename = "contact")] + pub contact: String, + /// Contact email. + #[serde(rename = "name")] + pub name: Option, + /// Contact type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2EmailType, +} + +impl ServiceDefinitionV2Email { + pub fn new( + contact: String, + type_: crate::datadogV2::model::ServiceDefinitionV2EmailType, + ) -> ServiceDefinitionV2Email { + ServiceDefinitionV2Email { + contact, + name: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_email_type.rs b/src/datadogV2/model/model_service_definition_v2_email_type.rs new file mode 100644 index 000000000..51c8555a0 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_email_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2EmailType { + #[serde(rename = "email")] + EMAIL, +} + +impl ToString for ServiceDefinitionV2EmailType { + fn to_string(&self) -> String { + match self { + Self::EMAIL => String::from("email"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_integrations.rs b/src/datadogV2/model/model_service_definition_v2_integrations.rs new file mode 100644 index 000000000..e9d928293 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_integrations.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Third party integrations that Datadog supports. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Integrations { + /// Opsgenie integration for the service. + #[serde(rename = "opsgenie")] + pub opsgenie: Option>, + /// PagerDuty service URL for the service. + #[serde(rename = "pagerduty")] + pub pagerduty: Option, +} + +impl ServiceDefinitionV2Integrations { + pub fn new() -> ServiceDefinitionV2Integrations { + ServiceDefinitionV2Integrations { + opsgenie: None, + pagerduty: None, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_link.rs b/src/datadogV2/model/model_service_definition_v2_link.rs new file mode 100644 index 000000000..1e79cf607 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_link.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service's external links. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Link { + /// Link name. + #[serde(rename = "name")] + pub name: String, + /// Link type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2LinkType, + /// Link URL. + #[serde(rename = "url")] + pub url: String, +} + +impl ServiceDefinitionV2Link { + pub fn new( + name: String, + type_: crate::datadogV2::model::ServiceDefinitionV2LinkType, + url: String, + ) -> ServiceDefinitionV2Link { + ServiceDefinitionV2Link { name, type_, url } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_link_type.rs b/src/datadogV2/model/model_service_definition_v2_link_type.rs new file mode 100644 index 000000000..533d56cbc --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_link_type.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2LinkType { + #[serde(rename = "doc")] + DOC, + #[serde(rename = "wiki")] + WIKI, + #[serde(rename = "runbook")] + RUNBOOK, + #[serde(rename = "url")] + URL, + #[serde(rename = "repo")] + REPO, + #[serde(rename = "dashboard")] + DASHBOARD, + #[serde(rename = "oncall")] + ONCALL, + #[serde(rename = "code")] + CODE, + #[serde(rename = "link")] + LINK, +} + +impl ToString for ServiceDefinitionV2LinkType { + fn to_string(&self) -> String { + match self { + Self::DOC => String::from("doc"), + Self::WIKI => String::from("wiki"), + Self::RUNBOOK => String::from("runbook"), + Self::URL => String::from("url"), + Self::REPO => String::from("repo"), + Self::DASHBOARD => String::from("dashboard"), + Self::ONCALL => String::from("oncall"), + Self::CODE => String::from("code"), + Self::LINK => String::from("link"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_ms_teams.rs b/src/datadogV2/model/model_service_definition_v2_ms_teams.rs new file mode 100644 index 000000000..ce30f45a1 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_ms_teams.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service owner's Microsoft Teams. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2MSTeams { + /// Contact value. + #[serde(rename = "contact")] + pub contact: String, + /// Contact Microsoft Teams. + #[serde(rename = "name")] + pub name: Option, + /// Contact type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2MSTeamsType, +} + +impl ServiceDefinitionV2MSTeams { + pub fn new( + contact: String, + type_: crate::datadogV2::model::ServiceDefinitionV2MSTeamsType, + ) -> ServiceDefinitionV2MSTeams { + ServiceDefinitionV2MSTeams { + contact, + name: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_ms_teams_type.rs b/src/datadogV2/model/model_service_definition_v2_ms_teams_type.rs new file mode 100644 index 000000000..3de1e4dd4 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_ms_teams_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2MSTeamsType { + #[serde(rename = "microsoft-teams")] + MICROSOFT_TEAMS, +} + +impl ToString for ServiceDefinitionV2MSTeamsType { + fn to_string(&self) -> String { + match self { + Self::MICROSOFT_TEAMS => String::from("microsoft-teams"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_opsgenie.rs b/src/datadogV2/model/model_service_definition_v2_opsgenie.rs new file mode 100644 index 000000000..7805b6b78 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_opsgenie.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Opsgenie integration for the service. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Opsgenie { + /// Opsgenie instance region. + #[serde(rename = "region")] + pub region: Option, + /// Opsgenie service url. + #[serde(rename = "service-url")] + pub service_url: String, +} + +impl ServiceDefinitionV2Opsgenie { + pub fn new(service_url: String) -> ServiceDefinitionV2Opsgenie { + ServiceDefinitionV2Opsgenie { + region: None, + service_url, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_opsgenie_region.rs b/src/datadogV2/model/model_service_definition_v2_opsgenie_region.rs new file mode 100644 index 000000000..e1062b352 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_opsgenie_region.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2OpsgenieRegion { + #[serde(rename = "US")] + US, + #[serde(rename = "EU")] + EU, +} + +impl ToString for ServiceDefinitionV2OpsgenieRegion { + fn to_string(&self) -> String { + match self { + Self::US => String::from("US"), + Self::EU => String::from("EU"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_repo.rs b/src/datadogV2/model/model_service_definition_v2_repo.rs new file mode 100644 index 000000000..c8ad9dba2 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_repo.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service code repositories. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Repo { + /// Repository name. + #[serde(rename = "name")] + pub name: String, + /// Repository provider. + #[serde(rename = "provider")] + pub provider: Option, + /// Repository URL. + #[serde(rename = "url")] + pub url: String, +} + +impl ServiceDefinitionV2Repo { + pub fn new(name: String, url: String) -> ServiceDefinitionV2Repo { + ServiceDefinitionV2Repo { + name, + provider: None, + url, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_slack.rs b/src/datadogV2/model/model_service_definition_v2_slack.rs new file mode 100644 index 000000000..b926c4fcf --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_slack.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Service owner's Slack channel. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionV2Slack { + /// Slack Channel. + #[serde(rename = "contact")] + pub contact: String, + /// Contact Slack. + #[serde(rename = "name")] + pub name: Option, + /// Contact type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ServiceDefinitionV2SlackType, +} + +impl ServiceDefinitionV2Slack { + pub fn new( + contact: String, + type_: crate::datadogV2::model::ServiceDefinitionV2SlackType, + ) -> ServiceDefinitionV2Slack { + ServiceDefinitionV2Slack { + contact, + name: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_slack_type.rs b/src/datadogV2/model/model_service_definition_v2_slack_type.rs new file mode 100644 index 000000000..b9bd3f6c9 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_slack_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2SlackType { + #[serde(rename = "slack")] + SLACK, +} + +impl ToString for ServiceDefinitionV2SlackType { + fn to_string(&self) -> String { + match self { + Self::SLACK => String::from("slack"), + } + } +} diff --git a/src/datadogV2/model/model_service_definition_v2_version.rs b/src/datadogV2/model/model_service_definition_v2_version.rs new file mode 100644 index 000000000..997695949 --- /dev/null +++ b/src/datadogV2/model/model_service_definition_v2_version.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServiceDefinitionV2Version { + #[serde(rename = "v2")] + V2, +} + +impl ToString for ServiceDefinitionV2Version { + fn to_string(&self) -> String { + match self { + Self::V2 => String::from("v2"), + } + } +} diff --git a/src/datadogV2/model/model_service_definitions_create_request.rs b/src/datadogV2/model/model_service_definitions_create_request.rs new file mode 100644 index 000000000..9d2072ecd --- /dev/null +++ b/src/datadogV2/model/model_service_definitions_create_request.rs @@ -0,0 +1,14 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; + +/// Create service definitions request. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ServiceDefinitionsCreateRequest { + ServiceDefinitionV2Dot2(Box), + ServiceDefinitionV2Dot1(Box), + ServiceDefinitionV2(Box), + ServiceDefinitionRaw(Box), +} diff --git a/src/datadogV2/model/model_service_definitions_list_response.rs b/src/datadogV2/model/model_service_definitions_list_response.rs new file mode 100644 index 000000000..1185d9276 --- /dev/null +++ b/src/datadogV2/model/model_service_definitions_list_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create service definitions response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServiceDefinitionsListResponse { + /// Data representing service definitions. + #[serde(rename = "data")] + pub data: Option>, +} + +impl ServiceDefinitionsListResponse { + pub fn new() -> ServiceDefinitionsListResponse { + ServiceDefinitionsListResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_slack_integration_metadata.rs b/src/datadogV2/model/model_slack_integration_metadata.rs new file mode 100644 index 000000000..da2b874f0 --- /dev/null +++ b/src/datadogV2/model/model_slack_integration_metadata.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Incident integration metadata for the Slack integration. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SlackIntegrationMetadata { + /// Array of Slack channels in this integration metadata. + #[serde(rename = "channels")] + pub channels: Vec, +} + +impl SlackIntegrationMetadata { + pub fn new( + channels: Vec, + ) -> SlackIntegrationMetadata { + SlackIntegrationMetadata { channels } + } +} diff --git a/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs b/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs new file mode 100644 index 000000000..119597103 --- /dev/null +++ b/src/datadogV2/model/model_slack_integration_metadata_channel_item.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Item in the Slack integration metadata channel array. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SlackIntegrationMetadataChannelItem { + /// Slack channel ID. + #[serde(rename = "channel_id")] + pub channel_id: String, + /// Name of the Slack channel. + #[serde(rename = "channel_name")] + pub channel_name: String, + /// URL redirecting to the Slack channel. + #[serde(rename = "redirect_url")] + pub redirect_url: String, + /// Slack team ID. + #[serde(rename = "team_id")] + pub team_id: Option, +} + +impl SlackIntegrationMetadataChannelItem { + pub fn new( + channel_id: String, + channel_name: String, + redirect_url: String, + ) -> SlackIntegrationMetadataChannelItem { + SlackIntegrationMetadataChannelItem { + channel_id, + channel_name, + redirect_url, + team_id: None, + } + } +} diff --git a/src/datadogV2/model/model_sort_direction.rs b/src/datadogV2/model/model_sort_direction.rs new file mode 100644 index 000000000..d27c7b98a --- /dev/null +++ b/src/datadogV2/model/model_sort_direction.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SortDirection { + #[serde(rename = "desc")] + DESC, + #[serde(rename = "asc")] + ASC, +} + +impl ToString for SortDirection { + fn to_string(&self) -> String { + match self { + Self::DESC => String::from("desc"), + Self::ASC => String::from("asc"), + } + } +} diff --git a/src/datadogV2/model/model_span.rs b/src/datadogV2/model/model_span.rs new file mode 100644 index 000000000..603c081e4 --- /dev/null +++ b/src/datadogV2/model/model_span.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object description of a spans after being processed and stored by Datadog. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Span { + /// JSON object containing all span attributes and their associated values. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Unique ID of the Span. + #[serde(rename = "id")] + pub id: Option, + /// Type of the span. + #[serde(rename = "type")] + pub type_: Option, +} + +impl Span { + pub fn new() -> Span { + Span { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_bucket.rs b/src/datadogV2/model/model_spans_aggregate_bucket.rs new file mode 100644 index 000000000..c03b5fb22 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_bucket.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Spans aggregate. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateBucket { + /// A bucket values. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the spans aggregate. + #[serde(rename = "id")] + pub id: Option, + /// The spans aggregate bucket type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SpansAggregateBucket { + pub fn new() -> SpansAggregateBucket { + SpansAggregateBucket { + attributes: None, + id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs b/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs new file mode 100644 index 000000000..322d63f11 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_bucket_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A bucket values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateBucketAttributes { + /// The key, value pairs for each group by. + #[serde(rename = "by")] + pub by: Option< + std::collections::HashMap>, + >, + /// The compute data. + #[serde(rename = "compute")] + pub compute: Option>, + /// A map of the metric name -> value for regular compute or list of values for a timeseries. + #[serde(rename = "computes")] + pub computes: Option< + std::collections::HashMap, + >, +} + +impl SpansAggregateBucketAttributes { + pub fn new() -> SpansAggregateBucketAttributes { + SpansAggregateBucketAttributes { + by: None, + compute: None, + computes: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_type.rs b/src/datadogV2/model/model_spans_aggregate_bucket_type.rs new file mode 100644 index 000000000..64b2fb01a --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_bucket_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansAggregateBucketType { + #[serde(rename = "bucket")] + BUCKET, +} + +impl ToString for SpansAggregateBucketType { + fn to_string(&self) -> String { + match self { + Self::BUCKET => String::from("bucket"), + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_value.rs b/src/datadogV2/model/model_spans_aggregate_bucket_value.rs new file mode 100644 index 000000000..048815570 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_bucket_value.rs @@ -0,0 +1,15 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A bucket value, can be either a timeseries or a single value. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SpansAggregateBucketValue { + SpansAggregateBucketValueSingleString(Box), + SpansAggregateBucketValueSingleNumber(Box), + SpansAggregateBucketValueTimeseries( + Box, + ), +} diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries.rs b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries.rs new file mode 100644 index 000000000..5c30f3d45 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries.rs @@ -0,0 +1,16 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries array. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateBucketValueTimeseries {} + +impl SpansAggregateBucketValueTimeseries { + pub fn new() -> SpansAggregateBucketValueTimeseries { + SpansAggregateBucketValueTimeseries {} + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs new file mode 100644 index 000000000..b7d30c1e7 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_bucket_value_timeseries_point.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A timeseries point. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateBucketValueTimeseriesPoint { + /// The time value for this point. + #[serde(rename = "time")] + pub time: Option, + /// The value for this point. + #[serde(rename = "value")] + pub value: Option, +} + +impl SpansAggregateBucketValueTimeseriesPoint { + pub fn new() -> SpansAggregateBucketValueTimeseriesPoint { + SpansAggregateBucketValueTimeseriesPoint { + time: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_data.rs b/src/datadogV2/model/model_spans_aggregate_data.rs new file mode 100644 index 000000000..f34503319 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object containing the query content. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateData { + /// The object containing all the query parameters. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The type of resource. The value should always be aggregate_request. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SpansAggregateData { + pub fn new() -> SpansAggregateData { + SpansAggregateData { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_request.rs b/src/datadogV2/model/model_spans_aggregate_request.rs new file mode 100644 index 000000000..b2cb76709 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object sent with the request to retrieve a list of aggregated spans from your organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateRequest { + /// The object containing the query content. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SpansAggregateRequest { + pub fn new() -> SpansAggregateRequest { + SpansAggregateRequest { data: None } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_request_attributes.rs b/src/datadogV2/model/model_spans_aggregate_request_attributes.rs new file mode 100644 index 000000000..2990d1a0f --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_request_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object containing all the query parameters. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateRequestAttributes { + /// The list of metrics or timeseries to compute for the retrieved buckets. + #[serde(rename = "compute")] + pub compute: Option>, + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// The rules for the group by. + #[serde(rename = "group_by")] + pub group_by: Option>, + /// Global query options that are used during the query. + /// Note: You should only supply timezone or time offset but not both otherwise the query will fail. + #[serde(rename = "options")] + pub options: Option>, +} + +impl SpansAggregateRequestAttributes { + pub fn new() -> SpansAggregateRequestAttributes { + SpansAggregateRequestAttributes { + compute: None, + filter: None, + group_by: None, + options: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_request_type.rs b/src/datadogV2/model/model_spans_aggregate_request_type.rs new file mode 100644 index 000000000..4fe52ea21 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansAggregateRequestType { + #[serde(rename = "aggregate_request")] + AGGREGATE_REQUEST, +} + +impl ToString for SpansAggregateRequestType { + fn to_string(&self) -> String { + match self { + Self::AGGREGATE_REQUEST => String::from("aggregate_request"), + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_response.rs b/src/datadogV2/model/model_spans_aggregate_response.rs new file mode 100644 index 000000000..9e25530cb --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The response object for the spans aggregate API endpoint. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateResponse { + /// The list of matching buckets, one item per bucket. + #[serde(rename = "data")] + pub data: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SpansAggregateResponse { + pub fn new() -> SpansAggregateResponse { + SpansAggregateResponse { + data: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_response_metadata.rs b/src/datadogV2/model/model_spans_aggregate_response_metadata.rs new file mode 100644 index 000000000..51a10e002 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_response_metadata.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata associated with a request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateResponseMetadata { + /// The time elapsed in milliseconds. + #[serde(rename = "elapsed")] + pub elapsed: Option, + /// The identifier of the request. + #[serde(rename = "request_id")] + pub request_id: Option, + /// The status of the response. + #[serde(rename = "status")] + pub status: Option, + /// A list of warnings (non fatal errors) encountered, partial results might be returned if + /// warnings are present in the response. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl SpansAggregateResponseMetadata { + pub fn new() -> SpansAggregateResponseMetadata { + SpansAggregateResponseMetadata { + elapsed: None, + request_id: None, + status: None, + warnings: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_response_status.rs b/src/datadogV2/model/model_spans_aggregate_response_status.rs new file mode 100644 index 000000000..87820b7d4 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_response_status.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansAggregateResponseStatus { + #[serde(rename = "done")] + DONE, + #[serde(rename = "timeout")] + TIMEOUT, +} + +impl ToString for SpansAggregateResponseStatus { + fn to_string(&self) -> String { + match self { + Self::DONE => String::from("done"), + Self::TIMEOUT => String::from("timeout"), + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_sort.rs b/src/datadogV2/model/model_spans_aggregate_sort.rs new file mode 100644 index 000000000..c00b2a9ff --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_sort.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A sort rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAggregateSort { + /// An aggregation function. + #[serde(rename = "aggregation")] + pub aggregation: Option, + /// The metric to sort by (only used for `type=measure`). + #[serde(rename = "metric")] + pub metric: Option, + /// The order to use, ascending or descending. + #[serde(rename = "order")] + pub order: Option, + /// The type of sorting algorithm. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SpansAggregateSort { + pub fn new() -> SpansAggregateSort { + SpansAggregateSort { + aggregation: None, + metric: None, + order: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregate_sort_type.rs b/src/datadogV2/model/model_spans_aggregate_sort_type.rs new file mode 100644 index 000000000..0548d01c0 --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregate_sort_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansAggregateSortType { + #[serde(rename = "alphabetical")] + ALPHABETICAL, + #[serde(rename = "measure")] + MEASURE, +} + +impl ToString for SpansAggregateSortType { + fn to_string(&self) -> String { + match self { + Self::ALPHABETICAL => String::from("alphabetical"), + Self::MEASURE => String::from("measure"), + } + } +} diff --git a/src/datadogV2/model/model_spans_aggregation_function.rs b/src/datadogV2/model/model_spans_aggregation_function.rs new file mode 100644 index 000000000..993b9f29c --- /dev/null +++ b/src/datadogV2/model/model_spans_aggregation_function.rs @@ -0,0 +1,52 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansAggregationFunction { + #[serde(rename = "count")] + COUNT, + #[serde(rename = "cardinality")] + CARDINALITY, + #[serde(rename = "pc75")] + PERCENTILE_75, + #[serde(rename = "pc90")] + PERCENTILE_90, + #[serde(rename = "pc95")] + PERCENTILE_95, + #[serde(rename = "pc98")] + PERCENTILE_98, + #[serde(rename = "pc99")] + PERCENTILE_99, + #[serde(rename = "sum")] + SUM, + #[serde(rename = "min")] + MIN, + #[serde(rename = "max")] + MAX, + #[serde(rename = "avg")] + AVG, + #[serde(rename = "median")] + MEDIAN, +} + +impl ToString for SpansAggregationFunction { + fn to_string(&self) -> String { + match self { + Self::COUNT => String::from("count"), + Self::CARDINALITY => String::from("cardinality"), + Self::PERCENTILE_75 => String::from("pc75"), + Self::PERCENTILE_90 => String::from("pc90"), + Self::PERCENTILE_95 => String::from("pc95"), + Self::PERCENTILE_98 => String::from("pc98"), + Self::PERCENTILE_99 => String::from("pc99"), + Self::SUM => String::from("sum"), + Self::MIN => String::from("min"), + Self::MAX => String::from("max"), + Self::AVG => String::from("avg"), + Self::MEDIAN => String::from("median"), + } + } +} diff --git a/src/datadogV2/model/model_spans_attributes.rs b/src/datadogV2/model/model_spans_attributes.rs new file mode 100644 index 000000000..4a3af463c --- /dev/null +++ b/src/datadogV2/model/model_spans_attributes.rs @@ -0,0 +1,88 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// JSON object containing all span attributes and their associated values. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansAttributes { + /// JSON object of attributes from your span. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// JSON object of custom spans data. + #[serde(rename = "custom")] + pub custom: Option>, + /// End timestamp of your span. + #[serde(rename = "end_timestamp")] + pub end_timestamp: Option, + /// Name of the environment from where the spans are being sent. + #[serde(rename = "env")] + pub env: Option, + /// Name of the machine from where the spans are being sent. + #[serde(rename = "host")] + pub host: Option, + /// The reason why the span was ingested. + #[serde(rename = "ingestion_reason")] + pub ingestion_reason: Option, + /// Id of the span that's parent of this span. + #[serde(rename = "parent_id")] + pub parent_id: Option, + /// Unique identifier of the resource. + #[serde(rename = "resource_hash")] + pub resource_hash: Option, + /// The name of the resource. + #[serde(rename = "resource_name")] + pub resource_name: Option, + /// The reason why the span was indexed. + #[serde(rename = "retained_by")] + pub retained_by: Option, + /// The name of the application or service generating the span events. + /// It is used to switch from APM to Logs, so make sure you define the same + /// value when you use both products. + #[serde(rename = "service")] + pub service: Option, + /// Whether or not the span was collected as a stand-alone span. Always associated to "single_span" ingestion_reason if true. + #[serde(rename = "single_span")] + pub single_span: Option, + /// Id of the span. + #[serde(rename = "span_id")] + pub span_id: Option, + /// Start timestamp of your span. + #[serde(rename = "start_timestamp")] + pub start_timestamp: Option, + /// Array of tags associated with your span. + #[serde(rename = "tags")] + pub tags: Option>, + /// Id of the trace to which the span belongs. + #[serde(rename = "trace_id")] + pub trace_id: Option, + /// The type of the span. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SpansAttributes { + pub fn new() -> SpansAttributes { + SpansAttributes { + attributes: None, + custom: None, + end_timestamp: None, + env: None, + host: None, + ingestion_reason: None, + parent_id: None, + resource_hash: None, + resource_name: None, + retained_by: None, + service: None, + single_span: None, + span_id: None, + start_timestamp: None, + tags: None, + trace_id: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_compute.rs b/src/datadogV2/model/model_spans_compute.rs new file mode 100644 index 000000000..19399a073 --- /dev/null +++ b/src/datadogV2/model/model_spans_compute.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A compute rule to compute metrics or timeseries. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansCompute { + /// An aggregation function. + #[serde(rename = "aggregation")] + pub aggregation: crate::datadogV2::model::SpansAggregationFunction, + /// The time buckets' size (only used for type=timeseries) + /// Defaults to a resolution of 150 points. + #[serde(rename = "interval")] + pub interval: Option, + /// The metric to use. + #[serde(rename = "metric")] + pub metric: Option, + /// The type of compute. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SpansCompute { + pub fn new(aggregation: crate::datadogV2::model::SpansAggregationFunction) -> SpansCompute { + SpansCompute { + aggregation, + interval: None, + metric: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_compute_type.rs b/src/datadogV2/model/model_spans_compute_type.rs new file mode 100644 index 000000000..7926813d9 --- /dev/null +++ b/src/datadogV2/model/model_spans_compute_type.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansComputeType { + #[serde(rename = "timeseries")] + TIMESERIES, + #[serde(rename = "total")] + TOTAL, +} + +impl ToString for SpansComputeType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES => String::from("timeseries"), + Self::TOTAL => String::from("total"), + } + } +} diff --git a/src/datadogV2/model/model_spans_filter.rs b/src/datadogV2/model/model_spans_filter.rs index d851e1230..909bd5b72 100644 --- a/src/datadogV2/model/model_spans_filter.rs +++ b/src/datadogV2/model/model_spans_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The spans filter used to index spans. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansFilter { /// The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). #[serde(rename = "query")] diff --git a/src/datadogV2/model/model_spans_filter_create.rs b/src/datadogV2/model/model_spans_filter_create.rs index 18a2c9fa8..0f57233ea 100644 --- a/src/datadogV2/model/model_spans_filter_create.rs +++ b/src/datadogV2/model/model_spans_filter_create.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The spans filter. Spans matching this filter will be indexed and stored. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansFilterCreate { /// The search query - following the [span search syntax](https://docs.datadoghq.com/tracing/trace_explorer/query_syntax/). #[serde(rename = "query")] diff --git a/src/datadogV2/model/model_spans_group_by.rs b/src/datadogV2/model/model_spans_group_by.rs new file mode 100644 index 000000000..d5d9250c7 --- /dev/null +++ b/src/datadogV2/model/model_spans_group_by.rs @@ -0,0 +1,43 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A group by rule. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansGroupBy { + /// The name of the facet to use (required). + #[serde(rename = "facet")] + pub facet: String, + /// Used to perform a histogram computation (only for measure facets). + /// Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval. + #[serde(rename = "histogram")] + pub histogram: Option>, + /// The maximum buckets to return for this group by. + #[serde(rename = "limit")] + pub limit: Option, + /// The value to use for spans that don't have the facet used to group by. + #[serde(rename = "missing")] + pub missing: Option>, + /// A sort rule. + #[serde(rename = "sort")] + pub sort: Option>, + /// A resulting object to put the given computes in over all the matching records. + #[serde(rename = "total")] + pub total: Option>, +} + +impl SpansGroupBy { + pub fn new(facet: String) -> SpansGroupBy { + SpansGroupBy { + facet, + histogram: None, + limit: None, + missing: None, + sort: None, + total: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_group_by_histogram.rs b/src/datadogV2/model/model_spans_group_by_histogram.rs new file mode 100644 index 000000000..856b96540 --- /dev/null +++ b/src/datadogV2/model/model_spans_group_by_histogram.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Used to perform a histogram computation (only for measure facets). +/// Note: At most 100 buckets are allowed, the number of buckets is (max - min)/interval. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansGroupByHistogram { + /// The bin size of the histogram buckets. + #[serde(rename = "interval")] + pub interval: f64, + /// The maximum value for the measure used in the histogram + /// (values greater than this one are filtered out). + #[serde(rename = "max")] + pub max: f64, + /// The minimum value for the measure used in the histogram + /// (values smaller than this one are filtered out). + #[serde(rename = "min")] + pub min: f64, +} + +impl SpansGroupByHistogram { + pub fn new(interval: f64, max: f64, min: f64) -> SpansGroupByHistogram { + SpansGroupByHistogram { interval, max, min } + } +} diff --git a/src/datadogV2/model/model_spans_group_by_missing.rs b/src/datadogV2/model/model_spans_group_by_missing.rs new file mode 100644 index 000000000..45ff9894d --- /dev/null +++ b/src/datadogV2/model/model_spans_group_by_missing.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// The value to use for spans that don't have the facet used to group by. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SpansGroupByMissing { + SpansGroupByMissingString(Box), + SpansGroupByMissingNumber(Box), +} diff --git a/src/datadogV2/model/model_spans_group_by_total.rs b/src/datadogV2/model/model_spans_group_by_total.rs new file mode 100644 index 000000000..0f8446a63 --- /dev/null +++ b/src/datadogV2/model/model_spans_group_by_total.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// A resulting object to put the given computes in over all the matching records. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SpansGroupByTotal { + SpansGroupByTotalBoolean(Box), + SpansGroupByTotalString(Box), + SpansGroupByTotalNumber(Box), +} diff --git a/src/datadogV2/model/model_spans_list_request.rs b/src/datadogV2/model/model_spans_list_request.rs new file mode 100644 index 000000000..660004df8 --- /dev/null +++ b/src/datadogV2/model/model_spans_list_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The request for a spans list. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansListRequest { + /// The object containing the query content. + #[serde(rename = "data")] + pub data: Option>, +} + +impl SpansListRequest { + pub fn new() -> SpansListRequest { + SpansListRequest { data: None } + } +} diff --git a/src/datadogV2/model/model_spans_list_request_attributes.rs b/src/datadogV2/model/model_spans_list_request_attributes.rs new file mode 100644 index 000000000..5af261ae5 --- /dev/null +++ b/src/datadogV2/model/model_spans_list_request_attributes.rs @@ -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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object containing all the query parameters. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansListRequestAttributes { + /// The search and filter query settings. + #[serde(rename = "filter")] + pub filter: Option>, + /// Global query options that are used during the query. + /// Note: You should only supply timezone or time offset but not both otherwise the query will fail. + #[serde(rename = "options")] + pub options: Option>, + /// Paging attributes for listing spans. + #[serde(rename = "page")] + pub page: Option>, + /// Sort parameters when querying spans. + #[serde(rename = "sort")] + pub sort: Option, +} + +impl SpansListRequestAttributes { + pub fn new() -> SpansListRequestAttributes { + SpansListRequestAttributes { + filter: None, + options: None, + page: None, + sort: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_list_request_data.rs b/src/datadogV2/model/model_spans_list_request_data.rs new file mode 100644 index 000000000..a9f43dca7 --- /dev/null +++ b/src/datadogV2/model/model_spans_list_request_data.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object containing the query content. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansListRequestData { + /// The object containing all the query parameters. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The type of resource. The value should always be search_request. + #[serde(rename = "type")] + pub type_: Option, +} + +impl SpansListRequestData { + pub fn new() -> SpansListRequestData { + SpansListRequestData { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_list_request_page.rs b/src/datadogV2/model/model_spans_list_request_page.rs new file mode 100644 index 000000000..44240394d --- /dev/null +++ b/src/datadogV2/model/model_spans_list_request_page.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes for listing spans. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansListRequestPage { + /// List following results with a cursor provided in the previous query. + #[serde(rename = "cursor")] + pub cursor: Option, + /// Maximum number of spans in the response. + #[serde(rename = "limit")] + pub limit: Option, +} + +impl SpansListRequestPage { + pub fn new() -> SpansListRequestPage { + SpansListRequestPage { + cursor: None, + limit: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_list_request_type.rs b/src/datadogV2/model/model_spans_list_request_type.rs new file mode 100644 index 000000000..ecfbb18a8 --- /dev/null +++ b/src/datadogV2/model/model_spans_list_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansListRequestType { + #[serde(rename = "search_request")] + SEARCH_REQUEST, +} + +impl ToString for SpansListRequestType { + fn to_string(&self) -> String { + match self { + Self::SEARCH_REQUEST => String::from("search_request"), + } + } +} diff --git a/src/datadogV2/model/model_spans_list_response.rs b/src/datadogV2/model/model_spans_list_response.rs new file mode 100644 index 000000000..2c09adbd1 --- /dev/null +++ b/src/datadogV2/model/model_spans_list_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response object with all spans matching the request and pagination information. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansListResponse { + /// Array of spans matching the request. + #[serde(rename = "data")] + pub data: Option>, + /// Links attributes. + #[serde(rename = "links")] + pub links: Option>, + /// The metadata associated with a request. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl SpansListResponse { + pub fn new() -> SpansListResponse { + SpansListResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_list_response_links.rs b/src/datadogV2/model/model_spans_list_response_links.rs new file mode 100644 index 000000000..d3b5d0573 --- /dev/null +++ b/src/datadogV2/model/model_spans_list_response_links.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansListResponseLinks { + /// Link for the next set of results. Note that the request can also be made using the + /// POST endpoint. + #[serde(rename = "next")] + pub next: Option, +} + +impl SpansListResponseLinks { + pub fn new() -> SpansListResponseLinks { + SpansListResponseLinks { next: None } + } +} diff --git a/src/datadogV2/model/model_spans_list_response_metadata.rs b/src/datadogV2/model/model_spans_list_response_metadata.rs new file mode 100644 index 000000000..8f8f1c87c --- /dev/null +++ b/src/datadogV2/model/model_spans_list_response_metadata.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The metadata associated with a request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansListResponseMetadata { + /// The time elapsed in milliseconds. + #[serde(rename = "elapsed")] + pub elapsed: Option, + /// Paging attributes. + #[serde(rename = "page")] + pub page: Option>, + /// The identifier of the request. + #[serde(rename = "request_id")] + pub request_id: Option, + /// The status of the response. + #[serde(rename = "status")] + pub status: Option, + /// A list of warnings (non fatal errors) encountered, partial results might be returned if + /// warnings are present in the response. + #[serde(rename = "warnings")] + pub warnings: Option>, +} + +impl SpansListResponseMetadata { + pub fn new() -> SpansListResponseMetadata { + SpansListResponseMetadata { + elapsed: None, + page: None, + request_id: None, + status: None, + warnings: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_metric_compute.rs b/src/datadogV2/model/model_spans_metric_compute.rs index 4bb0cc57f..c7f48a2c5 100644 --- a/src/datadogV2/model/model_spans_metric_compute.rs +++ b/src/datadogV2/model/model_spans_metric_compute.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The compute rule to compute the span-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricCompute { /// The type of aggregation to use. #[serde(rename = "aggregation_type")] diff --git a/src/datadogV2/model/model_spans_metric_compute_aggregation_type.rs b/src/datadogV2/model/model_spans_metric_compute_aggregation_type.rs index cd82152cc..7202f573d 100644 --- a/src/datadogV2/model/model_spans_metric_compute_aggregation_type.rs +++ b/src/datadogV2/model/model_spans_metric_compute_aggregation_type.rs @@ -20,9 +20,3 @@ impl ToString for SpansMetricComputeAggregationType { } } } - -impl Default for SpansMetricComputeAggregationType { - fn default() -> SpansMetricComputeAggregationType { - Self::COUNT - } -} diff --git a/src/datadogV2/model/model_spans_metric_create_attributes.rs b/src/datadogV2/model/model_spans_metric_create_attributes.rs index af26a4a9f..31425d255 100644 --- a/src/datadogV2/model/model_spans_metric_create_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_create_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object describing the Datadog span-based metric to create. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricCreateAttributes { /// The compute rule to compute the span-based metric. #[serde(rename = "compute")] @@ -21,10 +21,10 @@ pub struct SpansMetricCreateAttributes { impl SpansMetricCreateAttributes { pub fn new( - compute: crate::datadogV2::model::SpansMetricCompute, + compute: Box, ) -> SpansMetricCreateAttributes { SpansMetricCreateAttributes { - compute: Box::new(compute), + compute, filter: None, group_by: None, } diff --git a/src/datadogV2/model/model_spans_metric_create_data.rs b/src/datadogV2/model/model_spans_metric_create_data.rs index 5b9a0233e..7ab04106a 100644 --- a/src/datadogV2/model/model_spans_metric_create_data.rs +++ b/src/datadogV2/model/model_spans_metric_create_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new span-based metric properties. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricCreateData { /// The object describing the Datadog span-based metric to create. #[serde(rename = "attributes")] @@ -21,12 +21,12 @@ pub struct SpansMetricCreateData { impl SpansMetricCreateData { pub fn new( - attributes: crate::datadogV2::model::SpansMetricCreateAttributes, + attributes: Box, id: String, type_: crate::datadogV2::model::SpansMetricType, ) -> SpansMetricCreateData { SpansMetricCreateData { - attributes: Box::new(attributes), + attributes, id, type_, } diff --git a/src/datadogV2/model/model_spans_metric_create_request.rs b/src/datadogV2/model/model_spans_metric_create_request.rs index e130463a6..0e96b78b4 100644 --- a/src/datadogV2/model/model_spans_metric_create_request.rs +++ b/src/datadogV2/model/model_spans_metric_create_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new span-based metric body. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricCreateRequest { /// The new span-based metric properties. #[serde(rename = "data")] @@ -14,9 +14,9 @@ pub struct SpansMetricCreateRequest { } impl SpansMetricCreateRequest { - pub fn new(data: crate::datadogV2::model::SpansMetricCreateData) -> SpansMetricCreateRequest { - SpansMetricCreateRequest { - data: Box::new(data), - } + pub fn new( + data: Box, + ) -> SpansMetricCreateRequest { + SpansMetricCreateRequest { data } } } diff --git a/src/datadogV2/model/model_spans_metric_filter.rs b/src/datadogV2/model/model_spans_metric_filter.rs index c19e4f798..83a22d0ae 100644 --- a/src/datadogV2/model/model_spans_metric_filter.rs +++ b/src/datadogV2/model/model_spans_metric_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The span-based metric filter. Spans matching this filter will be aggregated in this metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricFilter { /// The search query - following the span search syntax. #[serde(rename = "query")] diff --git a/src/datadogV2/model/model_spans_metric_group_by.rs b/src/datadogV2/model/model_spans_metric_group_by.rs index 16582ff98..174d01bf3 100644 --- a/src/datadogV2/model/model_spans_metric_group_by.rs +++ b/src/datadogV2/model/model_spans_metric_group_by.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A group by rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricGroupBy { /// The path to the value the span-based metric will be aggregated over. #[serde(rename = "path")] diff --git a/src/datadogV2/model/model_spans_metric_response.rs b/src/datadogV2/model/model_spans_metric_response.rs index adb8fe6e6..80281f7e1 100644 --- a/src/datadogV2/model/model_spans_metric_response.rs +++ b/src/datadogV2/model/model_spans_metric_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The span-based metric object. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricResponse { /// The span-based metric properties. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_spans_metric_response_attributes.rs b/src/datadogV2/model/model_spans_metric_response_attributes.rs index 845bd2ce7..8ade41b23 100644 --- a/src/datadogV2/model/model_spans_metric_response_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_response_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The object describing a Datadog span-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricResponseAttributes { /// The compute rule to compute the span-based metric. #[serde(rename = "compute")] diff --git a/src/datadogV2/model/model_spans_metric_response_compute.rs b/src/datadogV2/model/model_spans_metric_response_compute.rs index 24a43f01d..08a126158 100644 --- a/src/datadogV2/model/model_spans_metric_response_compute.rs +++ b/src/datadogV2/model/model_spans_metric_response_compute.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The compute rule to compute the span-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricResponseCompute { /// The type of aggregation to use. #[serde(rename = "aggregation_type")] diff --git a/src/datadogV2/model/model_spans_metric_response_data.rs b/src/datadogV2/model/model_spans_metric_response_data.rs index d17698b77..3d1fb6942 100644 --- a/src/datadogV2/model/model_spans_metric_response_data.rs +++ b/src/datadogV2/model/model_spans_metric_response_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The span-based metric properties. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricResponseData { /// The object describing a Datadog span-based metric. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_spans_metric_response_filter.rs b/src/datadogV2/model/model_spans_metric_response_filter.rs index 13bdd909c..66f7acaa4 100644 --- a/src/datadogV2/model/model_spans_metric_response_filter.rs +++ b/src/datadogV2/model/model_spans_metric_response_filter.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The span-based metric filter. Spans matching this filter will be aggregated in this metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricResponseFilter { /// The search query - following the span search syntax. #[serde(rename = "query")] diff --git a/src/datadogV2/model/model_spans_metric_response_group_by.rs b/src/datadogV2/model/model_spans_metric_response_group_by.rs index 90ebcd05b..ff17f01f5 100644 --- a/src/datadogV2/model/model_spans_metric_response_group_by.rs +++ b/src/datadogV2/model/model_spans_metric_response_group_by.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// A group by rule. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricResponseGroupBy { /// The path to the value the span-based metric will be aggregated over. #[serde(rename = "path")] diff --git a/src/datadogV2/model/model_spans_metric_type.rs b/src/datadogV2/model/model_spans_metric_type.rs index f40e3bda9..2a2d5c981 100644 --- a/src/datadogV2/model/model_spans_metric_type.rs +++ b/src/datadogV2/model/model_spans_metric_type.rs @@ -17,9 +17,3 @@ impl ToString for SpansMetricType { } } } - -impl Default for SpansMetricType { - fn default() -> SpansMetricType { - Self::SPANS_METRICS - } -} diff --git a/src/datadogV2/model/model_spans_metric_update_attributes.rs b/src/datadogV2/model/model_spans_metric_update_attributes.rs index 77098d996..d71a64573 100644 --- a/src/datadogV2/model/model_spans_metric_update_attributes.rs +++ b/src/datadogV2/model/model_spans_metric_update_attributes.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The span-based metric properties that will be updated. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricUpdateAttributes { /// The compute rule to compute the span-based metric. #[serde(rename = "compute")] diff --git a/src/datadogV2/model/model_spans_metric_update_compute.rs b/src/datadogV2/model/model_spans_metric_update_compute.rs index 636daa5a8..306e0b428 100644 --- a/src/datadogV2/model/model_spans_metric_update_compute.rs +++ b/src/datadogV2/model/model_spans_metric_update_compute.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The compute rule to compute the span-based metric. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricUpdateCompute { /// Toggle to include or exclude percentile aggregations for distribution metrics. /// Only present when the `aggregation_type` is `distribution`. diff --git a/src/datadogV2/model/model_spans_metric_update_data.rs b/src/datadogV2/model/model_spans_metric_update_data.rs index 24ca4f76e..2cc039700 100644 --- a/src/datadogV2/model/model_spans_metric_update_data.rs +++ b/src/datadogV2/model/model_spans_metric_update_data.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new span-based metric properties. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricUpdateData { /// The span-based metric properties that will be updated. #[serde(rename = "attributes")] @@ -18,12 +18,9 @@ pub struct SpansMetricUpdateData { impl SpansMetricUpdateData { pub fn new( - attributes: crate::datadogV2::model::SpansMetricUpdateAttributes, + attributes: Box, type_: crate::datadogV2::model::SpansMetricType, ) -> SpansMetricUpdateData { - SpansMetricUpdateData { - attributes: Box::new(attributes), - type_, - } + SpansMetricUpdateData { attributes, type_ } } } diff --git a/src/datadogV2/model/model_spans_metric_update_request.rs b/src/datadogV2/model/model_spans_metric_update_request.rs index edc34e756..5247b351b 100644 --- a/src/datadogV2/model/model_spans_metric_update_request.rs +++ b/src/datadogV2/model/model_spans_metric_update_request.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// The new span-based metric body. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricUpdateRequest { /// The new span-based metric properties. #[serde(rename = "data")] @@ -14,9 +14,9 @@ pub struct SpansMetricUpdateRequest { } impl SpansMetricUpdateRequest { - pub fn new(data: crate::datadogV2::model::SpansMetricUpdateData) -> SpansMetricUpdateRequest { - SpansMetricUpdateRequest { - data: Box::new(data), - } + pub fn new( + data: Box, + ) -> SpansMetricUpdateRequest { + SpansMetricUpdateRequest { data } } } diff --git a/src/datadogV2/model/model_spans_metrics_response.rs b/src/datadogV2/model/model_spans_metrics_response.rs index 624f11a92..e18202bc6 100644 --- a/src/datadogV2/model/model_spans_metrics_response.rs +++ b/src/datadogV2/model/model_spans_metrics_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// All the available span-based metric objects. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SpansMetricsResponse { /// A list of span-based metric objects. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_spans_query_filter.rs b/src/datadogV2/model/model_spans_query_filter.rs new file mode 100644 index 000000000..fc2f3ef43 --- /dev/null +++ b/src/datadogV2/model/model_spans_query_filter.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The search and filter query settings. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansQueryFilter { + /// The minimum time for the requested spans, supports date-time ISO8601, date math, and regular timestamps (milliseconds). + #[serde(rename = "from")] + pub from: Option, + /// The search query - following the span search syntax. + #[serde(rename = "query")] + pub query: Option, + /// The maximum time for the requested spans, supports date-time ISO8601, date math, and regular timestamps (milliseconds). + #[serde(rename = "to")] + pub to: Option, +} + +impl SpansQueryFilter { + pub fn new() -> SpansQueryFilter { + SpansQueryFilter { + from: None, + query: None, + to: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_query_options.rs b/src/datadogV2/model/model_spans_query_options.rs new file mode 100644 index 000000000..173f187c4 --- /dev/null +++ b/src/datadogV2/model/model_spans_query_options.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Global query options that are used during the query. +/// Note: You should only supply timezone or time offset but not both otherwise the query will fail. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansQueryOptions { + /// The time offset (in seconds) to apply to the query. + #[serde(rename = "timeOffset")] + pub time_offset: Option, + /// The timezone can be specified as GMT, UTC, an offset from UTC (like UTC+1), or as a Timezone Database identifier (like America/New_York). + #[serde(rename = "timezone")] + pub timezone: Option, +} + +impl SpansQueryOptions { + pub fn new() -> SpansQueryOptions { + SpansQueryOptions { + time_offset: None, + timezone: None, + } + } +} diff --git a/src/datadogV2/model/model_spans_response_metadata_page.rs b/src/datadogV2/model/model_spans_response_metadata_page.rs new file mode 100644 index 000000000..760f66cab --- /dev/null +++ b/src/datadogV2/model/model_spans_response_metadata_page.rs @@ -0,0 +1,21 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Paging attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansResponseMetadataPage { + /// The cursor to use to get the next results, if any. To make the next request, use the same + /// parameters with the addition of the `page[cursor]`. + #[serde(rename = "after")] + pub after: Option, +} + +impl SpansResponseMetadataPage { + pub fn new() -> SpansResponseMetadataPage { + SpansResponseMetadataPage { after: None } + } +} diff --git a/src/datadogV2/model/model_spans_sort.rs b/src/datadogV2/model/model_spans_sort.rs new file mode 100644 index 000000000..551e86eb3 --- /dev/null +++ b/src/datadogV2/model/model_spans_sort.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansSort { + #[serde(rename = "timestamp")] + TIMESTAMP_ASCENDING, + #[serde(rename = "-timestamp")] + TIMESTAMP_DESCENDING, +} + +impl ToString for SpansSort { + fn to_string(&self) -> String { + match self { + Self::TIMESTAMP_ASCENDING => String::from("timestamp"), + Self::TIMESTAMP_DESCENDING => String::from("-timestamp"), + } + } +} diff --git a/src/datadogV2/model/model_spans_sort_order.rs b/src/datadogV2/model/model_spans_sort_order.rs new file mode 100644 index 000000000..868df09c6 --- /dev/null +++ b/src/datadogV2/model/model_spans_sort_order.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansSortOrder { + #[serde(rename = "asc")] + ASCENDING, + #[serde(rename = "desc")] + DESCENDING, +} + +impl ToString for SpansSortOrder { + fn to_string(&self) -> String { + match self { + Self::ASCENDING => String::from("asc"), + Self::DESCENDING => String::from("desc"), + } + } +} diff --git a/src/datadogV2/model/model_spans_type.rs b/src/datadogV2/model/model_spans_type.rs new file mode 100644 index 000000000..713af60a2 --- /dev/null +++ b/src/datadogV2/model/model_spans_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum SpansType { + #[serde(rename = "spans")] + SPANS, +} + +impl ToString for SpansType { + fn to_string(&self) -> String { + match self { + Self::SPANS => String::from("spans"), + } + } +} diff --git a/src/datadogV2/model/model_spans_warning.rs b/src/datadogV2/model/model_spans_warning.rs new file mode 100644 index 000000000..1a87cec93 --- /dev/null +++ b/src/datadogV2/model/model_spans_warning.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A warning message indicating something that went wrong with the query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct SpansWarning { + /// A unique code for this type of warning. + #[serde(rename = "code")] + pub code: Option, + /// A detailed explanation of this specific warning. + #[serde(rename = "detail")] + pub detail: Option, + /// A short human-readable summary of the warning. + #[serde(rename = "title")] + pub title: Option, +} + +impl SpansWarning { + pub fn new() -> SpansWarning { + SpansWarning { + code: None, + detail: None, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_state.rs b/src/datadogV2/model/model_state.rs new file mode 100644 index 000000000..7ed796c31 --- /dev/null +++ b/src/datadogV2/model/model_state.rs @@ -0,0 +1,25 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum State { + #[serde(rename = "pass")] + PASS, + #[serde(rename = "fail")] + FAIL, + #[serde(rename = "skip")] + SKIP, +} + +impl ToString for State { + fn to_string(&self) -> String { + match self { + Self::PASS => String::from("pass"), + Self::FAIL => String::from("fail"), + Self::SKIP => String::from("skip"), + } + } +} diff --git a/src/datadogV2/model/model_team.rs b/src/datadogV2/model/model_team.rs new file mode 100644 index 000000000..f72622e07 --- /dev/null +++ b/src/datadogV2/model/model_team.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Team { + /// Team attributes + #[serde(rename = "attributes")] + pub attributes: Box, + /// The team's identifier + #[serde(rename = "id")] + pub id: String, + /// Resources related to a team + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Team type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamType, +} + +impl Team { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::TeamType, + ) -> Team { + Team { + attributes, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_team_attributes.rs b/src/datadogV2/model/model_team_attributes.rs new file mode 100644 index 000000000..6ff9d2e8c --- /dev/null +++ b/src/datadogV2/model/model_team_attributes.rs @@ -0,0 +1,74 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamAttributes { + /// Unicode representation of the avatar for the team, limited to a single grapheme + #[serde(rename = "avatar", default, with = "::serde_with::rust::double_option")] + pub avatar: Option>, + /// Banner selection for the team + #[serde(rename = "banner", default, with = "::serde_with::rust::double_option")] + pub banner: Option>, + /// Creation date of the team + #[serde(rename = "created_at")] + pub created_at: Option, + /// Free-form markdown description/content for the team's homepage + #[serde( + rename = "description", + default, + with = "::serde_with::rust::double_option" + )] + pub description: Option>, + /// The team's identifier + #[serde(rename = "handle")] + pub handle: String, + /// Collection of hidden modules for the team + #[serde(rename = "hidden_modules")] + pub hidden_modules: Option>, + /// The number of links belonging to the team + #[serde(rename = "link_count")] + pub link_count: Option, + /// Modification date of the team + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// The name of the team + #[serde(rename = "name")] + pub name: String, + /// A brief summary of the team, derived from the `description` + #[serde( + rename = "summary", + default, + with = "::serde_with::rust::double_option" + )] + pub summary: Option>, + /// The number of users belonging to the team + #[serde(rename = "user_count")] + pub user_count: Option, + /// Collection of visible modules for the team + #[serde(rename = "visible_modules")] + pub visible_modules: Option>, +} + +impl TeamAttributes { + pub fn new(handle: String, name: String) -> TeamAttributes { + TeamAttributes { + avatar: None, + banner: None, + created_at: None, + description: None, + handle, + hidden_modules: None, + link_count: None, + modified_at: None, + name, + summary: None, + user_count: None, + visible_modules: None, + } + } +} diff --git a/src/datadogV2/model/model_team_create.rs b/src/datadogV2/model/model_team_create.rs new file mode 100644 index 000000000..5f0311d0f --- /dev/null +++ b/src/datadogV2/model/model_team_create.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team create +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamCreate { + /// Team creation attributes + #[serde(rename = "attributes")] + pub attributes: Box, + /// Relationships formed with the team on creation + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Team type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamType, +} + +impl TeamCreate { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::TeamType, + ) -> TeamCreate { + TeamCreate { + attributes, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_team_create_attributes.rs b/src/datadogV2/model/model_team_create_attributes.rs new file mode 100644 index 000000000..55c8e813a --- /dev/null +++ b/src/datadogV2/model/model_team_create_attributes.rs @@ -0,0 +1,46 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team creation attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamCreateAttributes { + /// Unicode representation of the avatar for the team, limited to a single grapheme + #[serde(rename = "avatar", default, with = "::serde_with::rust::double_option")] + pub avatar: Option>, + /// Banner selection for the team + #[serde(rename = "banner", default, with = "::serde_with::rust::double_option")] + pub banner: Option>, + /// Free-form markdown description/content for the team's homepage + #[serde(rename = "description")] + pub description: Option, + /// The team's identifier + #[serde(rename = "handle")] + pub handle: String, + /// Collection of hidden modules for the team + #[serde(rename = "hidden_modules")] + pub hidden_modules: Option>, + /// The name of the team + #[serde(rename = "name")] + pub name: String, + /// Collection of visible modules for the team + #[serde(rename = "visible_modules")] + pub visible_modules: Option>, +} + +impl TeamCreateAttributes { + pub fn new(handle: String, name: String) -> TeamCreateAttributes { + TeamCreateAttributes { + avatar: None, + banner: None, + description: None, + handle, + hidden_modules: None, + name, + visible_modules: None, + } + } +} diff --git a/src/datadogV2/model/model_team_create_relationships.rs b/src/datadogV2/model/model_team_create_relationships.rs new file mode 100644 index 000000000..45774d1e2 --- /dev/null +++ b/src/datadogV2/model/model_team_create_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships formed with the team on creation +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamCreateRelationships { + /// Relationship to users. + #[serde(rename = "users")] + pub users: Option>, +} + +impl TeamCreateRelationships { + pub fn new() -> TeamCreateRelationships { + TeamCreateRelationships { users: None } + } +} diff --git a/src/datadogV2/model/model_team_create_request.rs b/src/datadogV2/model/model_team_create_request.rs new file mode 100644 index 000000000..130a1f877 --- /dev/null +++ b/src/datadogV2/model/model_team_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Request to create a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamCreateRequest { + /// Team create + #[serde(rename = "data")] + pub data: Box, +} + +impl TeamCreateRequest { + pub fn new(data: Box) -> TeamCreateRequest { + TeamCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_team_included.rs b/src/datadogV2/model/model_team_included.rs new file mode 100644 index 000000000..a39d9c31a --- /dev/null +++ b/src/datadogV2/model/model_team_included.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// Included resources related to the team +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TeamIncluded { + User(Box), + TeamLink(Box), + UserTeamPermission(Box), +} diff --git a/src/datadogV2/model/model_team_link.rs b/src/datadogV2/model/model_team_link.rs new file mode 100644 index 000000000..641067628 --- /dev/null +++ b/src/datadogV2/model/model_team_link.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team link +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamLink { + /// Team link attributes + #[serde(rename = "attributes")] + pub attributes: Box, + /// The team link's identifier + #[serde(rename = "id")] + pub id: String, + /// Team link type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamLinkType, +} + +impl TeamLink { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::TeamLinkType, + ) -> TeamLink { + TeamLink { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_team_link_attributes.rs b/src/datadogV2/model/model_team_link_attributes.rs new file mode 100644 index 000000000..763affa81 --- /dev/null +++ b/src/datadogV2/model/model_team_link_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team link attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamLinkAttributes { + /// The link's label + #[serde(rename = "label")] + pub label: String, + /// The link's position, used to sort links for the team + #[serde(rename = "position")] + pub position: Option, + /// ID of the team the link is associated with + #[serde(rename = "team_id")] + pub team_id: Option, + /// The URL for the link + #[serde(rename = "url")] + pub url: String, +} + +impl TeamLinkAttributes { + pub fn new(label: String, url: String) -> TeamLinkAttributes { + TeamLinkAttributes { + label, + position: None, + team_id: None, + url, + } + } +} diff --git a/src/datadogV2/model/model_team_link_create.rs b/src/datadogV2/model/model_team_link_create.rs new file mode 100644 index 000000000..53c2bf13f --- /dev/null +++ b/src/datadogV2/model/model_team_link_create.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team link create +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamLinkCreate { + /// Team link attributes + #[serde(rename = "attributes")] + pub attributes: Box, + /// Team link type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamLinkType, +} + +impl TeamLinkCreate { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::TeamLinkType, + ) -> TeamLinkCreate { + TeamLinkCreate { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_team_link_create_request.rs b/src/datadogV2/model/model_team_link_create_request.rs new file mode 100644 index 000000000..e101dfbfd --- /dev/null +++ b/src/datadogV2/model/model_team_link_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team link create request +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamLinkCreateRequest { + /// Team link create + #[serde(rename = "data")] + pub data: Box, +} + +impl TeamLinkCreateRequest { + pub fn new(data: Box) -> TeamLinkCreateRequest { + TeamLinkCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_team_link_response.rs b/src/datadogV2/model/model_team_link_response.rs new file mode 100644 index 000000000..0609b5cc5 --- /dev/null +++ b/src/datadogV2/model/model_team_link_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team link response +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamLinkResponse { + /// Team link + #[serde(rename = "data")] + pub data: Option>, +} + +impl TeamLinkResponse { + pub fn new() -> TeamLinkResponse { + TeamLinkResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_team_link_type.rs b/src/datadogV2/model/model_team_link_type.rs new file mode 100644 index 000000000..ed84d64e5 --- /dev/null +++ b/src/datadogV2/model/model_team_link_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TeamLinkType { + #[serde(rename = "team_links")] + TEAM_LINKS, +} + +impl ToString for TeamLinkType { + fn to_string(&self) -> String { + match self { + Self::TEAM_LINKS => String::from("team_links"), + } + } +} diff --git a/src/datadogV2/model/model_team_links_response.rs b/src/datadogV2/model/model_team_links_response.rs new file mode 100644 index 000000000..d6f7db933 --- /dev/null +++ b/src/datadogV2/model/model_team_links_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team links response +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamLinksResponse { + /// Team links response data + #[serde(rename = "data")] + pub data: Option>, +} + +impl TeamLinksResponse { + pub fn new() -> TeamLinksResponse { + TeamLinksResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting.rs b/src/datadogV2/model/model_team_permission_setting.rs new file mode 100644 index 000000000..8042fa7d2 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team permission setting +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamPermissionSetting { + /// Team permission setting attributes + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The team permission setting's identifier + #[serde(rename = "id")] + pub id: String, + /// Team permission setting type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamPermissionSettingType, +} + +impl TeamPermissionSetting { + pub fn new( + id: String, + type_: crate::datadogV2::model::TeamPermissionSettingType, + ) -> TeamPermissionSetting { + TeamPermissionSetting { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_attributes.rs b/src/datadogV2/model/model_team_permission_setting_attributes.rs new file mode 100644 index 000000000..e3b3811f5 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_attributes.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team permission setting attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamPermissionSettingAttributes { + /// The identifier for the action + #[serde(rename = "action")] + pub action: Option, + /// Whether or not the permission setting is editable by the current user + #[serde(rename = "editable")] + pub editable: Option, + /// Possible values for action + #[serde(rename = "options")] + pub options: Option>, + /// The team permission name + #[serde(rename = "title")] + pub title: Option, + /// What type of user is allowed to perform the specified action + #[serde(rename = "value")] + pub value: Option, +} + +impl TeamPermissionSettingAttributes { + pub fn new() -> TeamPermissionSettingAttributes { + TeamPermissionSettingAttributes { + action: None, + editable: None, + options: None, + title: None, + value: None, + } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_response.rs b/src/datadogV2/model/model_team_permission_setting_response.rs new file mode 100644 index 000000000..70dfe25e8 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team permission setting response +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamPermissionSettingResponse { + /// Team permission setting + #[serde(rename = "data")] + pub data: Option>, +} + +impl TeamPermissionSettingResponse { + pub fn new() -> TeamPermissionSettingResponse { + TeamPermissionSettingResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_serializer_action.rs b/src/datadogV2/model/model_team_permission_setting_serializer_action.rs new file mode 100644 index 000000000..81bf3df9c --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_serializer_action.rs @@ -0,0 +1,22 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TeamPermissionSettingSerializerAction { + #[serde(rename = "manage_membership")] + MANAGE_MEMBERSHIP, + #[serde(rename = "edit")] + EDIT, +} + +impl ToString for TeamPermissionSettingSerializerAction { + fn to_string(&self) -> String { + match self { + Self::MANAGE_MEMBERSHIP => String::from("manage_membership"), + Self::EDIT => String::from("edit"), + } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_type.rs b/src/datadogV2/model/model_team_permission_setting_type.rs new file mode 100644 index 000000000..a93ffdd06 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TeamPermissionSettingType { + #[serde(rename = "team_permission_settings")] + TEAM_PERMISSION_SETTINGS, +} + +impl ToString for TeamPermissionSettingType { + fn to_string(&self) -> String { + match self { + Self::TEAM_PERMISSION_SETTINGS => String::from("team_permission_settings"), + } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_update.rs b/src/datadogV2/model/model_team_permission_setting_update.rs new file mode 100644 index 000000000..6c38061e1 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_update.rs @@ -0,0 +1,28 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team permission setting update +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamPermissionSettingUpdate { + /// Team permission setting update attributes + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Team permission setting type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamPermissionSettingType, +} + +impl TeamPermissionSettingUpdate { + pub fn new( + type_: crate::datadogV2::model::TeamPermissionSettingType, + ) -> TeamPermissionSettingUpdate { + TeamPermissionSettingUpdate { + attributes: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_update_attributes.rs b/src/datadogV2/model/model_team_permission_setting_update_attributes.rs new file mode 100644 index 000000000..0ee5493c2 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_update_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team permission setting update attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamPermissionSettingUpdateAttributes { + /// What type of user is allowed to perform the specified action + #[serde(rename = "value")] + pub value: Option, +} + +impl TeamPermissionSettingUpdateAttributes { + pub fn new() -> TeamPermissionSettingUpdateAttributes { + TeamPermissionSettingUpdateAttributes { value: None } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_update_request.rs b/src/datadogV2/model/model_team_permission_setting_update_request.rs new file mode 100644 index 000000000..e99eece29 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_update_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team permission setting update request +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamPermissionSettingUpdateRequest { + /// Team permission setting update + #[serde(rename = "data")] + pub data: Box, +} + +impl TeamPermissionSettingUpdateRequest { + pub fn new( + data: Box, + ) -> TeamPermissionSettingUpdateRequest { + TeamPermissionSettingUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_team_permission_setting_value.rs b/src/datadogV2/model/model_team_permission_setting_value.rs new file mode 100644 index 000000000..bb4f05c2c --- /dev/null +++ b/src/datadogV2/model/model_team_permission_setting_value.rs @@ -0,0 +1,31 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TeamPermissionSettingValue { + #[serde(rename = "admins")] + ADMINS, + #[serde(rename = "members")] + MEMBERS, + #[serde(rename = "organization")] + ORGANIZATION, + #[serde(rename = "user_access_manage")] + USER_ACCESS_MANAGE, + #[serde(rename = "teams_manage")] + TEAMS_MANAGE, +} + +impl ToString for TeamPermissionSettingValue { + fn to_string(&self) -> String { + match self { + Self::ADMINS => String::from("admins"), + Self::MEMBERS => String::from("members"), + Self::ORGANIZATION => String::from("organization"), + Self::USER_ACCESS_MANAGE => String::from("user_access_manage"), + Self::TEAMS_MANAGE => String::from("teams_manage"), + } + } +} diff --git a/src/datadogV2/model/model_team_permission_settings_response.rs b/src/datadogV2/model/model_team_permission_settings_response.rs new file mode 100644 index 000000000..401220413 --- /dev/null +++ b/src/datadogV2/model/model_team_permission_settings_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team permission settings response +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamPermissionSettingsResponse { + /// Team permission settings response data + #[serde(rename = "data")] + pub data: Option>, +} + +impl TeamPermissionSettingsResponse { + pub fn new() -> TeamPermissionSettingsResponse { + TeamPermissionSettingsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_team_relationships.rs b/src/datadogV2/model/model_team_relationships.rs new file mode 100644 index 000000000..1c32b75d0 --- /dev/null +++ b/src/datadogV2/model/model_team_relationships.rs @@ -0,0 +1,27 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Resources related to a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamRelationships { + /// Relationship between a team and a team link + #[serde(rename = "team_links")] + pub team_links: Option>, + /// Relationship between a user team permission and a team + #[serde(rename = "user_team_permissions")] + pub user_team_permissions: + Option>, +} + +impl TeamRelationships { + pub fn new() -> TeamRelationships { + TeamRelationships { + team_links: None, + user_team_permissions: None, + } + } +} diff --git a/src/datadogV2/model/model_team_relationships_links.rs b/src/datadogV2/model/model_team_relationships_links.rs new file mode 100644 index 000000000..eee0ef26a --- /dev/null +++ b/src/datadogV2/model/model_team_relationships_links.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Links attributes. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamRelationshipsLinks { + /// Related link. + #[serde(rename = "related")] + pub related: Option, +} + +impl TeamRelationshipsLinks { + pub fn new() -> TeamRelationshipsLinks { + TeamRelationshipsLinks { related: None } + } +} diff --git a/src/datadogV2/model/model_team_response.rs b/src/datadogV2/model/model_team_response.rs new file mode 100644 index 000000000..02302522c --- /dev/null +++ b/src/datadogV2/model/model_team_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamResponse { + /// A team + #[serde(rename = "data")] + pub data: Option>, +} + +impl TeamResponse { + pub fn new() -> TeamResponse { + TeamResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_team_type.rs b/src/datadogV2/model/model_team_type.rs new file mode 100644 index 000000000..7e561f243 --- /dev/null +++ b/src/datadogV2/model/model_team_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TeamType { + #[serde(rename = "team")] + TEAM, +} + +impl ToString for TeamType { + fn to_string(&self) -> String { + match self { + Self::TEAM => String::from("team"), + } + } +} diff --git a/src/datadogV2/model/model_team_update.rs b/src/datadogV2/model/model_team_update.rs new file mode 100644 index 000000000..900f59acb --- /dev/null +++ b/src/datadogV2/model/model_team_update.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team update request +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamUpdate { + /// Team update attributes + #[serde(rename = "attributes")] + pub attributes: Box, + /// Team update relationships + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Team type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TeamType, +} + +impl TeamUpdate { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::TeamType, + ) -> TeamUpdate { + TeamUpdate { + attributes, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_team_update_attributes.rs b/src/datadogV2/model/model_team_update_attributes.rs new file mode 100644 index 000000000..a52ef1c6a --- /dev/null +++ b/src/datadogV2/model/model_team_update_attributes.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team update attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamUpdateAttributes { + /// Unicode representation of the avatar for the team, limited to a single grapheme + #[serde(rename = "avatar", default, with = "::serde_with::rust::double_option")] + pub avatar: Option>, + /// Banner selection for the team + #[serde(rename = "banner", default, with = "::serde_with::rust::double_option")] + pub banner: Option>, + /// An identifier for the color representing the team + #[serde(rename = "color")] + pub color: Option, + /// Free-form markdown description/content for the team's homepage + #[serde(rename = "description")] + pub description: Option, + /// The team's identifier + #[serde(rename = "handle")] + pub handle: String, + /// Collection of hidden modules for the team + #[serde(rename = "hidden_modules")] + pub hidden_modules: Option>, + /// The name of the team + #[serde(rename = "name")] + pub name: String, + /// Collection of visible modules for the team + #[serde(rename = "visible_modules")] + pub visible_modules: Option>, +} + +impl TeamUpdateAttributes { + pub fn new(handle: String, name: String) -> TeamUpdateAttributes { + TeamUpdateAttributes { + avatar: None, + banner: None, + color: None, + description: None, + handle, + hidden_modules: None, + name, + visible_modules: None, + } + } +} diff --git a/src/datadogV2/model/model_team_update_relationships.rs b/src/datadogV2/model/model_team_update_relationships.rs new file mode 100644 index 000000000..8107e9289 --- /dev/null +++ b/src/datadogV2/model/model_team_update_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team update relationships +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamUpdateRelationships { + /// Relationship between a team and a team link + #[serde(rename = "team_links")] + pub team_links: Option>, +} + +impl TeamUpdateRelationships { + pub fn new() -> TeamUpdateRelationships { + TeamUpdateRelationships { team_links: None } + } +} diff --git a/src/datadogV2/model/model_team_update_request.rs b/src/datadogV2/model/model_team_update_request.rs new file mode 100644 index 000000000..c9953617c --- /dev/null +++ b/src/datadogV2/model/model_team_update_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team update request +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamUpdateRequest { + /// Team update request + #[serde(rename = "data")] + pub data: Box, +} + +impl TeamUpdateRequest { + pub fn new(data: Box) -> TeamUpdateRequest { + TeamUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_teams_field.rs b/src/datadogV2/model/model_teams_field.rs new file mode 100644 index 000000000..74096f6b6 --- /dev/null +++ b/src/datadogV2/model/model_teams_field.rs @@ -0,0 +1,61 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TeamsField { + #[serde(rename = "id")] + ID, + #[serde(rename = "name")] + NAME, + #[serde(rename = "handle")] + HANDLE, + #[serde(rename = "summary")] + SUMMARY, + #[serde(rename = "description")] + DESCRIPTION, + #[serde(rename = "avatar")] + AVATAR, + #[serde(rename = "banner")] + BANNER, + #[serde(rename = "visible_modules")] + VISIBLE_MODULES, + #[serde(rename = "hidden_modules")] + HIDDEN_MODULES, + #[serde(rename = "created_at")] + CREATED_AT, + #[serde(rename = "modified_at")] + MODIFIED_AT, + #[serde(rename = "user_count")] + USER_COUNT, + #[serde(rename = "link_count")] + LINK_COUNT, + #[serde(rename = "team_links")] + TEAM_LINKS, + #[serde(rename = "user_team_permissions")] + USER_TEAM_PERMISSIONS, +} + +impl ToString for TeamsField { + fn to_string(&self) -> String { + match self { + Self::ID => String::from("id"), + Self::NAME => String::from("name"), + Self::HANDLE => String::from("handle"), + Self::SUMMARY => String::from("summary"), + Self::DESCRIPTION => String::from("description"), + Self::AVATAR => String::from("avatar"), + Self::BANNER => String::from("banner"), + Self::VISIBLE_MODULES => String::from("visible_modules"), + Self::HIDDEN_MODULES => String::from("hidden_modules"), + Self::CREATED_AT => String::from("created_at"), + Self::MODIFIED_AT => String::from("modified_at"), + Self::USER_COUNT => String::from("user_count"), + Self::LINK_COUNT => String::from("link_count"), + Self::TEAM_LINKS => String::from("team_links"), + Self::USER_TEAM_PERMISSIONS => String::from("user_team_permissions"), + } + } +} diff --git a/src/datadogV2/model/model_teams_response.rs b/src/datadogV2/model/model_teams_response.rs new file mode 100644 index 000000000..bce99a43d --- /dev/null +++ b/src/datadogV2/model/model_teams_response.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response with multiple teams +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamsResponse { + /// Teams response data + #[serde(rename = "data")] + pub data: Option>, + /// Resources related to the team + #[serde(rename = "included")] + pub included: Option>, + /// Teams response links. + #[serde(rename = "links")] + pub links: Option>, + /// Teams response metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl TeamsResponse { + pub fn new() -> TeamsResponse { + TeamsResponse { + data: None, + included: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_teams_response_links.rs b/src/datadogV2/model/model_teams_response_links.rs new file mode 100644 index 000000000..f397b555f --- /dev/null +++ b/src/datadogV2/model/model_teams_response_links.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Teams response links. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamsResponseLinks { + /// First link. + #[serde(rename = "first")] + pub first: Option, + /// Last link. + #[serde(rename = "last", default, with = "::serde_with::rust::double_option")] + pub last: Option>, + /// Next link. + #[serde(rename = "next")] + pub next: Option, + /// Previous link. + #[serde(rename = "prev", default, with = "::serde_with::rust::double_option")] + pub prev: Option>, + /// Current link. + #[serde(rename = "self")] + pub self_: Option, +} + +impl TeamsResponseLinks { + pub fn new() -> TeamsResponseLinks { + TeamsResponseLinks { + first: None, + last: None, + next: None, + prev: None, + self_: None, + } + } +} diff --git a/src/datadogV2/model/model_teams_response_meta.rs b/src/datadogV2/model/model_teams_response_meta.rs new file mode 100644 index 000000000..a74b6bece --- /dev/null +++ b/src/datadogV2/model/model_teams_response_meta.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Teams response metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamsResponseMeta { + /// Teams response metadata. + #[serde(rename = "pagination")] + pub pagination: Option>, +} + +impl TeamsResponseMeta { + pub fn new() -> TeamsResponseMeta { + TeamsResponseMeta { pagination: None } + } +} diff --git a/src/datadogV2/model/model_teams_response_meta_pagination.rs b/src/datadogV2/model/model_teams_response_meta_pagination.rs new file mode 100644 index 000000000..7b6e14063 --- /dev/null +++ b/src/datadogV2/model/model_teams_response_meta_pagination.rs @@ -0,0 +1,50 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Teams response metadata. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TeamsResponseMetaPagination { + /// The first offset. + #[serde(rename = "first_offset")] + pub first_offset: Option, + /// The last offset. + #[serde(rename = "last_offset")] + pub last_offset: Option, + /// Pagination limit. + #[serde(rename = "limit")] + pub limit: Option, + /// The next offset. + #[serde(rename = "next_offset")] + pub next_offset: Option, + /// The offset. + #[serde(rename = "offset")] + pub offset: Option, + /// The previous offset. + #[serde(rename = "prev_offset")] + pub prev_offset: Option, + /// Total results. + #[serde(rename = "total")] + pub total: Option, + /// Offset type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl TeamsResponseMetaPagination { + pub fn new() -> TeamsResponseMetaPagination { + TeamsResponseMetaPagination { + first_offset: None, + last_offset: None, + limit: None, + next_offset: None, + offset: None, + prev_offset: None, + total: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_timeseries_formula_query_request.rs b/src/datadogV2/model/model_timeseries_formula_query_request.rs new file mode 100644 index 000000000..18efc49d5 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_formula_query_request.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A request wrapper around a single timeseries query to be executed. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesFormulaQueryRequest { + /// A single timeseries query to be executed. + #[serde(rename = "data")] + pub data: Box, +} + +impl TimeseriesFormulaQueryRequest { + pub fn new( + data: Box, + ) -> TimeseriesFormulaQueryRequest { + TimeseriesFormulaQueryRequest { data } + } +} diff --git a/src/datadogV2/model/model_timeseries_formula_query_response.rs b/src/datadogV2/model/model_timeseries_formula_query_response.rs new file mode 100644 index 000000000..8987e7612 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_formula_query_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A message containing one response to a timeseries query made with timeseries formula query request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesFormulaQueryResponse { + /// A message containing the response to a timeseries query. + #[serde(rename = "data")] + pub data: Option>, + /// The error generated by the request. + #[serde(rename = "errors")] + pub errors: Option, +} + +impl TimeseriesFormulaQueryResponse { + pub fn new() -> TimeseriesFormulaQueryResponse { + TimeseriesFormulaQueryResponse { + data: None, + errors: None, + } + } +} diff --git a/src/datadogV2/model/model_timeseries_formula_request.rs b/src/datadogV2/model/model_timeseries_formula_request.rs new file mode 100644 index 000000000..d82a7a550 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_formula_request.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A single timeseries query to be executed. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesFormulaRequest { + /// The object describing a timeseries formula request. + #[serde(rename = "attributes")] + pub attributes: Box, + /// The type of the resource. The value should always be timeseries_request. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::TimeseriesFormulaRequestType, +} + +impl TimeseriesFormulaRequest { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::TimeseriesFormulaRequestType, + ) -> TimeseriesFormulaRequest { + TimeseriesFormulaRequest { attributes, type_ } + } +} diff --git a/src/datadogV2/model/model_timeseries_formula_request_attributes.rs b/src/datadogV2/model/model_timeseries_formula_request_attributes.rs new file mode 100644 index 000000000..2bd90ef78 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_formula_request_attributes.rs @@ -0,0 +1,45 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object describing a timeseries formula request. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesFormulaRequestAttributes { + /// List of formulas to be calculated and returned as responses. + #[serde(rename = "formulas")] + pub formulas: Option>, + /// Start date (inclusive) of the query in milliseconds since the Unix epoch. + #[serde(rename = "from")] + pub from: i64, + /// A time interval in milliseconds. + /// May be overridden by a larger interval if the query would result in + /// too many points for the specified timeframe. + /// Defaults to a reasonable interval for the given timeframe. + #[serde(rename = "interval")] + pub interval: Option, + /// List of queries to be run and used as inputs to the formulas. + #[serde(rename = "queries")] + pub queries: Vec, + /// End date (exclusive) of the query in milliseconds since the Unix epoch. + #[serde(rename = "to")] + pub to: i64, +} + +impl TimeseriesFormulaRequestAttributes { + pub fn new( + from: i64, + queries: Vec, + to: i64, + ) -> TimeseriesFormulaRequestAttributes { + TimeseriesFormulaRequestAttributes { + formulas: None, + from, + interval: None, + queries, + to, + } + } +} diff --git a/src/datadogV2/model/model_timeseries_formula_request_type.rs b/src/datadogV2/model/model_timeseries_formula_request_type.rs new file mode 100644 index 000000000..eb0c97f79 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_formula_request_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TimeseriesFormulaRequestType { + #[serde(rename = "timeseries_request")] + TIMESERIES_REQUEST, +} + +impl ToString for TimeseriesFormulaRequestType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES_REQUEST => String::from("timeseries_request"), + } + } +} diff --git a/src/datadogV2/model/model_timeseries_formula_response_type.rs b/src/datadogV2/model/model_timeseries_formula_response_type.rs new file mode 100644 index 000000000..c98ca36bc --- /dev/null +++ b/src/datadogV2/model/model_timeseries_formula_response_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TimeseriesFormulaResponseType { + #[serde(rename = "timeseries_response")] + TIMESERIES_RESPONSE, +} + +impl ToString for TimeseriesFormulaResponseType { + fn to_string(&self) -> String { + match self { + Self::TIMESERIES_RESPONSE => String::from("timeseries_response"), + } + } +} diff --git a/src/datadogV2/model/model_timeseries_query.rs b/src/datadogV2/model/model_timeseries_query.rs new file mode 100644 index 000000000..02c434941 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_query.rs @@ -0,0 +1,12 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An individual timeseries query to one of the basic Datadog data sources. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TimeseriesQuery { + MetricsTimeseriesQuery(Box), + EventsTimeseriesQuery(Box), +} diff --git a/src/datadogV2/model/model_timeseries_response.rs b/src/datadogV2/model/model_timeseries_response.rs new file mode 100644 index 000000000..dfa9b4b50 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A message containing the response to a timeseries query. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesResponse { + /// The object describing a timeseries response. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The type of the resource. The value should always be timeseries_response. + #[serde(rename = "type")] + pub type_: Option, +} + +impl TimeseriesResponse { + pub fn new() -> TimeseriesResponse { + TimeseriesResponse { + attributes: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_timeseries_response_attributes.rs b/src/datadogV2/model/model_timeseries_response_attributes.rs new file mode 100644 index 000000000..73461cb89 --- /dev/null +++ b/src/datadogV2/model/model_timeseries_response_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// The object describing a timeseries response. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesResponseAttributes { + /// Array of response series. The index here corresponds to the index in the `formulas` or `queries` array from the request. + #[serde(rename = "series")] + pub series: Option>, + /// Array of times, 1-1 match with individual values arrays. + #[serde(rename = "times")] + pub times: Option>, + /// Array of value-arrays. The index here corresponds to the index in the `formulas` or `queries` array from the request. + #[serde(rename = "values")] + pub values: Option>>>, +} + +impl TimeseriesResponseAttributes { + pub fn new() -> TimeseriesResponseAttributes { + TimeseriesResponseAttributes { + series: None, + times: None, + values: None, + } + } +} diff --git a/src/datadogV2/model/model_timeseries_response_series.rs b/src/datadogV2/model/model_timeseries_response_series.rs new file mode 100644 index 000000000..deb1cd1ae --- /dev/null +++ b/src/datadogV2/model/model_timeseries_response_series.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct TimeseriesResponseSeries { + /// List of tags that apply to a single response value. + #[serde(rename = "group_tags")] + pub group_tags: Option>, + /// The index of the query in the "formulas" array (or "queries" array if no "formulas" was specified). + #[serde(rename = "query_index")] + pub query_index: Option, + /// Detailed information about the unit. + /// The first element describes the "primary unit" (for example, `bytes` in `bytes per second`). + /// The second element describes the "per unit" (for example, `second` in `bytes per second`). + /// If the second element is not present, the API returns null. + #[serde(rename = "unit")] + pub unit: Option>, +} + +impl TimeseriesResponseSeries { + pub fn new() -> TimeseriesResponseSeries { + TimeseriesResponseSeries { + group_tags: None, + query_index: None, + unit: None, + } + } +} diff --git a/src/datadogV2/model/model_unit.rs b/src/datadogV2/model/model_unit.rs new file mode 100644 index 000000000..9b28947a9 --- /dev/null +++ b/src/datadogV2/model/model_unit.rs @@ -0,0 +1,38 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object containing the metric unit family, scale factor, name, and short name. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct Unit { + /// Unit family, allows for conversion between units of the same family, for scaling. + #[serde(rename = "family")] + pub family: Option, + /// Unit name + #[serde(rename = "name")] + pub name: Option, + /// Plural form of the unit name. + #[serde(rename = "plural")] + pub plural: Option, + /// Factor for scaling between units of the same family. + #[serde(rename = "scale_factor")] + pub scale_factor: Option, + /// Abbreviation of the unit. + #[serde(rename = "short_name")] + pub short_name: Option, +} + +impl Unit { + pub fn new() -> Unit { + Unit { + family: None, + name: None, + plural: None, + scale_factor: None, + short_name: None, + } + } +} diff --git a/src/datadogV2/model/model_usage_application_security_monitoring_response.rs b/src/datadogV2/model/model_usage_application_security_monitoring_response.rs index 853f82692..41ad5f4d3 100644 --- a/src/datadogV2/model/model_usage_application_security_monitoring_response.rs +++ b/src/datadogV2/model/model_usage_application_security_monitoring_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Application Security Monitoring usage response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageApplicationSecurityMonitoringResponse { /// Response containing Application Security Monitoring usage. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_usage_attributes_object.rs b/src/datadogV2/model/model_usage_attributes_object.rs index 48e34680a..2ee13faa0 100644 --- a/src/datadogV2/model/model_usage_attributes_object.rs +++ b/src/datadogV2/model/model_usage_attributes_object.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Usage attributes data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageAttributesObject { /// The organization name. #[serde(rename = "org_name")] diff --git a/src/datadogV2/model/model_usage_data_object.rs b/src/datadogV2/model/model_usage_data_object.rs index 6d812a85e..dd4bbf68f 100644 --- a/src/datadogV2/model/model_usage_data_object.rs +++ b/src/datadogV2/model/model_usage_data_object.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Usage data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageDataObject { /// Usage attributes data. #[serde(rename = "attributes")] diff --git a/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs b/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs index 8fbfd00bb..33f189e2a 100644 --- a/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs +++ b/src/datadogV2/model/model_usage_lambda_traced_invocations_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Lambda Traced Invocations usage response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageLambdaTracedInvocationsResponse { /// Response containing Lambda Traced Invocations usage. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_usage_observability_pipelines_response.rs b/src/datadogV2/model/model_usage_observability_pipelines_response.rs index 11dee831b..db81dd29f 100644 --- a/src/datadogV2/model/model_usage_observability_pipelines_response.rs +++ b/src/datadogV2/model/model_usage_observability_pipelines_response.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Observability Pipelines usage response. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageObservabilityPipelinesResponse { /// Response containing Observability Pipelines usage. #[serde(rename = "data")] diff --git a/src/datadogV2/model/model_usage_time_series_object.rs b/src/datadogV2/model/model_usage_time_series_object.rs index 21795ea5f..e3f2d8bf7 100644 --- a/src/datadogV2/model/model_usage_time_series_object.rs +++ b/src/datadogV2/model/model_usage_time_series_object.rs @@ -6,7 +6,7 @@ use serde_with::skip_serializing_none; /// Usage timeseries data. #[skip_serializing_none] -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UsageTimeSeriesObject { /// Datetime in ISO-8601 format, UTC. The hour for the usage. #[serde(rename = "timestamp")] diff --git a/src/datadogV2/model/model_usage_time_series_type.rs b/src/datadogV2/model/model_usage_time_series_type.rs index 5ef777830..6b1ef08ec 100644 --- a/src/datadogV2/model/model_usage_time_series_type.rs +++ b/src/datadogV2/model/model_usage_time_series_type.rs @@ -17,9 +17,3 @@ impl ToString for UsageTimeSeriesType { } } } - -impl Default for UsageTimeSeriesType { - fn default() -> UsageTimeSeriesType { - Self::USAGE_TIMESERIES - } -} diff --git a/src/datadogV2/model/model_user.rs b/src/datadogV2/model/model_user.rs new file mode 100644 index 000000000..144920b41 --- /dev/null +++ b/src/datadogV2/model/model_user.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// User object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct User { + /// Attributes of user object returned by the API. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the user. + #[serde(rename = "id")] + pub id: Option, + /// Relationships of the user object returned by the API. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Users resource type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl User { + pub fn new() -> User { + User { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_user_attributes.rs b/src/datadogV2/model/model_user_attributes.rs new file mode 100644 index 000000000..070581760 --- /dev/null +++ b/src/datadogV2/model/model_user_attributes.rs @@ -0,0 +1,62 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of user object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserAttributes { + /// Creation time of the user. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Whether the user is disabled. + #[serde(rename = "disabled")] + pub disabled: Option, + /// Email of the user. + #[serde(rename = "email")] + pub email: Option, + /// Handle of the user. + #[serde(rename = "handle")] + pub handle: Option, + /// URL of the user's icon. + #[serde(rename = "icon")] + pub icon: Option, + /// Time that the user was last modified. + #[serde(rename = "modified_at")] + pub modified_at: Option, + /// Name of the user. + #[serde(rename = "name", default, with = "::serde_with::rust::double_option")] + pub name: Option>, + /// Whether the user is a service account. + #[serde(rename = "service_account")] + pub service_account: Option, + /// Status of the user. + #[serde(rename = "status")] + pub status: Option, + /// Title of the user. + #[serde(rename = "title", default, with = "::serde_with::rust::double_option")] + pub title: Option>, + /// Whether the user is verified. + #[serde(rename = "verified")] + pub verified: Option, +} + +impl UserAttributes { + pub fn new() -> UserAttributes { + UserAttributes { + created_at: None, + disabled: None, + email: None, + handle: None, + icon: None, + modified_at: None, + name: None, + service_account: None, + status: None, + title: None, + verified: None, + } + } +} diff --git a/src/datadogV2/model/model_user_create_attributes.rs b/src/datadogV2/model/model_user_create_attributes.rs new file mode 100644 index 000000000..07e1d06be --- /dev/null +++ b/src/datadogV2/model/model_user_create_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the created user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserCreateAttributes { + /// The email of the user. + #[serde(rename = "email")] + pub email: String, + /// The name of the user. + #[serde(rename = "name")] + pub name: Option, + /// The title of the user. + #[serde(rename = "title")] + pub title: Option, +} + +impl UserCreateAttributes { + pub fn new(email: String) -> UserCreateAttributes { + UserCreateAttributes { + email, + name: None, + title: None, + } + } +} diff --git a/src/datadogV2/model/model_user_create_data.rs b/src/datadogV2/model/model_user_create_data.rs new file mode 100644 index 000000000..f8028b3df --- /dev/null +++ b/src/datadogV2/model/model_user_create_data.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to create a user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserCreateData { + /// Attributes of the created user. + #[serde(rename = "attributes")] + pub attributes: Box, + /// Relationships of the user object. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Users resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UsersType, +} + +impl UserCreateData { + pub fn new( + attributes: Box, + type_: crate::datadogV2::model::UsersType, + ) -> UserCreateData { + UserCreateData { + attributes, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_user_create_request.rs b/src/datadogV2/model/model_user_create_request.rs new file mode 100644 index 000000000..5e685e6b2 --- /dev/null +++ b/src/datadogV2/model/model_user_create_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Create a user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserCreateRequest { + /// Object to create a user. + #[serde(rename = "data")] + pub data: Box, +} + +impl UserCreateRequest { + pub fn new(data: Box) -> UserCreateRequest { + UserCreateRequest { data } + } +} diff --git a/src/datadogV2/model/model_user_invitation_data.rs b/src/datadogV2/model/model_user_invitation_data.rs new file mode 100644 index 000000000..9e5461fd4 --- /dev/null +++ b/src/datadogV2/model/model_user_invitation_data.rs @@ -0,0 +1,29 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to create a user invitation. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInvitationData { + /// Relationships data for user invitation. + #[serde(rename = "relationships")] + pub relationships: Box, + /// User invitations type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserInvitationsType, +} + +impl UserInvitationData { + pub fn new( + relationships: Box, + type_: crate::datadogV2::model::UserInvitationsType, + ) -> UserInvitationData { + UserInvitationData { + relationships, + type_, + } + } +} diff --git a/src/datadogV2/model/model_user_invitation_data_attributes.rs b/src/datadogV2/model/model_user_invitation_data_attributes.rs new file mode 100644 index 000000000..7d9ea3bad --- /dev/null +++ b/src/datadogV2/model/model_user_invitation_data_attributes.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of a user invitation. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInvitationDataAttributes { + /// Creation time of the user invitation. + #[serde(rename = "created_at")] + pub created_at: Option, + /// Time of invitation expiration. + #[serde(rename = "expires_at")] + pub expires_at: Option, + /// Type of invitation. + #[serde(rename = "invite_type")] + pub invite_type: Option, + /// UUID of the user invitation. + #[serde(rename = "uuid")] + pub uuid: Option, +} + +impl UserInvitationDataAttributes { + pub fn new() -> UserInvitationDataAttributes { + UserInvitationDataAttributes { + created_at: None, + expires_at: None, + invite_type: None, + uuid: None, + } + } +} diff --git a/src/datadogV2/model/model_user_invitation_relationships.rs b/src/datadogV2/model/model_user_invitation_relationships.rs new file mode 100644 index 000000000..89882c195 --- /dev/null +++ b/src/datadogV2/model/model_user_invitation_relationships.rs @@ -0,0 +1,22 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships data for user invitation. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInvitationRelationships { + /// Relationship to user. + #[serde(rename = "user")] + pub user: Box, +} + +impl UserInvitationRelationships { + pub fn new( + user: Box, + ) -> UserInvitationRelationships { + UserInvitationRelationships { user } + } +} diff --git a/src/datadogV2/model/model_user_invitation_response.rs b/src/datadogV2/model/model_user_invitation_response.rs new file mode 100644 index 000000000..df9571ee1 --- /dev/null +++ b/src/datadogV2/model/model_user_invitation_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// User invitation as returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInvitationResponse { + /// Object of a user invitation returned by the API. + #[serde(rename = "data")] + pub data: Option>, +} + +impl UserInvitationResponse { + pub fn new() -> UserInvitationResponse { + UserInvitationResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_user_invitation_response_data.rs b/src/datadogV2/model/model_user_invitation_response_data.rs new file mode 100644 index 000000000..756d49e73 --- /dev/null +++ b/src/datadogV2/model/model_user_invitation_response_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object of a user invitation returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInvitationResponseData { + /// Attributes of a user invitation. + #[serde(rename = "attributes")] + pub attributes: Option>, + /// ID of the user invitation. + #[serde(rename = "id")] + pub id: Option, + /// Relationships data for user invitation. + #[serde(rename = "relationships")] + pub relationships: Option>, + /// User invitations type. + #[serde(rename = "type")] + pub type_: Option, +} + +impl UserInvitationResponseData { + pub fn new() -> UserInvitationResponseData { + UserInvitationResponseData { + attributes: None, + id: None, + relationships: None, + type_: None, + } + } +} diff --git a/src/datadogV2/model/model_user_invitations_request.rs b/src/datadogV2/model/model_user_invitations_request.rs new file mode 100644 index 000000000..398ab97b4 --- /dev/null +++ b/src/datadogV2/model/model_user_invitations_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to invite users to join the organization. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInvitationsRequest { + /// List of user invitations. + #[serde(rename = "data")] + pub data: Vec, +} + +impl UserInvitationsRequest { + pub fn new(data: Vec) -> UserInvitationsRequest { + UserInvitationsRequest { data } + } +} diff --git a/src/datadogV2/model/model_user_invitations_response.rs b/src/datadogV2/model/model_user_invitations_response.rs new file mode 100644 index 000000000..22d508c42 --- /dev/null +++ b/src/datadogV2/model/model_user_invitations_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// User invitations as returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserInvitationsResponse { + /// Array of user invitations. + #[serde(rename = "data")] + pub data: Option>, +} + +impl UserInvitationsResponse { + pub fn new() -> UserInvitationsResponse { + UserInvitationsResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_user_invitations_type.rs b/src/datadogV2/model/model_user_invitations_type.rs new file mode 100644 index 000000000..19e3417f5 --- /dev/null +++ b/src/datadogV2/model/model_user_invitations_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum UserInvitationsType { + #[serde(rename = "user_invitations")] + USER_INVITATIONS, +} + +impl ToString for UserInvitationsType { + fn to_string(&self) -> String { + match self { + Self::USER_INVITATIONS => String::from("user_invitations"), + } + } +} diff --git a/src/datadogV2/model/model_user_relationships.rs b/src/datadogV2/model/model_user_relationships.rs new file mode 100644 index 000000000..295143fcc --- /dev/null +++ b/src/datadogV2/model/model_user_relationships.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships of the user object. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserRelationships { + /// Relationship to roles. + #[serde(rename = "roles")] + pub roles: Option>, +} + +impl UserRelationships { + pub fn new() -> UserRelationships { + UserRelationships { roles: None } + } +} diff --git a/src/datadogV2/model/model_user_response.rs b/src/datadogV2/model/model_user_response.rs new file mode 100644 index 000000000..bf1fe861c --- /dev/null +++ b/src/datadogV2/model/model_user_response.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing information about a single user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserResponse { + /// User object returned by the API. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the user. + #[serde(rename = "included")] + pub included: Option>, +} + +impl UserResponse { + pub fn new() -> UserResponse { + UserResponse { + data: None, + included: None, + } + } +} diff --git a/src/datadogV2/model/model_user_response_included_item.rs b/src/datadogV2/model/model_user_response_included_item.rs new file mode 100644 index 000000000..7255d2c22 --- /dev/null +++ b/src/datadogV2/model/model_user_response_included_item.rs @@ -0,0 +1,13 @@ +// 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. +use serde::{Deserialize, Serialize}; + +/// An object related to a user. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UserResponseIncludedItem { + Organization(Box), + Permission(Box), + Role(Box), +} diff --git a/src/datadogV2/model/model_user_response_relationships.rs b/src/datadogV2/model/model_user_response_relationships.rs new file mode 100644 index 000000000..76612592c --- /dev/null +++ b/src/datadogV2/model/model_user_response_relationships.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationships of the user object returned by the API. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserResponseRelationships { + /// Relationship to an organization. + #[serde(rename = "org")] + pub org: Option>, + /// Relationship to organizations. + #[serde(rename = "other_orgs")] + pub other_orgs: Option>, + /// Relationship to users. + #[serde(rename = "other_users")] + pub other_users: Option>, + /// Relationship to roles. + #[serde(rename = "roles")] + pub roles: Option>, +} + +impl UserResponseRelationships { + pub fn new() -> UserResponseRelationships { + UserResponseRelationships { + org: None, + other_orgs: None, + other_users: None, + roles: None, + } + } +} diff --git a/src/datadogV2/model/model_user_team.rs b/src/datadogV2/model/model_user_team.rs new file mode 100644 index 000000000..3f233d71e --- /dev/null +++ b/src/datadogV2/model/model_user_team.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A user's relationship with a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeam { + /// Team membership attributes + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The ID of a user's relationship with a team + #[serde(rename = "id")] + pub id: String, + /// Relationship between membership and a user + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Team membership type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserTeamType, +} + +impl UserTeam { + pub fn new(id: String, type_: crate::datadogV2::model::UserTeamType) -> UserTeam { + UserTeam { + attributes: None, + id, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_user_team_attributes.rs b/src/datadogV2/model/model_user_team_attributes.rs new file mode 100644 index 000000000..b4c202a95 --- /dev/null +++ b/src/datadogV2/model/model_user_team_attributes.rs @@ -0,0 +1,39 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team membership attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamAttributes { + /// The mechanism responsible for provisioning the team relationship. + /// Possible values: null for added by a user, "service_account" if added by a service account, and "saml_mapping" if provisioned via SAML mapping. + #[serde( + rename = "provisioned_by", + default, + with = "::serde_with::rust::double_option" + )] + pub provisioned_by: Option>, + /// UUID of the User or Service Account who provisioned this team membership, or null if provisioned via SAML mapping. + #[serde( + rename = "provisioned_by_id", + default, + with = "::serde_with::rust::double_option" + )] + pub provisioned_by_id: Option>, + /// The user's role within the team + #[serde(rename = "role", default, with = "::serde_with::rust::double_option")] + pub role: Option>, +} + +impl UserTeamAttributes { + pub fn new() -> UserTeamAttributes { + UserTeamAttributes { + provisioned_by: None, + provisioned_by_id: None, + role: None, + } + } +} diff --git a/src/datadogV2/model/model_user_team_create.rs b/src/datadogV2/model/model_user_team_create.rs new file mode 100644 index 000000000..edf13d5a5 --- /dev/null +++ b/src/datadogV2/model/model_user_team_create.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A user's relationship with a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamCreate { + /// Team membership attributes + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Relationship between membership and a user + #[serde(rename = "relationships")] + pub relationships: Option>, + /// Team membership type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserTeamType, +} + +impl UserTeamCreate { + pub fn new(type_: crate::datadogV2::model::UserTeamType) -> UserTeamCreate { + UserTeamCreate { + attributes: None, + relationships: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_user_team_permission.rs b/src/datadogV2/model/model_user_team_permission.rs new file mode 100644 index 000000000..5ae0ae9ee --- /dev/null +++ b/src/datadogV2/model/model_user_team_permission.rs @@ -0,0 +1,33 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A user's permissions for a given team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamPermission { + /// User team permission attributes + #[serde(rename = "attributes")] + pub attributes: Option>, + /// The user team permission's identifier + #[serde(rename = "id")] + pub id: String, + /// User team permission type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserTeamPermissionType, +} + +impl UserTeamPermission { + pub fn new( + id: String, + type_: crate::datadogV2::model::UserTeamPermissionType, + ) -> UserTeamPermission { + UserTeamPermission { + attributes: None, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_user_team_permission_attributes.rs b/src/datadogV2/model/model_user_team_permission_attributes.rs new file mode 100644 index 000000000..36050489a --- /dev/null +++ b/src/datadogV2/model/model_user_team_permission_attributes.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// User team permission attributes +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamPermissionAttributes { + /// Object of team permission actions and boolean values that a logged in user can perform on this team. + #[serde(rename = "permissions")] + pub permissions: Option>, +} + +impl UserTeamPermissionAttributes { + pub fn new() -> UserTeamPermissionAttributes { + UserTeamPermissionAttributes { permissions: None } + } +} diff --git a/src/datadogV2/model/model_user_team_permission_type.rs b/src/datadogV2/model/model_user_team_permission_type.rs new file mode 100644 index 000000000..cdc550fe0 --- /dev/null +++ b/src/datadogV2/model/model_user_team_permission_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum UserTeamPermissionType { + #[serde(rename = "user_team_permissions")] + USER_TEAM_PERMISSIONS, +} + +impl ToString for UserTeamPermissionType { + fn to_string(&self) -> String { + match self { + Self::USER_TEAM_PERMISSIONS => String::from("user_team_permissions"), + } + } +} diff --git a/src/datadogV2/model/model_user_team_relationships.rs b/src/datadogV2/model/model_user_team_relationships.rs new file mode 100644 index 000000000..090d21c5f --- /dev/null +++ b/src/datadogV2/model/model_user_team_relationships.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Relationship between membership and a user +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamRelationships { + /// Relationship between team membership and team + #[serde(rename = "team")] + pub team: Option>, + /// Relationship between team membership and user + #[serde(rename = "user")] + pub user: Option>, +} + +impl UserTeamRelationships { + pub fn new() -> UserTeamRelationships { + UserTeamRelationships { + team: None, + user: None, + } + } +} diff --git a/src/datadogV2/model/model_user_team_request.rs b/src/datadogV2/model/model_user_team_request.rs new file mode 100644 index 000000000..ab83ec52e --- /dev/null +++ b/src/datadogV2/model/model_user_team_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team membership request +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamRequest { + /// A user's relationship with a team + #[serde(rename = "data")] + pub data: Box, +} + +impl UserTeamRequest { + pub fn new(data: Box) -> UserTeamRequest { + UserTeamRequest { data } + } +} diff --git a/src/datadogV2/model/model_user_team_response.rs b/src/datadogV2/model/model_user_team_response.rs new file mode 100644 index 000000000..122722b3a --- /dev/null +++ b/src/datadogV2/model/model_user_team_response.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team membership response +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamResponse { + /// A user's relationship with a team + #[serde(rename = "data")] + pub data: Option>, +} + +impl UserTeamResponse { + pub fn new() -> UserTeamResponse { + UserTeamResponse { data: None } + } +} diff --git a/src/datadogV2/model/model_user_team_role.rs b/src/datadogV2/model/model_user_team_role.rs new file mode 100644 index 000000000..425f0ec34 --- /dev/null +++ b/src/datadogV2/model/model_user_team_role.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum UserTeamRole { + #[serde(rename = "admin")] + ADMIN, +} + +impl ToString for UserTeamRole { + fn to_string(&self) -> String { + match self { + Self::ADMIN => String::from("admin"), + } + } +} diff --git a/src/datadogV2/model/model_user_team_team_type.rs b/src/datadogV2/model/model_user_team_team_type.rs new file mode 100644 index 000000000..76665e86d --- /dev/null +++ b/src/datadogV2/model/model_user_team_team_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum UserTeamTeamType { + #[serde(rename = "team")] + TEAM, +} + +impl ToString for UserTeamTeamType { + fn to_string(&self) -> String { + match self { + Self::TEAM => String::from("team"), + } + } +} diff --git a/src/datadogV2/model/model_user_team_type.rs b/src/datadogV2/model/model_user_team_type.rs new file mode 100644 index 000000000..82664e44a --- /dev/null +++ b/src/datadogV2/model/model_user_team_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum UserTeamType { + #[serde(rename = "team_memberships")] + TEAM_MEMBERSHIPS, +} + +impl ToString for UserTeamType { + fn to_string(&self) -> String { + match self { + Self::TEAM_MEMBERSHIPS => String::from("team_memberships"), + } + } +} diff --git a/src/datadogV2/model/model_user_team_update.rs b/src/datadogV2/model/model_user_team_update.rs new file mode 100644 index 000000000..2d57218e1 --- /dev/null +++ b/src/datadogV2/model/model_user_team_update.rs @@ -0,0 +1,26 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// A user's relationship with a team +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamUpdate { + /// Team membership attributes + #[serde(rename = "attributes")] + pub attributes: Option>, + /// Team membership type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UserTeamType, +} + +impl UserTeamUpdate { + pub fn new(type_: crate::datadogV2::model::UserTeamType) -> UserTeamUpdate { + UserTeamUpdate { + attributes: None, + type_, + } + } +} diff --git a/src/datadogV2/model/model_user_team_update_request.rs b/src/datadogV2/model/model_user_team_update_request.rs new file mode 100644 index 000000000..797f8a1d2 --- /dev/null +++ b/src/datadogV2/model/model_user_team_update_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team membership request +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamUpdateRequest { + /// A user's relationship with a team + #[serde(rename = "data")] + pub data: Box, +} + +impl UserTeamUpdateRequest { + pub fn new(data: Box) -> UserTeamUpdateRequest { + UserTeamUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_user_team_user_type.rs b/src/datadogV2/model/model_user_team_user_type.rs new file mode 100644 index 000000000..6ccdad173 --- /dev/null +++ b/src/datadogV2/model/model_user_team_user_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum UserTeamUserType { + #[serde(rename = "users")] + USERS, +} + +impl ToString for UserTeamUserType { + fn to_string(&self) -> String { + match self { + Self::USERS => String::from("users"), + } + } +} diff --git a/src/datadogV2/model/model_user_teams_response.rs b/src/datadogV2/model/model_user_teams_response.rs new file mode 100644 index 000000000..15668c4e2 --- /dev/null +++ b/src/datadogV2/model/model_user_teams_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Team memberships response +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserTeamsResponse { + /// Team memberships response data + #[serde(rename = "data")] + pub data: Option>, + /// Teams response links. + #[serde(rename = "links")] + pub links: Option>, + /// Teams response metadata. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl UserTeamsResponse { + pub fn new() -> UserTeamsResponse { + UserTeamsResponse { + data: None, + links: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_user_update_attributes.rs b/src/datadogV2/model/model_user_update_attributes.rs new file mode 100644 index 000000000..45cefe877 --- /dev/null +++ b/src/datadogV2/model/model_user_update_attributes.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Attributes of the edited user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserUpdateAttributes { + /// If the user is enabled or disabled. + #[serde(rename = "disabled")] + pub disabled: Option, + /// The email of the user. + #[serde(rename = "email")] + pub email: Option, + /// The name of the user. + #[serde(rename = "name")] + pub name: Option, +} + +impl UserUpdateAttributes { + pub fn new() -> UserUpdateAttributes { + UserUpdateAttributes { + disabled: None, + email: None, + name: None, + } + } +} diff --git a/src/datadogV2/model/model_user_update_data.rs b/src/datadogV2/model/model_user_update_data.rs new file mode 100644 index 000000000..8f2d44a8f --- /dev/null +++ b/src/datadogV2/model/model_user_update_data.rs @@ -0,0 +1,34 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Object to update a user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserUpdateData { + /// Attributes of the edited user. + #[serde(rename = "attributes")] + pub attributes: Box, + /// ID of the user. + #[serde(rename = "id")] + pub id: String, + /// Users resource type. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::UsersType, +} + +impl UserUpdateData { + pub fn new( + attributes: Box, + id: String, + type_: crate::datadogV2::model::UsersType, + ) -> UserUpdateData { + UserUpdateData { + attributes, + id, + type_, + } + } +} diff --git a/src/datadogV2/model/model_user_update_request.rs b/src/datadogV2/model/model_user_update_request.rs new file mode 100644 index 000000000..28f5922e0 --- /dev/null +++ b/src/datadogV2/model/model_user_update_request.rs @@ -0,0 +1,20 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Update a user. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserUpdateRequest { + /// Object to update a user. + #[serde(rename = "data")] + pub data: Box, +} + +impl UserUpdateRequest { + pub fn new(data: Box) -> UserUpdateRequest { + UserUpdateRequest { data } + } +} diff --git a/src/datadogV2/model/model_users_response.rs b/src/datadogV2/model/model_users_response.rs new file mode 100644 index 000000000..27a34b1f2 --- /dev/null +++ b/src/datadogV2/model/model_users_response.rs @@ -0,0 +1,30 @@ +// 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. +use serde::{Deserialize, Serialize}; +use serde_with::skip_serializing_none; + +/// Response containing information about multiple users. +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct UsersResponse { + /// Array of returned users. + #[serde(rename = "data")] + pub data: Option>, + /// Array of objects related to the users. + #[serde(rename = "included")] + pub included: Option>, + /// Object describing meta attributes of response. + #[serde(rename = "meta")] + pub meta: Option>, +} + +impl UsersResponse { + pub fn new() -> UsersResponse { + UsersResponse { + data: None, + included: None, + meta: None, + } + } +} diff --git a/src/datadogV2/model/model_users_type.rs b/src/datadogV2/model/model_users_type.rs new file mode 100644 index 000000000..8b2288c25 --- /dev/null +++ b/src/datadogV2/model/model_users_type.rs @@ -0,0 +1,19 @@ +// 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. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum UsersType { + #[serde(rename = "users")] + USERS, +} + +impl ToString for UsersType { + fn to_string(&self) -> String { + match self { + Self::USERS => String::from("users"), + } + } +} diff --git a/src/datadogV2/model/model_widget_live_span.rs b/src/datadogV2/model/model_widget_live_span.rs new file mode 100644 index 000000000..b8fd7696c --- /dev/null +++ b/src/datadogV2/model/model_widget_live_span.rs @@ -0,0 +1,61 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum WidgetLiveSpan { + #[serde(rename = "1m")] + PAST_ONE_MINUTE, + #[serde(rename = "5m")] + PAST_FIVE_MINUTES, + #[serde(rename = "10m")] + PAST_TEN_MINUTES, + #[serde(rename = "15m")] + PAST_FIFTEEN_MINUTES, + #[serde(rename = "30m")] + PAST_THIRTY_MINUTES, + #[serde(rename = "1h")] + PAST_ONE_HOUR, + #[serde(rename = "4h")] + PAST_FOUR_HOURS, + #[serde(rename = "1d")] + PAST_ONE_DAY, + #[serde(rename = "2d")] + PAST_TWO_DAYS, + #[serde(rename = "1w")] + PAST_ONE_WEEK, + #[serde(rename = "1mo")] + PAST_ONE_MONTH, + #[serde(rename = "3mo")] + PAST_THREE_MONTHS, + #[serde(rename = "6mo")] + PAST_SIX_MONTHS, + #[serde(rename = "1y")] + PAST_ONE_YEAR, + #[serde(rename = "alert")] + ALERT, +} + +impl ToString for WidgetLiveSpan { + fn to_string(&self) -> String { + match self { + Self::PAST_ONE_MINUTE => String::from("1m"), + Self::PAST_FIVE_MINUTES => String::from("5m"), + Self::PAST_TEN_MINUTES => String::from("10m"), + Self::PAST_FIFTEEN_MINUTES => String::from("15m"), + Self::PAST_THIRTY_MINUTES => String::from("30m"), + Self::PAST_ONE_HOUR => String::from("1h"), + Self::PAST_FOUR_HOURS => String::from("4h"), + Self::PAST_ONE_DAY => String::from("1d"), + Self::PAST_TWO_DAYS => String::from("2d"), + Self::PAST_ONE_WEEK => String::from("1w"), + Self::PAST_ONE_MONTH => String::from("1mo"), + Self::PAST_THREE_MONTHS => String::from("3mo"), + Self::PAST_SIX_MONTHS => String::from("6mo"), + Self::PAST_ONE_YEAR => String::from("1y"), + Self::ALERT => String::from("alert"), + } + } +} diff --git a/tests/main.rs b/tests/main.rs index 32b507160..54986bced 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -1,8 +1,9 @@ mod scenarios; use cucumber::{cli, parser, runner, writer, World}; -use scenarios::fixtures::{after_scenario, before_scenario, DatadogWorld}; -use std::env; +use scenarios::fixtures::{after_scenario, before_scenario, DatadogWorld, API_VERSION_RE}; +use serde_json::Value; +use std::{env, fs::File, io::BufReader}; #[tokio::main] async fn main() { @@ -14,11 +15,40 @@ async fn main() { let is_replay = !record_mode.eq("true") && !record_mode.eq("none"); let parsed_cli: cli::Opts = cli::Opts::parsed(); + + let given_v1_file = File::open("tests/scenarios/features/v1/given.json").unwrap(); + let given_v1: Value = serde_json::from_reader(BufReader::new(given_v1_file)) + .expect("failed to deserialize given.json"); + let undo_v1_file = File::open("tests/scenarios/features/v1/undo.json").unwrap(); + let undo_v1: Value = serde_json::from_reader(BufReader::new(undo_v1_file)) + .expect("failed to deserialize undo.json"); + let given_v2_file = File::open("tests/scenarios/features/v2/given.json").unwrap(); + let given_v2: Value = serde_json::from_reader(BufReader::new(given_v2_file)) + .expect("failed to deserialize given.json"); + let undo_v2_file = File::open("tests/scenarios/features/v2/undo.json").unwrap(); + let undo_v2: Value = serde_json::from_reader(BufReader::new(undo_v2_file)) + .expect("failed to deserialize undo.json"); + DatadogWorld::cucumber() .with_default_cli() .repeat_failed() .fail_on_skipped() - .before(|feature, rule, scenario, world| { + .before(move |feature, rule, scenario, world| { + world.api_version = API_VERSION_RE + .captures(feature.path.as_ref().unwrap().to_str().unwrap()) + .unwrap() + .get(1) + .unwrap() + .as_str() + .parse() + .unwrap(); + if world.api_version == 1 { + world.given_map = given_v1.clone(); + world.undo_map = undo_v1.clone(); + } else if world.api_version == 2 { + world.given_map = given_v2.clone(); + world.undo_map = undo_v2.clone(); + } Box::pin(before_scenario(feature, rule, scenario, world)) }) .after(|feature, rule, scenario, ev, world| { diff --git a/tests/scenarios/cassettes/v1/aws_integration/Create-an-AWS-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/aws_integration/Create-an-AWS-integration-returns-OK-response.frozen new file mode 100644 index 000000000..7c6183582 --- /dev/null +++ b/tests/scenarios/cassettes/v1/aws_integration/Create-an-AWS-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-13T14:17:01.291Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/aws_integration/Create-an-AWS-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/aws_integration/Create-an-AWS-integration-returns-OK-response.json new file mode 100644 index 000000000..e46621e18 --- /dev/null +++ b/tests/scenarios/cassettes/v1/aws_integration/Create-an-AWS-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"account_id\":\"169988502100\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/aws"}, "response": {"body": {"string": "{\"external_id\":\"9668e281c0ef4cc8be01710ef7a0ae4c\"}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 13 Nov 2023 14:17:01 GMT"}, {"request": {"body": {"string": "{\"account_id\":\"169988502100\",\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/aws"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 13 Nov 2023 14:17:01 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/aws_integration/Delete-an-AWS-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/aws_integration/Delete-an-AWS-integration-returns-OK-response.frozen new file mode 100644 index 000000000..e3ae39811 --- /dev/null +++ b/tests/scenarios/cassettes/v1/aws_integration/Delete-an-AWS-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-21T19:25:15.118Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/aws_integration/Delete-an-AWS-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/aws_integration/Delete-an-AWS-integration-returns-OK-response.json new file mode 100644 index 000000000..75833aa65 --- /dev/null +++ b/tests/scenarios/cassettes/v1/aws_integration/Delete-an-AWS-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"account_id\":\"170059471500\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/aws"}, "response": {"body": {"string": "{\"external_id\":\"77c77ead62584b0fa1bb6a9fe7d2fa28\"}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 21 Nov 2023 19:25:15 GMT"}, {"request": {"body": {"string": "{\"account_id\":\"170059471500\",\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/aws"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 21 Nov 2023 19:25:15 GMT"}, {"request": {"body": {"string": "{\"account_id\":\"170059471500\",\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/aws"}, "response": {"body": {"string": "{\"errors\":[\"AWS account 170059471500 does not exist in integration\"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 400, "message": "Bad Request"}}, "recorded_at": "Tue, 21 Nov 2023 19:25:15 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.frozen index c139a36bd..34d80ee0c 100644 --- a/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-17T15:38:07.190Z \ No newline at end of file +2023-11-23T18:16:16.323Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.json index a238145dc..ba11149b8 100644 --- a/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.json +++ b/tests/scenarios/cassettes/v1/aws_integration/Update-an-AWS-integration-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"account_id\":\"123456789012\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"datadog-role\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "put", "uri": "https://api.datadoghq.com/api/v1/integration/aws?account_id=123456789012&role_name=datadog-role"}, "response": {"body": {"string": "{}", "encoding": null}, "headers": {"Content-Type": ["application/json;charset=utf-8"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 17 May 2022 15:38:07 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"account_id\":\"170076337600\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/aws"}, "response": {"body": {"string": "{\"external_id\":\"c7298c166e774bf1bd1bc0419e68f1a0\"}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 23 Nov 2023 18:16:16 GMT"}, {"request": {"body": {"string": "{\"account_id\":\"170076337600\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":false,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":true,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "put", "uri": "https://api.datadoghq.com/api/v1/integration/aws?account_id=170076337600&role_name=DatadogAWSIntegrationRole"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 23 Nov 2023 18:16:16 GMT"}, {"request": {"body": {"string": "{\"account_id\":\"170076337600\",\"role_name\":\"DatadogAWSIntegrationRole\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/aws"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 23 Nov 2023 18:16:16 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/azure_integration/Create-an-Azure-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/azure_integration/Create-an-Azure-integration-returns-OK-response.frozen new file mode 100644 index 000000000..10af779fb --- /dev/null +++ b/tests/scenarios/cassettes/v1/azure_integration/Create-an-Azure-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-15T18:21:55.828Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/azure_integration/Create-an-Azure-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/azure_integration/Create-an-Azure-integration-returns-OK-response.json new file mode 100644 index 000000000..2bbc671b1 --- /dev/null +++ b/tests/scenarios/cassettes/v1/azure_integration/Create-an-Azure-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17026645-0000-0000-0000-170266451500\",\"client_secret\":\"testingx./Sw*g/Y33t..R1cH+hScMDt\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"new_client_id\":\"17026645-0000-0000-0000-170266451500\",\"new_tenant_name\":\"17026645-0000-0000-0000-170266451500\",\"resource_collection_enabled\":true,\"tenant_name\":\"17026645-0000-0000-0000-170266451500\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:55 GMT"}, {"request": {"body": {"string": "{\"client_id\":\"17026645-0000-0000-0000-170266451500\",\"tenant_name\":\"17026645-0000-0000-0000-170266451500\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:55 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.frozen new file mode 100644 index 000000000..59b6f680c --- /dev/null +++ b/tests/scenarios/cassettes/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-15T18:21:57.741Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.json new file mode 100644 index 000000000..2bc522191 --- /dev/null +++ b/tests/scenarios/cassettes/v1/azure_integration/Delete-an-Azure-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17026645-0000-0000-0000-170266451700\",\"client_secret\":\"testingx./Sw*g/Y33t..R1cH+hScMDt\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"new_client_id\":\"17026645-0000-0000-0000-170266451700\",\"new_tenant_name\":\"17026645-0000-0000-0000-170266451700\",\"resource_collection_enabled\":true,\"tenant_name\":\"17026645-0000-0000-0000-170266451700\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:57 GMT"}, {"request": {"body": {"string": "{\"client_id\":\"17026645-0000-0000-0000-170266451700\",\"tenant_name\":\"17026645-0000-0000-0000-170266451700\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:57 GMT"}, {"request": {"body": {"string": "{\"client_id\":\"17026645-0000-0000-0000-170266451700\",\"tenant_name\":\"17026645-0000-0000-0000-170266451700\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:57 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.frozen new file mode 100644 index 000000000..28414158e --- /dev/null +++ b/tests/scenarios/cassettes/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-15T18:21:59.912Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.json new file mode 100644 index 000000000..83b93ef65 --- /dev/null +++ b/tests/scenarios/cassettes/v1/azure_integration/Update-an-Azure-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17026645-0000-0000-0000-170266451900\",\"client_secret\":\"testingx./Sw*g/Y33t..R1cH+hScMDt\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"new_client_id\":\"17026645-0000-0000-0000-170266451900\",\"new_tenant_name\":\"17026645-0000-0000-0000-170266451900\",\"resource_collection_enabled\":true,\"tenant_name\":\"17026645-0000-0000-0000-170266451900\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:59 GMT"}, {"request": {"body": {"string": "{\"app_service_plan_filters\":\"key:value,filter:example\",\"automute\":true,\"client_id\":\"17026645-0000-0000-0000-170266451900\",\"client_secret\":\"testingx./Sw*g/Y33t..R1cH+hScMDt\",\"container_app_filters\":\"key:value,filter:example\",\"cspm_enabled\":true,\"custom_metrics_enabled\":true,\"errors\":[\"*\"],\"host_filters\":\"key:value,filter:example\",\"new_client_id\":\"17026645-0000-0000-0000-170266451900\",\"new_tenant_name\":\"17026645-0000-0000-0000-170266451900\",\"resource_collection_enabled\":true,\"tenant_name\":\"17026645-0000-0000-0000-170266451900\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "put", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:59 GMT"}, {"request": {"body": {"string": "{\"client_id\":\"17026645-0000-0000-0000-170266451900\",\"tenant_name\":\"17026645-0000-0000-0000-170266451900\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/azure"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 15 Dec 2023 18:21:59 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.frozen index c799f9c5f..111062c80 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.frozen @@ -1 +1 @@ -2023-07-11T14:32:45.409Z \ No newline at end of file +2023-11-14T21:39:19.397Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.json index 87e17f709..c631880ef 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-a-timeseries-widget-using-formulas-and-functions-cloud-cost-query.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1689085965\",\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"}}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/dashboard"}, "response": {"body": {"string": "{\"id\":\"kka-2iz-3jf\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1689085965\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/kka-2iz-3jf/test-createanewdashboardwithatimeserieswidgetusingformulasandfunctionscloudcostq\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"},\"id\":1004255439340}],\"notify_list\":null,\"created_at\":\"2023-07-11T14:32:45.564617+00:00\",\"modified_at\":\"2023-07-11T14:32:45.564617+00:00\",\"restricted_roles\":[]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 11 Jul 2023 14:32:45 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/dashboard/kka-2iz-3jf"}, "response": {"body": {"string": "{\"deleted_dashboard_id\":\"kka-2iz-3jf\"}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 11 Jul 2023 14:32:45 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1699997959\",\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"time\":{\"live_span\":\"week_to_date\"},\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"}}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/dashboard"}, "response": {"body": {"string": "{\"id\":\"nh3-n9c-wuz\",\"title\":\"Test-Create_a_new_dashboard_with_a_timeseries_widget_using_formulas_and_functions_cloud_cost_query-1699997959\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/nh3-n9c-wuz/test-createanewdashboardwithatimeserieswidgetusingformulasandfunctionscloudcostq\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"display_type\":\"bars\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"data_source\":\"cloud_cost\",\"name\":\"query1\",\"query\":\"sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)\"}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"time\":{\"live_span\":\"week_to_date\"},\"title\":\"Example Cloud Cost Query\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"timeseries\"},\"id\":380165468656457}],\"notify_list\":null,\"created_at\":\"2023-11-14T21:39:19.798591+00:00\",\"modified_at\":\"2023-11-14T21:39:19.798591+00:00\",\"restricted_roles\":[]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 14 Nov 2023 21:39:19 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/dashboard/nh3-n9c-wuz"}, "response": {"body": {"string": "{\"deleted_dashboard_id\":\"nh3-n9c-wuz\"}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 14 Nov 2023 21:39:19 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.frozen b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.frozen index fe01821d9..5402413b1 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.frozen +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.frozen @@ -1 +1 @@ -2022-01-06T00:50:42.009Z \ No newline at end of file +2023-10-26T08:09:58.883Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.json b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.json index 6e8be8db2..b76d4d25a 100644 --- a/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.json +++ b/tests/scenarios/cassettes/v1/dashboards/Create-a-new-dashboard-with-toplist-widget.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1641430242\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\"}],\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/dashboard"}, "response": {"body": {"string": "{\"notify_list\":[],\"description\":\"\",\"restricted_roles\":[],\"author_name\":null,\"template_variables\":[],\"is_read_only\":false,\"id\":\"d2b-542-pi3\",\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1641430242\",\"url\":\"/dashboard/d2b-542-pi3/test-createanewdashboardwithtoplistwidget-1641430242\",\"created_at\":\"2022-01-06T00:50:42.239967+00:00\",\"modified_at\":\"2022-01-06T00:50:42.239967+00:00\",\"author_handle\":\"frog@datadoghq.com\",\"widgets\":[{\"definition\":{\"title_size\":\"16\",\"title\":\"\",\"title_align\":\"left\",\"time\":{},\"requests\":[{\"formulas\":[{\"formula\":\"query1\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"response_format\":\"scalar\",\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}]}],\"type\":\"toplist\"},\"layout\":{\"y\":0,\"width\":47,\"x\":0,\"height\":15},\"id\":7585713881554705}],\"layout_type\":\"free\"}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 06 Jan 2022 00:50:42 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/dashboard/d2b-542-pi3"}, "response": {"body": {"string": "{\"deleted_dashboard_id\":\"d2b-542-pi3\"}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 06 Jan 2022 00:50:42 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"description\":\"\",\"is_read_only\":false,\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1698307798\",\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\"}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/dashboard"}, "response": {"body": {"string": "{\"id\":\"bw8-fjj-cai\",\"title\":\"Test-Create_a_new_dashboard_with_toplist_widget-1698307798\",\"description\":\"\",\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"free\",\"url\":\"/dashboard/bw8-fjj-cai/test-createanewdashboardwithtoplistwidget-1698307798\",\"is_read_only\":false,\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"formulas\":[{\"formula\":\"query1\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"queries\":[{\"aggregator\":\"avg\",\"data_source\":\"metrics\",\"name\":\"query1\",\"query\":\"avg:system.cpu.user{*} by {service}\"}],\"response_format\":\"scalar\"}],\"style\":{\"display\":{\"legend\":\"inline\",\"type\":\"stacked\"},\"scaling\":\"relative\"},\"time\":{},\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"toplist\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":7690286767696538}],\"notify_list\":[],\"created_at\":\"2023-10-26T08:09:59.495981+00:00\",\"modified_at\":\"2023-10-26T08:09:59.495981+00:00\",\"restricted_roles\":[]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 26 Oct 2023 08:09:58 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/dashboard/bw8-fjj-cai"}, "response": {"body": {"string": "{\"deleted_dashboard_id\":\"bw8-fjj-cai\"}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 26 Oct 2023 08:09:58 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/Create-a-GCP-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/gcp_integration/Create-a-GCP-integration-returns-OK-response.frozen new file mode 100644 index 000000000..3677f3cb1 --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/Create-a-GCP-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-20T13:18:07.717Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/Create-a-GCP-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/gcp_integration/Create-a-GCP-integration-returns-OK-response.json new file mode 100644 index 000000000..0b9d4f6b1 --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/Create-a-GCP-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_email\":\"e5bbc86fb86ab202@example.com\",\"client_id\":\"170307828717030782870\",\"client_x509_cert_url\":\"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL\",\"host_filters\":\"key:value,filter:example\",\"is_cspm_enabled\":true,\"is_security_command_center_enabled\":true,\"private_key\":\"private_key\",\"private_key_id\":\"123456789abcdefghi123456789abcdefghijklm\",\"project_id\":\"datadog-apitest\",\"resource_collection_enabled\":true,\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"type\":\"service_account\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:18:07 GMT"}, {"request": {"body": {"string": "{\"client_email\":\"e5bbc86fb86ab202@example.com\",\"client_id\":\"170307828717030782870\",\"project_id\":\"datadog-apitest\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:18:07 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/Delete-a-GCP-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/gcp_integration/Delete-a-GCP-integration-returns-OK-response.frozen new file mode 100644 index 000000000..ab5126c3f --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/Delete-a-GCP-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-20T13:20:18.421Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/Delete-a-GCP-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/gcp_integration/Delete-a-GCP-integration-returns-OK-response.json new file mode 100644 index 000000000..e6902e2bb --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/Delete-a-GCP-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_email\":\"40c7bfeef7b52e04@example.com\",\"client_id\":\"170307841817030784180\",\"client_x509_cert_url\":\"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL\",\"host_filters\":\"key:value,filter:example\",\"is_cspm_enabled\":true,\"is_security_command_center_enabled\":true,\"private_key\":\"private_key\",\"private_key_id\":\"123456789abcdefghi123456789abcdefghijklm\",\"project_id\":\"datadog-apitest\",\"resource_collection_enabled\":true,\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"type\":\"service_account\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:20:18 GMT"}, {"request": {"body": {"string": "{\"client_email\":\"40c7bfeef7b52e04@example.com\",\"client_id\":\"170307841817030784180\",\"project_id\":\"datadog-apitest\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:20:18 GMT"}, {"request": {"body": {"string": "{\"client_email\":\"40c7bfeef7b52e04@example.com\",\"client_id\":\"170307841817030784180\",\"project_id\":\"datadog-apitest\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:20:18 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/List-all-GCP-integrations-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/gcp_integration/List-all-GCP-integrations-returns-OK-response.frozen new file mode 100644 index 000000000..35145abdd --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/List-all-GCP-integrations-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-20T13:44:06.411Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/List-all-GCP-integrations-returns-OK-response.json b/tests/scenarios/cassettes/v1/gcp_integration/List-all-GCP-integrations-returns-OK-response.json new file mode 100644 index 000000000..1cd79189d --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/List-all-GCP-integrations-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "[{\"project_id\":\"\",\"client_email\":\"00981e1c3e8e97a1@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"02c9828017e15aa5@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"097c90af04124b05@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"0f08d4423223120b@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"1085f36962d101c9@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"10e47d352952f506@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"11f4e1b9c5ec0832@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"14a023b819befe53@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"1662faf86d58e1b7@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"18bae0a9a8846c9e@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"1c5b52e7576334d2@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"1e4805f564fa2ac9@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"1fad1b27edb5bcf2@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"208ee5ed66d71133@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"219d10ddeed283a3@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"23a5556b778915be@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"24e9015e320313f8@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"277a44a2d4070df0@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"28dcbaecc6090d7e@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"2b826cc0d80181ba@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"2e67a657a5e9e7c0@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"2e9d423e7aa1f482@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"2fa0809e16b17119@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"3084fcf0ee31eb0c@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"363b41762d905e45@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"3731304188d2cf16@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"3da4c7006b369ab8@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"3ecc38b6941b8636@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"4480243013d4e5f2@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"46fe7f297cbf4352@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"4d16a20f9531ae34@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"4f72cf81bddbbdce@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"4f9c2129311f67c8@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"4fd2c5373c504d3d@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"54e6214d4e37c221@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"558219f266cb5661@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"567f48bf35496e63@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"59fd6255ff318598@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"5f67543f83a9f8fe@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"5fcbbd9fd2b05a98@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"6287c3a6f90577f5@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"6310e1f5179a6f81@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"7468db1f938c7a5b@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"792047232a0ee446@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"79fd7f289d3e203c@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"7e829bef04cabf05@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"7f0d1446a2b36412@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"800d8f61bc1b1f11@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"80c76870b798470e@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"856a341306f76135@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"85eec49aa13601a0@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"86fffdf0a2f9c120@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"8b77145ab254af0e@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"900221429a54e8c9@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"9090d908de5494b0@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"9152c07ea52b6ebf@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"92357e402dc93e16@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"936c176ea8d149f5@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"96942532bb1c698b@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"977541a023419b38@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"9822a7b951c1749b@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"99d25eaedaa0b964@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"9af8703db57f8adc@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"9b15d9c0b38905fc@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"9c20e39790e74a9a@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"a2920570daa112f1@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"a75bd581627e2019@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"a8045bf0668414a0@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"a8c4c1d81bd7f901@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"a8cd678d02a877ef@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"a951ac716618bc39@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"aaf327e22d3addd3@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"ac1de3dc0c8bd5db@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"ad33d7633503bf99@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"ad427d0e856cbbd6@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b10d6276ad2a39ce@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b15d65667f94645a@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b1faa95226c9e32f@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b402406faf436ec7@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b425753d70134965@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b5c318c34c295312@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b79dded205ad0ca0@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"b9e7fdcb3de4199e@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"c5758874111f033d@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"c5bb8a766c0da9b1@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"c65984c4759a8081@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"c765735adb6c4448@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"cb871a85cdddf23d@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"cc34eb2339b0758e@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"cea03370bad43fa8@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"d2aee02f16a95eb6@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"d497d8ae666e8c67@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"d5545b6ffc57e4c1@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"d6fe27adfb2c76ef@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"daeaffdee8f68e43@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"dc167bde560cc8ec@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"dc51b5741de8e6ea@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"df3af5ae9cb794e2@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"e307c0141d0b0056@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"e518c87ea9f81132@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"e541c487131dcfac@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"e86657afbbcc662e@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"eab76a9567596ffc@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"edbc8f8058581958@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"ededfe06c277b8b4@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"f4a3cca553ea085e@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"f938e794b0925958@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"fb67d7b98cd68c2d@example.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"fbde34a142d42679@test-project.iam.gserviceaccount.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"\",\"client_email\":\"service-account@iam-service-google.com\",\"host_filters\":\"\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699099608\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699099608@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699101380\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699101380@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699101466\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699101466@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699143227\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699143227@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699144985\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699144985@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699145097\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699145097@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699186355\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699186355@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699187247\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699187247@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]},{\"project_id\":\"tf-TestAccDatadogIntegrationGCP-local-1699187275\",\"client_email\":\"tf-TestAccDatadogIntegrationGCP-local-1699187275@awesome-project-id.iam.gserviceaccount.com\",\"host_filters\":\"foo:bar,buzz:lightyear\",\"automute\":false,\"is_cspm_enabled\":false,\"resource_collection_enabled\":false,\"is_security_command_center_enabled\":false,\"errors\":[]}]\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:44:06 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/Update-a-GCP-integration-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/gcp_integration/Update-a-GCP-integration-returns-OK-response.frozen new file mode 100644 index 000000000..d7584786d --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/Update-a-GCP-integration-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-20T13:43:40.420Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/gcp_integration/Update-a-GCP-integration-returns-OK-response.json b/tests/scenarios/cassettes/v1/gcp_integration/Update-a-GCP-integration-returns-OK-response.json new file mode 100644 index 000000000..664b8df6c --- /dev/null +++ b/tests/scenarios/cassettes/v1/gcp_integration/Update-a-GCP-integration-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_email\":\"5cf439fad579761d@example.com\",\"client_id\":\"170307982017030798200\",\"client_x509_cert_url\":\"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL\",\"host_filters\":\"key:value,filter:example\",\"is_cspm_enabled\":true,\"is_security_command_center_enabled\":true,\"private_key\":\"private_key\",\"private_key_id\":\"123456789abcdefghi123456789abcdefghijklm\",\"project_id\":\"datadog-apitest\",\"resource_collection_enabled\":true,\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"type\":\"service_account\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:43:40 GMT"}, {"request": {"body": {"string": "{\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_email\":\"5cf439fad579761d@example.com\",\"client_id\":\"170307982017030798200\",\"client_x509_cert_url\":\"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL\",\"host_filters\":\"key:value,filter:example\",\"is_cspm_enabled\":true,\"is_security_command_center_enabled\":true,\"private_key\":\"private_key\",\"private_key_id\":\"123456789abcdefghi123456789abcdefghijklm\",\"project_id\":\"datadog-apitest\",\"resource_collection_enabled\":true,\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"type\":\"service_account\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "put", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:43:40 GMT"}, {"request": {"body": {"string": "{\"client_email\":\"5cf439fad579761d@example.com\",\"client_id\":\"170307982017030798200\",\"project_id\":\"datadog-apitest\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/integration/gcp"}, "response": {"body": {"string": "{}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 20 Dec 2023 13:43:40 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.frozen index e61520e3c..e1193224e 100644 --- a/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.frozen @@ -1 +1 @@ -2023-10-04T18:33:20.272Z \ No newline at end of file +2023-11-09T17:58:50.774Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.json b/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.json index 13ff9a5cb..e75eae6a1 100644 --- a/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v1/monitors/Create-a-metric-monitor-with-a-custom-schedule-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1696444400\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"on_missing_data\":\"default\",\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5}},\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"tags\":[],\"type\":\"query alert\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/monitor"}, "response": {"body": {"string": "{\"id\":132537965,\"org_id\":321813,\"type\":\"query alert\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1696444400\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[],\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"on_missing_data\":\"default\",\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5},\"new_host_delay\":300,\"silenced\":{}},\"multi\":false,\"created_at\":1696444400000,\"created\":\"2023-10-04T18:33:20.388003+00:00\",\"modified\":\"2023-10-04T18:33:20.388003+00:00\",\"deleted\":null,\"restricted_roles\":null,\"priority\":null,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"id\":2320499}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 04 Oct 2023 18:33:20 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/monitor/132537965"}, "response": {"body": {"string": "{\"deleted_monitor_id\":132537965}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 04 Oct 2023 18:33:20 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"message\":\"some message Notify: @hipchat-channel\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1699552730\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5}},\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"tags\":[],\"type\":\"query alert\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/monitor"}, "response": {"body": {"string": "{\"id\":134549556,\"org_id\":321813,\"type\":\"query alert\",\"name\":\"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1699552730\",\"message\":\"some message Notify: @hipchat-channel\",\"tags\":[],\"query\":\"avg(current_1mo):avg:system.load.5{*} > 0.5\",\"options\":{\"include_tags\":false,\"notify_audit\":false,\"scheduling_options\":{\"custom_schedule\":{\"recurrences\":[{\"rrule\":\"FREQ=DAILY;INTERVAL=1\",\"start\":\"2024-10-26T09:13:00\",\"timezone\":\"America/Los_Angeles\"}]},\"evaluation_window\":{\"day_starts\":\"04:00\",\"month_starts\":1}},\"thresholds\":{\"critical\":0.5},\"new_host_delay\":300,\"silenced\":{}},\"multi\":false,\"created_at\":1699552731000,\"created\":\"2023-11-09T17:58:51.118858+00:00\",\"modified\":\"2023-11-09T17:58:51.118858+00:00\",\"deleted\":null,\"restricted_roles\":null,\"priority\":null,\"overall_state_modified\":null,\"overall_state\":\"No Data\",\"creator\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"id\":2320499}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 09 Nov 2023 17:58:50 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v1/monitor/134549556"}, "response": {"body": {"string": "{\"deleted_monitor_id\":134549556}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 09 Nov 2023 17:58:50 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.frozen b/tests/scenarios/cassettes/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.frozen new file mode 100644 index 000000000..b473119b4 --- /dev/null +++ b/tests/scenarios/cassettes/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-17T12:10:50.122Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.json b/tests/scenarios/cassettes/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.json new file mode 100644 index 000000000..b217cff57 --- /dev/null +++ b/tests/scenarios/cassettes/v1/synthetics/Patch-a-Synthetic-test-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testpatchasynthetictestreturnsokresponse1700223050\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Patch_a_Synthetic_test_returns_OK_response-1700223050\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Patch_a_Synthetic_test_returns_OK_response-1700223050\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/synthetics/tests/api"}, "response": {"body": {"string": "{\"public_id\":\"imz-5ik-p8i\",\"name\":\"Test-Patch_a_Synthetic_test_returns_OK_response-1700223050\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-11-17T12:10:50.727692+00:00\",\"modified_at\":\"2023-11-17T12:10:50.727692+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testpatchasynthetictestreturnsokresponse1700223050\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Patch_a_Synthetic_test_returns_OK_response-1700223050\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":135003391,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 17 Nov 2023 12:10:50 GMT"}, {"request": {"body": {"string": "{\"data\":[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"New test name\"},{\"op\":\"remove\",\"path\":\"/config/assertions/0\"}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v1/synthetics/tests/imz-5ik-p8i"}, "response": {"body": {"string": "{\"public_id\":\"imz-5ik-p8i\",\"name\":\"New test name\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-11-17T12:10:50.727692+00:00\",\"modified_at\":\"2023-11-17T12:10:51.334561+00:00\",\"config\":{\"assertions\":[{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testpatchasynthetictestreturnsokresponse1700223050\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Patch_a_Synthetic_test_returns_OK_response-1700223050\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":135003391,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 17 Nov 2023 12:10:50 GMT"}, {"request": {"body": {"string": "{\"public_ids\":[\"imz-5ik-p8i\"]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v1/synthetics/tests/delete"}, "response": {"body": {"string": "{\"deleted_tests\":[{\"public_id\":\"imz-5ik-p8i\",\"deleted_at\":\"2023-11-17T12:10:52.395192+00:00\"}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 17 Nov 2023 12:10:50 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.frozen new file mode 100644 index 000000000..f0a50294d --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-12T14:24:29.702Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.json new file mode 100644 index 000000000..3810ac41f --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"account_id\":\"123456789123\",\"bucket_name\":\"dd-cost-bucket\",\"bucket_region\":\"us-east-1\",\"report_name\":\"dd-report-name\",\"report_prefix\":\"dd-report-prefix\"},\"type\":\"aws_cur_config_post_request\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/cost/aws_cur_config"}, "response": {"body": {"string": "{\"data\":{\"type\":\"aws_cur_config\",\"id\":177,\"attributes\":{\"account_id\":\"123456789123\",\"bucket_name\":\"dd-cost-bucket\",\"bucket_region\":\"us-east-1\",\"report_prefix\":\"dd-report-prefix\",\"report_name\":\"dd-report-name\",\"months\":15,\"updated_at\":\"2023-12-12T14:24:30.907264\",\"created_at\":\"2023-12-12T14:24:30.907264\",\"status\":\"active\",\"status_updated_at\":\"2023-12-12T14:24:30.904602\",\"error_messages\":[]}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 12 Dec 2023 14:24:29 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.frozen new file mode 100644 index 000000000..c9d8714c6 --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-12T17:11:52.024Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.json new file mode 100644 index 000000000..9a6499729 --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\": {\"attributes\": {\"account_id\": \"1234abcd-1234-abcd-1234-1234abcd1234\", \"actual_bill_config\": {\"export_name\": \"dd-actual-export\", \"export_path\": \"dd-export-path\", \"storage_account\": \"dd-storage-account\", \"storage_container\": \"dd-storage-container\"}, \"amortized_bill_config\": {\"export_name\": \"dd-actual-export\", \"export_path\": \"dd-export-path\", \"storage_account\": \"dd-storage-account\", \"storage_container\": \"dd-storage-container\"}, \"client_id\": \"1234abcd-1234-abcd-1234-1234abcd1234\", \"is_enabled\": true, \"scope\": \"subscriptions/1234abcd-1234-abcd-1234-1234abcd1234\"}, \"type\": \"azure_uc_config_post_request\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/cost/azure_uc_config"}, "response": {"body": {"string": "{\"data\": {\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"storage_container\": \"test_storage_container\", \"scope\": \"test_scope\", \"status\": \"active\", \"account_id\": \"1234abcd-1234-abcd-1234-1234abcd1234\", \"client_id\": \"test_client_id\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"error_messages\": [], \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-12-12T17:11:56.855669\", \"created_at\": \"2023-12-12T17:11:56.860554\", \"updated_at\": \"2023-12-12T17:11:56.860554\", \"export_name\": \"test_export_name\", \"export_path\": \"test_export_path\"}, {\"id\": 1, \"storage_container\": \"test_storage_container\", \"scope\": \"test_scope\", \"status\": \"active\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"error_messages\": [], \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-12-12T17:11:56.855669\", \"created_at\": \"2023-12-12T17:11:56.861623\", \"updated_at\": \"2023-12-12T17:11:56.861623\", \"export_name\": \"test_export_name\", \"export_path\": \"test_export_path\"}]}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 12 Dec 2023 17:11:52 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-AWS-CUR-config-returns-No-Content-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-AWS-CUR-config-returns-No-Content-response.frozen new file mode 100644 index 000000000..846b3868d --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-AWS-CUR-config-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2023-12-12T14:24:02.091Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-AWS-CUR-config-returns-No-Content-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-AWS-CUR-config-returns-No-Content-response.json new file mode 100644 index 000000000..48b4c2ead --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-AWS-CUR-config-returns-No-Content-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/cost/aws_cur_config/100"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 12 Dec 2023 14:24:02 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-Azure-config-returns-No-Content-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-Azure-config-returns-No-Content-response.frozen new file mode 100644 index 000000000..595b32006 --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-Azure-config-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2023-12-12T16:00:55.255Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-Azure-config-returns-No-Content-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-Azure-config-returns-No-Content-response.json new file mode 100644 index 000000000..0a082522c --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Delete-Cloud-Cost-Management-Azure-config-returns-No-Content-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/cost/azure_uc_config/100"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 12 Dec 2023 16:00:55 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-AWS-CUR-configs-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-AWS-CUR-configs-returns-OK-response.frozen new file mode 100644 index 000000000..af095c7a1 --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-AWS-CUR-configs-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-12T13:33:48.031Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-AWS-CUR-configs-returns-OK-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-AWS-CUR-configs-returns-OK-response.json new file mode 100644 index 000000000..0bdbae4ea --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-AWS-CUR-configs-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/cost/aws_cur_config"}, "response": {"body": {"string": "{\"data\": [{\"type\": \"aws_cur_config\", \"id\": 100, \"attributes\": {\"account_id\": \"000000000000\", \"bucket_name\": \"test_bucket_name\", \"bucket_region\": \"us-east-1\", \"report_prefix\": \"cur-hourly\", \"report_name\": \"billing-conductor-cur\", \"months\": 15, \"updated_at\": \"2023-10-27T12:38:39.585408\", \"created_at\": \"2023-10-10T13:53:28.774143\", \"status\": \"active\", \"status_updated_at\": \"2023-11-21T17:07:24.778386\", \"error_messages\": []}}]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 12 Dec 2023 13:33:48 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-Azure-configs-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-Azure-configs-returns-OK-response.frozen new file mode 100644 index 000000000..359a94ce6 --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-Azure-configs-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-12T15:29:02.625Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-Azure-configs-returns-OK-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-Azure-configs-returns-OK-response.json new file mode 100644 index 000000000..dbfb181c1 --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/List-Cloud-Cost-Management-Azure-configs-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/cost/azure_uc_config"}, "response": {"body": {"string": "{\"data\": [{\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-06-29T12:43:36.569819\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-03T13:48:16.827724\", \"error_messages\": [], \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-06-29T12:43:36.569819\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-03T13:48:16.827724\", \"error_messages\": [], \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}, {\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T16:26:33.859447\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T16:26:33.859447\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-09T16:26:33.849153\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T16:26:33.862026\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T16:26:33.862026\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-09T16:26:33.849153\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}, {\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T20:20:35.959808\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T20:20:35.959808\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-09T20:20:35.956202\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T20:20:35.960815\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T20:20:35.960815\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-09T20:20:35.956202\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 12 Dec 2023 15:29:02 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/List-related-AWS-accounts-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/List-related-AWS-accounts-returns-OK-response.frozen new file mode 100644 index 000000000..fc911e03b --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/List-related-AWS-accounts-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-12T14:56:29.893Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/List-related-AWS-accounts-returns-OK-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/List-related-AWS-accounts-returns-OK-response.json new file mode 100644 index 000000000..c21c7088a --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/List-related-AWS-accounts-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/cost/aws_related_accounts?filter%5Bmanagement_account_id%5D=123456789123"}, "response": {"body": {"string": "{\"data\": [{\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": false}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": true}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": false}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": false}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": true}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": false}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": false}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": true}}, {\"type\": \"aws_account\", \"id\": \"000000000000\", \"attributes\": {\"name\": \"test_name\", \"has_datadog_integration\": false}}]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 12 Dec 2023 14:56:29 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.frozen new file mode 100644 index 000000000..f30bb46fe --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-12T13:23:19.108Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.json new file mode 100644 index 000000000..c25ed1166 --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\": {\"attributes\": {\"is_enabled\": true}, \"type\": \"aws_cur_config_patch_request\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/cost/aws_cur_config/100"}, "response": {"body": {"string": "{\"data\": [{\"type\": \"aws_cur_config\", \"id\": 100, \"attributes\": {\"account_id\": \"000000000000\", \"bucket_name\": \"test_bucket_name\", \"bucket_region\": \"us-east-1\", \"report_prefix\": \"cur-report-hourly\", \"report_name\": \"cur-hourly\", \"months\": 15, \"updated_at\": \"2023-10-18T08:15:45.265597\", \"created_at\": \"2022-07-25T17:19:47.190482\", \"status\": \"active\", \"status_updated_at\": \"2023-11-08T22:47:55.372330\", \"error_messages\": []}}]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 12 Dec 2023 13:23:19 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-OK-response.frozen new file mode 100644 index 000000000..b67ac855f --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-13T13:29:24.025Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-OK-response.json b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-OK-response.json new file mode 100644 index 000000000..54a1ff71b --- /dev/null +++ b/tests/scenarios/cassettes/v2/cloud_cost_management/Update-Cloud-Cost-Management-Azure-config-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\": {\"attributes\": {\"is_enabled\": true}, \"type\": \"azure_uc_config_patch_request\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/cost/azure_uc_config/100"}, "response": {"body": {"string": "{\"data\": {\"type\": \"azure_uc_configs\", \"id\": 100, \"attributes\": {\"configs\": [{\"updated_at\": \"2023-06-29T12:43:36.569819\", \"export_path\": \"/amortized-cost\", \"status\": \"active\", \"id\": 56, \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"storage_account\": \"test_storage_account\", \"storage_container\": \"test_storage_container\", \"status_updated_at\": \"2023-12-13T13:29:24.462039\", \"months\": 15}, {\"updated_at\": \"2023-06-29T12:43:36.569819\", \"export_path\": \"/actual-cost\", \"status\": \"active\", \"id\": 55, \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"storage_account\": \"test_storage_account\", \"storage_container\": \"test_storage_container\", \"status_updated_at\": \"2023-12-13T13:29:24.462039\", \"months\": 15}]}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 13:29:24 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.frozen new file mode 100644 index 000000000..17810ab68 --- /dev/null +++ b/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-16T16:58:35.007Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.json b/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.json new file mode 100644 index 000000000..801d15a5e --- /dev/null +++ b/tests/scenarios/cassettes/v2/dora_metrics/Send-a-deployment-event-for-DORA-Metrics-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"finished_at\":1693491984000000000,\"git\":{\"commit_sha\":\"66adc9350f2cc9b250b69abddab733dd55e1a588\",\"repository_url\":\"https://github.com/organization/example-repository\"},\"service\":\"shopist\",\"started_at\":1693491974000000000,\"version\":\"v1.12.07\"}}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/dora/deployment"}, "response": {"body": {"string": "{\"data\":{\"id\":\"2a47b5f25b160b8a\",\"type\":\"dora_deployment\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 16 Nov 2023 16:58:35 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.frozen new file mode 100644 index 000000000..de4fef2d6 --- /dev/null +++ b/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-16T16:58:35.716Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.json b/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.json new file mode 100644 index 000000000..fa23936e4 --- /dev/null +++ b/tests/scenarios/cassettes/v2/dora_metrics/Send-an-incident-event-for-DORA-Metrics-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"finished_at\":1693491984000000000,\"git\":{\"commit_sha\":\"66adc9350f2cc9b250b69abddab733dd55e1a588\",\"repository_url\":\"https://github.com/organization/example-repository\"},\"name\":\"Webserver is down failing all requests\",\"service\":\"shopist\",\"severity\":\"High\",\"started_at\":1693491974000000000,\"version\":\"v1.12.07\"}}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/dora/incident"}, "response": {"body": {"string": "{\"data\":{\"id\":\"2a47b5f25b160b8a\",\"type\":\"dora_incident\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 16 Nov 2023 16:58:35 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-cspm-enabled-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-cspm-enabled-returns-OK-response.frozen new file mode 100644 index 000000000..007c9de4a --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-cspm-enabled-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-15T08:45:38.020Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-cspm-enabled-returns-OK-response.json b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-cspm-enabled-returns-OK-response.json new file mode 100644 index 000000000..f52518999 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-cspm-enabled-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"client_email\":\"9f53cbf93a21704b@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_cspm_enabled\":true,\"resource_collection_enabled\":true},\"type\":\"gcp_service_account\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"is_cspm_enabled\":true,\"account_tags\":[],\"host_filters\":[],\"resource_collection_enabled\":true,\"is_security_command_center_enabled\":false,\"client_email\":\"9f53cbf93a21704b@test-project.iam.gserviceaccount.com\",\"automute\":false},\"id\":\"cf3c6e32-dad2-452e-8c09-f34c5f2211a1\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Fri, 15 Dec 2023 08:45:38 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/cf3c6e32-dad2-452e-8c09-f34c5f2211a1"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Fri, 15 Dec 2023 08:45:38 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-disabled-and-cspm-enabled-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-disabled-and-cspm-enabled-returns-Bad-Request-response.frozen new file mode 100644 index 000000000..aad0057ee --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-disabled-and-cspm-enabled-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2023-12-13T21:29:09.936Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-disabled-and-cspm-enabled-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-disabled-and-cspm-enabled-returns-Bad-Request-response.json new file mode 100644 index 000000000..030ed8301 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-disabled-and-cspm-enabled-returns-Bad-Request-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"client_email\":\"328d5a676e7e2219@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_cspm_enabled\":true,\"resource_collection_enabled\":false},\"type\":\"gcp_service_account\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"}, "response": {"body": {"string": "{\"errors\":[\"Resource Collection must be enabled for CSM to be enabled\"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 400, "message": "Bad Request"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:09 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-returns-OK-response.frozen new file mode 100644 index 000000000..b48e4fe18 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-13T21:29:10.005Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-returns-OK-response.json b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-returns-OK-response.json new file mode 100644 index 000000000..5b7687c83 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-resource-collection-enabled-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"client_email\":\"c200eb5fe37e7d26@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"resource_collection_enabled\":true},\"type\":\"gcp_service_account\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"automute\":false,\"is_security_command_center_enabled\":false,\"host_filters\":[],\"client_email\":\"c200eb5fe37e7d26@test-project.iam.gserviceaccount.com\",\"resource_collection_enabled\":true,\"account_tags\":[],\"is_cspm_enabled\":false},\"id\":\"e0e0b030-aba8-4eff-bcf2-7d4266d0d7fd\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:10 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/e0e0b030-aba8-4eff-bcf2-7d4266d0d7fd"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:10 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-security-command-center-enabled-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-security-command-center-enabled-returns-OK-response.frozen new file mode 100644 index 000000000..a70b525b6 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-security-command-center-enabled-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-12-13T21:29:10.722Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-security-command-center-enabled-returns-OK-response.json b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-security-command-center-enabled-returns-OK-response.json new file mode 100644 index 000000000..c0e64b068 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Create-a-new-entry-for-your-service-account-with-security-command-center-enabled-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"client_email\":\"bce3b7c65fce9a71@test-project.iam.gserviceaccount.com\",\"host_filters\":[],\"is_security_command_center_enabled\":true},\"type\":\"gcp_service_account\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"automute\":false,\"account_tags\":[],\"host_filters\":[],\"client_email\":\"bce3b7c65fce9a71@test-project.iam.gserviceaccount.com\",\"is_security_command_center_enabled\":true,\"resource_collection_enabled\":false,\"is_cspm_enabled\":false},\"id\":\"e72611ce-c7eb-4411-bc0e-04fa12a8cb6c\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:10 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/e72611ce-c7eb-4411-bc0e-04fa12a8cb6c"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:10 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Update-STS-Service-Account-returns-OK-response-with-enable-resource-collection-turned-on.frozen b/tests/scenarios/cassettes/v2/gcp_integration/Update-STS-Service-Account-returns-OK-response-with-enable-resource-collection-turned-on.frozen new file mode 100644 index 000000000..bb19b1444 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Update-STS-Service-Account-returns-OK-response-with-enable-resource-collection-turned-on.frozen @@ -0,0 +1 @@ +2023-12-13T21:29:11.135Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/gcp_integration/Update-STS-Service-Account-returns-OK-response-with-enable-resource-collection-turned-on.json b/tests/scenarios/cassettes/v2/gcp_integration/Update-STS-Service-Account-returns-OK-response-with-enable-resource-collection-turned-on.json new file mode 100644 index 000000000..7239baa62 --- /dev/null +++ b/tests/scenarios/cassettes/v2/gcp_integration/Update-STS-Service-Account-returns-OK-response-with-enable-resource-collection-turned-on.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"client_email\":\"78489d28e3cca21b@example.com\",\"host_filters\":[]},\"type\":\"gcp_service_account\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"client_email\":\"78489d28e3cca21b@example.com\",\"host_filters\":[],\"account_tags\":[],\"is_cspm_enabled\":false,\"automute\":false,\"is_security_command_center_enabled\":false,\"resource_collection_enabled\":false},\"id\":\"1ce480d7-4006-418e-b627-167af0586d7e\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:11 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"client_email\":\"78489d28e3cca21b@example.com\",\"resource_collection_enabled\":true},\"id\":\"1ce480d7-4006-418e-b627-167af0586d7e\",\"type\":\"gcp_service_account\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/1ce480d7-4006-418e-b627-167af0586d7e"}, "response": {"body": {"string": "{\"data\":{\"type\":\"gcp_service_account\",\"attributes\":{\"resource_collection_enabled\":true,\"is_security_command_center_enabled\":false,\"automute\":false,\"account_tags\":[],\"host_filters\":[],\"client_email\":\"78489d28e3cca21b@example.com\",\"is_cspm_enabled\":false},\"id\":\"1ce480d7-4006-418e-b627-167af0586d7e\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:11 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integration/gcp/accounts/1ce480d7-4006-418e-b627-167af0586d7e"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 13 Dec 2023 21:29:11 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen b/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen index 61ee06dcf..1d02b7f5c 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen +++ b/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:36.632Z \ No newline at end of file +2023-11-06T21:59:33.507Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.json b/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.json index 403ea7ccf..b7617d189 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.json +++ b/tests/scenarios/cassettes/v2/incident_teams/Create-a-new-incident-team-returns-CREATED-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Create_a_new_incident_team_returns_CREATED_response-1652349096\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"teams\",\"id\":\"1be2fa70-2fa1-51c7-aa84-6cab8defbe7d\",\"attributes\":{\"name\":\"Test-Create_a_new_incident_team_returns_CREATED_response-1652349096\",\"created\":\"2022-05-12T09:51:37.217606+00:00\",\"modified\":\"2022-05-12T09:51:37.217606+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:36 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/1be2fa70-2fa1-51c7-aa84-6cab8defbe7d"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:36 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"ad2b4266-f087-5b33-9da5-e726f61fd9b0\",\"attributes\":{\"name\":\"Test-Create_a_new_incident_team_returns_CREATED_response-1699307973\",\"created\":\"2023-11-06T21:59:33.756628+00:00\",\"modified\":\"2023-11-06T21:59:33.756628+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:33 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/ad2b4266-f087-5b33-9da5-e726f61fd9b0"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:33 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen index 61b4be46b..ddd60cfae 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:37.673Z \ No newline at end of file +2023-11-06T21:59:33.925Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.json b/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.json index a7a457667..c398410be 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incident_teams/Delete-an-existing-incident-team-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_team_returns_OK_response-1652349097\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"teams\",\"id\":\"94f78eab-7698-5c99-9b6e-23f18d36d926\",\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_team_returns_OK_response-1652349097\",\"created\":\"2022-05-12T09:51:38.160481+00:00\",\"modified\":\"2022-05-12T09:51:38.160481+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:37 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/94f78eab-7698-5c99-9b6e-23f18d36d926"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:37 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/94f78eab-7698-5c99-9b6e-23f18d36d926"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:37 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"a5250cc2-827f-509c-8159-2e0ccfb43cd3\",\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_team_returns_OK_response-1699307973\",\"created\":\"2023-11-06T21:59:34.043971+00:00\",\"modified\":\"2023-11-06T21:59:34.043971+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:33 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:33 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/a5250cc2-827f-509c-8159-2e0ccfb43cd3"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:33 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen index 8b415ad3f..fe3e133ec 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:39.045Z \ No newline at end of file +2023-11-06T21:59:34.298Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.json b/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.json index 5bec79b1c..9468938a0 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incident_teams/Get-a-list-of-all-incident-teams-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1652349099\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"teams\",\"id\":\"48fe29a2-88f2-5563-ac54-205e0ca2723a\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1652349099\",\"created\":\"2022-05-12T09:51:39.732496+00:00\",\"modified\":\"2022-05-12T09:51:39.732496+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:39 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/teams?filter=Test-Get_a_list_of_all_incident_teams_returns_OK_response-1652349099"}, "response": {"body": {"string": "{\"meta\":{\"sort\":\"ASC\",\"pagination\":{\"total\":1705,\"size\":1,\"next_offset\":1,\"offset\":0},\"total\":1705},\"data\":[{\"type\":\"teams\",\"id\":\"48fe29a2-88f2-5563-ac54-205e0ca2723a\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1652349099\",\"created\":\"2022-05-12T09:51:39.732496+00:00\",\"modified\":\"2022-05-12T09:51:39.732496+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:39 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/48fe29a2-88f2-5563-ac54-205e0ca2723a"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:39 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.424755+00:00\",\"modified\":\"2023-11-06T21:59:34.424755+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:34 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/teams?filter=Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"teams\",\"id\":\"7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_teams_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.424755+00:00\",\"modified\":\"2023-11-06T21:59:34.424755+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}],\"meta\":{\"pagination\":{\"offset\":0,\"next_offset\":1,\"size\":1,\"total\":3852},\"sort\":\"ASC\",\"total\":3852}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:34 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/7f1a6db2-da0d-51cd-bcfc-7462b9ce9ff8"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:34 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen index 2dbcb657a..5791822ad 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:40.869Z \ No newline at end of file +2023-11-06T21:59:34.734Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.json b/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.json index b9983d4bf..b0d8722f9 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incident_teams/Get-details-of-an-incident-team-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1652349100\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"teams\",\"id\":\"d447ff27-d27c-59ab-a492-42c455411a49\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1652349100\",\"created\":\"2022-05-12T09:51:41.287353+00:00\",\"modified\":\"2022-05-12T09:51:41.287353+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:40 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/teams/d447ff27-d27c-59ab-a492-42c455411a49"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"d447ff27-d27c-59ab-a492-42c455411a49\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1652349100\",\"created\":\"2022-05-12T09:51:41.287353+00:00\",\"modified\":\"2022-05-12T09:51:41.287353+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:40 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/d447ff27-d27c-59ab-a492-42c455411a49"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:40 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"98da5ea5-4d67-5296-b971-b8cd48f3e5f3\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.850054+00:00\",\"modified\":\"2023-11-06T21:59:34.850054+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:34 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"98da5ea5-4d67-5296-b971-b8cd48f3e5f3\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_team_returns_OK_response-1699307974\",\"created\":\"2023-11-06T21:59:34.850054+00:00\",\"modified\":\"2023-11-06T21:59:34.850054+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:34 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/98da5ea5-4d67-5296-b971-b8cd48f3e5f3"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:34 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen index 44a436eaa..95003d7bd 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:42.258Z \ No newline at end of file +2023-11-06T21:59:35.100Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.json b/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.json index 9fba78557..2504f8e1f 100644 --- a/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incident_teams/Update-an-existing-incident-team-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1652349102\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"teams\",\"id\":\"361a363d-3245-5783-8a77-e9f74261d571\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1652349102\",\"created\":\"2022-05-12T09:51:42.962938+00:00\",\"modified\":\"2022-05-12T09:51:42.962938+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:42 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1652349102-updated\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/teams/361a363d-3245-5783-8a77-e9f74261d571"}, "response": {"body": {"string": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"teams\",\"id\":\"361a363d-3245-5783-8a77-e9f74261d571\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1652349102-updated\",\"created\":\"2022-05-12T09:51:42.962938+00:00\",\"modified\":\"2022-05-12T09:51:43.443748+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:42 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/361a363d-3245-5783-8a77-e9f74261d571"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:42 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/teams"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"90c4f5c8-5965-533e-8b56-cffad17e03bf\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975\",\"created\":\"2023-11-06T21:59:35.219247+00:00\",\"modified\":\"2023-11-06T21:59:35.219247+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:35 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated\"},\"type\":\"teams\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf"}, "response": {"body": {"string": "{\"data\":{\"type\":\"teams\",\"id\":\"90c4f5c8-5965-533e-8b56-cffad17e03bf\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_team_returns_OK_response-1699307975-updated\",\"created\":\"2023-11-06T21:59:35.219247+00:00\",\"modified\":\"2023-11-06T21:59:35.364568+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}},\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:35 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/teams/90c4f5c8-5965-533e-8b56-cffad17e03bf"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 21:59:35 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.frozen index 0b2649e7e..e20996870 100644 --- a/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:43.966Z \ No newline at end of file +2023-11-06T20:25:23.087Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.json index 0626ea300..afba71391 100644 --- a/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Add-commander-to-an-incident-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"email\":\"Test-Add_commander_to_an_incident_returns_OK_response-1652349103@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/users"}, "response": {"body": {"string": "{\"data\":{\"type\":\"users\",\"id\":\"21a1513e-d1d9-11ec-ad3d-da7ad0900002\",\"attributes\":{\"name\":null,\"handle\":\"test-add_commander_to_an_incident_returns_ok_response-1652349103@datadoghq.com\",\"created_at\":\"2022-05-12T09:51:44.395553+00:00\",\"modified_at\":\"2022-05-12T09:51:44.439618+00:00\",\"email\":\"test-add_commander_to_an_incident_returns_ok_response-1652349103@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/4d1873aad8a2e5766e6a8676c103b209?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:43 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Add_commander_to_an_incident_returns_OK_response-1652349103\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"67dd441c-525e-5926-adcf-61485868592a\",\"attributes\":{\"public_id\":95243,\"title\":\"Test-Add_commander_to_an_incident_returns_OK_response-1652349103\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-05-12T09:51:44.897061+00:00\",\"modified\":\"2022-05-12T09:51:44.897061+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:44.888820+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:43 GMT"}, {"request": {"body": {"string": "{\"data\":{\"id\":\"67dd441c-525e-5926-adcf-61485868592a\",\"relationships\":{\"commander_user\":{\"data\":{\"id\":\"21a1513e-d1d9-11ec-ad3d-da7ad0900002\",\"type\":\"users\"}}},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/67dd441c-525e-5926-adcf-61485868592a"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"67dd441c-525e-5926-adcf-61485868592a\",\"attributes\":{\"public_id\":95243,\"title\":\"Test-Add_commander_to_an_incident_returns_OK_response-1652349103\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2022-05-12T09:51:44.897061+00:00\",\"modified\":\"2022-05-12T09:51:45.614198+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"21a1513e-d1d9-11ec-ad3d-da7ad0900002\",\"attributes\":{\"uuid\":\"21a1513e-d1d9-11ec-ad3d-da7ad0900002\",\"handle\":\"test-add_commander_to_an_incident_returns_ok_response-1652349103@datadoghq.com\",\"email\":\"test-add_commander_to_an_incident_returns_ok_response-1652349103@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/4d1873aad8a2e5766e6a8676c103b209?s=48&d=retro\"}}},\"detected\":\"2022-05-12T09:51:44.888820+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"92ea2d25-f971-5f2c-8920-0e8420a4281e\"},{\"type\":\"incident_responders\",\"id\":\"caf350bb-918b-5fb9-9c1b-966aff13256b\"}]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:43 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/67dd441c-525e-5926-adcf-61485868592a"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:43 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/users/21a1513e-d1d9-11ec-ad3d-da7ad0900002"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:43 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"email\":\"Test-Add_commander_to_an_incident_returns_OK_response-1699302323@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/users"}, "response": {"body": {"string": "{\"data\":{\"type\":\"users\",\"id\":\"9cee6c65-7ce2-11ee-afa1-d613a1313e9b\",\"attributes\":{\"name\":null,\"handle\":\"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com\",\"created_at\":\"2023-11-06T20:25:23.238858+00:00\",\"modified_at\":\"2023-11-06T20:25:23.238858+00:00\",\"email\":\"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/3635a30484b69ec7f1dd8be2aa1962c6?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:23 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Add_commander_to_an_incident_returns_OK_response-1699302323\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"ef130d24-3827-5ca3-85ae-700fe155b6ae\",\"attributes\":{\"public_id\":174802,\"incident_type_uuid\":null,\"title\":\"Test-Add_commander_to_an_incident_returns_OK_response-1699302323\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:23.425656+00:00\",\"modified\":\"2023-11-06T20:25:23.425656+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:23.412982+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:23 GMT"}, {"request": {"body": {"string": "{\"data\":{\"id\":\"ef130d24-3827-5ca3-85ae-700fe155b6ae\",\"relationships\":{\"commander_user\":{\"data\":{\"id\":\"9cee6c65-7ce2-11ee-afa1-d613a1313e9b\",\"type\":\"users\"}}},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/ef130d24-3827-5ca3-85ae-700fe155b6ae"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"ef130d24-3827-5ca3-85ae-700fe155b6ae\",\"attributes\":{\"public_id\":174802,\"incident_type_uuid\":null,\"title\":\"Test-Add_commander_to_an_incident_returns_OK_response-1699302323\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-06T20:25:23.425656+00:00\",\"modified\":\"2023-11-06T20:25:23.853499+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"9cee6c65-7ce2-11ee-afa1-d613a1313e9b\",\"attributes\":{\"uuid\":\"9cee6c65-7ce2-11ee-afa1-d613a1313e9b\",\"handle\":\"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com\",\"email\":\"test-add_commander_to_an_incident_returns_ok_response-1699302323@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/3635a30484b69ec7f1dd8be2aa1962c6?s=48&d=retro\"}}},\"detected\":\"2023-11-06T20:25:23.412982+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"a08d26e3-2baf-51dc-a956-a1df39b65108\"},{\"type\":\"incident_responders\",\"id\":\"28394b67-84ac-5ace-80bc-da0472019eae\"}]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:23 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/ef130d24-3827-5ca3-85ae-700fe155b6ae"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:23 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/users/9cee6c65-7ce2-11ee-afa1-d613a1313e9b"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:23 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.frozen index 669d401fa..dd8b2e643 100644 --- a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.frozen @@ -1 +1 @@ -2022-09-26T21:17:23.851Z \ No newline at end of file +2023-11-06T20:25:24.764Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.json index fdd3248d0..aa33476ad 100644 --- a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-attachment-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1664227043\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"96fe3f0e-ee19-5e91-8eb8-324c9b4af1cf\",\"attributes\":{\"public_id\":106581,\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1664227043\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-09-26T21:17:24.154561+00:00\",\"modified\":\"2022-09-26T21:17:24.154561+00:00\",\"commander\":null,\"detected\":\"2022-09-26T21:17:24.145418+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 26 Sep 2022 21:17:23 GMT"}, {"request": {"body": {"string": "{\"data\":[{\"attributes\":{\"attachment\":{\"documentUrl\":\"https://www.example.com/doc\",\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1664227043\"},\"attachment_type\":\"link\"},\"type\":\"incident_attachments\"}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/96fe3f0e-ee19-5e91-8eb8-324c9b4af1cf/attachments"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"fead2659-92bf-543d-beca-0b90fb42c5df\",\"attributes\":{\"modified\":\"2022-09-26T21:17:24.650927+00:00\",\"attachment_type\":\"link\",\"attachment\":{\"documentUrl\":\"https://www.example.com/doc\",\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1664227043\"}},\"relationships\":{\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 26 Sep 2022 21:17:23 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/96fe3f0e-ee19-5e91-8eb8-324c9b4af1cf"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 26 Sep 2022 21:17:23 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1699302324\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"f5faf64f-c9bd-5171-8c9e-e4ce51604c97\",\"attributes\":{\"public_id\":174803,\"incident_type_uuid\":null,\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1699302324\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:24.903041+00:00\",\"modified\":\"2023-11-06T20:25:24.903041+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:24.890646+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:24 GMT"}, {"request": {"body": {"string": "{\"data\":[{\"attributes\":{\"attachment\":{\"documentUrl\":\"https://www.example.com/doc\",\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1699302324\"},\"attachment_type\":\"link\"},\"type\":\"incident_attachments\"}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/f5faf64f-c9bd-5171-8c9e-e4ce51604c97/attachments"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"34749f37-7681-50cb-8cc4-709950a4bd62\",\"attributes\":{\"modified\":\"2023-11-06T20:25:25.295458+00:00\",\"attachment_type\":\"link\",\"attachment\":{\"title\":\"Test-Create_an_incident_attachment_returns_OK_response-1699302324\",\"documentUrl\":\"https://www.example.com/doc\"}},\"relationships\":{\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:24 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/f5faf64f-c9bd-5171-8c9e-e4ce51604c97"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:24 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.frozen b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.frozen index 51810a54c..ba5191e47 100644 --- a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.frozen @@ -1 +1 @@ -2023-03-02T08:30:38.031Z \ No newline at end of file +2023-11-06T20:25:25.688Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.json b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.json index 47414b3eb..b0c20839b 100644 --- a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-integration-metadata-returns-CREATED-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Create_an_incident_integration_metadata_returns_CREATED_response-1677745838\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"c1c3c52e-a1a6-52b3-9dcd-65d04496033f\",\"attributes\":{\"public_id\":124034,\"title\":\"Test-Create_an_incident_integration_metadata_returns_CREATED_response-1677745838\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-03-02T08:30:38.468135+00:00\",\"modified\":\"2023-03-02T08:30:38.468135+00:00\",\"commander\":null,\"detected\":\"2023-03-02T08:30:38.458636+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:38 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"c1c3c52e-a1a6-52b3-9dcd-65d04496033f\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#new-channel\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/c1c3c52e-a1a6-52b3-9dcd-65d04496033f/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"b841d498-4840-5388-98af-9f6cc30307f1\",\"attributes\":{\"created\":\"2023-03-02T08:30:39.110755+00:00\",\"modified\":\"2023-03-02T08:30:39.110755+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"c1c3c52e-a1a6-52b3-9dcd-65d04496033f\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#new-channel\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:38 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/c1c3c52e-a1a6-52b3-9dcd-65d04496033f/relationships/integrations/b841d498-4840-5388-98af-9f6cc30307f1"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:38 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/c1c3c52e-a1a6-52b3-9dcd-65d04496033f"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:38 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Create_an_incident_integration_metadata_returns_CREATED_response-1699302325\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"114eac5a-0705-59b8-b9fd-0810aadb85f7\",\"attributes\":{\"public_id\":174804,\"incident_type_uuid\":null,\"title\":\"Test-Create_an_incident_integration_metadata_returns_CREATED_response-1699302325\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:25.824255+00:00\",\"modified\":\"2023-11-06T20:25:25.824255+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:25.811013+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:25 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"114eac5a-0705-59b8-b9fd-0810aadb85f7\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#new-channel\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/114eac5a-0705-59b8-b9fd-0810aadb85f7/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"51833293-96c6-5129-913f-1f6c2812871f\",\"attributes\":{\"created\":\"2023-11-06T20:25:26.250807+00:00\",\"modified\":\"2023-11-06T20:25:26.250807+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"114eac5a-0705-59b8-b9fd-0810aadb85f7\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#new-channel\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:25 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/114eac5a-0705-59b8-b9fd-0810aadb85f7/relationships/integrations/51833293-96c6-5129-913f-1f6c2812871f"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:25 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/114eac5a-0705-59b8-b9fd-0810aadb85f7"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:25 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.frozen b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.frozen index d2def1729..ee36889d5 100644 --- a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:47.020Z \ No newline at end of file +2023-11-06T20:25:26.795Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.json b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.json index baa7e684e..b9800d410 100644 --- a/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Create-an-incident-returns-CREATED-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_an_incident_returns_CREATED_response-1652349107@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/users"}, "response": {"body": {"string": "{\"data\":{\"type\":\"users\",\"id\":\"23750d48-d1d9-11ec-ad3d-da7ad0900002\",\"attributes\":{\"name\":null,\"handle\":\"test-create_an_incident_returns_created_response-1652349107@datadoghq.com\",\"created_at\":\"2022-05-12T09:51:47.459988+00:00\",\"modified_at\":\"2022-05-12T09:51:47.505378+00:00\",\"email\":\"test-create_an_incident_returns_created_response-1652349107@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/7f5c22d991353b07f83612ae6b7b14a8?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:47 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"fields\":{\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"}},\"title\":\"Test-Create_an_incident_returns_CREATED_response-1652349107\"},\"relationships\":{\"commander_user\":{\"data\":{\"id\":\"23750d48-d1d9-11ec-ad3d-da7ad0900002\",\"type\":\"users\"}}},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"2c86e43d-5710-5ad6-8674-99d4fe2549c3\",\"attributes\":{\"public_id\":95244,\"title\":\"Test-Create_an_incident_returns_CREATED_response-1652349107\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-05-12T09:51:47.972179+00:00\",\"modified\":\"2022-05-12T09:51:47.972179+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"23750d48-d1d9-11ec-ad3d-da7ad0900002\",\"attributes\":{\"uuid\":\"23750d48-d1d9-11ec-ad3d-da7ad0900002\",\"handle\":\"test-create_an_incident_returns_created_response-1652349107@datadoghq.com\",\"email\":\"test-create_an_incident_returns_created_response-1652349107@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/7f5c22d991353b07f83612ae6b7b14a8?s=48&d=retro\"}}},\"detected\":\"2022-05-12T09:51:47.954241+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"23750d48-d1d9-11ec-ad3d-da7ad0900002\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"e32d59e6-a8f8-561c-aa66-0de122c4a1a5\"}]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:47 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/2c86e43d-5710-5ad6-8674-99d4fe2549c3"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:47 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/users/23750d48-d1d9-11ec-ad3d-da7ad0900002"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:47 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_an_incident_returns_CREATED_response-1699302326@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/users"}, "response": {"body": {"string": "{\"data\":{\"type\":\"users\",\"id\":\"9f1d70ff-7ce2-11ee-8c05-8e8ed6f172de\",\"attributes\":{\"name\":null,\"handle\":\"test-create_an_incident_returns_created_response-1699302326@datadoghq.com\",\"created_at\":\"2023-11-06T20:25:26.902430+00:00\",\"modified_at\":\"2023-11-06T20:25:26.902430+00:00\",\"email\":\"test-create_an_incident_returns_created_response-1699302326@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/458fde925dde178af60afb57aede60ab?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:26 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"fields\":{\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"}},\"title\":\"Test-Create_an_incident_returns_CREATED_response-1699302326\"},\"relationships\":{\"commander_user\":{\"data\":{\"id\":\"9f1d70ff-7ce2-11ee-8c05-8e8ed6f172de\",\"type\":\"users\"}}},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"3c4c88ec-620e-5fb0-af45-5cff0e7f6a16\",\"attributes\":{\"public_id\":174805,\"incident_type_uuid\":null,\"title\":\"Test-Create_an_incident_returns_CREATED_response-1699302326\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:27.088157+00:00\",\"modified\":\"2023-11-06T20:25:27.088157+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"9f1d70ff-7ce2-11ee-8c05-8e8ed6f172de\",\"attributes\":{\"uuid\":\"9f1d70ff-7ce2-11ee-8c05-8e8ed6f172de\",\"handle\":\"test-create_an_incident_returns_created_response-1699302326@datadoghq.com\",\"email\":\"test-create_an_incident_returns_created_response-1699302326@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/458fde925dde178af60afb57aede60ab?s=48&d=retro\"}}},\"detected\":\"2023-11-06T20:25:27.074830+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"9f1d70ff-7ce2-11ee-8c05-8e8ed6f172de\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"285bf315-cd07-50a7-9fc2-507791ac4079\"}]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:26 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/3c4c88ec-620e-5fb0-af45-5cff0e7f6a16"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:26 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/users/9f1d70ff-7ce2-11ee-8c05-8e8ed6f172de"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:26 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.frozen index c4d68db41..68022d632 100644 --- a/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:49.802Z \ No newline at end of file +2023-11-06T20:25:28.128Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.json index 010aedd28..4d39f71c5 100644 --- a/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Delete-an-existing-incident-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1652349109\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"b59899a2-00df-5e60-a5bf-ce0e2e594dc0\",\"attributes\":{\"public_id\":95245,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1652349109\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-05-12T09:51:50.252197+00:00\",\"modified\":\"2022-05-12T09:51:50.252197+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:50.243019+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:49 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/b59899a2-00df-5e60-a5bf-ce0e2e594dc0"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:49 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/b59899a2-00df-5e60-a5bf-ce0e2e594dc0"}, "response": {"body": {"string": "{\"errors\": [\"incident b59899a2-00df-5e60-a5bf-ce0e2e594dc0 not found\"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 404, "message": "Not Found"}}, "recorded_at": "Thu, 12 May 2022 09:51:49 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1699302328\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"e7a955c0-dcf2-553c-a8ae-4fa4908eb5bf\",\"attributes\":{\"public_id\":174806,\"incident_type_uuid\":null,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1699302328\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:28.282046+00:00\",\"modified\":\"2023-11-06T20:25:28.282046+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:28.271982+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/e7a955c0-dcf2-553c-a8ae-4fa4908eb5bf"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/e7a955c0-dcf2-553c-a8ae-4fa4908eb5bf"}, "response": {"body": {"string": "{\"errors\":[\"incident e7a955c0-dcf2-553c-a8ae-4fa4908eb5bf not found\"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 404, "message": "Not Found"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.frozen index 56155f272..f58c3f03e 100644 --- a/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.frozen @@ -1 +1 @@ -2023-02-24T19:28:01.343Z \ No newline at end of file +2023-11-06T20:25:28.935Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.json index acdc6637a..01d42ed58 100644 --- a/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Delete-an-incident-integration-metadata-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Delete_an_incident_integration_metadata_returns_OK_response-1677266881\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"312a9af4-0bed-524e-9243-a9de9492506a\",\"attributes\":{\"public_id\":123329,\"title\":\"Test-Delete_an_incident_integration_metadata_returns_OK_response-1677266881\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-02-24T19:28:01.563619+00:00\",\"modified\":\"2023-02-24T19:28:01.563619+00:00\",\"commander\":null,\"detected\":\"2023-02-24T19:28:01.554591+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:01 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"312a9af4-0bed-524e-9243-a9de9492506a\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"74bd2fb0-e385-5564-85db-7d8de4966f36\",\"attributes\":{\"created\":\"2023-02-24T19:28:01.991274+00:00\",\"modified\":\"2023-02-24T19:28:01.991274+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"312a9af4-0bed-524e-9243-a9de9492506a\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:01 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a/relationships/integrations/74bd2fb0-e385-5564-85db-7d8de4966f36"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:01 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a/relationships/integrations/74bd2fb0-e385-5564-85db-7d8de4966f36"}, "response": {"body": {"string": "{\"errors\":[\"74bd2fb0-e385-5564-85db-7d8de4966f36 not found\"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 404, "message": "Not Found"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:01 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/312a9af4-0bed-524e-9243-a9de9492506a"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:01 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Delete_an_incident_integration_metadata_returns_OK_response-1699302328\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"f703ecbc-fb3c-5ec1-b7a3-272149fddce7\",\"attributes\":{\"public_id\":174807,\"incident_type_uuid\":null,\"title\":\"Test-Delete_an_incident_integration_metadata_returns_OK_response-1699302328\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:29.083565+00:00\",\"modified\":\"2023-11-06T20:25:29.083565+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:29.071823+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"f703ecbc-fb3c-5ec1-b7a3-272149fddce7\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/f703ecbc-fb3c-5ec1-b7a3-272149fddce7/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"7361c4d9-1947-5ba5-9439-8cbf53a61e86\",\"attributes\":{\"created\":\"2023-11-06T20:25:29.507969+00:00\",\"modified\":\"2023-11-06T20:25:29.507969+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"f703ecbc-fb3c-5ec1-b7a3-272149fddce7\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/f703ecbc-fb3c-5ec1-b7a3-272149fddce7/relationships/integrations/7361c4d9-1947-5ba5-9439-8cbf53a61e86"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/f703ecbc-fb3c-5ec1-b7a3-272149fddce7/relationships/integrations/7361c4d9-1947-5ba5-9439-8cbf53a61e86"}, "response": {"body": {"string": "{\"errors\":[\"7361c4d9-1947-5ba5-9439-8cbf53a61e86 not found\"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 404, "message": "Not Found"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/f703ecbc-fb3c-5ec1-b7a3-272149fddce7"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:28 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.frozen index c44374335..4e79af404 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.frozen @@ -1 +1 @@ -2023-02-28T08:31:00.439Z \ No newline at end of file +2023-11-06T20:25:30.244Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.json index 1c384b7b4..753ab4e44 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-an-incident-s-integration-metadata-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_a_list_of_an_incident_s_integration_metadata_returns_OK_response-1677573060\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a\",\"attributes\":{\"public_id\":123751,\"title\":\"Test-Get_a_list_of_an_incident_s_integration_metadata_returns_OK_response-1677573060\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-02-28T08:31:00.888846+00:00\",\"modified\":\"2023-02-28T08:31:00.888846+00:00\",\"commander\":null,\"detected\":\"2023-02-28T08:31:00.879554+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 28 Feb 2023 08:31:00 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"52ba8c74-a1c2-56ef-8c72-8ea578719072\",\"attributes\":{\"created\":\"2023-02-28T08:31:01.472130+00:00\",\"modified\":\"2023-02-28T08:31:01.472130+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 28 Feb 2023 08:31:00 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a/relationships/integrations"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_integrations\",\"id\":\"52ba8c74-a1c2-56ef-8c72-8ea578719072\",\"attributes\":{\"created\":\"2023-02-28T08:31:01.472130+00:00\",\"modified\":\"2023-02-28T08:31:01.472130+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a\",\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"team_id\":\"T01234567\",\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}],\"meta\":{\"pagination\":{\"offset\":0,\"next_offset\":1,\"size\":1}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 28 Feb 2023 08:31:00 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a/relationships/integrations/52ba8c74-a1c2-56ef-8c72-8ea578719072"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 28 Feb 2023 08:31:00 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/ef6f2ac8-25ee-5771-903c-8fbea1b0ff8a"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 28 Feb 2023 08:31:00 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_a_list_of_an_incident_s_integration_metadata_returns_OK_response-1699302330\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"716a6bf5-cea2-5026-ba21-e1354d790343\",\"attributes\":{\"public_id\":174808,\"incident_type_uuid\":null,\"title\":\"Test-Get_a_list_of_an_incident_s_integration_metadata_returns_OK_response-1699302330\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:30.371095+00:00\",\"modified\":\"2023-11-06T20:25:30.371095+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:30.358461+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:30 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"716a6bf5-cea2-5026-ba21-e1354d790343\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/716a6bf5-cea2-5026-ba21-e1354d790343/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"b16d89a2-4e69-542f-bfa3-d7052320a89b\",\"attributes\":{\"created\":\"2023-11-06T20:25:30.816058+00:00\",\"modified\":\"2023-11-06T20:25:30.816058+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"716a6bf5-cea2-5026-ba21-e1354d790343\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:30 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/716a6bf5-cea2-5026-ba21-e1354d790343/relationships/integrations"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_integrations\",\"id\":\"b16d89a2-4e69-542f-bfa3-d7052320a89b\",\"attributes\":{\"created\":\"2023-11-06T20:25:30.816058+00:00\",\"modified\":\"2023-11-06T20:25:30.816058+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"716a6bf5-cea2-5026-ba21-e1354d790343\",\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"team_id\":\"T01234567\",\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}],\"meta\":{\"pagination\":{\"offset\":0,\"next_offset\":1,\"size\":1}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:30 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/716a6bf5-cea2-5026-ba21-e1354d790343/relationships/integrations/b16d89a2-4e69-542f-bfa3-d7052320a89b"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:30 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/716a6bf5-cea2-5026-ba21-e1354d790343"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:30 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.frozen index b8d211bcf..831926de6 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:51.537Z \ No newline at end of file +2023-11-06T20:25:31.571Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.json index 224fe1372..61902887b 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Get-a-list-of-incidents-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1652349111\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"18be08b0-c199-560e-a82a-1c85f6df8292\",\"attributes\":{\"public_id\":95246,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1652349111\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-05-12T09:51:51.980130+00:00\",\"modified\":\"2022-05-12T09:51:51.980130+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:51.962476+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:51 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"meta\":{\"pagination\":{\"size\":25,\"next_offset\":25,\"offset\":0}},\"data\":[{\"type\":\"incidents\",\"id\":\"ed3ff75e-6ce6-5b00-8ab4-665fcaeda9f8\",\"attributes\":{\"public_id\":62105,\"title\":\"Test-Ruby-Get_the_details_of_an_incident_returns_OK_response-1631710219\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"created\":\"2021-09-15T12:50:19.743510+00:00\",\"modified\":\"2021-09-15T12:50:19.743510+00:00\",\"detected\":\"2021-09-15T12:50:19.741188+00:00\",\"created_by_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"00037f9b-dd47-5b21-bcf3-f8dd30e907da\",\"attributes\":{\"public_id\":62582,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1631884327\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:12:08.512729+00:00\",\"modified\":\"2021-09-17T13:12:08.512729+00:00\",\"detected\":\"2021-09-17T13:12:08.510606+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"1524396f-fa67-5e6d-a27d-78e7bd85f14d\",\"attributes\":{\"public_id\":62583,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1631884336\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:12:17.076724+00:00\",\"modified\":\"2021-09-17T13:12:17.076724+00:00\",\"detected\":\"2021-09-17T13:12:17.075124+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"a55f9079-4af2-58fb-8cb4-a0889ed511ec\",\"attributes\":{\"public_id\":62584,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1631884339\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:12:19.704758+00:00\",\"modified\":\"2021-09-17T13:12:19.704758+00:00\",\"detected\":\"2021-09-17T13:12:19.702100+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"f6992253-ad7b-5684-853c-fd6a9e7a6168\",\"attributes\":{\"public_id\":62585,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1631884344\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:12:25.283247+00:00\",\"modified\":\"2021-09-17T13:12:25.283247+00:00\",\"detected\":\"2021-09-17T13:12:25.280858+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"7b212a2d-8412-508f-8210-4a1ed9cc6e4d\",\"attributes\":{\"public_id\":62586,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1631884434\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:13:55.593558+00:00\",\"modified\":\"2021-09-17T13:13:55.593558+00:00\",\"detected\":\"2021-09-17T13:13:55.591163+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"95a02c3a-6a43-55d8-b458-064e18f5b59f\",\"attributes\":{\"public_id\":62587,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1631884436\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:13:56.759987+00:00\",\"modified\":\"2021-09-17T13:13:56.759987+00:00\",\"detected\":\"2021-09-17T13:13:56.758538+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"5ba154d6-374d-575c-80c2-34eae41bc7ad\",\"attributes\":{\"public_id\":62588,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1631884446\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:14:06.676104+00:00\",\"modified\":\"2021-09-17T13:14:06.676104+00:00\",\"detected\":\"2021-09-17T13:14:06.674229+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"8a407316-349e-5479-9ecf-38ee7189edbf\",\"attributes\":{\"public_id\":62589,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1631884466\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:14:26.944152+00:00\",\"modified\":\"2021-09-17T13:14:26.944152+00:00\",\"detected\":\"2021-09-17T13:14:26.941989+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"63a4a7a7-34e8-51ed-b319-09bfe52abaf4\",\"attributes\":{\"public_id\":62590,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1631884657\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:17:37.772747+00:00\",\"modified\":\"2021-09-17T13:17:37.772747+00:00\",\"detected\":\"2021-09-17T13:17:37.770605+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"183c6f35-8769-5d5c-be3a-88cae24f852c\",\"attributes\":{\"public_id\":62591,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1631884661\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:17:42.003773+00:00\",\"modified\":\"2021-09-17T13:17:42.003773+00:00\",\"detected\":\"2021-09-17T13:17:42.002102+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"f9753512-defd-5df5-a239-ba2851c0c39a\",\"attributes\":{\"public_id\":62592,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1631884669\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:17:49.948960+00:00\",\"modified\":\"2021-09-17T13:17:49.948960+00:00\",\"detected\":\"2021-09-17T13:17:49.946176+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e4ed937c-e738-5a70-a5f1-366ec0f910a7\",\"attributes\":{\"public_id\":62593,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1631884677\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:17:57.732512+00:00\",\"modified\":\"2021-09-17T13:17:57.732512+00:00\",\"detected\":\"2021-09-17T13:17:57.730975+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"c4f26eac-53f1-5fc3-96de-76c1f9d9b4ab\",\"attributes\":{\"public_id\":62594,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1631884713\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:18:33.710434+00:00\",\"modified\":\"2021-09-17T13:18:33.710434+00:00\",\"detected\":\"2021-09-17T13:18:33.708674+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"f68757ce-a2b3-527d-ad89-49ef74b6f84e\",\"attributes\":{\"public_id\":62595,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1631884716\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:18:37.589294+00:00\",\"modified\":\"2021-09-17T13:18:37.589294+00:00\",\"detected\":\"2021-09-17T13:18:37.587392+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"c86fd44b-5039-5478-9b65-75902b830f34\",\"attributes\":{\"public_id\":62596,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1631884721\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:18:41.865409+00:00\",\"modified\":\"2021-09-17T13:18:41.865409+00:00\",\"detected\":\"2021-09-17T13:18:41.863134+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"0b5fc0ac-9463-5d0a-adeb-85be8aef298b\",\"attributes\":{\"public_id\":62597,\"title\":\"Test-Delete_an_existing_incident_returns_OK_response-1631884733\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:18:54.523271+00:00\",\"modified\":\"2021-09-17T13:18:54.523271+00:00\",\"detected\":\"2021-09-17T13:18:54.520816+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"159c011c-bff7-5e3b-bee9-51d0c1628cb4\",\"attributes\":{\"public_id\":62598,\"title\":\"Test-Python-Get_the_details_of_an_incident_returns_OK_response-1631886007\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:40:07.696727+00:00\",\"modified\":\"2021-09-17T13:40:07.696727+00:00\",\"detected\":\"2021-09-17T13:40:07.694142+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"ef960518-0b5c-5528-b995-21b6b867c0b9\",\"attributes\":{\"public_id\":62599,\"title\":\"Test-Python-Get_a_list_of_incidents_returns_OK_response-1631886010\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:40:10.574273+00:00\",\"modified\":\"2021-09-17T13:40:10.574273+00:00\",\"detected\":\"2021-09-17T13:40:10.571906+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"4976b799-77ec-5122-8a3e-00930a309f1b\",\"attributes\":{\"public_id\":62600,\"title\":\"Test-Python-Update_an_existing_incident_returns_OK_response-1631886026\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:40:27.323950+00:00\",\"modified\":\"2021-09-17T13:40:27.323950+00:00\",\"detected\":\"2021-09-17T13:40:27.321746+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"cd8cb170-e348-5c25-9536-ebc4d385b177\",\"attributes\":{\"public_id\":62601,\"title\":\"Test-Python-Delete_an_existing_incident_returns_OK_response-1631886042\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-17T13:40:42.624782+00:00\",\"modified\":\"2021-09-17T13:40:42.624782+00:00\",\"detected\":\"2021-09-17T13:40:42.623636+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"ce952d04-3f4e-54ed-92f6-de2d3d78b581\",\"attributes\":{\"public_id\":63361,\"title\":\"Test-Typescript-Delete_an_existing_incident_returns_OK_response-1632237241\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-21T15:14:01.455024+00:00\",\"modified\":\"2021-09-21T15:14:01.455024+00:00\",\"detected\":\"2021-09-21T15:14:01.453618+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"24f4ac82-0544-59cb-a3f0-432e4700e2e3\",\"attributes\":{\"public_id\":63362,\"title\":\"Test-Typescript-Get_a_list_of_incidents_returns_OK_response-1632237241\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-21T15:14:01.884148+00:00\",\"modified\":\"2021-09-21T15:14:01.884148+00:00\",\"detected\":\"2021-09-21T15:14:01.880745+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"54dbc82d-4aa2-5ce6-9087-180adb774ddc\",\"attributes\":{\"public_id\":63363,\"title\":\"Test-Typescript-Get_the_details_of_an_incident_returns_OK_response-1632237242\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-21T15:14:02.325469+00:00\",\"modified\":\"2021-09-21T15:14:02.325469+00:00\",\"detected\":\"2021-09-21T15:14:02.322823+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"2549119e-9c9c-5cba-9cf8-dae6e76c9f0c\",\"attributes\":{\"public_id\":63364,\"title\":\"Test-Typescript-Update_an_existing_incident_returns_OK_response-1632237242\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2021-09-21T15:14:02.745795+00:00\",\"modified\":\"2021-09-21T15:14:02.745795+00:00\",\"detected\":\"2021-09-21T15:14:02.743796+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:51 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/18be08b0-c199-560e-a82a-1c85f6df8292"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:51 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1699302331\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"ab39b86b-fe44-570b-be1b-6ce0242d980d\",\"attributes\":{\"public_id\":174809,\"incident_type_uuid\":null,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1699302331\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:31.701983+00:00\",\"modified\":\"2023-11-06T20:25:31.701983+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:31.689012+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:31 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incidents\",\"id\":\"53be4c9b-17c1-5109-9e61-f97804f78df0\",\"attributes\":{\"public_id\":174180,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Add_commander_to_an_incident_returns_OK_response-1699043757\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:35:58.136089+00:00\",\"modified\":\"2023-11-03T20:35:58.136089+00:00\",\"detected\":\"2023-11-03T20:35:58.123446+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"a72d6e86-3581-5a0c-9407-7c118a72e3b9\",\"attributes\":{\"public_id\":174181,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Create_an_incident_attachment_returns_OK_response-1699043758\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:35:58.740564+00:00\",\"modified\":\"2023-11-03T20:35:58.740564+00:00\",\"detected\":\"2023-11-03T20:35:58.729778+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"40eb208a-c867-5b51-97ee-e8efba340396\",\"attributes\":{\"public_id\":174182,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Create_an_incident_integration_metadata_returns_CREATED_response-1699043758\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:35:59.153850+00:00\",\"modified\":\"2023-11-03T20:35:59.153850+00:00\",\"detected\":\"2023-11-03T20:35:59.141884+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"233463fe-28bd-5361-9d14-98e2ac20f328\",\"attributes\":{\"public_id\":174183,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Create_an_incident_returns_CREATED_response-1699043759\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:35:59.657637+00:00\",\"modified\":\"2023-11-03T20:35:59.657637+00:00\",\"detected\":\"2023-11-03T20:35:59.647678+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\"}},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"598eca3a-47d8-55a8-a2ca-0a95d0b9ec7c\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"1b45d550-12f7-55c8-89ed-826d688d3d1f\",\"attributes\":{\"public_id\":174184,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Delete_an_existing_incident_returns_OK_response-1699043760\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:00.341449+00:00\",\"modified\":\"2023-11-03T20:36:00.341449+00:00\",\"detected\":\"2023-11-03T20:36:00.331012+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"19c70c0d-7e83-5f81-bcd2-75e0f90ee11f\",\"attributes\":{\"public_id\":174185,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Delete_an_incident_integration_metadata_returns_OK_response-1699043760\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:00.653305+00:00\",\"modified\":\"2023-11-03T20:36:00.653305+00:00\",\"detected\":\"2023-11-03T20:36:00.642522+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"0ddf94c4-47ec-5fbb-8827-101c1b2678e0\",\"attributes\":{\"public_id\":174186,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_a_list_of_an_incident_s_integration_metadata_returns_OK_response-1699043760\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:00.962444+00:00\",\"modified\":\"2023-11-03T20:36:00.962444+00:00\",\"detected\":\"2023-11-03T20:36:00.951291+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"ce870e8d-cd51-5b58-92ef-2dfe01530066\",\"attributes\":{\"public_id\":174187,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_a_list_of_incidents_returns_OK_response-1699043761\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:01.278262+00:00\",\"modified\":\"2023-11-03T20:36:01.278262+00:00\",\"detected\":\"2023-11-03T20:36:01.267284+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"9c68f2c7-256e-5e98-a176-97526fd9d257\",\"attributes\":{\"public_id\":174188,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_incident_attachments_returns_OK_response-1699043761\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:01.678836+00:00\",\"modified\":\"2023-11-03T20:36:01.678836+00:00\",\"detected\":\"2023-11-03T20:36:01.662659+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e4b4a761-8426-5e8c-ac41-e151eee07af9\",\"attributes\":{\"public_id\":174189,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_incident_integration_metadata_details_returns_OK_response-1699043761\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:02.127431+00:00\",\"modified\":\"2023-11-03T20:36:02.127431+00:00\",\"detected\":\"2023-11-03T20:36:02.115307+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e70e2781-1df4-5e93-9210-7c672ff65a8c\",\"attributes\":{\"public_id\":174190,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_the_details_of_an_incident_returns_OK_response-1699043762\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:02.523488+00:00\",\"modified\":\"2023-11-03T20:36:02.523488+00:00\",\"detected\":\"2023-11-03T20:36:02.508790+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"68000356-e808-5571-b49a-109e96bc5e08\",\"attributes\":{\"public_id\":174191,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Remove_commander_from_an_incident_returns_OK_response-1699043762\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:02.811051+00:00\",\"modified\":\"2023-11-03T20:36:02.811051+00:00\",\"detected\":\"2023-11-03T20:36:02.800270+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"5af2ff33-ec8d-50c1-ae0b-77694ea77c89\",\"attributes\":{\"public_id\":174192,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Update_an_existing_incident_integration_metadata_returns_OK_response-1699043762\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:03.083799+00:00\",\"modified\":\"2023-11-03T20:36:03.083799+00:00\",\"detected\":\"2023-11-03T20:36:03.071557+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"96534427-6172-53bf-8cbe-215de5b207e1\",\"attributes\":{\"public_id\":174193,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Update_an_existing_incident_returns_OK_response-1699043763\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:03.395843+00:00\",\"modified\":\"2023-11-03T20:36:03.395843+00:00\",\"detected\":\"2023-11-03T20:36:03.379763+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e729fbb8-4087-5227-8725-11e44fe85b5f\",\"attributes\":{\"public_id\":174194,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Update_an_incident_todo_returns_OK_response-1699043763\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-03T20:36:03.670238+00:00\",\"modified\":\"2023-11-03T20:36:03.670238+00:00\",\"detected\":\"2023-11-03T20:36:03.659639+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"ab39b86b-fe44-570b-be1b-6ce0242d980d\",\"attributes\":{\"public_id\":174809,\"incident_type_uuid\":null,\"title\":\"Test-Get_a_list_of_incidents_returns_OK_response-1699302331\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-06T20:25:31.701983+00:00\",\"modified\":\"2023-11-06T20:25:31.701983+00:00\",\"detected\":\"2023-11-06T20:25:31.689012+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}],\"meta\":{\"pagination\":{\"offset\":0,\"next_offset\":16,\"size\":16}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:31 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/ab39b86b-fe44-570b-be1b-6ce0242d980d"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:31 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.frozen index 76ad9d143..91b7a431c 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.frozen @@ -1 +1 @@ -2022-09-26T21:17:25.250Z \ No newline at end of file +2023-11-06T20:25:32.875Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.json index 12c4157b0..6ac502275 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Get-incident-attachments-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_incident_attachments_returns_OK_response-1664227045\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"762590df-8e28-5b77-8282-a51ec6aff95f\",\"attributes\":{\"public_id\":106582,\"title\":\"Test-Get_incident_attachments_returns_OK_response-1664227045\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-09-26T21:17:25.438704+00:00\",\"modified\":\"2022-09-26T21:17:25.438704+00:00\",\"commander\":null,\"detected\":\"2022-09-26T21:17:25.429904+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 26 Sep 2022 21:17:25 GMT"}, {"request": {"body": {"string": "{\"data\":[{\"attributes\":{\"attachment\":{\"documentUrl\":\"https://www.example.com/doc\",\"title\":\"Important Doc\"},\"attachment_type\":\"link\"},\"type\":\"incident_attachments\"}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/762590df-8e28-5b77-8282-a51ec6aff95f/attachments"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"c383d7df-3f44-571c-922a-4668ce53a8ad\",\"attributes\":{\"modified\":\"2022-09-26T21:17:25.906466+00:00\",\"attachment_type\":\"link\",\"attachment\":{\"documentUrl\":\"https://www.example.com/doc\",\"title\":\"Important Doc\"}},\"relationships\":{\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 26 Sep 2022 21:17:25 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/762590df-8e28-5b77-8282-a51ec6aff95f/attachments"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"c383d7df-3f44-571c-922a-4668ce53a8ad\",\"attributes\":{\"modified\":\"2022-09-26T21:17:25.906466+00:00\",\"attachment_type\":\"link\",\"attachment\":{\"documentUrl\":\"https://www.example.com/doc\",\"title\":\"Important Doc\"}},\"relationships\":{\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 26 Sep 2022 21:17:25 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/762590df-8e28-5b77-8282-a51ec6aff95f"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 26 Sep 2022 21:17:25 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_incident_attachments_returns_OK_response-1699302332\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"e49b3ad0-3bd0-5b05-91a1-06706e7e8bda\",\"attributes\":{\"public_id\":174810,\"incident_type_uuid\":null,\"title\":\"Test-Get_incident_attachments_returns_OK_response-1699302332\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:33.000644+00:00\",\"modified\":\"2023-11-06T20:25:33.000644+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:32.991070+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:32 GMT"}, {"request": {"body": {"string": "{\"data\":[{\"attributes\":{\"attachment\":{\"documentUrl\":\"https://www.example.com/doc\",\"title\":\"Important Doc\"},\"attachment_type\":\"link\"},\"type\":\"incident_attachments\"}]}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/e49b3ad0-3bd0-5b05-91a1-06706e7e8bda/attachments"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"04f09f86-e2bf-576b-976e-7002405673c4\",\"attributes\":{\"modified\":\"2023-11-06T20:25:33.440319+00:00\",\"attachment_type\":\"link\",\"attachment\":{\"title\":\"Important Doc\",\"documentUrl\":\"https://www.example.com/doc\"}},\"relationships\":{\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:32 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/e49b3ad0-3bd0-5b05-91a1-06706e7e8bda/attachments"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"04f09f86-e2bf-576b-976e-7002405673c4\",\"attributes\":{\"modified\":\"2023-11-06T20:25:33.440319+00:00\",\"attachment_type\":\"link\",\"attachment\":{\"title\":\"Important Doc\",\"documentUrl\":\"https://www.example.com/doc\"}},\"relationships\":{\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:32 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/e49b3ad0-3bd0-5b05-91a1-06706e7e8bda"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:32 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.frozen index 5f7c73fad..2128bbd2b 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.frozen @@ -1 +1 @@ -2023-02-24T19:28:03.052Z \ No newline at end of file +2023-11-06T20:25:34.057Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.json index 9db7d40c5..f65d0ec23 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Get-incident-integration-metadata-details-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_incident_integration_metadata_details_returns_OK_response-1677266883\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"attributes\":{\"public_id\":123330,\"title\":\"Test-Get_incident_integration_metadata_details_returns_OK_response-1677266883\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-02-24T19:28:03.236100+00:00\",\"modified\":\"2023-02-24T19:28:03.236100+00:00\",\"commander\":null,\"detected\":\"2023-02-24T19:28:03.228113+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:03 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"6e654fe0-d3db-56c9-937c-861a9f9ce19e\",\"attributes\":{\"created\":\"2023-02-24T19:28:03.731346+00:00\",\"modified\":\"2023-02-24T19:28:03.731346+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:03 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9/relationships/integrations/6e654fe0-d3db-56c9-937c-861a9f9ce19e"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"6e654fe0-d3db-56c9-937c-861a9f9ce19e\",\"attributes\":{\"created\":\"2023-02-24T19:28:03.731346+00:00\",\"modified\":\"2023-02-24T19:28:03.731346+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"57400630-f287-5c30-8cb8-0ecabb3d44b9\",\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"team_id\":\"T01234567\",\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:03 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9/relationships/integrations/6e654fe0-d3db-56c9-937c-861a9f9ce19e"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:03 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/57400630-f287-5c30-8cb8-0ecabb3d44b9"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Fri, 24 Feb 2023 19:28:03 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_incident_integration_metadata_details_returns_OK_response-1699302334\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"0c83a971-8024-5a9f-8748-957c6a94dcbd\",\"attributes\":{\"public_id\":174811,\"incident_type_uuid\":null,\"title\":\"Test-Get_incident_integration_metadata_details_returns_OK_response-1699302334\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:34.181614+00:00\",\"modified\":\"2023-11-06T20:25:34.181614+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:34.167758+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:34 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"0c83a971-8024-5a9f-8748-957c6a94dcbd\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/0c83a971-8024-5a9f-8748-957c6a94dcbd/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"a25ca729-6da3-5a0c-90af-7f1cbe8df9c1\",\"attributes\":{\"created\":\"2023-11-06T20:25:34.663600+00:00\",\"modified\":\"2023-11-06T20:25:34.663600+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"0c83a971-8024-5a9f-8748-957c6a94dcbd\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:34 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/0c83a971-8024-5a9f-8748-957c6a94dcbd/relationships/integrations/a25ca729-6da3-5a0c-90af-7f1cbe8df9c1"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"a25ca729-6da3-5a0c-90af-7f1cbe8df9c1\",\"attributes\":{\"created\":\"2023-11-06T20:25:34.663600+00:00\",\"modified\":\"2023-11-06T20:25:34.663600+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"0c83a971-8024-5a9f-8748-957c6a94dcbd\",\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"team_id\":\"T01234567\",\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:34 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/0c83a971-8024-5a9f-8748-957c6a94dcbd/relationships/integrations/a25ca729-6da3-5a0c-90af-7f1cbe8df9c1"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:34 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/0c83a971-8024-5a9f-8748-957c6a94dcbd"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:34 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.frozen index 5f18a1af3..7838ae506 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:54.021Z \ No newline at end of file +2023-11-06T20:25:35.307Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.json index 85a34366c..51104a7b9 100644 --- a/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Get-the-details-of-an-incident-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1652349114\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"4b220587-66f8-59c2-839d-68eb53672064\",\"attributes\":{\"public_id\":95247,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1652349114\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-05-12T09:51:54.434114+00:00\",\"modified\":\"2022-05-12T09:51:54.434114+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:54.426681+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:54 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/4b220587-66f8-59c2-839d-68eb53672064"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"4b220587-66f8-59c2-839d-68eb53672064\",\"attributes\":{\"public_id\":95247,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1652349114\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2022-05-12T09:51:54.434114+00:00\",\"modified\":\"2022-05-12T09:51:54.434114+00:00\",\"detected\":\"2022-05-12T09:51:54.426681+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:54 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/4b220587-66f8-59c2-839d-68eb53672064"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:54 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1699302335\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"1996a76f-a6b7-570a-bc63-95f7f1d0e289\",\"attributes\":{\"public_id\":174812,\"incident_type_uuid\":null,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1699302335\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:35.426487+00:00\",\"modified\":\"2023-11-06T20:25:35.426487+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:35.414038+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:35 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/1996a76f-a6b7-570a-bc63-95f7f1d0e289"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"1996a76f-a6b7-570a-bc63-95f7f1d0e289\",\"attributes\":{\"public_id\":174812,\"incident_type_uuid\":null,\"title\":\"Test-Get_the_details_of_an_incident_returns_OK_response-1699302335\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-06T20:25:35.426487+00:00\",\"modified\":\"2023-11-06T20:25:35.426487+00:00\",\"detected\":\"2023-11-06T20:25:35.414038+00:00\",\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:35 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/1996a76f-a6b7-570a-bc63-95f7f1d0e289"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:35 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.frozen index be02c5d86..0a0eba4aa 100644 --- a/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:55.683Z \ No newline at end of file +2023-11-06T20:25:35.990Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.json index 63e062ca9..c81a8f7cb 100644 --- a/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Remove-commander-from-an-incident-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Remove_commander_from_an_incident_returns_OK_response-1652349115\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"e3dd7a6c-675d-5f37-8320-fdff8b12f03e\",\"attributes\":{\"public_id\":95248,\"title\":\"Test-Remove_commander_from_an_incident_returns_OK_response-1652349115\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-05-12T09:51:56.157497+00:00\",\"modified\":\"2022-05-12T09:51:56.157497+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:56.148361+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:55 GMT"}, {"request": {"body": {"string": "{\"data\":{\"id\":\"e3dd7a6c-675d-5f37-8320-fdff8b12f03e\",\"relationships\":{\"commander_user\":{\"data\":null}},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/e3dd7a6c-675d-5f37-8320-fdff8b12f03e"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"e3dd7a6c-675d-5f37-8320-fdff8b12f03e\",\"attributes\":{\"public_id\":95248,\"title\":\"Test-Remove_commander_from_an_incident_returns_OK_response-1652349115\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2022-05-12T09:51:56.157497+00:00\",\"modified\":\"2022-05-12T09:51:56.878810+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:56.148361+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"891b9b1c-fe34-5049-ba9b-0c3a58dd6729\"}]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:55 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/e3dd7a6c-675d-5f37-8320-fdff8b12f03e"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:55 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Remove_commander_from_an_incident_returns_OK_response-1699302335\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"f485a73d-bb6f-53ad-8d2a-61e965f3fb4a\",\"attributes\":{\"public_id\":174813,\"incident_type_uuid\":null,\"title\":\"Test-Remove_commander_from_an_incident_returns_OK_response-1699302335\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:36.125910+00:00\",\"modified\":\"2023-11-06T20:25:36.125910+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:36.111903+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:35 GMT"}, {"request": {"body": {"string": "{\"data\":{\"id\":\"f485a73d-bb6f-53ad-8d2a-61e965f3fb4a\",\"relationships\":{\"commander_user\":{\"data\":null}},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/f485a73d-bb6f-53ad-8d2a-61e965f3fb4a"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"f485a73d-bb6f-53ad-8d2a-61e965f3fb4a\",\"attributes\":{\"public_id\":174813,\"incident_type_uuid\":null,\"title\":\"Test-Remove_commander_from_an_incident_returns_OK_response-1699302335\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-06T20:25:36.125910+00:00\",\"modified\":\"2023-11-06T20:25:36.524033+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:36.111903+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"db687925-f1c5-5629-b919-98dd4e581626\"}]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:35 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/f485a73d-bb6f-53ad-8d2a-61e965f3fb4a"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:35 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.frozen index 243186c18..3fd1a78f6 100644 --- a/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.frozen @@ -1 +1 @@ -2023-01-04T00:33:33.944Z \ No newline at end of file +2023-11-06T20:25:37.045Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.json index 7fb4d32b2..1d2fc4fbe 100644 --- a/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Search-for-incidents-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Search_for_incidents_returns_OK_response-1672792413\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"698787fa-35d4-5950-8697-80c4e83ed1c5\",\"attributes\":{\"public_id\":117205,\"title\":\"Test-Search_for_incidents_returns_OK_response-1672792413\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:33:34.114783+00:00\",\"modified\":\"2023-01-04T00:33:34.114783+00:00\",\"commander\":null,\"detected\":\"2023-01-04T00:33:34.107801+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 04 Jan 2023 00:33:33 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/search?query=state%3A%28active%20OR%20stable%20OR%20resolved%29"}, "response": {"body": {"string": "{\"included\":[{\"type\":\"incidents\",\"id\":\"8b4f2baf-75c6-5992-b7f4-3059ba7d9a09\",\"attributes\":{\"public_id\":116985,\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672618365-updated\",\"resolved\":\"2023-01-02T00:12:48+00:00\",\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:45+00:00\",\"modified\":\"2023-01-02T00:12:48+00:00\",\"commander\":null,\"detected\":\"2023-01-02T00:12:45+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":3,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":3,\"spans\":[{\"start\":1672618365,\"end\":1672618368}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672618368,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"6d2c22d1-db02-5b17-bbb2-dca33b221f45\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e7479f51-aabc-5e4e-9c94-97f2b41d601f\",\"attributes\":{\"public_id\":117086,\"title\":\"Test-Go-Create_an_incident_attachment_returns_OK_response-1672704724\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:04+00:00\",\"modified\":\"2023-01-03T00:12:04+00:00\",\"commander\":null,\"detected\":\"2023-01-03T00:12:04+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704724,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"e09687c7-749d-568b-a6a5-8c97064781db\"}]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"e06f394b-94be-5f66-aa6d-1e30fc83ce15\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"6316c8bf-c371-5533-8db4-a6ff1d8f635a\",\"attributes\":{\"public_id\":117196,\"title\":\"Test-Go-Create_an_incident_attachment_returns_OK_response-1672791112\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:11:52+00:00\",\"modified\":\"2023-01-04T00:11:52+00:00\",\"commander\":null,\"detected\":\"2023-01-04T00:11:52+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791112,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"9864e73c-82df-5f1b-a6ef-2051649e55ae\"}]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"9027dcfd-cc8c-533f-9d65-99c0c10089c7\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"4e7f047b-f510-54d9-a46e-e680896f27df\",\"attributes\":{\"public_id\":116984,\"title\":\"Test-Go-Remove_commander_from_an_incident_returns_OK_response-1672618362\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:43+00:00\",\"modified\":\"2023-01-02T00:12:45+00:00\",\"commander\":null,\"detected\":\"2023-01-02T00:12:43+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618363,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"c3ab396e-0046-5adc-a429-26eeea1e408c\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"fbcec095-5b9d-5e9b-a440-bbd87014e4de\",\"attributes\":{\"public_id\":116982,\"title\":\"Test-Go-Get_incident_attachments_returns_OK_response-1672618355\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:35+00:00\",\"modified\":\"2023-01-02T00:12:35+00:00\",\"commander\":null,\"detected\":\"2023-01-02T00:12:35+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618355,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"bcb80eba-bc32-5f0f-9a62-6efb59012530\"}]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"0271185a-46c5-5969-94ef-d6fbeaf592f6\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"1bd22b70-a2a4-5043-887b-6967510a4f6c\",\"attributes\":{\"public_id\":117195,\"title\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672791107\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:11:49+00:00\",\"modified\":\"2023-01-04T00:11:52+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\",\"attributes\":{\"uuid\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\",\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672791107@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672791107@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/fee7315f03d359fcc7d7b96a2bfde509?s=48&d=retro\"}}},\"detected\":\"2023-01-04T00:11:49+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791109,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\"}},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"08fb7533-0dcb-5e00-be95-34e679aca740\"},{\"type\":\"incident_responders\",\"id\":\"1b29da40-d487-5548-9735-f570435e56e2\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e1212490-ca36-5912-991e-663241e9f077\",\"attributes\":{\"public_id\":117200,\"title\":\"Test-Go-Get_incident_attachments_returns_OK_response-1672791124\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:12:04+00:00\",\"modified\":\"2023-01-04T00:12:04+00:00\",\"commander\":null,\"detected\":\"2023-01-04T00:12:04+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791124,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"37710d9b-0b57-524e-8cab-2a55684f9c9e\"}]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"1c19106e-80cc-5b01-b5c0-09921e057997\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"adbe3989-0704-5cf8-b2d0-323f5e2a8032\",\"attributes\":{\"public_id\":117093,\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672704745-updated\",\"resolved\":\"2023-01-03T00:12:28+00:00\",\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:26+00:00\",\"modified\":\"2023-01-03T00:12:28+00:00\",\"commander\":null,\"detected\":\"2023-01-03T00:12:26+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":2,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":2,\"spans\":[{\"start\":1672704746,\"end\":1672704748}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672704748,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"744f15f8-5e8a-5c54-8c9b-7061e29e6d43\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"504cf0bf-68f7-52a3-bb9c-b8f603c36137\",\"attributes\":{\"public_id\":116885,\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672531855-updated\",\"resolved\":\"2023-01-01T00:10:58+00:00\",\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-01T00:10:55+00:00\",\"modified\":\"2023-01-01T00:10:58+00:00\",\"commander\":null,\"detected\":\"2023-01-01T00:10:55+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":3,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":3,\"spans\":[{\"start\":1672531855,\"end\":1672531858}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672531858,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"2997bd45-ac4d-5569-ae39-072ce0fff20b\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"0a5b2395-7e16-5417-83d1-b78ad950d070\",\"attributes\":{\"public_id\":117092,\"title\":\"Test-Go-Remove_commander_from_an_incident_returns_OK_response-1672704743\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:23+00:00\",\"modified\":\"2023-01-03T00:12:25+00:00\",\"commander\":null,\"detected\":\"2023-01-03T00:12:23+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704743,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"3bccfa3b-bbf2-5c06-89a8-86a7499f6535\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"325bff5b-6e7e-5591-b1c9-aded3d69f572\",\"attributes\":{\"public_id\":117201,\"title\":\"Test-Go-Get_the_details_of_an_incident_returns_OK_response-1672791129\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:12:09+00:00\",\"modified\":\"2023-01-04T00:12:09+00:00\",\"commander\":null,\"detected\":\"2023-01-04T00:12:09+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791129,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"58407390-5743-5b3e-8630-21ca058e406a\",\"attributes\":{\"public_id\":116983,\"title\":\"Test-Go-Get_the_details_of_an_incident_returns_OK_response-1672618360\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:40+00:00\",\"modified\":\"2023-01-02T00:12:40+00:00\",\"commander\":null,\"detected\":\"2023-01-02T00:12:40+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618360,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"13c25a39-8ee8-5995-a740-3714f3200333\",\"attributes\":{\"public_id\":117087,\"title\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672704726\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:09+00:00\",\"modified\":\"2023-01-03T00:12:09+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"a4230eac-f78e-407d-8551-b07c6476622b\",\"attributes\":{\"uuid\":\"a4230eac-f78e-407d-8551-b07c6476622b\",\"handle\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/0525262fe05a13b8759a523b34d5d882?s=48&d=retro\"}}},\"detected\":\"2023-01-03T00:12:09+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672704729,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"a4230eac-f78e-407d-8551-b07c6476622b\"}},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"a2cf37eb-d9a1-5da4-8b29-006062c63e27\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"4154152c-f7f6-560e-878c-48968cfce69c\",\"attributes\":{\"public_id\":116981,\"title\":\"Test-Go-Get_a_list_of_incidents_returns_OK_response-1672618352\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:32+00:00\",\"modified\":\"2023-01-02T00:12:32+00:00\",\"commander\":null,\"detected\":\"2023-01-02T00:12:32+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618352,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"0367372f-2036-51f5-99cf-33563e9c1f45\",\"attributes\":{\"public_id\":117091,\"title\":\"Test-Go-Get_the_details_of_an_incident_returns_OK_response-1672704740\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:20+00:00\",\"modified\":\"2023-01-03T00:12:20+00:00\",\"commander\":null,\"detected\":\"2023-01-03T00:12:20+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704740,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"7db1b077-c521-5503-96e3-dec958978fc7\",\"attributes\":{\"public_id\":117090,\"title\":\"Test-Go-Get_incident_attachments_returns_OK_response-1672704736\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:16+00:00\",\"modified\":\"2023-01-03T00:12:16+00:00\",\"commander\":null,\"detected\":\"2023-01-03T00:12:16+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704736,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"65f751cb-5c20-5de6-b0e3-2b2c2c74eb24\"}]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"bc9d0105-0603-5c6d-8642-248a2d9591f6\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"3f575b77-9b89-5187-a835-0e1aa8d73f38\",\"attributes\":{\"public_id\":117199,\"title\":\"Test-Go-Get_a_list_of_incidents_returns_OK_response-1672791121\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:12:01+00:00\",\"modified\":\"2023-01-04T00:12:01+00:00\",\"commander\":null,\"detected\":\"2023-01-04T00:12:01+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791121,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e0c6c509-cec0-53ec-972f-2f72b9e5219f\",\"attributes\":{\"public_id\":116977,\"title\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672618338\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:21+00:00\",\"modified\":\"2023-01-02T00:12:23+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\",\"attributes\":{\"uuid\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\",\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/00805e4c643bee01f2ca28248bc352ae?s=48&d=retro\"}}},\"detected\":\"2023-01-02T00:12:21+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618341,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\"}},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"15a13dfd-ff70-5a0f-b4e1-17a295cf3f6a\"},{\"type\":\"incident_responders\",\"id\":\"60592e7b-5548-5784-8dbe-db7f805cb954\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"61b4382f-f362-5228-8756-b98461208aa6\",\"attributes\":{\"public_id\":117197,\"title\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672791115\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:11:57+00:00\",\"modified\":\"2023-01-04T00:11:57+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\",\"attributes\":{\"uuid\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\",\"handle\":\"test-go-create_an_incident_returns_created_response-1672791115@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672791115@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/bb1b3be196d5d7225b7f3eef58b5e2e1?s=48&d=retro\"}}},\"detected\":\"2023-01-04T00:11:57+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672791117,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\"}},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"abf4c288-ce9c-56cc-9100-4be2da1ed945\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"4d9dd3dd-7052-5815-bc4f-316d60faaf74\",\"attributes\":{\"public_id\":117089,\"title\":\"Test-Go-Get_a_list_of_incidents_returns_OK_response-1672704733\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:13+00:00\",\"modified\":\"2023-01-03T00:12:13+00:00\",\"commander\":null,\"detected\":\"2023-01-03T00:12:13+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704733,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"55dff457-92d9-586d-9074-369a975e5393\",\"attributes\":{\"public_id\":116978,\"title\":\"Test-Go-Create_an_incident_attachment_returns_OK_response-1672618344\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:24+00:00\",\"modified\":\"2023-01-02T00:12:24+00:00\",\"commander\":null,\"detected\":\"2023-01-02T00:12:24+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618344,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"29248789-7309-5070-af26-4d79b1923a51\"}]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"2303ffbe-3496-5356-9604-5ee47462bd55\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"2c9caa16-2f7c-5559-9eaf-605e75165992\",\"attributes\":{\"public_id\":117203,\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672791134-updated\",\"resolved\":\"2023-01-04T00:12:17+00:00\",\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:12:14+00:00\",\"modified\":\"2023-01-04T00:12:17+00:00\",\"commander\":null,\"detected\":\"2023-01-04T00:12:14+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":3,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":3,\"spans\":[{\"start\":1672791134,\"end\":1672791137}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672791137,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"632452f7-bacf-57b8-8e8f-99a9aac6b732\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"aae06082-34e0-572c-95eb-db2820d38eda\",\"attributes\":{\"public_id\":117202,\"title\":\"Test-Go-Remove_commander_from_an_incident_returns_OK_response-1672791131\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-04T00:12:12+00:00\",\"modified\":\"2023-01-04T00:12:14+00:00\",\"commander\":null,\"detected\":\"2023-01-04T00:12:11+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791132,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"5c28b141-4d5c-5219-8cd3-eabd7fb72835\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"ba6388a5-fff1-52ce-b171-5096ca4c7c41\",\"attributes\":{\"public_id\":116979,\"title\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672618346\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-02T00:12:29+00:00\",\"modified\":\"2023-01-02T00:12:29+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"e84ce941-4c3d-4b79-b736-619897785a82\",\"attributes\":{\"uuid\":\"e84ce941-4c3d-4b79-b736-619897785a82\",\"handle\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/2384e4fc83a34385611de13f7c92e933?s=48&d=retro\"}}},\"detected\":\"2023-01-02T00:12:29+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672618349,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"e84ce941-4c3d-4b79-b736-619897785a82\"}},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"68b00b90-08de-5b5c-a91f-80caab081745\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"c7bb0342-1a44-5857-8ab2-1fe4929a4d04\",\"attributes\":{\"public_id\":117085,\"title\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672704719\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-01-03T00:12:01+00:00\",\"modified\":\"2023-01-03T00:12:03+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\",\"attributes\":{\"uuid\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\",\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/2799a6c94b04914f4d154230b5edcab3?s=48&d=retro\"}}},\"detected\":\"2023-01-03T00:12:01+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"attributes\":{\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704721,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\"}},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"daa2749b-8f6f-515b-8376-6b8619bfd669\"},{\"type\":\"incident_responders\",\"id\":\"59fe2d64-96ff-546e-929a-291aa544639f\"}]},\"impacts\":{\"data\":[]}}}],\"meta\":{\"pagination\":{\"size\":25,\"next_offset\":25,\"offset\":0}},\"data\":{\"type\":\"incidents_search_results\",\"attributes\":{\"total\":680,\"facets\":{\"severity\":[{\"count\":680,\"name\":\"UNKNOWN\"},{\"count\":0,\"name\":\"SEV-1\"},{\"count\":0,\"name\":\"SEV-2\"},{\"count\":0,\"name\":\"SEV-3\"},{\"count\":0,\"name\":\"SEV-4\"},{\"count\":0,\"name\":\"SEV-5\"}],\"fields\":[{\"facets\":[{\"count\":680,\"name\":\"unknown\"},{\"count\":0,\"name\":\"customer\"},{\"count\":0,\"name\":\"employee\"},{\"count\":0,\"name\":\"monitor\"},{\"count\":0,\"name\":\"other\"}],\"name\":\"detection_method\"},{\"facets\":[],\"name\":\"root_cause\"},{\"facets\":[],\"name\":\"services\"},{\"facets\":[],\"name\":\"summary\"},{\"facets\":[],\"name\":\"teams\"}],\"responder\":[{\"count\":355,\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},{\"count\":70,\"handle\":\"frog@datadoghq.com\",\"name\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672013445@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672013445@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672013445@datadoghq.com\",\"uuid\":\"03e16d56-e954-4e9a-b9da-22dffdfa1f24\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666981015@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666981015@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666981015@datadoghq.com\",\"uuid\":\"03e65d16-b7bb-456a-a5da-bf31dffbdf4d\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669335011@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669335011@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669335011@datadoghq.com\",\"uuid\":\"04c4feaa-1864-4167-a48b-e156181d50d8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669248659@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669248659@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669248659@datadoghq.com\",\"uuid\":\"04f0d8b5-1959-43fb-85b5-782682062c4e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666743047@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666743047@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666743047@datadoghq.com\",\"uuid\":\"060c37c0-93a9-48c0-90bc-dee85b66a7c7\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670112680@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670112680@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670112680@datadoghq.com\",\"uuid\":\"09010d4b-7635-4553-a7b9-973f5f9cea5b\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667434335@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667434335@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667434335@datadoghq.com\",\"uuid\":\"0ebbf763-be8f-40bb-8ee7-d37b729a5eed\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668384644@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668384644@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668384644@datadoghq.com\",\"uuid\":\"1193cff3-b670-4e08-a535-346105dcaf9f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668643799@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668643799@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668643799@datadoghq.com\",\"uuid\":\"12d78e1b-0784-46f3-99ac-7e5db2d5c92e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671667884@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671667884@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671667884@datadoghq.com\",\"uuid\":\"1310687d-9adb-47ae-ad7a-066c9e525f8b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670927771@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670927771@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670927771@datadoghq.com\",\"uuid\":\"14344412-a7b1-4044-89f7-8139727432f6\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667261554@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667261554@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667261554@datadoghq.com\",\"uuid\":\"1608c46d-bee2-46a5-be87-49af2b889db5\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670929702@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670929702@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670929702@datadoghq.com\",\"uuid\":\"161217ca-a0b5-418c-b0e5-d16edddd8258\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670928949@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670928949@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670928949@datadoghq.com\",\"uuid\":\"16754b18-1887-4f22-ae44-4a86e9bfc749\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671754258@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671754258@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671754258@datadoghq.com\",\"uuid\":\"18ada30d-ad3e-4ba2-911d-931233a75aa0\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670285407@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670285407@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670285407@datadoghq.com\",\"uuid\":\"1bb87a6c-da01-4798-8bd0-5cd9918f641f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668903124@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668903124@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668903124@datadoghq.com\",\"uuid\":\"1bcb111e-ea64-4d60-9b77-ae5e7f22f157\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668039051@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668039051@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668039051@datadoghq.com\",\"uuid\":\"1c54a963-17f1-4ee8-a2b0-7fd07c3b2c68\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671149452@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671149452@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671149452@datadoghq.com\",\"uuid\":\"1ebe2367-3eda-464c-9571-edd444620682\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"uuid\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666915819@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666915819@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666915819@datadoghq.com\",\"uuid\":\"20be4a8a-b215-4bc0-b2fa-31c27e0a642b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671840707@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671840707@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671840707@datadoghq.com\",\"uuid\":\"20d2001a-92b4-4d03-a5cb-73617f27b723\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670594546@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670594546@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670594546@datadoghq.com\",\"uuid\":\"2399be00-e683-4133-aec2-7ab8fe73779e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667175034@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667175034@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667175034@datadoghq.com\",\"uuid\":\"24f932ba-4cd2-498e-8261-64f6ec161bcb\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672013452@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672013452@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672013452@datadoghq.com\",\"uuid\":\"2593795d-b0f5-46f9-a852-34d3c466ce0a\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667520677@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667520677@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667520677@datadoghq.com\",\"uuid\":\"26287ddb-5d1c-400d-96dc-a1d3bb09f880\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668557513@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668557513@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668557513@datadoghq.com\",\"uuid\":\"2871bc57-733f-4f85-b3ef-440569202326\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668471095@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668471095@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668471095@datadoghq.com\",\"uuid\":\"289f8508-500c-472e-a9d4-71f30f1cf151\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671667877@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671667877@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671667877@datadoghq.com\",\"uuid\":\"28ae893d-4b70-420d-96dc-f82066a0642f\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672531830@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672531830@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672531830@datadoghq.com\",\"uuid\":\"291b8416-a87d-4e56-a93e-9d430d5c4996\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671927057@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671927057@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671927057@datadoghq.com\",\"uuid\":\"2b0ac046-39c8-4bf4-a00a-deb089bbbc0c\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672445562@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672445562@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672445562@datadoghq.com\",\"uuid\":\"2db31432-b497-42b8-80b7-fef85898a2a8\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668039059@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668039059@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668039059@datadoghq.com\",\"uuid\":\"2ebfffc1-a7da-4558-a507-038442f7ee79\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669767030@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669767030@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669767030@datadoghq.com\",\"uuid\":\"2eca0bd9-db8e-4c5d-91b7-2ccddffd5764\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671235865@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671235865@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671235865@datadoghq.com\",\"uuid\":\"2fc6258a-7492-43c0-accf-24528cbbfea1\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669680686@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669680686@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669680686@datadoghq.com\",\"uuid\":\"302a3d05-c61c-41d8-ad31-8821b764acf7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669680678@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669680678@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669680678@datadoghq.com\",\"uuid\":\"31ad2923-926d-49af-ad5b-d8b120e6edc8\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671581470@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671581470@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671581470@datadoghq.com\",\"uuid\":\"34377484-e597-4d4c-bccf-88e919b6d549\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667693449@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667693449@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667693449@datadoghq.com\",\"uuid\":\"34e92512-7c24-4704-816e-4fadc9b5eff7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668211888@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668211888@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668211888@datadoghq.com\",\"uuid\":\"3578dcc8-088a-4320-8c27-7f80f1bba4cb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672186272@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672186272@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672186272@datadoghq.com\",\"uuid\":\"3584000d-6337-4c9e-955e-e25514b83be0\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671062982@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671062982@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671062982@datadoghq.com\",\"uuid\":\"3883d9fe-1678-452e-8801-11a374f9fdae\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667002244@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667002244@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667002244@datadoghq.com\",\"uuid\":\"39627294-7a14-4e71-b5ff-5221e68b6fbe\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671581462@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671581462@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671581462@datadoghq.com\",\"uuid\":\"3bc8406a-5790-4582-82f5-08e330921b9b\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668989431@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668989431@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668989431@datadoghq.com\",\"uuid\":\"3c28c823-158e-46c2-8dce-06f1dace90e8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669162240@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669162240@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669162240@datadoghq.com\",\"uuid\":\"3ce20d84-5e75-45a5-b7b9-971549a50cf4\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670458180@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670458180@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670458180@datadoghq.com\",\"uuid\":\"40d8c19a-8c6a-4f54-9444-aba7b6798064\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672099886@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672099886@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672099886@datadoghq.com\",\"uuid\":\"431624c4-d099-4dfb-b701-33a60bba6ebe\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669421482@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669421482@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669421482@datadoghq.com\",\"uuid\":\"442dd264-b729-473b-a51d-4b141068fe3d\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603297@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603297@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603297@datadoghq.com\",\"uuid\":\"446cd2d8-630c-4fe9-8901-fb85bd22426d\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668989438@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668989438@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668989438@datadoghq.com\",\"uuid\":\"46d62900-016b-463c-9fff-c8b4f946ce5c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670371777@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670371777@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670371777@datadoghq.com\",\"uuid\":\"48f7337b-3304-46fc-9e88-23b4dc5d24cc\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670943350@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670943350@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670943350@datadoghq.com\",\"uuid\":\"4b432133-ba1b-4edc-ab57-c0250963f250\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668816648@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668816648@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668816648@datadoghq.com\",\"uuid\":\"4e5cb15e-f18e-43ba-b115-2a4e62736739\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603851@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603851@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603851@datadoghq.com\",\"uuid\":\"4e6b1824-dc1e-4691-8abd-5ffb968da7eb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669421474@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669421474@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669421474@datadoghq.com\",\"uuid\":\"4fdb4327-3660-4aeb-b403-7f7939493f27\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670458188@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670458188@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670458188@datadoghq.com\",\"uuid\":\"50d5408a-1894-4173-9fa1-32209009d9b1\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670803787@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670803787@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670803787@datadoghq.com\",\"uuid\":\"521a78f7-573e-4b67-8e2c-d0dd5d91a265\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666743039@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666743039@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666743039@datadoghq.com\",\"uuid\":\"54b84ea9-ae9f-4159-b226-aba3b432a792\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670929700@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670929700@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670929700@datadoghq.com\",\"uuid\":\"5705f818-933e-4ef4-818c-615b06f80fd1\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668557521@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668557521@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668557521@datadoghq.com\",\"uuid\":\"577067f0-c41d-4928-8964-0f7725e8cf68\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666829448@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666829448@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666829448@datadoghq.com\",\"uuid\":\"586e086f-1e29-4689-99b6-641c3218b0a8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667261546@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667261546@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667261546@datadoghq.com\",\"uuid\":\"59c9cd2e-cd40-4530-ba50-415bce89b133\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670976638@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670976638@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670976638@datadoghq.com\",\"uuid\":\"5baf69e4-9bd6-4c76-b552-2bfee88031b5\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668298265@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668298265@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668298265@datadoghq.com\",\"uuid\":\"5c4ecf79-7ffb-47ea-9331-687b04ac9df8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671840699@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671840699@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671840699@datadoghq.com\",\"uuid\":\"5ce42d6d-a0b9-4d0f-893b-aa0b8f30ee5c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672445570@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672445570@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672445570@datadoghq.com\",\"uuid\":\"5d11019d-f1dc-468d-a20a-8e64e7af9494\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670976646@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670976646@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670976646@datadoghq.com\",\"uuid\":\"5db9c599-b71f-40c6-84d9-8ca8779004e1\"},{\"count\":1,\"handle\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672791107@datadoghq.com\",\"name\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672791107@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672791107@datadoghq.com\",\"uuid\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667088640@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667088640@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667088640@datadoghq.com\",\"uuid\":\"61d88713-957f-4920-8a3b-65f0ccd79b57\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670026253@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670026253@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670026253@datadoghq.com\",\"uuid\":\"623452c3-d694-466a-95b9-140a9c44a1ab\"},{\"count\":1,\"handle\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672791115@datadoghq.com\",\"name\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672791115@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672791115@datadoghq.com\",\"uuid\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667520669@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667520669@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667520669@datadoghq.com\",\"uuid\":\"6887723d-dbde-4969-bba8-e9b3464645ce\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667952700@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667952700@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667952700@datadoghq.com\",\"uuid\":\"6c22fc34-31d7-4085-948b-d862feb447fe\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671149459@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671149459@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671149459@datadoghq.com\",\"uuid\":\"6ccce5fc-d6a8-416d-921b-f883914b67ad\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669594231@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669594231@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669594231@datadoghq.com\",\"uuid\":\"6d550b97-297b-43ea-a3dc-85383cf72fba\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671927065@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671927065@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671927065@datadoghq.com\",\"uuid\":\"6d7f7052-6ddb-461f-a49f-6cb5fca6b2c8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670927769@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670927769@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670927769@datadoghq.com\",\"uuid\":\"6efabec4-24bc-46bd-8f53-e068f03adbf0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670717462@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670717462@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670717462@datadoghq.com\",\"uuid\":\"70532155-9800-46d9-89ed-bd41347c3dfd\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671322271@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671322271@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671322271@datadoghq.com\",\"uuid\":\"7247d247-e798-4af5-b9ce-7bf786c4d0c7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672359091@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672359091@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672359091@datadoghq.com\",\"uuid\":\"73546355-1adc-4289-908a-2f6fae7fc9fa\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666979688@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666979688@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666979688@datadoghq.com\",\"uuid\":\"74d4e917-96f7-4cef-afb6-97e8044a1944\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669507839@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669507839@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669507839@datadoghq.com\",\"uuid\":\"7571121d-a654-4df8-9afa-e638f17d53bb\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668384652@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668384652@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668384652@datadoghq.com\",\"uuid\":\"7da5fc01-ccbd-4679-8149-cb22fe402bb3\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667779824@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667779824@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667779824@datadoghq.com\",\"uuid\":\"7dd124ba-7343-4882-b700-c44374efa8e3\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670926105@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670926105@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670926105@datadoghq.com\",\"uuid\":\"81831280-6cb1-4a01-9dc9-f68b1405f8f6\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670199054@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670199054@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670199054@datadoghq.com\",\"uuid\":\"847f57aa-1b32-4eee-8447-e6eef1f6744f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670630968@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670630968@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670630968@datadoghq.com\",\"uuid\":\"853cce16-d7d3-4bd6-8f99-b1eab0407cf1\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672099877@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672099877@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672099877@datadoghq.com\",\"uuid\":\"862d085b-48ce-446e-a74f-ae3538d623f5\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667434343@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667434343@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667434343@datadoghq.com\",\"uuid\":\"88c2cdf6-2769-4e68-9503-38d3f166ff1a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668643791@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668643791@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668643791@datadoghq.com\",\"uuid\":\"8a2d2c9d-c478-4a74-94a8-cabb28bd1473\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"uuid\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667866310@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667866310@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667866310@datadoghq.com\",\"uuid\":\"8f8399af-4d57-41a1-91a3-37c29fb62092\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670630960@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670630960@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670630960@datadoghq.com\",\"uuid\":\"8fa60296-198c-4113-8f21-0ba09e4fd83e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666829456@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666829456@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666829456@datadoghq.com\",\"uuid\":\"91a8dc0a-0c63-4411-b9ab-39ec37dc2eee\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669939802@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669939802@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669939802@datadoghq.com\",\"uuid\":\"92c4c4e2-d881-485c-9668-0aa68239c513\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667088632@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667088632@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667088632@datadoghq.com\",\"uuid\":\"93e8df0e-729e-4d2f-b0a4-9495ffb37b06\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670598792@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670598792@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670598792@datadoghq.com\",\"uuid\":\"94d92a17-4768-48dd-97b4-ab32fee4e33b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669853467@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669853467@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669853467@datadoghq.com\",\"uuid\":\"94f7179d-40a0-4790-9436-6080eb0db034\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669075853@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669075853@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669075853@datadoghq.com\",\"uuid\":\"96796850-b278-4313-a726-9cf5c832fe30\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670594544@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670594544@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670594544@datadoghq.com\",\"uuid\":\"9b26b565-e0c1-4777-a693-553a8d5cb243\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670285415@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670285415@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670285415@datadoghq.com\",\"uuid\":\"9b9fe3ac-f73b-43a5-b570-43d156e07ea9\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670926595@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670926595@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670926595@datadoghq.com\",\"uuid\":\"9c09fbea-fce4-4c02-9a45-ec845bab938a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670544898@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670544898@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670544898@datadoghq.com\",\"uuid\":\"9c58a1dc-6beb-4390-928e-ed9d95b13b30\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667693441@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667693441@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667693441@datadoghq.com\",\"uuid\":\"9ccf5d51-55b4-43e0-ad79-7819a8d223f0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666979690@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666979690@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666979690@datadoghq.com\",\"uuid\":\"9e072255-5184-44a8-ae5f-a8e70ec5037c\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668125498@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668125498@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668125498@datadoghq.com\",\"uuid\":\"9f5a1546-bccf-4b9f-a25f-96fb87bd7bfc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669162248@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669162248@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669162248@datadoghq.com\",\"uuid\":\"9f88a5e0-9842-4fd1-95c7-7f85edad3874\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666981017@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666981017@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666981017@datadoghq.com\",\"uuid\":\"a136a629-05cd-4a2f-b925-e1d74c6a69ad\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670803795@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670803795@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670803795@datadoghq.com\",\"uuid\":\"a18c9430-e993-488f-8b5c-3ad27997e55c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"uuid\":\"a4230eac-f78e-407d-8551-b07c6476622b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669767038@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669767038@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669767038@datadoghq.com\",\"uuid\":\"a9977d83-cddd-4644-ba02-dc1a86c0293e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667606997@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667606997@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667606997@datadoghq.com\",\"uuid\":\"ab5bb1f0-b9b2-43da-bd50-e5ba7315fc29\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672272649@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672272649@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672272649@datadoghq.com\",\"uuid\":\"ac484716-4260-4fd9-8288-1d4a6b0d39da\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672359099@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672359099@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672359099@datadoghq.com\",\"uuid\":\"b12b859b-c89a-4023-84e6-2634f93fff00\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667347843@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667347843@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667347843@datadoghq.com\",\"uuid\":\"b2f195b3-53b7-4095-bfb8-90538edb12f7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667779816@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667779816@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667779816@datadoghq.com\",\"uuid\":\"b335a7f4-a66e-41ed-b4aa-982c5b76ffc1\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670890374@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670890374@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670890374@datadoghq.com\",\"uuid\":\"b3ccf662-7d0d-4a45-9cb3-5ffcb089012c\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669594223@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669594223@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669594223@datadoghq.com\",\"uuid\":\"b4a8f9a4-28a9-4311-a813-8149eb5264f4\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671408605@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671408605@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671408605@datadoghq.com\",\"uuid\":\"b7d64361-36fd-4ebd-9438-949f60ec3745\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670604391@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670604391@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670604391@datadoghq.com\",\"uuid\":\"b8fa89c4-34f6-4b69-a654-e3671ce743a0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668471103@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668471103@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668471103@datadoghq.com\",\"uuid\":\"b9d64d92-66de-41cc-9164-b83b7b74439f\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669853460@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669853460@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669853460@datadoghq.com\",\"uuid\":\"bc036552-b05e-4ffd-8dd1-44dbe725a6ec\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670544906@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670544906@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670544906@datadoghq.com\",\"uuid\":\"bcb9456d-8b65-4369-b2c4-49ee5e4c14b7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667952692@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667952692@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667952692@datadoghq.com\",\"uuid\":\"be421a73-22de-48d3-be3f-1a269016ff83\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666915811@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666915811@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666915811@datadoghq.com\",\"uuid\":\"c20da1a9-657e-4b5a-9159-9f4d324f51fc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671495039@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671495039@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671495039@datadoghq.com\",\"uuid\":\"c23885b0-3659-4d47-b5c9-16c0965dc7d9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668730249@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668730249@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668730249@datadoghq.com\",\"uuid\":\"c36f2608-4650-4331-b810-1dc5500c1356\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670924666@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670924666@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670924666@datadoghq.com\",\"uuid\":\"c381f80b-8a88-47bd-9dbe-77720d784a52\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669075846@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669075846@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669075846@datadoghq.com\",\"uuid\":\"c39f3031-906f-4679-a817-9b8f072254bb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667002236@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667002236@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667002236@datadoghq.com\",\"uuid\":\"c567f0fa-6f70-42e3-855e-2ae1d2ed7243\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668125506@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668125506@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668125506@datadoghq.com\",\"uuid\":\"c60a0f7d-3f36-4966-a63f-f1f77dca030a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668903116@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668903116@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668903116@datadoghq.com\",\"uuid\":\"c7319ecf-1451-4031-817a-5bef597d5ac9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670604389@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670604389@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670604389@datadoghq.com\",\"uuid\":\"c7b7b86f-5268-4c20-b223-afc7923d54b9\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671754265@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671754265@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671754265@datadoghq.com\",\"uuid\":\"c8e6753d-801c-40b5-9dd8-c98feae31df9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926103@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926103@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926103@datadoghq.com\",\"uuid\":\"c9f53cd7-2f1e-4491-ae28-796ace9db6fc\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670371766@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670371766@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670371766@datadoghq.com\",\"uuid\":\"cac0f70c-c327-4965-b9f9-62190c96b0dc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671235873@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671235873@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671235873@datadoghq.com\",\"uuid\":\"cc1891b1-9a95-4af6-98d7-95ac53c4e6ff\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670943352@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670943352@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670943352@datadoghq.com\",\"uuid\":\"d0330853-c731-4097-a353-fd1014abde80\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667175027@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667175027@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667175027@datadoghq.com\",\"uuid\":\"d1d53f95-4adc-4e7b-896b-1e75ba345e9f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672186280@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672186280@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672186280@datadoghq.com\",\"uuid\":\"d70a12ec-c10f-47dd-9892-cebecfd6ffb0\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670199046@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670199046@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670199046@datadoghq.com\",\"uuid\":\"d968eb97-03c1-436e-835f-9ed06d352716\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670890367@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670890367@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670890367@datadoghq.com\",\"uuid\":\"d9a19936-2b5c-4fbc-b802-7a3dbf639c1b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670026261@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670026261@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670026261@datadoghq.com\",\"uuid\":\"ddd99aa3-c7e5-4dff-8099-10588153e164\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671495031@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671495031@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671495031@datadoghq.com\",\"uuid\":\"de662b96-845c-45b9-a359-b0b763a45a61\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670717454@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670717454@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670717454@datadoghq.com\",\"uuid\":\"def01997-ae71-49bc-93ea-ff9287d606c7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670112672@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670112672@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670112672@datadoghq.com\",\"uuid\":\"e09cd088-50f3-4a99-8222-0917d760f4fb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670924664@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670924664@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670924664@datadoghq.com\",\"uuid\":\"e0a87080-eb76-45db-9230-ed4ef629b0d2\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668730257@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668730257@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668730257@datadoghq.com\",\"uuid\":\"e21b3798-5777-4777-919d-e5ff6fce422a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667347836@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667347836@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667347836@datadoghq.com\",\"uuid\":\"e2267bdc-1a12-4210-869e-60d0faa477bd\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669248667@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669248667@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669248667@datadoghq.com\",\"uuid\":\"e42f7f54-0e83-4c40-b112-887402a7ba6b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669335019@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669335019@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669335019@datadoghq.com\",\"uuid\":\"e485ea7a-9a64-44dd-a774-d3f31e869f6e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669939809@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669939809@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669939809@datadoghq.com\",\"uuid\":\"e6d0a0d2-e642-4b20-aa66-34ab638f4d9f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672531837@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672531837@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672531837@datadoghq.com\",\"uuid\":\"e7403ce3-c0a2-4bae-8823-45a21c310656\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"uuid\":\"e84ce941-4c3d-4b79-b736-619897785a82\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668298272@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668298272@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668298272@datadoghq.com\",\"uuid\":\"e9b00493-1235-49f2-b229-06ee3afc79b0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669507847@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669507847@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669507847@datadoghq.com\",\"uuid\":\"ebf0848a-6b21-4736-ad2a-d93daf59fd15\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671322279@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671322279@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671322279@datadoghq.com\",\"uuid\":\"ebf23d4b-53c8-467a-bbb0-636c11b3ffee\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667606989@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667606989@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667606989@datadoghq.com\",\"uuid\":\"ec1ed77b-1d70-4727-b2ac-f478a37e3b8c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671062990@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671062990@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671062990@datadoghq.com\",\"uuid\":\"ee1307d6-f262-47be-b312-0f77517487b8\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672272657@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672272657@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672272657@datadoghq.com\",\"uuid\":\"efc56647-04f9-430b-abcd-78fd73135dc9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670598789@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670598789@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670598789@datadoghq.com\",\"uuid\":\"f6a52e1f-a5fc-4498-b0f2-69fee17a4142\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668211896@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668211896@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668211896@datadoghq.com\",\"uuid\":\"f8313d55-863c-4872-8f01-5a74e04418d2\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668816640@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668816640@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668816640@datadoghq.com\",\"uuid\":\"f92f0fb9-f3fd-42ff-955a-744cc01ee9a4\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670928947@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670928947@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670928947@datadoghq.com\",\"uuid\":\"f9e94170-240d-43ed-a3e4-dec65a38531b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670603299@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670603299@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670603299@datadoghq.com\",\"uuid\":\"fc061455-8536-4ea0-8a7c-d6bd072c5b89\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671408597@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671408597@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671408597@datadoghq.com\",\"uuid\":\"fd20bff8-5c0c-4eb2-941b-c0d7669f996a\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670603854@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670603854@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670603854@datadoghq.com\",\"uuid\":\"fdef06c9-5a21-44bb-afb4-14b055649e5b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667866318@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667866318@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667866318@datadoghq.com\",\"uuid\":\"fe4f352d-a8b5-435e-a18c-9914eb88c865\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926593@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926593@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926593@datadoghq.com\",\"uuid\":\"ff2e2858-cf28-44c7-98aa-be52cef329be\"}],\"time_to_resolve\":[{\"aggregates\":{\"max\":3.0,\"min\":1.0},\"name\":\"time_to_resolve\"}],\"commander\":[{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672013445@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672013445@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672013445@datadoghq.com\",\"uuid\":\"03e16d56-e954-4e9a-b9da-22dffdfa1f24\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666981015@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666981015@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666981015@datadoghq.com\",\"uuid\":\"03e65d16-b7bb-456a-a5da-bf31dffbdf4d\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669335011@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669335011@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669335011@datadoghq.com\",\"uuid\":\"04c4feaa-1864-4167-a48b-e156181d50d8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669248659@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669248659@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669248659@datadoghq.com\",\"uuid\":\"04f0d8b5-1959-43fb-85b5-782682062c4e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666743047@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666743047@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666743047@datadoghq.com\",\"uuid\":\"060c37c0-93a9-48c0-90bc-dee85b66a7c7\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670112680@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670112680@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670112680@datadoghq.com\",\"uuid\":\"09010d4b-7635-4553-a7b9-973f5f9cea5b\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667434335@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667434335@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667434335@datadoghq.com\",\"uuid\":\"0ebbf763-be8f-40bb-8ee7-d37b729a5eed\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668384644@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668384644@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668384644@datadoghq.com\",\"uuid\":\"1193cff3-b670-4e08-a535-346105dcaf9f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668643799@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668643799@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668643799@datadoghq.com\",\"uuid\":\"12d78e1b-0784-46f3-99ac-7e5db2d5c92e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671667884@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671667884@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671667884@datadoghq.com\",\"uuid\":\"1310687d-9adb-47ae-ad7a-066c9e525f8b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670927771@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670927771@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670927771@datadoghq.com\",\"uuid\":\"14344412-a7b1-4044-89f7-8139727432f6\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667261554@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667261554@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667261554@datadoghq.com\",\"uuid\":\"1608c46d-bee2-46a5-be87-49af2b889db5\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670929702@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670929702@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670929702@datadoghq.com\",\"uuid\":\"161217ca-a0b5-418c-b0e5-d16edddd8258\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670928949@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670928949@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670928949@datadoghq.com\",\"uuid\":\"16754b18-1887-4f22-ae44-4a86e9bfc749\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671754258@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671754258@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671754258@datadoghq.com\",\"uuid\":\"18ada30d-ad3e-4ba2-911d-931233a75aa0\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670285407@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670285407@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670285407@datadoghq.com\",\"uuid\":\"1bb87a6c-da01-4798-8bd0-5cd9918f641f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668903124@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668903124@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668903124@datadoghq.com\",\"uuid\":\"1bcb111e-ea64-4d60-9b77-ae5e7f22f157\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668039051@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668039051@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668039051@datadoghq.com\",\"uuid\":\"1c54a963-17f1-4ee8-a2b0-7fd07c3b2c68\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671149452@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671149452@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671149452@datadoghq.com\",\"uuid\":\"1ebe2367-3eda-464c-9571-edd444620682\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"uuid\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666915819@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666915819@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666915819@datadoghq.com\",\"uuid\":\"20be4a8a-b215-4bc0-b2fa-31c27e0a642b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671840707@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671840707@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671840707@datadoghq.com\",\"uuid\":\"20d2001a-92b4-4d03-a5cb-73617f27b723\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670594546@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670594546@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670594546@datadoghq.com\",\"uuid\":\"2399be00-e683-4133-aec2-7ab8fe73779e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667175034@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667175034@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667175034@datadoghq.com\",\"uuid\":\"24f932ba-4cd2-498e-8261-64f6ec161bcb\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672013452@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672013452@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672013452@datadoghq.com\",\"uuid\":\"2593795d-b0f5-46f9-a852-34d3c466ce0a\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667520677@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667520677@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667520677@datadoghq.com\",\"uuid\":\"26287ddb-5d1c-400d-96dc-a1d3bb09f880\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668557513@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668557513@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668557513@datadoghq.com\",\"uuid\":\"2871bc57-733f-4f85-b3ef-440569202326\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668471095@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668471095@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668471095@datadoghq.com\",\"uuid\":\"289f8508-500c-472e-a9d4-71f30f1cf151\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671667877@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671667877@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671667877@datadoghq.com\",\"uuid\":\"28ae893d-4b70-420d-96dc-f82066a0642f\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672531830@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672531830@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672531830@datadoghq.com\",\"uuid\":\"291b8416-a87d-4e56-a93e-9d430d5c4996\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671927057@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671927057@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671927057@datadoghq.com\",\"uuid\":\"2b0ac046-39c8-4bf4-a00a-deb089bbbc0c\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672445562@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672445562@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672445562@datadoghq.com\",\"uuid\":\"2db31432-b497-42b8-80b7-fef85898a2a8\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668039059@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668039059@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668039059@datadoghq.com\",\"uuid\":\"2ebfffc1-a7da-4558-a507-038442f7ee79\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669767030@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669767030@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669767030@datadoghq.com\",\"uuid\":\"2eca0bd9-db8e-4c5d-91b7-2ccddffd5764\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671235865@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671235865@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671235865@datadoghq.com\",\"uuid\":\"2fc6258a-7492-43c0-accf-24528cbbfea1\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669680686@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669680686@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669680686@datadoghq.com\",\"uuid\":\"302a3d05-c61c-41d8-ad31-8821b764acf7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669680678@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669680678@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669680678@datadoghq.com\",\"uuid\":\"31ad2923-926d-49af-ad5b-d8b120e6edc8\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671581470@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671581470@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671581470@datadoghq.com\",\"uuid\":\"34377484-e597-4d4c-bccf-88e919b6d549\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667693449@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667693449@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667693449@datadoghq.com\",\"uuid\":\"34e92512-7c24-4704-816e-4fadc9b5eff7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668211888@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668211888@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668211888@datadoghq.com\",\"uuid\":\"3578dcc8-088a-4320-8c27-7f80f1bba4cb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672186272@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672186272@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672186272@datadoghq.com\",\"uuid\":\"3584000d-6337-4c9e-955e-e25514b83be0\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671062982@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671062982@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671062982@datadoghq.com\",\"uuid\":\"3883d9fe-1678-452e-8801-11a374f9fdae\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667002244@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667002244@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667002244@datadoghq.com\",\"uuid\":\"39627294-7a14-4e71-b5ff-5221e68b6fbe\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671581462@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671581462@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671581462@datadoghq.com\",\"uuid\":\"3bc8406a-5790-4582-82f5-08e330921b9b\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668989431@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668989431@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668989431@datadoghq.com\",\"uuid\":\"3c28c823-158e-46c2-8dce-06f1dace90e8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669162240@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669162240@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669162240@datadoghq.com\",\"uuid\":\"3ce20d84-5e75-45a5-b7b9-971549a50cf4\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670458180@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670458180@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670458180@datadoghq.com\",\"uuid\":\"40d8c19a-8c6a-4f54-9444-aba7b6798064\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672099886@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672099886@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672099886@datadoghq.com\",\"uuid\":\"431624c4-d099-4dfb-b701-33a60bba6ebe\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669421482@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669421482@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669421482@datadoghq.com\",\"uuid\":\"442dd264-b729-473b-a51d-4b141068fe3d\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603297@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603297@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603297@datadoghq.com\",\"uuid\":\"446cd2d8-630c-4fe9-8901-fb85bd22426d\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668989438@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668989438@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668989438@datadoghq.com\",\"uuid\":\"46d62900-016b-463c-9fff-c8b4f946ce5c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670371777@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670371777@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670371777@datadoghq.com\",\"uuid\":\"48f7337b-3304-46fc-9e88-23b4dc5d24cc\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670943350@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670943350@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670943350@datadoghq.com\",\"uuid\":\"4b432133-ba1b-4edc-ab57-c0250963f250\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668816648@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668816648@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668816648@datadoghq.com\",\"uuid\":\"4e5cb15e-f18e-43ba-b115-2a4e62736739\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603851@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603851@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670603851@datadoghq.com\",\"uuid\":\"4e6b1824-dc1e-4691-8abd-5ffb968da7eb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669421474@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669421474@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669421474@datadoghq.com\",\"uuid\":\"4fdb4327-3660-4aeb-b403-7f7939493f27\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670458188@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670458188@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670458188@datadoghq.com\",\"uuid\":\"50d5408a-1894-4173-9fa1-32209009d9b1\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670803787@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670803787@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670803787@datadoghq.com\",\"uuid\":\"521a78f7-573e-4b67-8e2c-d0dd5d91a265\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666743039@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666743039@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666743039@datadoghq.com\",\"uuid\":\"54b84ea9-ae9f-4159-b226-aba3b432a792\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670929700@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670929700@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670929700@datadoghq.com\",\"uuid\":\"5705f818-933e-4ef4-818c-615b06f80fd1\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668557521@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668557521@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668557521@datadoghq.com\",\"uuid\":\"577067f0-c41d-4928-8964-0f7725e8cf68\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666829448@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666829448@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666829448@datadoghq.com\",\"uuid\":\"586e086f-1e29-4689-99b6-641c3218b0a8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667261546@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667261546@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667261546@datadoghq.com\",\"uuid\":\"59c9cd2e-cd40-4530-ba50-415bce89b133\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670976638@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670976638@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670976638@datadoghq.com\",\"uuid\":\"5baf69e4-9bd6-4c76-b552-2bfee88031b5\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668298265@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668298265@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668298265@datadoghq.com\",\"uuid\":\"5c4ecf79-7ffb-47ea-9331-687b04ac9df8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671840699@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671840699@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671840699@datadoghq.com\",\"uuid\":\"5ce42d6d-a0b9-4d0f-893b-aa0b8f30ee5c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672445570@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672445570@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672445570@datadoghq.com\",\"uuid\":\"5d11019d-f1dc-468d-a20a-8e64e7af9494\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670976646@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670976646@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670976646@datadoghq.com\",\"uuid\":\"5db9c599-b71f-40c6-84d9-8ca8779004e1\"},{\"count\":1,\"handle\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672791107@datadoghq.com\",\"name\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672791107@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672791107@datadoghq.com\",\"uuid\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667088640@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667088640@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667088640@datadoghq.com\",\"uuid\":\"61d88713-957f-4920-8a3b-65f0ccd79b57\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670026253@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670026253@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670026253@datadoghq.com\",\"uuid\":\"623452c3-d694-466a-95b9-140a9c44a1ab\"},{\"count\":1,\"handle\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672791115@datadoghq.com\",\"name\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672791115@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672791115@datadoghq.com\",\"uuid\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667520669@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667520669@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667520669@datadoghq.com\",\"uuid\":\"6887723d-dbde-4969-bba8-e9b3464645ce\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667952700@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667952700@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667952700@datadoghq.com\",\"uuid\":\"6c22fc34-31d7-4085-948b-d862feb447fe\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671149459@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671149459@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671149459@datadoghq.com\",\"uuid\":\"6ccce5fc-d6a8-416d-921b-f883914b67ad\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669594231@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669594231@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669594231@datadoghq.com\",\"uuid\":\"6d550b97-297b-43ea-a3dc-85383cf72fba\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671927065@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671927065@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671927065@datadoghq.com\",\"uuid\":\"6d7f7052-6ddb-461f-a49f-6cb5fca6b2c8\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670927769@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670927769@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670927769@datadoghq.com\",\"uuid\":\"6efabec4-24bc-46bd-8f53-e068f03adbf0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670717462@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670717462@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670717462@datadoghq.com\",\"uuid\":\"70532155-9800-46d9-89ed-bd41347c3dfd\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671322271@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671322271@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671322271@datadoghq.com\",\"uuid\":\"7247d247-e798-4af5-b9ce-7bf786c4d0c7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672359091@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672359091@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672359091@datadoghq.com\",\"uuid\":\"73546355-1adc-4289-908a-2f6fae7fc9fa\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666979688@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666979688@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666979688@datadoghq.com\",\"uuid\":\"74d4e917-96f7-4cef-afb6-97e8044a1944\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669507839@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669507839@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669507839@datadoghq.com\",\"uuid\":\"7571121d-a654-4df8-9afa-e638f17d53bb\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668384652@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668384652@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668384652@datadoghq.com\",\"uuid\":\"7da5fc01-ccbd-4679-8149-cb22fe402bb3\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667779824@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667779824@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667779824@datadoghq.com\",\"uuid\":\"7dd124ba-7343-4882-b700-c44374efa8e3\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670926105@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670926105@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670926105@datadoghq.com\",\"uuid\":\"81831280-6cb1-4a01-9dc9-f68b1405f8f6\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670199054@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670199054@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670199054@datadoghq.com\",\"uuid\":\"847f57aa-1b32-4eee-8447-e6eef1f6744f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670630968@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670630968@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670630968@datadoghq.com\",\"uuid\":\"853cce16-d7d3-4bd6-8f99-b1eab0407cf1\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672099877@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672099877@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672099877@datadoghq.com\",\"uuid\":\"862d085b-48ce-446e-a74f-ae3538d623f5\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667434343@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667434343@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667434343@datadoghq.com\",\"uuid\":\"88c2cdf6-2769-4e68-9503-38d3f166ff1a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668643791@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668643791@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668643791@datadoghq.com\",\"uuid\":\"8a2d2c9d-c478-4a74-94a8-cabb28bd1473\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"uuid\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667866310@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667866310@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667866310@datadoghq.com\",\"uuid\":\"8f8399af-4d57-41a1-91a3-37c29fb62092\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670630960@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670630960@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670630960@datadoghq.com\",\"uuid\":\"8fa60296-198c-4113-8f21-0ba09e4fd83e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666829456@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666829456@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666829456@datadoghq.com\",\"uuid\":\"91a8dc0a-0c63-4411-b9ab-39ec37dc2eee\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669939802@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669939802@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669939802@datadoghq.com\",\"uuid\":\"92c4c4e2-d881-485c-9668-0aa68239c513\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667088632@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667088632@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667088632@datadoghq.com\",\"uuid\":\"93e8df0e-729e-4d2f-b0a4-9495ffb37b06\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670598792@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670598792@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670598792@datadoghq.com\",\"uuid\":\"94d92a17-4768-48dd-97b4-ab32fee4e33b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669853467@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669853467@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669853467@datadoghq.com\",\"uuid\":\"94f7179d-40a0-4790-9436-6080eb0db034\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669075853@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669075853@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669075853@datadoghq.com\",\"uuid\":\"96796850-b278-4313-a726-9cf5c832fe30\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670594544@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670594544@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670594544@datadoghq.com\",\"uuid\":\"9b26b565-e0c1-4777-a693-553a8d5cb243\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670285415@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670285415@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670285415@datadoghq.com\",\"uuid\":\"9b9fe3ac-f73b-43a5-b570-43d156e07ea9\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670926595@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670926595@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670926595@datadoghq.com\",\"uuid\":\"9c09fbea-fce4-4c02-9a45-ec845bab938a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670544898@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670544898@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670544898@datadoghq.com\",\"uuid\":\"9c58a1dc-6beb-4390-928e-ed9d95b13b30\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667693441@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667693441@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667693441@datadoghq.com\",\"uuid\":\"9ccf5d51-55b4-43e0-ad79-7819a8d223f0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666979690@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666979690@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666979690@datadoghq.com\",\"uuid\":\"9e072255-5184-44a8-ae5f-a8e70ec5037c\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668125498@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668125498@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668125498@datadoghq.com\",\"uuid\":\"9f5a1546-bccf-4b9f-a25f-96fb87bd7bfc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669162248@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669162248@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669162248@datadoghq.com\",\"uuid\":\"9f88a5e0-9842-4fd1-95c7-7f85edad3874\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1666981017@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1666981017@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1666981017@datadoghq.com\",\"uuid\":\"a136a629-05cd-4a2f-b925-e1d74c6a69ad\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670803795@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670803795@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670803795@datadoghq.com\",\"uuid\":\"a18c9430-e993-488f-8b5c-3ad27997e55c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"uuid\":\"a4230eac-f78e-407d-8551-b07c6476622b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669767038@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669767038@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669767038@datadoghq.com\",\"uuid\":\"a9977d83-cddd-4644-ba02-dc1a86c0293e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667606997@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667606997@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667606997@datadoghq.com\",\"uuid\":\"ab5bb1f0-b9b2-43da-bd50-e5ba7315fc29\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672272649@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672272649@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672272649@datadoghq.com\",\"uuid\":\"ac484716-4260-4fd9-8288-1d4a6b0d39da\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672359099@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672359099@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672359099@datadoghq.com\",\"uuid\":\"b12b859b-c89a-4023-84e6-2634f93fff00\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667347843@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667347843@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667347843@datadoghq.com\",\"uuid\":\"b2f195b3-53b7-4095-bfb8-90538edb12f7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667779816@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667779816@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667779816@datadoghq.com\",\"uuid\":\"b335a7f4-a66e-41ed-b4aa-982c5b76ffc1\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670890374@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670890374@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670890374@datadoghq.com\",\"uuid\":\"b3ccf662-7d0d-4a45-9cb3-5ffcb089012c\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669594223@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669594223@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669594223@datadoghq.com\",\"uuid\":\"b4a8f9a4-28a9-4311-a813-8149eb5264f4\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671408605@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671408605@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671408605@datadoghq.com\",\"uuid\":\"b7d64361-36fd-4ebd-9438-949f60ec3745\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670604391@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670604391@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670604391@datadoghq.com\",\"uuid\":\"b8fa89c4-34f6-4b69-a654-e3671ce743a0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668471103@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668471103@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668471103@datadoghq.com\",\"uuid\":\"b9d64d92-66de-41cc-9164-b83b7b74439f\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669853460@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669853460@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669853460@datadoghq.com\",\"uuid\":\"bc036552-b05e-4ffd-8dd1-44dbe725a6ec\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670544906@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670544906@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670544906@datadoghq.com\",\"uuid\":\"bcb9456d-8b65-4369-b2c4-49ee5e4c14b7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667952692@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667952692@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667952692@datadoghq.com\",\"uuid\":\"be421a73-22de-48d3-be3f-1a269016ff83\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666915811@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666915811@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1666915811@datadoghq.com\",\"uuid\":\"c20da1a9-657e-4b5a-9159-9f4d324f51fc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671495039@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671495039@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671495039@datadoghq.com\",\"uuid\":\"c23885b0-3659-4d47-b5c9-16c0965dc7d9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668730249@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668730249@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668730249@datadoghq.com\",\"uuid\":\"c36f2608-4650-4331-b810-1dc5500c1356\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670924666@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670924666@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670924666@datadoghq.com\",\"uuid\":\"c381f80b-8a88-47bd-9dbe-77720d784a52\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669075846@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669075846@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1669075846@datadoghq.com\",\"uuid\":\"c39f3031-906f-4679-a817-9b8f072254bb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667002236@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667002236@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667002236@datadoghq.com\",\"uuid\":\"c567f0fa-6f70-42e3-855e-2ae1d2ed7243\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668125506@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668125506@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668125506@datadoghq.com\",\"uuid\":\"c60a0f7d-3f36-4966-a63f-f1f77dca030a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668903116@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668903116@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668903116@datadoghq.com\",\"uuid\":\"c7319ecf-1451-4031-817a-5bef597d5ac9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670604389@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670604389@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670604389@datadoghq.com\",\"uuid\":\"c7b7b86f-5268-4c20-b223-afc7923d54b9\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671754265@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671754265@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671754265@datadoghq.com\",\"uuid\":\"c8e6753d-801c-40b5-9dd8-c98feae31df9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926103@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926103@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926103@datadoghq.com\",\"uuid\":\"c9f53cd7-2f1e-4491-ae28-796ace9db6fc\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670371766@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670371766@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670371766@datadoghq.com\",\"uuid\":\"cac0f70c-c327-4965-b9f9-62190c96b0dc\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671235873@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671235873@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671235873@datadoghq.com\",\"uuid\":\"cc1891b1-9a95-4af6-98d7-95ac53c4e6ff\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670943352@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670943352@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670943352@datadoghq.com\",\"uuid\":\"d0330853-c731-4097-a353-fd1014abde80\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667175027@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667175027@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667175027@datadoghq.com\",\"uuid\":\"d1d53f95-4adc-4e7b-896b-1e75ba345e9f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672186280@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672186280@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672186280@datadoghq.com\",\"uuid\":\"d70a12ec-c10f-47dd-9892-cebecfd6ffb0\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670199046@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670199046@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670199046@datadoghq.com\",\"uuid\":\"d968eb97-03c1-436e-835f-9ed06d352716\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670890367@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670890367@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670890367@datadoghq.com\",\"uuid\":\"d9a19936-2b5c-4fbc-b802-7a3dbf639c1b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670026261@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670026261@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670026261@datadoghq.com\",\"uuid\":\"ddd99aa3-c7e5-4dff-8099-10588153e164\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671495031@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671495031@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671495031@datadoghq.com\",\"uuid\":\"de662b96-845c-45b9-a359-b0b763a45a61\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670717454@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670717454@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670717454@datadoghq.com\",\"uuid\":\"def01997-ae71-49bc-93ea-ff9287d606c7\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670112672@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670112672@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670112672@datadoghq.com\",\"uuid\":\"e09cd088-50f3-4a99-8222-0917d760f4fb\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670924664@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670924664@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670924664@datadoghq.com\",\"uuid\":\"e0a87080-eb76-45db-9230-ed4ef629b0d2\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668730257@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668730257@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668730257@datadoghq.com\",\"uuid\":\"e21b3798-5777-4777-919d-e5ff6fce422a\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667347836@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667347836@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667347836@datadoghq.com\",\"uuid\":\"e2267bdc-1a12-4210-869e-60d0faa477bd\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669248667@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669248667@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669248667@datadoghq.com\",\"uuid\":\"e42f7f54-0e83-4c40-b112-887402a7ba6b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669335019@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669335019@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669335019@datadoghq.com\",\"uuid\":\"e485ea7a-9a64-44dd-a774-d3f31e869f6e\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669939809@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669939809@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669939809@datadoghq.com\",\"uuid\":\"e6d0a0d2-e642-4b20-aa66-34ab638f4d9f\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672531837@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672531837@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672531837@datadoghq.com\",\"uuid\":\"e7403ce3-c0a2-4bae-8823-45a21c310656\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"uuid\":\"e84ce941-4c3d-4b79-b736-619897785a82\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668298272@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668298272@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668298272@datadoghq.com\",\"uuid\":\"e9b00493-1235-49f2-b229-06ee3afc79b0\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1669507847@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1669507847@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1669507847@datadoghq.com\",\"uuid\":\"ebf0848a-6b21-4736-ad2a-d93daf59fd15\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671322279@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671322279@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671322279@datadoghq.com\",\"uuid\":\"ebf23d4b-53c8-467a-bbb0-636c11b3ffee\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667606989@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667606989@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1667606989@datadoghq.com\",\"uuid\":\"ec1ed77b-1d70-4727-b2ac-f478a37e3b8c\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1671062990@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1671062990@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1671062990@datadoghq.com\",\"uuid\":\"ee1307d6-f262-47be-b312-0f77517487b8\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1672272657@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1672272657@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1672272657@datadoghq.com\",\"uuid\":\"efc56647-04f9-430b-abcd-78fd73135dc9\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670598789@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670598789@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670598789@datadoghq.com\",\"uuid\":\"f6a52e1f-a5fc-4498-b0f2-69fee17a4142\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1668211896@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1668211896@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1668211896@datadoghq.com\",\"uuid\":\"f8313d55-863c-4872-8f01-5a74e04418d2\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668816640@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668816640@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1668816640@datadoghq.com\",\"uuid\":\"f92f0fb9-f3fd-42ff-955a-744cc01ee9a4\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670928947@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670928947@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670928947@datadoghq.com\",\"uuid\":\"f9e94170-240d-43ed-a3e4-dec65a38531b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670603299@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670603299@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670603299@datadoghq.com\",\"uuid\":\"fc061455-8536-4ea0-8a7c-d6bd072c5b89\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671408597@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671408597@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1671408597@datadoghq.com\",\"uuid\":\"fd20bff8-5c0c-4eb2-941b-c0d7669f996a\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1670603854@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1670603854@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1670603854@datadoghq.com\",\"uuid\":\"fdef06c9-5a21-44bb-afb4-14b055649e5b\"},{\"count\":1,\"handle\":\"test-go-create_an_incident_returns_created_response-1667866318@datadoghq.com\",\"name\":\"test-go-create_an_incident_returns_created_response-1667866318@datadoghq.com\",\"email\":\"test-go-create_an_incident_returns_created_response-1667866318@datadoghq.com\",\"uuid\":\"fe4f352d-a8b5-435e-a18c-9914eb88c865\"},{\"count\":1,\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926593@datadoghq.com\",\"name\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926593@datadoghq.com\",\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1670926593@datadoghq.com\",\"uuid\":\"ff2e2858-cf28-44c7-98aa-be52cef329be\"}],\"time_to_repair\":[{\"aggregates\":{\"max\":null,\"min\":null},\"name\":\"time_to_repair\"}],\"state\":[{\"count\":510,\"name\":\"active\"},{\"count\":170,\"name\":\"resolved\"},{\"count\":0,\"name\":\"stable\"}],\"customer_impacted\":[{\"count\":680,\"name\":0},{\"count\":0,\"name\":true}],\"last_modified_by\":[{\"count\":568,\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},{\"count\":112,\"handle\":\"frog@datadoghq.com\",\"name\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}],\"postmortem\":[{\"count\":680,\"name\":\"No\"},{\"count\":0,\"name\":\"Yes\"}],\"created_by\":[{\"count\":568,\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},{\"count\":112,\"handle\":\"frog@datadoghq.com\",\"name\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}]},\"incidents\":[{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"632452f7-bacf-57b8-8e8f-99a9aac6b732\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117203,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672791134-updated\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:12:14+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"resolved\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":3,\"field_analytics\":{\"state\":{\"active\":{\"duration\":3,\"spans\":[{\"start\":1672791134,\"end\":1672791137}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672791137,\"end\":null}]}}},\"created\":\"2023-01-04T00:12:14+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-04T00:12:17+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":\"2023-01-04T00:12:17+00:00\",\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"2c9caa16-2f7c-5559-9eaf-605e75165992\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"5c28b141-4d5c-5219-8cd3-eabd7fb72835\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117202,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Remove_commander_from_an_incident_returns_OK_response-1672791131\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:12:11+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791132,\"end\":null}]}}},\"created\":\"2023-01-04T00:12:12+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-04T00:12:14+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"aae06082-34e0-572c-95eb-db2820d38eda\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117201,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_the_details_of_an_incident_returns_OK_response-1672791129\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:12:09+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791129,\"end\":null}]}}},\"created\":\"2023-01-04T00:12:09+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-04T00:12:09+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"325bff5b-6e7e-5591-b1c9-aded3d69f572\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"37710d9b-0b57-524e-8cab-2a55684f9c9e\"}]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"1c19106e-80cc-5b01-b5c0-09921e057997\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117200,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_incident_attachments_returns_OK_response-1672791124\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:12:04+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791124,\"end\":null}]}}},\"created\":\"2023-01-04T00:12:04+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-04T00:12:04+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"e1212490-ca36-5912-991e-663241e9f077\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117199,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_a_list_of_incidents_returns_OK_response-1672791121\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:12:01+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791121,\"end\":null}]}}},\"created\":\"2023-01-04T00:12:01+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-04T00:12:01+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"3f575b77-9b89-5187-a835-0e1aa8d73f38\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\"}},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"abf4c288-ce9c-56cc-9100-4be2da1ed945\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117197,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":{\"data\":{\"attributes\":{\"email\":\"test-go-create_an_incident_returns_created_response-1672791115@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/bb1b3be196d5d7225b7f3eef58b5e2e1?s=48&d=retro\",\"handle\":\"test-go-create_an_incident_returns_created_response-1672791115@datadoghq.com\",\"name\":\"\",\"uuid\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\"},\"type\":\"users\",\"id\":\"65b38b0e-8bc4-11ed-81c7-fed5bfaa3f3d\"}},\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672791115\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:11:57+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"resolved\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672791117,\"end\":null}]}}},\"created\":\"2023-01-04T00:11:57+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-04T00:11:57+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"61b4382f-f362-5228-8756-b98461208aa6\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"9864e73c-82df-5f1b-a6ef-2051649e55ae\"}]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"9027dcfd-cc8c-533f-9d65-99c0c10089c7\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117196,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Create_an_incident_attachment_returns_OK_response-1672791112\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:11:52+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791112,\"end\":null}]}}},\"created\":\"2023-01-04T00:11:52+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-04T00:11:52+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"6316c8bf-c371-5533-8db4-a6ff1d8f635a\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\"}},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"08fb7533-0dcb-5e00-be95-34e679aca740\"},{\"type\":\"incident_responders\",\"id\":\"1b29da40-d487-5548-9735-f570435e56e2\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117195,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":{\"data\":{\"attributes\":{\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672791107@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/fee7315f03d359fcc7d7b96a2bfde509?s=48&d=retro\",\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672791107@datadoghq.com\",\"name\":\"\",\"uuid\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\"},\"type\":\"users\",\"id\":\"610753d8-8bc4-11ed-94a1-26632eba8bed\"}},\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672791107\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-04T00:11:49+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672791109,\"end\":null}]}}},\"created\":\"2023-01-04T00:11:49+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-04T00:11:52+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"1bd22b70-a2a4-5043-887b-6967510a4f6c\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"744f15f8-5e8a-5c54-8c9b-7061e29e6d43\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117093,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672704745-updated\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:26+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"resolved\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":2,\"field_analytics\":{\"state\":{\"active\":{\"duration\":2,\"spans\":[{\"start\":1672704746,\"end\":1672704748}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672704748,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:26+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-03T00:12:28+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":\"2023-01-03T00:12:28+00:00\",\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"adbe3989-0704-5cf8-b2d0-323f5e2a8032\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"3bccfa3b-bbf2-5c06-89a8-86a7499f6535\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117092,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Remove_commander_from_an_incident_returns_OK_response-1672704743\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:23+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704743,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:23+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-03T00:12:25+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"0a5b2395-7e16-5417-83d1-b78ad950d070\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117091,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_the_details_of_an_incident_returns_OK_response-1672704740\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:20+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704740,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:20+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-03T00:12:20+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"0367372f-2036-51f5-99cf-33563e9c1f45\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"65f751cb-5c20-5de6-b0e3-2b2c2c74eb24\"}]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"bc9d0105-0603-5c6d-8642-248a2d9591f6\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117090,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_incident_attachments_returns_OK_response-1672704736\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:16+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704736,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:16+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-03T00:12:16+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"7db1b077-c521-5503-96e3-dec958978fc7\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117089,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_a_list_of_incidents_returns_OK_response-1672704733\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:13+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704733,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:13+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-03T00:12:13+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"4d9dd3dd-7052-5815-bc4f-316d60faaf74\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"a4230eac-f78e-407d-8551-b07c6476622b\"}},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"a2cf37eb-d9a1-5da4-8b29-006062c63e27\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117087,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":{\"data\":{\"attributes\":{\"email\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/0525262fe05a13b8759a523b34d5d882?s=48&d=retro\",\"handle\":\"test-go-create_an_incident_returns_created_response-1672704726@datadoghq.com\",\"name\":\"\",\"uuid\":\"a4230eac-f78e-407d-8551-b07c6476622b\"},\"type\":\"users\",\"id\":\"a4230eac-f78e-407d-8551-b07c6476622b\"}},\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672704726\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:09+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"resolved\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672704729,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:09+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-03T00:12:09+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"13c25a39-8ee8-5995-a740-3714f3200333\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"e09687c7-749d-568b-a6a5-8c97064781db\"}]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"e06f394b-94be-5f66-aa6d-1e30fc83ce15\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117086,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Create_an_incident_attachment_returns_OK_response-1672704724\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:04+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704724,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:04+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-03T00:12:04+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"e7479f51-aabc-5e4e-9c94-97f2b41d601f\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\"}},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"daa2749b-8f6f-515b-8376-6b8619bfd669\"},{\"type\":\"incident_responders\",\"id\":\"59fe2d64-96ff-546e-929a-291aa544639f\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":117085,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":{\"data\":{\"attributes\":{\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/2799a6c94b04914f4d154230b5edcab3?s=48&d=retro\",\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672704719@datadoghq.com\",\"name\":\"\",\"uuid\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\"},\"type\":\"users\",\"id\":\"8e85e36f-5ccd-4052-a34e-d7338178914e\"}},\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672704719\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-03T00:12:01+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672704721,\"end\":null}]}}},\"created\":\"2023-01-03T00:12:01+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-03T00:12:03+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"c7bb0342-1a44-5857-8ab2-1fe4929a4d04\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"6d2c22d1-db02-5b17-bbb2-dca33b221f45\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116985,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672618365-updated\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:45+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"resolved\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":3,\"field_analytics\":{\"state\":{\"active\":{\"duration\":3,\"spans\":[{\"start\":1672618365,\"end\":1672618368}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672618368,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:45+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-02T00:12:48+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":\"2023-01-02T00:12:48+00:00\",\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"8b4f2baf-75c6-5992-b7f4-3059ba7d9a09\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"c3ab396e-0046-5adc-a429-26eeea1e408c\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116984,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Remove_commander_from_an_incident_returns_OK_response-1672618362\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:43+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618363,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:43+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-02T00:12:45+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"4e7f047b-f510-54d9-a46e-e680896f27df\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116983,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_the_details_of_an_incident_returns_OK_response-1672618360\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:40+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618360,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:40+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-02T00:12:40+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"58407390-5743-5b3e-8630-21ca058e406a\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"bcb80eba-bc32-5f0f-9a62-6efb59012530\"}]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"0271185a-46c5-5969-94ef-d6fbeaf592f6\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116982,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_incident_attachments_returns_OK_response-1672618355\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:35+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618355,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:35+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-02T00:12:35+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"fbcec095-5b9d-5e9b-a440-bbd87014e4de\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116981,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Get_a_list_of_incidents_returns_OK_response-1672618352\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:32+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618352,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:32+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-02T00:12:32+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"4154152c-f7f6-560e-878c-48968cfce69c\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"e84ce941-4c3d-4b79-b736-619897785a82\"}},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"68b00b90-08de-5b5c-a91f-80caab081745\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116979,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":{\"data\":{\"attributes\":{\"email\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/2384e4fc83a34385611de13f7c92e933?s=48&d=retro\",\"handle\":\"test-go-create_an_incident_returns_created_response-1672618346@datadoghq.com\",\"name\":\"\",\"uuid\":\"e84ce941-4c3d-4b79-b736-619897785a82\"},\"type\":\"users\",\"id\":\"e84ce941-4c3d-4b79-b736-619897785a82\"}},\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Create_an_incident_returns_CREATED_response-1672618346\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:29+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"resolved\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672618349,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:29+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-02T00:12:29+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"ba6388a5-fff1-52ce-b171-5096ca4c7c41\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[{\"type\":\"incident_attachments\",\"id\":\"29248789-7309-5070-af26-4d79b1923a51\"}]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"2303ffbe-3496-5356-9604-5ee47462bd55\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116978,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Create_an_incident_attachment_returns_OK_response-1672618344\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:24+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618344,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:24+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-02T00:12:24+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"55dff457-92d9-586d-9074-369a975e5393\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\"}},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"15a13dfd-ff70-5a0f-b4e1-17a295cf3f6a\"},{\"type\":\"incident_responders\",\"id\":\"60592e7b-5548-5784-8dbe-db7f805cb954\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116977,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":{\"data\":{\"attributes\":{\"email\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/00805e4c643bee01f2ca28248bc352ae?s=48&d=retro\",\"handle\":\"test-go-add_commander_to_an_incident_returns_ok_response-1672618338@datadoghq.com\",\"name\":\"\",\"uuid\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\"},\"type\":\"users\",\"id\":\"1fd5cef4-df5c-4609-be9a-11bf76483cfc\"}},\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Add_commander_to_an_incident_returns_OK_response-1672618338\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-02T00:12:21+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"active\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1672618341,\"end\":null}]}}},\"created\":\"2023-01-02T00:12:21+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"modified\":\"2023-01-02T00:12:23+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":null,\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"e0c6c509-cec0-53ec-972f-2f72b9e5219f\"}},{\"data\":{\"relationships\":{\"commander_user\":{\"data\":null},\"attachments\":{\"data\":[]},\"impacts\":{\"data\":[]},\"integrations\":{\"data\":[]},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"user_defined_fields\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"2997bd45-ac4d-5569-ae39-072ce0fff20b\"}]}},\"attributes\":{\"customer_impact_scope\":\"\",\"public_id\":116885,\"created_by_uuid\":null,\"customer_impact_start\":null,\"commander\":null,\"customer_impacted\":false,\"time_to_internal_response\":0,\"time_to_detect\":0,\"severity\":\"UNKNOWN\",\"title\":\"Test-Go-Update_an_existing_incident_returns_OK_response-1672531855-updated\",\"creation_idempotency_key\":null,\"detected\":\"2023-01-01T00:10:55+00:00\",\"created_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"notification_handles\":null,\"state\":\"resolved\",\"non_datadog_creator\":null,\"customer_impact_duration\":0,\"customer_impact_end\":null,\"visibility\":\"organization\",\"time_to_resolve\":3,\"field_analytics\":{\"state\":{\"active\":{\"duration\":3,\"spans\":[{\"start\":1672531855,\"end\":1672531858}]},\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1672531858,\"end\":null}]}}},\"created\":\"2023-01-01T00:10:55+00:00\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"modified\":\"2023-01-01T00:10:58+00:00\",\"last_modified_by\":{\"data\":{\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b7c189b5b4c2c429d7c1e0bc3749330e?s=48&d=retro\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"type\":\"users\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}},\"time_to_repair\":0,\"resolved\":\"2023-01-01T00:10:58+00:00\",\"last_modified_by_uuid\":null},\"type\":\"incidents\",\"id\":\"504cf0bf-68f7-52a3-bb9c-b8f603c36137\"}}]},\"relationships\":{\"incidents_relationship\":{\"data\":[{\"type\":\"incidents\",\"id\":\"2c9caa16-2f7c-5559-9eaf-605e75165992\"},{\"type\":\"incidents\",\"id\":\"aae06082-34e0-572c-95eb-db2820d38eda\"},{\"type\":\"incidents\",\"id\":\"325bff5b-6e7e-5591-b1c9-aded3d69f572\"},{\"type\":\"incidents\",\"id\":\"e1212490-ca36-5912-991e-663241e9f077\"},{\"type\":\"incidents\",\"id\":\"3f575b77-9b89-5187-a835-0e1aa8d73f38\"},{\"type\":\"incidents\",\"id\":\"61b4382f-f362-5228-8756-b98461208aa6\"},{\"type\":\"incidents\",\"id\":\"6316c8bf-c371-5533-8db4-a6ff1d8f635a\"},{\"type\":\"incidents\",\"id\":\"1bd22b70-a2a4-5043-887b-6967510a4f6c\"},{\"type\":\"incidents\",\"id\":\"adbe3989-0704-5cf8-b2d0-323f5e2a8032\"},{\"type\":\"incidents\",\"id\":\"0a5b2395-7e16-5417-83d1-b78ad950d070\"},{\"type\":\"incidents\",\"id\":\"0367372f-2036-51f5-99cf-33563e9c1f45\"},{\"type\":\"incidents\",\"id\":\"7db1b077-c521-5503-96e3-dec958978fc7\"},{\"type\":\"incidents\",\"id\":\"4d9dd3dd-7052-5815-bc4f-316d60faaf74\"},{\"type\":\"incidents\",\"id\":\"13c25a39-8ee8-5995-a740-3714f3200333\"},{\"type\":\"incidents\",\"id\":\"e7479f51-aabc-5e4e-9c94-97f2b41d601f\"},{\"type\":\"incidents\",\"id\":\"c7bb0342-1a44-5857-8ab2-1fe4929a4d04\"},{\"type\":\"incidents\",\"id\":\"8b4f2baf-75c6-5992-b7f4-3059ba7d9a09\"},{\"type\":\"incidents\",\"id\":\"4e7f047b-f510-54d9-a46e-e680896f27df\"},{\"type\":\"incidents\",\"id\":\"58407390-5743-5b3e-8630-21ca058e406a\"},{\"type\":\"incidents\",\"id\":\"fbcec095-5b9d-5e9b-a440-bbd87014e4de\"},{\"type\":\"incidents\",\"id\":\"4154152c-f7f6-560e-878c-48968cfce69c\"},{\"type\":\"incidents\",\"id\":\"ba6388a5-fff1-52ce-b171-5096ca4c7c41\"},{\"type\":\"incidents\",\"id\":\"55dff457-92d9-586d-9074-369a975e5393\"},{\"type\":\"incidents\",\"id\":\"e0c6c509-cec0-53ec-972f-2f72b9e5219f\"},{\"type\":\"incidents\",\"id\":\"504cf0bf-68f7-52a3-bb9c-b8f603c36137\"}]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 04 Jan 2023 00:33:33 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/698787fa-35d4-5950-8697-80c4e83ed1c5"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 04 Jan 2023 00:33:33 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Search_for_incidents_returns_OK_response-1699302337\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"e3d37bc4-d7ee-55f8-87d7-651729afc766\",\"attributes\":{\"public_id\":174814,\"incident_type_uuid\":null,\"title\":\"Test-Search_for_incidents_returns_OK_response-1699302337\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:37.187440+00:00\",\"modified\":\"2023-11-06T20:25:37.187440+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:37.163541+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:37 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/incidents/search?query=state%3A%28active%20OR%20stable%20OR%20resolved%29"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents_search_results\",\"attributes\":{\"total\":15,\"facets\":{\"severity\":[{\"name\":\"UNKNOWN\",\"count\":15},{\"name\":\"SEV-1\",\"count\":0},{\"name\":\"SEV-2\",\"count\":0},{\"name\":\"SEV-3\",\"count\":0},{\"name\":\"SEV-4\",\"count\":0},{\"name\":\"SEV-5\",\"count\":0}],\"time_to_repair\":[{\"name\":\"time_to_repair\",\"aggregates\":{\"min\":null,\"max\":null}}],\"visibility\":[{\"name\":\"organization\",\"count\":15}],\"responder\":[{\"name\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\",\"count\":1,\"handle\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\",\"uuid\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\",\"email\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\"}],\"impact\":[{\"name\":\"none\",\"count\":15}],\"postmortem\":[{\"name\":\"No\",\"count\":15},{\"name\":\"Yes\",\"count\":0}],\"time_to_resolve\":[{\"name\":\"time_to_resolve\",\"aggregates\":{\"min\":null,\"max\":null}}],\"state\":[{\"name\":\"active\",\"count\":14},{\"name\":\"resolved\",\"count\":1},{\"name\":\"stable\",\"count\":0}],\"customer_impacted\":[{\"name\":0,\"count\":15},{\"name\":true,\"count\":0}],\"fields\":[{\"name\":\"detection_method\",\"facets\":[{\"name\":\"unknown\",\"count\":15},{\"name\":\"customer\",\"count\":0},{\"name\":\"employee\",\"count\":0},{\"name\":\"monitor\",\"count\":0},{\"name\":\"other\",\"count\":0}]},{\"name\":\"root_cause\",\"facets\":[]},{\"name\":\"services\",\"facets\":[]},{\"name\":\"summary\",\"facets\":[]},{\"name\":\"teams\",\"facets\":[]}],\"created_by\":[{\"name\":\"frog@datadoghq.com\",\"count\":15,\"handle\":\"frog@datadoghq.com\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"email\":\"frog@datadoghq.com\"}],\"last_modified_by\":[{\"name\":\"frog@datadoghq.com\",\"count\":15,\"handle\":\"frog@datadoghq.com\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"email\":\"frog@datadoghq.com\"}],\"commander\":[{\"name\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\",\"count\":1,\"handle\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\",\"uuid\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\",\"email\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\"}]},\"incidents\":[{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:03+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Update_an_existing_incident_returns_OK_response-1699043763\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:03+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:03+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043763,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null}},\"public_id\":174193},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"96534427-6172-53bf-8cbe-215de5b207e1\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:03+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Update_an_incident_todo_returns_OK_response-1699043763\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:03+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:03+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043763,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"}},\"public_id\":174194},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"e729fbb8-4087-5227-8725-11e44fe85b5f\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:03+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Update_an_existing_incident_integration_metadata_returns_OK_response-1699043762\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:03+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:03+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043763,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"summary\":{\"type\":\"textbox\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"}},\"public_id\":174192},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"5af2ff33-ec8d-50c1-ae0b-77694ea77c89\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:02+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Remove_commander_from_an_incident_returns_OK_response-1699043762\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:02+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:02+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043762,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"public_id\":174191},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"68000356-e808-5571-b49a-109e96bc5e08\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:02+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Get_incident_integration_metadata_details_returns_OK_response-1699043761\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:02+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:02+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043762,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"public_id\":174189},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"e4b4a761-8426-5e8c-ac41-e151eee07af9\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:02+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Get_the_details_of_an_incident_returns_OK_response-1699043762\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:02+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:02+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043762,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"}},\"public_id\":174190},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"e70e2781-1df4-5e93-9210-7c672ff65a8c\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:01+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Get_a_list_of_incidents_returns_OK_response-1699043761\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:01+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:01+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043761,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"public_id\":174187},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"ce870e8d-cd51-5b58-92ef-2dfe01530066\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:01+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Get_incident_attachments_returns_OK_response-1699043761\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:01+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:01+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043761,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"public_id\":174188},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"9c68f2c7-256e-5e98-a176-97526fd9d257\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:00+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Delete_an_incident_integration_metadata_returns_OK_response-1699043760\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:00+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:00+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043760,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"public_id\":174185},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"19c70c0d-7e83-5f81-bcd2-75e0f90ee11f\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:00+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Delete_an_existing_incident_returns_OK_response-1699043760\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:00+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:00+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043760,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null}},\"public_id\":174184},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"1b45d550-12f7-55c8-89ed-826d688d3d1f\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:36:00+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Get_a_list_of_an_incident_s_integration_metadata_returns_OK_response-1699043760\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:36:00+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:36:00+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043761,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"public_id\":174186},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"0ddf94c4-47ec-5fbb-8827-101c1b2678e0\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:35:59+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Create_an_incident_returns_CREATED_response-1699043759\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:35:59+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:35:59+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1699043759,\"end\":null}]}}},\"state\":\"resolved\",\"notification_handles\":null,\"commander\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/f7303955721eab35c744ea91afdfe815?s=48&d=retro\",\"uuid\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\",\"name\":\"\",\"email\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\",\"handle\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\"},\"id\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\"}},\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"}},\"public_id\":174183},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"598eca3a-47d8-55a8-a2ca-0a95d0b9ec7c\"}]}},\"id\":\"233463fe-28bd-5361-9d14-98e2ac20f328\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:35:59+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Create_an_incident_integration_metadata_returns_CREATED_response-1699043758\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:35:59+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:35:59+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043759,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"summary\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"public_id\":174182},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"40eb208a-c867-5b51-97ee-e8efba340396\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:35:58+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Add_commander_to_an_incident_returns_OK_response-1699043757\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:35:58+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:35:58+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043758,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"}},\"public_id\":174180},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"53be4c9b-17c1-5109-9e61-f97804f78df0\"}},{\"data\":{\"type\":\"incidents\",\"attributes\":{\"time_to_repair\":0,\"creation_idempotency_key\":null,\"archived\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impacted\":false,\"incident_type_uuid\":null,\"created_by_uuid\":null,\"created\":\"2023-11-03T20:35:58+00:00\",\"time_to_internal_response\":0,\"title\":\"Test-Typescript-Create_an_incident_attachment_returns_OK_response-1699043758\",\"last_modified_by_uuid\":null,\"modified\":\"2023-11-03T20:35:58+00:00\",\"customer_impact_end\":null,\"created_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"detected\":\"2023-11-03T20:35:58+00:00\",\"non_datadog_creator\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"attributes\":{\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\"},\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"time_to_resolve\":0,\"time_to_detect\":0,\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043758,\"end\":null}]}}},\"state\":\"active\",\"notification_handles\":null,\"commander\":null,\"customer_impact_duration\":0,\"severity\":\"UNKNOWN\",\"case_id\":null,\"resolved\":null,\"visibility\":\"organization\",\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"public_id\":174181},\"relationships\":{\"user_defined_fields\":{\"data\":[]},\"attachments\":{\"data\":[]},\"commander_user\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"integrations\":{\"data\":[]},\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"impacts\":{\"data\":[]},\"responders\":{\"data\":[]}},\"id\":\"a72d6e86-3581-5a0c-9407-7c118a72e3b9\"}}]},\"relationships\":{\"incidents_relationship\":{\"data\":[{\"type\":\"incidents\",\"id\":\"96534427-6172-53bf-8cbe-215de5b207e1\"},{\"type\":\"incidents\",\"id\":\"e729fbb8-4087-5227-8725-11e44fe85b5f\"},{\"type\":\"incidents\",\"id\":\"5af2ff33-ec8d-50c1-ae0b-77694ea77c89\"},{\"type\":\"incidents\",\"id\":\"68000356-e808-5571-b49a-109e96bc5e08\"},{\"type\":\"incidents\",\"id\":\"e4b4a761-8426-5e8c-ac41-e151eee07af9\"},{\"type\":\"incidents\",\"id\":\"e70e2781-1df4-5e93-9210-7c672ff65a8c\"},{\"type\":\"incidents\",\"id\":\"ce870e8d-cd51-5b58-92ef-2dfe01530066\"},{\"type\":\"incidents\",\"id\":\"9c68f2c7-256e-5e98-a176-97526fd9d257\"},{\"type\":\"incidents\",\"id\":\"19c70c0d-7e83-5f81-bcd2-75e0f90ee11f\"},{\"type\":\"incidents\",\"id\":\"1b45d550-12f7-55c8-89ed-826d688d3d1f\"},{\"type\":\"incidents\",\"id\":\"0ddf94c4-47ec-5fbb-8827-101c1b2678e0\"},{\"type\":\"incidents\",\"id\":\"233463fe-28bd-5361-9d14-98e2ac20f328\"},{\"type\":\"incidents\",\"id\":\"40eb208a-c867-5b51-97ee-e8efba340396\"},{\"type\":\"incidents\",\"id\":\"53be4c9b-17c1-5109-9e61-f97804f78df0\"},{\"type\":\"incidents\",\"id\":\"a72d6e86-3581-5a0c-9407-7c118a72e3b9\"}]}}},\"included\":[{\"type\":\"incidents\",\"id\":\"96534427-6172-53bf-8cbe-215de5b207e1\",\"attributes\":{\"public_id\":174193,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Update_an_existing_incident_returns_OK_response-1699043763\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:03+00:00\",\"modified\":\"2023-11-03T20:36:03+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:03+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043763,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e729fbb8-4087-5227-8725-11e44fe85b5f\",\"attributes\":{\"public_id\":174194,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Update_an_incident_todo_returns_OK_response-1699043763\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:03+00:00\",\"modified\":\"2023-11-03T20:36:03+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:03+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043763,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"5af2ff33-ec8d-50c1-ae0b-77694ea77c89\",\"attributes\":{\"public_id\":174192,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Update_an_existing_incident_integration_metadata_returns_OK_response-1699043762\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:03+00:00\",\"modified\":\"2023-11-03T20:36:03+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:03+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"summary\":{\"type\":\"textbox\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043763,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"68000356-e808-5571-b49a-109e96bc5e08\",\"attributes\":{\"public_id\":174191,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Remove_commander_from_an_incident_returns_OK_response-1699043762\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:02+00:00\",\"modified\":\"2023-11-03T20:36:02+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:02+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043762,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e4b4a761-8426-5e8c-ac41-e151eee07af9\",\"attributes\":{\"public_id\":174189,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_incident_integration_metadata_details_returns_OK_response-1699043761\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:02+00:00\",\"modified\":\"2023-11-03T20:36:02+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:02+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043762,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"e70e2781-1df4-5e93-9210-7c672ff65a8c\",\"attributes\":{\"public_id\":174190,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_the_details_of_an_incident_returns_OK_response-1699043762\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:02+00:00\",\"modified\":\"2023-11-03T20:36:02+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:02+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043762,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"ce870e8d-cd51-5b58-92ef-2dfe01530066\",\"attributes\":{\"public_id\":174187,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_a_list_of_incidents_returns_OK_response-1699043761\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:01+00:00\",\"modified\":\"2023-11-03T20:36:01+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:01+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043761,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"9c68f2c7-256e-5e98-a176-97526fd9d257\",\"attributes\":{\"public_id\":174188,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_incident_attachments_returns_OK_response-1699043761\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:01+00:00\",\"modified\":\"2023-11-03T20:36:01+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:01+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043761,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"19c70c0d-7e83-5f81-bcd2-75e0f90ee11f\",\"attributes\":{\"public_id\":174185,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Delete_an_incident_integration_metadata_returns_OK_response-1699043760\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:00+00:00\",\"modified\":\"2023-11-03T20:36:00+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:00+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043760,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"1b45d550-12f7-55c8-89ed-826d688d3d1f\",\"attributes\":{\"public_id\":174184,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Delete_an_existing_incident_returns_OK_response-1699043760\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:00+00:00\",\"modified\":\"2023-11-03T20:36:00+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:00+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043760,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"0ddf94c4-47ec-5fbb-8827-101c1b2678e0\",\"attributes\":{\"public_id\":174186,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Get_a_list_of_an_incident_s_integration_metadata_returns_OK_response-1699043760\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:36:00+00:00\",\"modified\":\"2023-11-03T20:36:00+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:36:00+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"summary\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043761,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"233463fe-28bd-5361-9d14-98e2ac20f328\",\"attributes\":{\"public_id\":174183,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Create_an_incident_returns_CREATED_response-1699043759\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:35:59+00:00\",\"modified\":\"2023-11-03T20:35:59+00:00\",\"commander\":{\"data\":{\"type\":\"users\",\"id\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\",\"attributes\":{\"uuid\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\",\"handle\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\",\"email\":\"test-typescript-create_an_incident_returns_created_response-1699043759@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/f7303955721eab35c744ea91afdfe815?s=48&d=retro\"}}},\"detected\":\"2023-11-03T20:35:59+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"}},\"field_analytics\":{\"state\":{\"resolved\":{\"duration\":0,\"spans\":[{\"start\":1699043759,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":{\"type\":\"users\",\"id\":\"98ebf0b3-7a88-11ee-8d9d-868e8930478f\"}},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"598eca3a-47d8-55a8-a2ca-0a95d0b9ec7c\"}]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"40eb208a-c867-5b51-97ee-e8efba340396\",\"attributes\":{\"public_id\":174182,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Create_an_incident_integration_metadata_returns_CREATED_response-1699043758\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:35:59+00:00\",\"modified\":\"2023-11-03T20:35:59+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:35:59+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"summary\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043759,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"53be4c9b-17c1-5109-9e61-f97804f78df0\",\"attributes\":{\"public_id\":174180,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Add_commander_to_an_incident_returns_OK_response-1699043757\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:35:58+00:00\",\"modified\":\"2023-11-03T20:35:58+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:35:58+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043758,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}},{\"type\":\"incidents\",\"id\":\"a72d6e86-3581-5a0c-9407-7c118a72e3b9\",\"attributes\":{\"public_id\":174181,\"incident_type_uuid\":null,\"title\":\"Test-Typescript-Create_an_incident_attachment_returns_OK_response-1699043758\",\"resolved\":null,\"customer_impact_scope\":\"\",\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-03T20:35:58+00:00\",\"modified\":\"2023-11-03T20:35:58+00:00\",\"commander\":null,\"detected\":\"2023-11-03T20:35:58+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":\"\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null},\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"}},\"field_analytics\":{\"state\":{\"active\":{\"duration\":0,\"spans\":[{\"start\":1699043758,\"end\":null}]}}},\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}],\"meta\":{\"pagination\":{\"offset\":0,\"next_offset\":15,\"size\":15}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:37 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/e3d37bc4-d7ee-55f8-87d7-651729afc766"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:37 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.frozen index b5b717cfa..b4bec86a8 100644 --- a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.frozen @@ -1 +1 @@ -2023-03-02T08:30:18.771Z \ No newline at end of file +2023-11-06T20:25:55.821Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.json index dbce13d48..ca4c31cd8 100644 --- a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-integration-metadata-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Update_an_existing_incident_integration_metadata_returns_OK_response-1677745818\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"3291404a-284f-5ef5-b012-16aa4bcbb677\",\"attributes\":{\"public_id\":124033,\"title\":\"Test-Update_an_existing_incident_integration_metadata_returns_OK_response-1677745818\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-03-02T08:30:19.354738+00:00\",\"modified\":\"2023-03-02T08:30:19.354738+00:00\",\"commander\":null,\"detected\":\"2023-03-02T08:30:19.344778+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:18 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"3291404a-284f-5ef5-b012-16aa4bcbb677\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/3291404a-284f-5ef5-b012-16aa4bcbb677/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"7c127cf5-9381-5a41-a83d-4b0190c8cd6a\",\"attributes\":{\"created\":\"2023-03-02T08:30:20.051847+00:00\",\"modified\":\"2023-03-02T08:30:20.051847+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"3291404a-284f-5ef5-b012-16aa4bcbb677\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:18 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"3291404a-284f-5ef5-b012-16aa4bcbb677\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#updated-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/3291404a-284f-5ef5-b012-16aa4bcbb677/relationships/integrations/7c127cf5-9381-5a41-a83d-4b0190c8cd6a"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"7c127cf5-9381-5a41-a83d-4b0190c8cd6a\",\"attributes\":{\"created\":\"2023-03-02T08:30:20.051847+00:00\",\"modified\":\"2023-03-02T08:30:20.597056+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"3291404a-284f-5ef5-b012-16aa4bcbb677\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":4,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#updated-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:18 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/3291404a-284f-5ef5-b012-16aa4bcbb677/relationships/integrations/7c127cf5-9381-5a41-a83d-4b0190c8cd6a"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:18 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/3291404a-284f-5ef5-b012-16aa4bcbb677"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 02 Mar 2023 08:30:18 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Update_an_existing_incident_integration_metadata_returns_OK_response-1699302355\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"35b9a115-57c6-50dd-9946-3e93c3dbedc8\",\"attributes\":{\"public_id\":174815,\"incident_type_uuid\":null,\"title\":\"Test-Update_an_existing_incident_integration_metadata_returns_OK_response-1699302355\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:55.934005+00:00\",\"modified\":\"2023-11-06T20:25:55.934005+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:55.923127+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:55 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"35b9a115-57c6-50dd-9946-3e93c3dbedc8\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]},\"status\":2},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/35b9a115-57c6-50dd-9946-3e93c3dbedc8/relationships/integrations"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"b35d3e07-5778-5283-9704-9862a308d863\",\"attributes\":{\"created\":\"2023-11-06T20:25:56.271192+00:00\",\"modified\":\"2023-11-06T20:25:56.271192+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"35b9a115-57c6-50dd-9946-3e93c3dbedc8\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":3,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#example-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:55 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"incident_id\":\"35b9a115-57c6-50dd-9946-3e93c3dbedc8\",\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#updated-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"type\":\"incident_integrations\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/35b9a115-57c6-50dd-9946-3e93c3dbedc8/relationships/integrations/b35d3e07-5778-5283-9704-9862a308d863"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_integrations\",\"id\":\"b35d3e07-5778-5283-9704-9862a308d863\",\"attributes\":{\"created\":\"2023-11-06T20:25:56.271192+00:00\",\"modified\":\"2023-11-06T20:25:56.525025+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"35b9a115-57c6-50dd-9946-3e93c3dbedc8\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"status\":4,\"integration_type\":1,\"metadata\":{\"channels\":[{\"channel_id\":\"C0123456789\",\"channel_name\":\"#updated-channel-name\",\"redirect_url\":\"https://slack.com/app_redirect?channel=C0123456789&team=T01234567\",\"team_id\":\"T01234567\"}]}},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:55 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/35b9a115-57c6-50dd-9946-3e93c3dbedc8/relationships/integrations/b35d3e07-5778-5283-9704-9862a308d863"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:55 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/35b9a115-57c6-50dd-9946-3e93c3dbedc8"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:55 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.frozen index af998055a..206819de6 100644 --- a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.frozen @@ -1 +1 @@ -2022-05-12T09:51:57.580Z \ No newline at end of file +2023-11-06T20:25:57.121Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.json index 7a1281829..25b253077 100644 --- a/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Update-an-existing-incident-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1652349117\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"a96e7410-b136-5e42-828b-f2df24cfe2cb\",\"attributes\":{\"public_id\":95249,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1652349117\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2022-05-12T09:51:58.142974+00:00\",\"modified\":\"2022-05-12T09:51:58.142974+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:58.133490+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:51:57 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"fields\":{\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"}},\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1652349117-updated\"},\"id\":\"a96e7410-b136-5e42-828b-f2df24cfe2cb\",\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/a96e7410-b136-5e42-828b-f2df24cfe2cb"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"a96e7410-b136-5e42-828b-f2df24cfe2cb\",\"attributes\":{\"public_id\":95249,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1652349117-updated\",\"resolved\":\"2022-05-12T09:51:58.986623+00:00\",\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2022-05-12T09:51:58.142974+00:00\",\"modified\":\"2022-05-12T09:51:58.988942+00:00\",\"commander\":null,\"detected\":\"2022-05-12T09:51:58.133490+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"public\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"30159115-2f89-5c41-96fc-677a6f534af8\"}]},\"impacts\":{\"data\":[]}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 12 May 2022 09:51:57 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/a96e7410-b136-5e42-828b-f2df24cfe2cb"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:51:57 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1699302357\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"035d9c83-698d-50eb-a39f-8c2d7ed135d1\",\"attributes\":{\"public_id\":174816,\"incident_type_uuid\":null,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1699302357\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:57.231101+00:00\",\"modified\":\"2023-11-06T20:25:57.231101+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:57.220235+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"fields\":{\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"}},\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1699302357-updated\"},\"id\":\"035d9c83-698d-50eb-a39f-8c2d7ed135d1\",\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/035d9c83-698d-50eb-a39f-8c2d7ed135d1"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"035d9c83-698d-50eb-a39f-8c2d7ed135d1\",\"attributes\":{\"public_id\":174816,\"incident_type_uuid\":null,\"title\":\"Test-Update_an_existing_incident_returns_OK_response-1699302357-updated\",\"resolved\":\"2023-11-06T20:25:57.505905+00:00\",\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"created\":\"2023-11-06T20:25:57.231101+00:00\",\"modified\":\"2023-11-06T20:25:57.510442+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:57.220235+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"resolved\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"resolved\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[{\"type\":\"incident_responders\",\"id\":\"bcbaea8b-306a-5a8e-b25c-2163bf8caf81\"}]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/035d9c83-698d-50eb-a39f-8c2d7ed135d1"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.frozen index 77ce5edb7..aee1947a7 100644 --- a/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.frozen @@ -1 +1 @@ -2023-03-07T18:27:22.742Z \ No newline at end of file +2023-11-06T20:25:57.913Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.json b/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.json index f99b00e1f..35b230c18 100644 --- a/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/incidents/Update-an-incident-todo-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Update_an_incident_todo_returns_OK_response-1678213642\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"75fbb4e1-f6e5-5cc0-a9f2-3fea655f1e5f\",\"attributes\":{\"public_id\":124743,\"title\":\"Test-Update_an_incident_todo_returns_OK_response-1678213642\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-03-07T18:27:22.832686+00:00\",\"modified\":\"2023-03-07T18:27:22.832686+00:00\",\"commander\":null,\"detected\":\"2023-03-07T18:27:22.825904+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 07 Mar 2023 18:27:22 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"assignees\":[\"@test.user@test.com\",{\"icon\":\"https://a.slack-edge.com/80588/img/slackbot_48.png\",\"id\":\"USLACKBOT\",\"name\":\"Slackbot\",\"source\":\"slack\"}],\"content\":\"Follow up with customer about the impact they saw.\"},\"type\":\"incident_todos\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/75fbb4e1-f6e5-5cc0-a9f2-3fea655f1e5f/relationships/todos"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_todos\",\"id\":\"927ccd46-7db5-5307-a30c-e4ffb33f749e\",\"attributes\":{\"created\":\"2023-03-07T18:27:23.126883+00:00\",\"modified\":\"2023-03-07T18:27:23.126883+00:00\",\"completed\":null,\"due_date\":null,\"assignees\":[\"@test.user@test.com\",{\"icon\":\"https://a.slack-edge.com/80588/img/slackbot_48.png\",\"id\":\"USLACKBOT\",\"name\":\"Slackbot\",\"source\":\"slack\"}],\"content\":\"Follow up with customer about the impact they saw.\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"incident_id\":\"75fbb4e1-f6e5-5cc0-a9f2-3fea655f1e5f\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 07 Mar 2023 18:27:22 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"assignees\":[\"@test.user@test.com\"],\"completed\":\"2023-03-06T22:00:00.000000+00:00\",\"content\":\"Restore lost data.\",\"due_date\":\"2023-07-10T05:00:00.000000+00:00\"},\"type\":\"incident_todos\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/75fbb4e1-f6e5-5cc0-a9f2-3fea655f1e5f/relationships/todos/927ccd46-7db5-5307-a30c-e4ffb33f749e"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_todos\",\"id\":\"927ccd46-7db5-5307-a30c-e4ffb33f749e\",\"attributes\":{\"created\":\"2023-03-07T18:27:23.126883+00:00\",\"modified\":\"2023-03-07T18:27:23.531802+00:00\",\"completed\":\"2023-03-06T22:00:00+00:00\",\"due_date\":\"2023-07-10T05:00:00+00:00\",\"assignees\":[\"@test.user@test.com\"],\"content\":\"Restore lost data.\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"75fbb4e1-f6e5-5cc0-a9f2-3fea655f1e5f\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 07 Mar 2023 18:27:22 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/75fbb4e1-f6e5-5cc0-a9f2-3fea655f1e5f/relationships/todos/927ccd46-7db5-5307-a30c-e4ffb33f749e"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 07 Mar 2023 18:27:22 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/75fbb4e1-f6e5-5cc0-a9f2-3fea655f1e5f"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 07 Mar 2023 18:27:22 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"customer_impacted\":false,\"title\":\"Test-Update_an_incident_todo_returns_OK_response-1699302357\"},\"type\":\"incidents\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incidents\",\"id\":\"aac94de7-d203-5171-9c46-ac8e554f1442\",\"attributes\":{\"public_id\":174817,\"incident_type_uuid\":null,\"title\":\"Test-Update_an_incident_todo_returns_OK_response-1699302357\",\"resolved\":null,\"customer_impact_scope\":null,\"customer_impact_start\":null,\"customer_impact_end\":null,\"customer_impacted\":false,\"notification_handles\":null,\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null,\"created\":\"2023-11-06T20:25:58.033003+00:00\",\"modified\":\"2023-11-06T20:25:58.033003+00:00\",\"commander\":null,\"detected\":\"2023-11-06T20:25:58.020584+00:00\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"creation_idempotency_key\":null,\"customer_impact_duration\":0,\"time_to_detect\":0,\"time_to_repair\":0,\"time_to_internal_response\":0,\"time_to_resolve\":0,\"archived\":null,\"fields\":{\"severity\":{\"type\":\"dropdown\",\"value\":\"UNKNOWN\"},\"state\":{\"type\":\"dropdown\",\"value\":\"active\"},\"root_cause\":{\"type\":\"textbox\",\"value\":null},\"detection_method\":{\"type\":\"dropdown\",\"value\":\"unknown\"},\"services\":{\"type\":\"autocomplete\",\"value\":null},\"teams\":{\"type\":\"autocomplete\",\"value\":null},\"summary\":{\"type\":\"textbox\",\"value\":null}},\"field_analytics\":null,\"severity\":\"UNKNOWN\",\"state\":\"active\",\"non_datadog_creator\":null,\"visibility\":\"organization\",\"case_id\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"commander_user\":{\"data\":null},\"user_defined_fields\":{\"data\":[{\"type\":\"user_defined_field\",\"id\":\"ad2b9456-eaec-5bbd-9bae-e502d74e23f8\"},{\"type\":\"user_defined_field\",\"id\":\"299616f7-8acd-5403-886b-991656d6b982\"},{\"type\":\"user_defined_field\",\"id\":\"4148ead2-da45-548e-b6be-8e319bafc425\"},{\"type\":\"user_defined_field\",\"id\":\"66b62f59-48f6-5fee-969a-0886b1db6dcd\"},{\"type\":\"user_defined_field\",\"id\":\"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e\"},{\"type\":\"user_defined_field\",\"id\":\"623af0a5-f30c-577e-8146-09b8324bdb2d\"},{\"type\":\"user_defined_field\",\"id\":\"ccfc9e6c-f586-58e5-b502-03c466c72e6f\"}]},\"integrations\":{\"data\":[]},\"attachments\":{\"data\":[]},\"responders\":{\"data\":[]},\"impacts\":{\"data\":[]}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"assignees\":[\"@test.user@test.com\",{\"icon\":\"https://a.slack-edge.com/80588/img/slackbot_48.png\",\"id\":\"USLACKBOT\",\"name\":\"Slackbot\",\"source\":\"slack\"}],\"content\":\"Follow up with customer about the impact they saw.\"},\"type\":\"incident_todos\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/incidents/aac94de7-d203-5171-9c46-ac8e554f1442/relationships/todos"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_todos\",\"id\":\"b1fe8268-35cd-5656-b529-a17a34e75c8e\",\"attributes\":{\"created\":\"2023-11-06T20:25:58.387305+00:00\",\"modified\":\"2023-11-06T20:25:58.387305+00:00\",\"completed\":null,\"due_date\":null,\"assignees\":[\"@test.user@test.com\",{\"icon\":\"https://a.slack-edge.com/80588/img/slackbot_48.png\",\"id\":\"USLACKBOT\",\"name\":\"Slackbot\",\"source\":\"slack\"}],\"content\":\"Follow up with customer about the impact they saw.\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":null,\"incident_id\":\"aac94de7-d203-5171-9c46-ac8e554f1442\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":null},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"assignees\":[\"@test.user@test.com\"],\"completed\":\"2023-03-06T22:00:00.000000+00:00\",\"content\":\"Restore lost data.\",\"due_date\":\"2023-07-10T05:00:00.000000+00:00\"},\"type\":\"incident_todos\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/incidents/aac94de7-d203-5171-9c46-ac8e554f1442/relationships/todos/b1fe8268-35cd-5656-b529-a17a34e75c8e"}, "response": {"body": {"string": "{\"data\":{\"type\":\"incident_todos\",\"id\":\"b1fe8268-35cd-5656-b529-a17a34e75c8e\",\"attributes\":{\"created\":\"2023-11-06T20:25:58.387305+00:00\",\"modified\":\"2023-11-06T20:25:58.907937+00:00\",\"completed\":\"2023-03-06T22:00:00+00:00\",\"due_date\":\"2023-07-10T05:00:00+00:00\",\"assignees\":[\"@test.user@test.com\"],\"content\":\"Restore lost data.\",\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"created_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"incident_id\":\"aac94de7-d203-5171-9c46-ac8e554f1442\",\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\",\"name\":null,\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\"}}},\"last_modified_by_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"},\"relationships\":{\"created_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"last_modified_by_user\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/aac94de7-d203-5171-9c46-ac8e554f1442/relationships/todos/b1fe8268-35cd-5656-b529-a17a34e75c8e"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/incidents/aac94de7-d203-5171-9c46-ac8e554f1442"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Mon, 06 Nov 2023 20:25:57 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.frozen b/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.frozen index e9526d4ba..bdcf91b33 100644 --- a/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.frozen +++ b/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.frozen @@ -1 +1 @@ -2022-05-12T09:52:29.805Z \ No newline at end of file +2023-12-07T15:20:06.421Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.json b/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.json index b5183eb98..b34ffd338 100644 --- a/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.json +++ b/tests/scenarios/cassettes/v2/metrics/Configure-tags-for-multiple-metrics-returns-Accepted-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"email\":\"Test-Configure_tags_for_multiple_metrics_returns_Accepted_response-1652349149@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/users"}, "response": {"body": {"string": "{\"data\":{\"type\":\"users\",\"id\":\"3cf23548-d1d9-11ec-ad3d-da7ad0900002\",\"attributes\":{\"name\":null,\"handle\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1652349149@datadoghq.com\",\"created_at\":\"2022-05-12T09:52:30.224025+00:00\",\"modified_at\":\"2022-05-12T09:52:30.279356+00:00\",\"email\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1652349149@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/37b97ed3403eaebb504eab5b74a44f2a?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 12 May 2022 09:52:29 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1652349149@datadoghq.com\"],\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1652349149\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/metrics/config/bulk-tags"}, "response": {"body": {"string": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1652349149\"],\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1652349149@datadoghq.com\"],\"status\":\"Accepted\"}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 202, "message": "Accepted"}}, "recorded_at": "Thu, 12 May 2022 09:52:29 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1652349149@datadoghq.com\"],\"status\":\"Accepted\",\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1652349149\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/metrics/config/bulk-tags"}, "response": {"body": {"string": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1652349149@datadoghq.com\"],\"status\":\"Accepted\"}}}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 202, "message": "Accepted"}}, "recorded_at": "Thu, 12 May 2022 09:52:29 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/users/3cf23548-d1d9-11ec-ad3d-da7ad0900002"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 12 May 2022 09:52:29 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"email\":\"Test-Configure_tags_for_multiple_metrics_returns_Accepted_response-1701962406@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/users"}, "response": {"body": {"string": "{\"data\":{\"type\":\"users\",\"id\":\"1a6aac59-9514-11ee-8d56-0adb1a638a47\",\"attributes\":{\"name\":null,\"handle\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\",\"created_at\":\"2023-12-07T15:20:07.014747+00:00\",\"modified_at\":\"2023-12-07T15:20:07.014747+00:00\",\"email\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/0a707b27174d49cd592ec7a4fc13bc4d?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"3386799c-00cc-11ea-a77b-eb0f88a49e0f\"}}}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 07 Dec 2023 15:20:06 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"],\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1701962406\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/metrics/config/bulk-tags"}, "response": {"body": {"string": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1701962406\"],\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"],\"status\":\"Accepted\",\"exclude_tags_mode\":null}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 202, "message": "Accepted"}}, "recorded_at": "Thu, 07 Dec 2023 15:20:06 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/metrics/config/bulk-tags"}, "response": {"body": {"string": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"],\"status\":\"Accepted\"}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 202, "message": "Accepted"}}, "recorded_at": "Thu, 07 Dec 2023 15:20:06 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/users/1a6aac59-9514-11ee-8d56-0adb1a638a47"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 07 Dec 2023 15:20:06 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/Add-Okta-account-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/okta_integration/Add-Okta-account-returns-OK-response.frozen new file mode 100644 index 000000000..04e51eb1c --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/Add-Okta-account-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-21T16:59:43.805Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/Add-Okta-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/okta_integration/Add-Okta-account-returns-OK-response.json new file mode 100644 index 000000000..01e456a66 --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/Add-Okta-account-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"auth_method\":\"oauth\",\"client_id\":\"client_id\",\"client_secret\":\"client_secret\",\"domain\":\"https://example.okta.com/\",\"name\":\"Okta_Prod\"},\"id\":\"f749daaf-682e-4208-a38d-c9b43162c609\",\"type\":\"okta-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"okta-accounts\",\"attributes\":{\"domain\":\"https://example.okta.com/\",\"client_id\":\"client_id\",\"auth_method\":\"oauth\",\"name\":\"Okta_Prod\"},\"id\":\"6330b376-d352-4a06-a169-107002bd6e6c\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:43 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts/6330b376-d352-4a06-a169-107002bd6e6c"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:43 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/Get-Okta-account-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/okta_integration/Get-Okta-account-returns-OK-response.frozen new file mode 100644 index 000000000..25029ca6d --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/Get-Okta-account-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-21T16:59:44.767Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/Get-Okta-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/okta_integration/Get-Okta-account-returns-OK-response.json new file mode 100644 index 000000000..c06883869 --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/Get-Okta-account-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"auth_method\":\"oauth\",\"client_id\":\"fakeclientid\",\"client_secret\":\"fakeclientsecret\",\"domain\":\"https://dev-test.okta.com/\",\"name\":\"testgetoktaaccountreturnsokresponse1700585984\"},\"type\":\"okta-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"okta-accounts\",\"attributes\":{\"client_id\":\"fakeclientid\",\"auth_method\":\"oauth\",\"domain\":\"https://dev-test.okta.com/\",\"name\":\"testgetoktaaccountreturnsokresponse1700585984\"},\"id\":\"2bf39935-f5c8-46b1-b41b-eda0b4bd2e78\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:44 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts/2bf39935-f5c8-46b1-b41b-eda0b4bd2e78"}, "response": {"body": {"string": "{\"data\":{\"type\":\"okta-accounts\",\"attributes\":{\"client_id\":\"fakeclientid\",\"auth_method\":\"oauth\",\"domain\":\"https://dev-test.okta.com/\",\"name\":\"testgetoktaaccountreturnsokresponse1700585984\"},\"id\":\"2bf39935-f5c8-46b1-b41b-eda0b4bd2e78\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:44 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts/2bf39935-f5c8-46b1-b41b-eda0b4bd2e78"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:44 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/List-Okta-accounts-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/okta_integration/List-Okta-accounts-returns-OK-response.frozen new file mode 100644 index 000000000..9b10d8fa8 --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/List-Okta-accounts-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-21T16:59:46.153Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/List-Okta-accounts-returns-OK-response.json b/tests/scenarios/cassettes/v2/okta_integration/List-Okta-accounts-returns-OK-response.json new file mode 100644 index 000000000..0b20ef495 --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/List-Okta-accounts-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"auth_method\":\"oauth\",\"client_id\":\"fakeclientid\",\"client_secret\":\"fakeclientsecret\",\"domain\":\"https://dev-test.okta.com/\",\"name\":\"testlistoktaaccountsreturnsokresponse1700585986\"},\"type\":\"okta-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"okta-accounts\",\"attributes\":{\"client_id\":\"fakeclientid\",\"name\":\"testlistoktaaccountsreturnsokresponse1700585986\",\"auth_method\":\"oauth\",\"domain\":\"https://dev-test.okta.com/\"},\"id\":\"a5e9a04b-ac5b-4a5c-a4d5-c697deb232aa\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:46 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"okta-accounts\",\"attributes\":{\"name\":\"testoktapublicupdateaccountreturnsokresponse1699978854\",\"auth_method\":\"oauth\",\"domain\":\"https://example.okta.com/\",\"client_id\":\"client_id\"},\"id\":\"9637ddf0-4f5e-4adb-89b0-72b7c843116f\"},{\"type\":\"okta-accounts\",\"attributes\":{\"name\":\"testoktapublicupdateaccountreturnsokresponse1699978979\",\"auth_method\":\"oauth\",\"domain\":\"https://example.okta.com/\",\"client_id\":\"client_id\"},\"id\":\"199e06bf-6805-403c-8b97-34c10f526485\"},{\"type\":\"okta-accounts\",\"attributes\":{\"name\":\"testoktapublicupdateaccountreturnsokresponse1699989540\",\"auth_method\":\"oauth\",\"domain\":\"https://example.okta.com/\",\"client_id\":\"client_id\"},\"id\":\"2770caff-0eb2-4edf-b3dd-63b42d706c79\"},{\"type\":\"okta-accounts\",\"attributes\":{\"name\":\"testoktapublicupdateaccountreturnsokresponse1699990165\",\"auth_method\":\"oauth\",\"domain\":\"https://example.okta.com/\",\"client_id\":\"client_id\"},\"id\":\"ee163be4-1a6d-466e-ba9d-539e5c505645\"},{\"type\":\"okta-accounts\",\"attributes\":{\"name\":\"testupdateoktaaccountreturnsokresponse1700585947\",\"auth_method\":\"oauth\",\"domain\":\"https://example.okta.com/\",\"client_id\":\"client_id\"},\"id\":\"474f2d62-fb47-40fc-a201-f0c59c90d3e3\"},{\"type\":\"okta-accounts\",\"attributes\":{\"name\":\"testlistoktaaccountsreturnsokresponse1700585986\",\"auth_method\":\"oauth\",\"domain\":\"https://dev-test.okta.com/\",\"client_id\":\"fakeclientid\"},\"id\":\"a5e9a04b-ac5b-4a5c-a4d5-c697deb232aa\"}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:46 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts/a5e9a04b-ac5b-4a5c-a4d5-c697deb232aa"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["text/html; charset=utf-8"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:46 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/Update-Okta-account-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/okta_integration/Update-Okta-account-returns-OK-response.frozen new file mode 100644 index 000000000..2292c7c30 --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/Update-Okta-account-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-21T16:59:47.501Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/okta_integration/Update-Okta-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/okta_integration/Update-Okta-account-returns-OK-response.json new file mode 100644 index 000000000..35a8d6ba7 --- /dev/null +++ b/tests/scenarios/cassettes/v2/okta_integration/Update-Okta-account-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"auth_method\":\"oauth\",\"client_id\":\"fakeclientid\",\"client_secret\":\"fakeclientsecret\",\"domain\":\"https://dev-test.okta.com/\",\"name\":\"testupdateoktaaccountreturnsokresponse1700585987\"},\"type\":\"okta-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts"}, "response": {"body": {"string": "{\"data\":{\"type\":\"okta-accounts\",\"attributes\":{\"domain\":\"https://dev-test.okta.com/\",\"auth_method\":\"oauth\",\"client_id\":\"fakeclientid\",\"name\":\"testupdateoktaaccountreturnsokresponse1700585987\"},\"id\":\"c847a349-9687-4b80-8b0f-996e0e75f73e\"}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:47 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"auth_method\":\"oauth\",\"client_id\":\"client_id\",\"client_secret\":\"client_secret\",\"domain\":\"https://example.okta.com/\"},\"type\":\"okta-accounts\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts/c847a349-9687-4b80-8b0f-996e0e75f73e"}, "response": {"body": {"string": "{\"data\":{\"type\":\"okta-accounts\",\"id\":\"7343985f-6e86-4327-8792-538b4c9b38e9\",\"attributes\":{\"auth_method\":\"oauth\",\"client_id\":\"client_id\",\"domain\":\"https://example.okta.com/\",\"name\":\"testupdateoktaaccountreturnsokresponse1700585987\"}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:47 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/integrations/okta/accounts/c847a349-9687-4b80-8b0f-996e0e75f73e"}, "response": {"body": {"string": "{\"errors\":[\"Unknown error occurred: \"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 400, "message": "Bad Request"}}, "recorded_at": "Tue, 21 Nov 2023 16:59:47 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Create-a-detection-rule-with-detection-method-third-party-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/security_monitoring/Create-a-detection-rule-with-detection-method-third-party-returns-OK-response.frozen new file mode 100644 index 000000000..190be7497 --- /dev/null +++ b/tests/scenarios/cassettes/v2/security_monitoring/Create-a-detection-rule-with-detection-method-third-party-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-01-03T15:07:54.290Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Create-a-detection-rule-with-detection-method-third-party-returns-OK-response.json b/tests/scenarios/cassettes/v2/security_monitoring/Create-a-detection-rule-with-detection-method-third-party-returns-OK-response.json new file mode 100644 index 000000000..b4e9c24cd --- /dev/null +++ b/tests/scenarios/cassettes/v2/security_monitoring/Create-a-detection-rule-with-detection-method-third-party-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"cases\":[],\"isEnabled\":true,\"message\":\"This is a third party rule\",\"name\":\"Test-Create_a_detection_rule_with_detection_method_third_party_returns_OK_response-1704294474\",\"options\":{\"detectionMethod\":\"third_party\",\"keepAlive\":0,\"maxSignalDuration\":0,\"thirdPartyRuleOptions\":{\"defaultStatus\":\"info\",\"rootQueries\":[{\"groupByFields\":[\"instance-id\"],\"query\":\"source:guardduty @details.alertType:*EC2*\"},{\"groupByFields\":[],\"query\":\"source:guardduty\"}]}},\"queries\":[],\"thirdPartyCases\":[{\"name\":\"high\",\"query\":\"status:error\",\"status\":\"high\"},{\"name\":\"low\",\"query\":\"status:info\",\"status\":\"low\"}],\"type\":\"log_detection\"}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/security_monitoring/rules"}, "response": {"body": {"string": "{\"id\":\"ut1-s7a-0kn\",\"version\":1,\"name\":\"Test-Create_a_detection_rule_with_detection_method_third_party_returns_OK_response-1704294474\",\"createdAt\":1704294474748,\"creationAuthorId\":1445416,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"status:error\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"none\",\"name\":\"\"},{\"query\":\"status:info\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"none\",\"name\":\"\"}],\"options\":{\"keepAlive\":0,\"maxSignalDuration\":0,\"detectionMethod\":\"third_party\",\"evaluationWindow\":0,\"thirdPartyRuleOptions\":{\"defaultStatus\":\"info\",\"defaultNotifications\":[],\"rootQueries\":[{\"query\":\"source:guardduty @details.alertType:*EC2*\",\"groupByFields\":[\"instance-id\"]},{\"query\":\"source:guardduty\",\"groupByFields\":[]}]}},\"cases\":[{\"name\":\"high\",\"status\":\"high\",\"notifications\":[]},{\"name\":\"low\",\"status\":\"low\",\"notifications\":[]}],\"message\":\"This is a third party rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"thirdPartyCases\":[{\"name\":\"high\",\"status\":\"high\",\"notifications\":[],\"query\":\"status:error\"},{\"name\":\"low\",\"status\":\"low\",\"notifications\":[],\"query\":\"status:info\"}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 03 Jan 2024 15:07:54 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/security_monitoring/rules/ut1-s7a-0kn"}, "response": {"body": {"string": "", "encoding": null}, "headers": {}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 03 Jan 2024 15:07:54 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Bad-Request-The-server-cannot-process-the-request-due-to-invalid-syntax-in-the-request-response.frozen b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Bad-Request-The-server-cannot-process-the-request-due-to-invalid-syntax-in-the-request-response.frozen deleted file mode 100644 index 047be7754..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Bad-Request-The-server-cannot-process-the-request-due-to-invalid-syntax-in-the-request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-10-27T10:39:51.051Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Bad-Request-The-server-cannot-process-the-request-due-to-invalid-syntax-in-the-request-response.json b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Bad-Request-The-server-cannot-process-the-request-due-to-invalid-syntax-in-the-request-response.json deleted file mode 100644 index 512e2320e..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Bad-Request-The-server-cannot-process-the-request-due-to-invalid-syntax-in-the-request-response.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"mute\":{\"expirationDate\":1778721573794,\"muted\":\"true\",\"reason\":\"ACCEPTED_RISK\"}},\"id\":\"dbe5f567-192b-4404-b908-29b70e1c9f76\",\"meta\":{\"findings\":[{\"finding_id\":\"ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==\"}]},\"type\":\"finding\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/posture_management/findings"}, "response": {"body": {"string": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"json: cannot unmarshal number into Go struct field Mute.mute.expirationDate of type string\"}]}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 400, "message": "Bad Request"}}, "recorded_at": "Fri, 27 Oct 2023 10:39:51 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-Some-findings-IDs-are-malformed-response.frozen b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-Some-findings-IDs-are-malformed-response.frozen deleted file mode 100644 index 5b62b79e3..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-Some-findings-IDs-are-malformed-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-10-27T10:39:51.414Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-Some-findings-IDs-are-malformed-response.json b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-Some-findings-IDs-are-malformed-response.json deleted file mode 100644 index c863c960e..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-Some-findings-IDs-are-malformed-response.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"mute\":{\"expiration_date\":1778721573794,\"muted\":true,\"reason\":\"ACCEPTED_RISK\"}},\"id\":\"dbe5f567-192b-4404-b908-29b70e1c9f76\",\"meta\":{\"findings\":[{\"finding_id\":\"AQAAAYbb1i0gijTHEQAAAABBWWJiMWkwZ0FBQ2FuNzBJVGZXZ3B3QUE\"}]},\"type\":\"finding\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/posture_management/findings"}, "response": {"body": {"string": "{\"errors\":[{\"status\":\"422\",\"title\":\"Invalid Request\",\"detail\":\"Some findings IDs are malformed\"}]}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 422, "message": "Unprocessable Entity"}}, "recorded_at": "Fri, 27 Oct 2023 10:39:51 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-The-server-understands-the-request-syntax-but-cannot-process-it-due-to-invalid-data-response.frozen b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-The-server-understands-the-request-syntax-but-cannot-process-it-due-to-invalid-data-response.frozen deleted file mode 100644 index 4ee307459..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-The-server-understands-the-request-syntax-but-cannot-process-it-due-to-invalid-data-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-10-27T10:09:05.292Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-The-server-understands-the-request-syntax-but-cannot-process-it-due-to-invalid-data-response.json b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-The-server-understands-the-request-syntax-but-cannot-process-it-due-to-invalid-data-response.json deleted file mode 100644 index 22acc85a4..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Invalid-Request-The-server-understands-the-request-syntax-but-cannot-process-it-due-to-invalid-data-response.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"mute\":{\"expiration_date\":1778721573794,\"muted\":true,\"reason\":\"ACCEPTED_RISK\"}},\"id\":\"dbe5f567-192b-4404-b908-29b70e1c9f76\",\"meta\":{\"findings\":[{\"finding_id\":\"AQAAAYbb1i0gijTHEQAAAABBWWJiMWkwZ0FBQ2FuNzBJVGZXZ3B3QUE\"}]},\"type\":\"finding\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/posture_management/findings"}, "response": {"body": {"string": "{\"errors\":[{\"status\":\"422\",\"title\":\"Invalid Request\",\"detail\":\"Some findings IDs are malformed\"}]}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 422, "message": "Unprocessable Entity"}}, "recorded_at": "Fri, 27 Oct 2023 10:09:05 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Not-Found-The-requested-finding-cannot-be-found-response.frozen b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Not-Found-The-requested-finding-cannot-be-found-response.frozen deleted file mode 100644 index 6d7f12b00..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Not-Found-The-requested-finding-cannot-be-found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2023-10-27T10:39:51.776Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Not-Found-The-requested-finding-cannot-be-found-response.json b/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Not-Found-The-requested-finding-cannot-be-found-response.json deleted file mode 100644 index eb766ad4c..000000000 --- a/tests/scenarios/cassettes/v2/security_monitoring/Mute-or-unmute-a-batch-of-findings-returns-Not-Found-The-requested-finding-cannot-be-found-response.json +++ /dev/null @@ -1 +0,0 @@ -{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"mute\":{\"expiration_date\":1778721573794,\"muted\":true,\"reason\":\"ACCEPTED_RISK\"}},\"id\":\"dbe5f567-192b-4404-b908-29b70e1c9f76\",\"meta\":{\"findings\":[{\"finding_id\":\"ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==\"}]},\"type\":\"finding\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/posture_management/findings"}, "response": {"body": {"string": "{\"errors\":[{\"status\":\"404\"}]}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 404, "message": "Not Found"}}, "recorded_at": "Fri, 27 Oct 2023 10:39:51 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.frozen index aaef0ebf7..66d9a10b1 100644 --- a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.frozen @@ -1 +1 @@ -2023-01-24T13:12:12.388Z \ No newline at end of file +2023-12-13T09:06:38.820Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.json b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.json index 628df771a..b4a3b892b 100644 --- a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config"}, "response": {"body": {"string": "{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"attributes\":{},\"type\":\"sensitive_data_scanner_configuration\",\"relationships\":{\"groups\":{\"data\":[]}}},\"meta\":{\"version\":12574,\"count_limit\":100,\"group_count_limit\":20,\"is_pci_compliant\":false,\"has_highlight_enabled\":true,\"has_multi_pass_enabled\":true}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:12 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"]},\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups"}, "response": {"body": {"string": "{\"data\":{\"id\":\"z7iUhBfcSR6-1kTCPtmdpg\",\"attributes\":{\"name\":\"my-test-group\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}},\"meta\":{\"version\":12575}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:12 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"excluded_namespaces\":[\"admin.name\"],\"is_enabled\":true,\"name\":\"Test-Create_Scanning_Rule_returns_OK_response-1674565932\",\"namespaces\":[\"admin\"],\"pattern\":\"pattern\",\"tags\":[\"sensitive_data:true\"],\"text_replacement\":{\"type\":\"none\"}},\"relationships\":{\"group\":{\"data\":{\"id\":\"z7iUhBfcSR6-1kTCPtmdpg\",\"type\":\"sensitive_data_scanner_group\"}}},\"type\":\"sensitive_data_scanner_rule\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"r3NAGDIXQcSyNhfFPUZLSg\",\"attributes\":{\"name\":\"Test-Create_Scanning_Rule_returns_OK_response-1674565932\",\"namespaces\":[\"admin\"],\"excluded_namespaces\":[\"admin.name\"],\"pattern\":\"pattern\",\"text_replacement\":{\"type\":\"none\"},\"tags\":[\"sensitive_data:true\"],\"is_enabled\":true},\"type\":\"sensitive_data_scanner_rule\",\"relationships\":{\"group\":{\"data\":{\"id\":\"z7iUhBfcSR6-1kTCPtmdpg\",\"type\":\"sensitive_data_scanner_group\"}}}},\"meta\":{\"version\":12576}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:12 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules/r3NAGDIXQcSyNhfFPUZLSg"}, "response": {"body": {"string": "{\"meta\":{\"version\":12577}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:12 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups/z7iUhBfcSR6-1kTCPtmdpg"}, "response": {"body": {"string": "{\"meta\":{\"version\":12578}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:12 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config"}, "response": {"body": {"string": "{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"attributes\":{},\"type\":\"sensitive_data_scanner_configuration\",\"relationships\":{\"groups\":{\"data\":[{\"id\":\"z9vY6YO8R-2q6dv_rTUOCA\",\"type\":\"sensitive_data_scanner_group\"},{\"id\":\"01OnORacS5qHeVO7C97drg\",\"type\":\"sensitive_data_scanner_group\"}]}}},\"meta\":{\"version\":127243,\"count_limit\":100,\"group_count_limit\":20,\"is_pci_compliant\":false,\"has_highlight_enabled\":true,\"has_multi_pass_enabled\":true},\"included\":[{\"id\":\"z9vY6YO8R-2q6dv_rTUOCA\",\"attributes\":{\"name\":\"Example-Update_Scanning_Group_returns_OK_response_1696199477\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}},{\"id\":\"01OnORacS5qHeVO7C97drg\",\"attributes\":{\"name\":\"my-test-group\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:38 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"]},\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups"}, "response": {"body": {"string": "{\"data\":{\"id\":\"Dyurbbz2Tk23SMEr4fcHCw\",\"attributes\":{\"name\":\"my-test-group\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}},\"meta\":{\"version\":127244}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:38 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"excluded_namespaces\":[\"admin.name\"],\"is_enabled\":true,\"name\":\"Test-Create_Scanning_Rule_returns_OK_response-1702458398\",\"namespaces\":[\"admin\"],\"pattern\":\"pattern\",\"priority\":1,\"tags\":[\"sensitive_data:true\"],\"text_replacement\":{\"type\":\"none\"}},\"relationships\":{\"group\":{\"data\":{\"id\":\"Dyurbbz2Tk23SMEr4fcHCw\",\"type\":\"sensitive_data_scanner_group\"}}},\"type\":\"sensitive_data_scanner_rule\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"Xp3fpaEhSGKqtDFmXvJZwQ\",\"attributes\":{\"name\":\"Test-Create_Scanning_Rule_returns_OK_response-1702458398\",\"namespaces\":[\"admin\"],\"excluded_namespaces\":[\"admin.name\"],\"pattern\":\"pattern\",\"text_replacement\":{\"type\":\"none\"},\"tags\":[\"sensitive_data:true\"],\"is_enabled\":true,\"priority\":1},\"type\":\"sensitive_data_scanner_rule\",\"relationships\":{\"group\":{\"data\":{\"id\":\"Dyurbbz2Tk23SMEr4fcHCw\",\"type\":\"sensitive_data_scanner_group\"}}}},\"meta\":{\"version\":127245}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:38 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules/Xp3fpaEhSGKqtDFmXvJZwQ"}, "response": {"body": {"string": "{\"meta\":{\"version\":127246}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:38 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups/Dyurbbz2Tk23SMEr4fcHCw"}, "response": {"body": {"string": "{\"meta\":{\"version\":127247}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:38 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.frozen index 1eec36907..da74cd47c 100644 --- a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.frozen @@ -1 +1 @@ -2023-01-24T13:12:20.575Z \ No newline at end of file +2023-12-13T09:06:40.913Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.json b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.json index f04dd40b2..43251724e 100644 --- a/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/sensitive_data_scanner/Update-Scanning-Rule-returns-OK-response.json @@ -1 +1 @@ -{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config"}, "response": {"body": {"string": "{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"attributes\":{},\"type\":\"sensitive_data_scanner_configuration\",\"relationships\":{\"groups\":{\"data\":[]}}},\"meta\":{\"version\":12586,\"count_limit\":100,\"group_count_limit\":20,\"is_pci_compliant\":false,\"has_highlight_enabled\":true,\"has_multi_pass_enabled\":true}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:20 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"]},\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups"}, "response": {"body": {"string": "{\"data\":{\"id\":\"g0hUfjkqQEejgzkTN8J1sA\",\"attributes\":{\"name\":\"my-test-group\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}},\"meta\":{\"version\":12587}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:20 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"is_enabled\":true,\"name\":\"Test-Update_Scanning_Rule_returns_OK_response-1674565940\",\"namespaces\":[\"admin.email\"],\"pattern\":\"pattern\",\"tags\":[\"sensitive_data:true\"],\"text_replacement\":{\"type\":\"none\"}},\"relationships\":{\"group\":{\"data\":{\"id\":\"g0hUfjkqQEejgzkTN8J1sA\",\"type\":\"sensitive_data_scanner_group\"}}},\"type\":\"sensitive_data_scanner_rule\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"miOWlXzWQXCJaJktLUW40g\",\"attributes\":{\"name\":\"Test-Update_Scanning_Rule_returns_OK_response-1674565940\",\"namespaces\":[\"admin.email\"],\"excluded_namespaces\":[],\"pattern\":\"pattern\",\"text_replacement\":{\"type\":\"none\"},\"tags\":[\"sensitive_data:true\"],\"is_enabled\":true},\"type\":\"sensitive_data_scanner_rule\",\"relationships\":{\"group\":{\"data\":{\"id\":\"g0hUfjkqQEejgzkTN8J1sA\",\"type\":\"sensitive_data_scanner_group\"}}}},\"meta\":{\"version\":12588}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:20 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"is_enabled\":true,\"name\":\"Test-Update_Scanning_Rule_returns_OK_response-1674565940\",\"pattern\":\"pattern\",\"tags\":[\"sensitive_data:true\"],\"text_replacement\":{\"type\":\"none\"}},\"id\":\"miOWlXzWQXCJaJktLUW40g\",\"relationships\":{\"group\":{\"data\":{\"id\":\"g0hUfjkqQEejgzkTN8J1sA\",\"type\":\"sensitive_data_scanner_group\"}}},\"type\":\"sensitive_data_scanner_rule\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules/miOWlXzWQXCJaJktLUW40g"}, "response": {"body": {"string": "{\"meta\":{\"version\":12589}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:20 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules/miOWlXzWQXCJaJktLUW40g"}, "response": {"body": {"string": "{\"meta\":{\"version\":12590}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:20 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups/g0hUfjkqQEejgzkTN8J1sA"}, "response": {"body": {"string": "{\"meta\":{\"version\":12591}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Tue, 24 Jan 2023 13:12:20 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config"}, "response": {"body": {"string": "{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"attributes\":{},\"type\":\"sensitive_data_scanner_configuration\",\"relationships\":{\"groups\":{\"data\":[{\"id\":\"z9vY6YO8R-2q6dv_rTUOCA\",\"type\":\"sensitive_data_scanner_group\"},{\"id\":\"01OnORacS5qHeVO7C97drg\",\"type\":\"sensitive_data_scanner_group\"}]}}},\"meta\":{\"version\":127247,\"count_limit\":100,\"group_count_limit\":20,\"is_pci_compliant\":false,\"has_highlight_enabled\":true,\"has_multi_pass_enabled\":true},\"included\":[{\"id\":\"z9vY6YO8R-2q6dv_rTUOCA\",\"attributes\":{\"name\":\"Example-Update_Scanning_Group_returns_OK_response_1696199477\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}},{\"id\":\"01OnORacS5qHeVO7C97drg\",\"attributes\":{\"name\":\"my-test-group\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:40 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"]},\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups"}, "response": {"body": {"string": "{\"data\":{\"id\":\"LAf2eSOlTQ6RTz2rwiQGsA\",\"attributes\":{\"name\":\"my-test-group\",\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"]},\"type\":\"sensitive_data_scanner_group\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}},\"meta\":{\"version\":127248}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:40 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"is_enabled\":true,\"name\":\"Test-Update_Scanning_Rule_returns_OK_response-1702458400\",\"namespaces\":[\"admin.email\"],\"pattern\":\"pattern\",\"tags\":[\"sensitive_data:true\"],\"text_replacement\":{\"type\":\"none\"}},\"relationships\":{\"group\":{\"data\":{\"id\":\"LAf2eSOlTQ6RTz2rwiQGsA\",\"type\":\"sensitive_data_scanner_group\"}}},\"type\":\"sensitive_data_scanner_rule\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"N7Hb8CgTRayW0VADXfo9Wg\",\"attributes\":{\"name\":\"Test-Update_Scanning_Rule_returns_OK_response-1702458400\",\"namespaces\":[\"admin.email\"],\"excluded_namespaces\":[],\"pattern\":\"pattern\",\"text_replacement\":{\"type\":\"none\"},\"tags\":[\"sensitive_data:true\"],\"is_enabled\":true},\"type\":\"sensitive_data_scanner_rule\",\"relationships\":{\"group\":{\"data\":{\"id\":\"LAf2eSOlTQ6RTz2rwiQGsA\",\"type\":\"sensitive_data_scanner_group\"}}}},\"meta\":{\"version\":127249}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:40 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"is_enabled\":true,\"name\":\"Test-Update_Scanning_Rule_returns_OK_response-1702458400\",\"pattern\":\"pattern\",\"priority\":5,\"tags\":[\"sensitive_data:true\"],\"text_replacement\":{\"type\":\"none\"}},\"id\":\"N7Hb8CgTRayW0VADXfo9Wg\",\"relationships\":{\"group\":{\"data\":{\"id\":\"LAf2eSOlTQ6RTz2rwiQGsA\",\"type\":\"sensitive_data_scanner_group\"}}},\"type\":\"sensitive_data_scanner_rule\"},\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "patch", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules/N7Hb8CgTRayW0VADXfo9Wg"}, "response": {"body": {"string": "{\"meta\":{\"version\":127250}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:40 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/rules/N7Hb8CgTRayW0VADXfo9Wg"}, "response": {"body": {"string": "{\"meta\":{\"version\":127251}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:40 GMT"}, {"request": {"body": {"string": "{\"meta\":{}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups/LAf2eSOlTQ6RTz2rwiQGsA"}, "response": {"body": {"string": "{\"meta\":{\"version\":127252}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 13 Dec 2023 09:06:40 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Create-a-new-rule-returns-Created-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/Create-a-new-rule-returns-Created-response.frozen new file mode 100644 index 000000000..8f14dcc84 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Create-a-new-rule-returns-Created-response.frozen @@ -0,0 +1 @@ +2023-11-01T22:17:30.469Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Create-a-new-rule-returns-Created-response.json b/tests/scenarios/cassettes/v2/service_scorecards/Create-a-new-rule-returns-Created-response.json new file mode 100644 index 000000000..bfb33ab5c --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Create-a-new-rule-returns-Created-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Create_a_new_rule_returns_Created_response-1698877050\",\"scorecard_name\":\"Observability Best Practices\"},\"type\":\"rule\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"b6a60878-a110-4df5-b8aa-648d7f02dd02\",\"type\":\"rule\",\"attributes\":{\"category\":\"Observability Best Practices\",\"created_at\":\"2023-11-01T22:17:30.596814Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T22:17:30.596814Z\",\"name\":\"Test-Create_a_new_rule_returns_Created_response-1698877050\",\"scorecard_name\":\"Observability Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"hA5zOZJXXJ4K\",\"type\":\"scorecard\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:30 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules/b6a60878-a110-4df5-b8aa-648d7f02dd02"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:30 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-Bad-Request-response.frozen new file mode 100644 index 000000000..9cb1eb9cc --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2023-11-02T21:19:11.538Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-Bad-Request-response.json new file mode 100644 index 000000000..14aa93422 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-Bad-Request-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Create_outcomes_batch_returns_Bad_Request_response-1698959951\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"type\":\"rule\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"0451feb1-fb1b-463f-ba02-4568feb2795b\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-02T21:19:11.70524Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-02T21:19:11.70524Z\",\"name\":\"Test-Create_outcomes_batch_returns_Bad_Request_response-1698959951\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Thu, 02 Nov 2023 21:19:11 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"results\":[{\"remarks\":\"See: Services\",\"rule_id\":\"0451feb1-fb1b-463f-ba02-4568feb2795b\",\"service_name\":\"\",\"state\":\"pass\"}]},\"type\":\"batched-outcome\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/scorecard/outcomes/batch"}, "response": {"body": {"string": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"service_name\\\" is required\"}]}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 400, "message": "Bad Request"}}, "recorded_at": "Thu, 02 Nov 2023 21:19:11 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules/0451feb1-fb1b-463f-ba02-4568feb2795b"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Thu, 02 Nov 2023 21:19:11 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-OK-response.frozen new file mode 100644 index 000000000..05d6b8fff --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-01T22:17:31.442Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-OK-response.json b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-OK-response.json new file mode 100644 index 000000000..b4a43f38c --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Create-outcomes-batch-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Create_outcomes_batch_returns_OK_response-1698877051\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"type\":\"rule\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"b124b446-f246-41ab-b477-99293969cc5e\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T22:17:31.577258Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T22:17:31.577258Z\",\"name\":\"Test-Create_outcomes_batch_returns_OK_response-1698877051\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:31 GMT"}, {"request": {"body": {"string": "{\"data\":{\"attributes\":{\"results\":[{\"remarks\":\"See: Services\",\"rule_id\":\"b124b446-f246-41ab-b477-99293969cc5e\",\"service_name\":\"my-service\",\"state\":\"pass\"}]},\"type\":\"batched-outcome\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/scorecard/outcomes/batch"}, "response": {"body": {"string": "{\"data\":[{\"id\":\"b124b446-f246-41ab-b477-99293969cc5e\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"modified_at\":\"2023-11-01T22:17:31.68808Z\",\"remarks\":\"See: \\u003ca href=\\\"https://app.datadoghq.com/services\\\"\\u003eServices\\u003c/a\\u003e\",\"service_name\":\"my-service\",\"state\":\"pass\"},\"relationships\":{\"rule\":{\"data\":{\"id\":\"b124b446-f246-41ab-b477-99293969cc5e\",\"type\":\"rule\"}}}}],\"meta\":{\"total_received\":1,\"total_updated\":1}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:31 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules/b124b446-f246-41ab-b477-99293969cc5e"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:31 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-Not-Found-response.frozen new file mode 100644 index 000000000..9aba106e1 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2023-11-01T22:17:30.908Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-Not-Found-response.json new file mode 100644 index 000000000..8888fd0a0 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-Not-Found-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules/2a4f524e-168a-429d-bb75-7b1ffeab0cbb"}, "response": {"body": {"string": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"rule not found: 2a4f524e-168a-429d-bb75-7b1ffeab0cbb\"}]}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 404, "message": "Not Found"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:30 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-OK-response.frozen new file mode 100644 index 000000000..b8fc66c99 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-01T22:17:31.023Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-OK-response.json b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-OK-response.json new file mode 100644 index 000000000..d1f13997d --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Delete-a-rule-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": {"string": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Delete_a_rule_returns_OK_response-1698877051\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"type\":\"rule\"}}", "encoding": null}, "headers": {"Accept": ["application/json"], "Content-Type": ["application/json"]}, "method": "post", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules"}, "response": {"body": {"string": "{\"data\":{\"id\":\"74d92a4b-2242-488d-b3de-dd557eecb18b\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T22:17:31.138205Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T22:17:31.138205Z\",\"name\":\"Test-Delete_a_rule_returns_OK_response-1698877051\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 201, "message": "Created"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:31 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules/74d92a4b-2242-488d-b3de-dd557eecb18b"}, "response": {"body": {"string": "", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 204, "message": "No Content"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:31 GMT"}, {"request": {"body": "", "headers": {"Accept": ["*/*"]}, "method": "delete", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules/74d92a4b-2242-488d-b3de-dd557eecb18b"}, "response": {"body": {"string": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"rule not found: 74d92a4b-2242-488d-b3de-dd557eecb18b\"}]}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 404, "message": "Not Found"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:31 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Get-all-rules-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/Get-all-rules-returns-OK-response.frozen new file mode 100644 index 000000000..018470cf4 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Get-all-rules-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-01T22:17:30.803Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/Get-all-rules-returns-OK-response.json b/tests/scenarios/cassettes/v2/service_scorecards/Get-all-rules-returns-OK-response.json new file mode 100644 index 000000000..2b8ec992f --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/Get-all-rules-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules"}, "response": {"body": {"string": "{\"data\":[{\"id\":\"d45d511e-f03a-42e9-8ef6-5d00a9456c32\",\"type\":\"rule\",\"attributes\":{\"category\":\"Deployments automated via Deployment Trains\",\"created_at\":\"2023-11-01T14:11:49.302387Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T14:11:49.302387Z\",\"name\":\"Team Defined\",\"scorecard_name\":\"Deployments automated via Deployment Trains\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"_M1Ygy3QcqRI\",\"type\":\"scorecard\"}}}},{\"id\":\"0e6eac8b-5c4c-4438-a6c5-e631f7a2c90e\",\"type\":\"rule\",\"attributes\":{\"category\":\"Observability Best Practices\",\"created_at\":\"2023-11-01T18:04:56.125512Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T18:04:56.125512Z\",\"name\":\"Test-Create_a_new_rule_returns_Created_response-1698861895\",\"scorecard_name\":\"Observability Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"hA5zOZJXXJ4K\",\"type\":\"scorecard\"}}}},{\"id\":\"2609deb7-bbd0-4277-bf48-2265328bc4ca\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T20:08:49.073289Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:08:49.073289Z\",\"name\":\"Test-Create_outcomes_batch_returns_OK_response-1698869328\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}},{\"id\":\"c939cd35-77ba-42af-aa04-f1a027e0dae6\",\"type\":\"rule\",\"attributes\":{\"category\":\"Observability Best Practices\",\"created_at\":\"2023-11-01T20:03:46.852914Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:03:46.852914Z\",\"name\":\"Test-Typescript-Create_a_new_rule_returns_Created_response-1698869026\",\"scorecard_name\":\"Observability Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"hA5zOZJXXJ4K\",\"type\":\"scorecard\"}}}},{\"id\":\"e8ac31f0-488f-40b1-a83c-cd747e2eeadc\",\"type\":\"rule\",\"attributes\":{\"category\":\"Observability Best Practices\",\"created_at\":\"2023-11-01T20:05:34.033986Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:05:34.033986Z\",\"name\":\"Test-Typescript-Create_a_new_rule_returns_Created_response-1698869133\",\"scorecard_name\":\"Observability Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"hA5zOZJXXJ4K\",\"type\":\"scorecard\"}}}},{\"id\":\"a5352494-7fad-4e4b-9c7a-3ecd90f30d27\",\"type\":\"rule\",\"attributes\":{\"category\":\"Observability Best Practices\",\"created_at\":\"2023-11-01T20:25:35.217803Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:25:35.217803Z\",\"name\":\"Test-Typescript-Create_a_new_rule_returns_Created_response-1698870335\",\"scorecard_name\":\"Observability Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"hA5zOZJXXJ4K\",\"type\":\"scorecard\"}}}},{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T20:08:35.347219Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:08:35.347219Z\",\"name\":\"Test-Typescript-Create_outcomes_batch_returns_OK_response-1698869315\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}},{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T20:25:35.374915Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:25:35.374915Z\",\"name\":\"Test-Typescript-Create_outcomes_batch_returns_OK_response-1698870335\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}},{\"id\":\"76460cec-323c-4215-81ae-b16aa160d0f1\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T20:25:35.637942Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:25:35.637942Z\",\"name\":\"Test-Typescript-Delete_a_rule_returns_OK_response-1698870335\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}}],\"links\":{\"next\":\"/api/v2/scorecard/rules?page%5Blimit%5D=100\\u0026page%5Boffset%5D=100\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:30 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response-with-pagination.frozen b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response-with-pagination.frozen new file mode 100644 index 000000000..3af402a97 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response-with-pagination.frozen @@ -0,0 +1 @@ +2023-11-02T15:08:06.419Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response-with-pagination.json b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response-with-pagination.json new file mode 100644 index 000000000..d3ba846e1 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response-with-pagination.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/outcomes?page%5Bsize%5D=2&fields%5Boutcome%5D=state&filter%5Boutcome%5D%5Bservice_name%5D=my-service"}, "response": {"body": {"string": "{\"data\":[{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"state\":\"pass\"}},{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"state\":\"pass\"}}],\"links\":{\"next\":\"/api/v2/scorecard/outcomes?fields%5Boutcome%5D=state\\u0026filter%5Boutcome%5D%5Bservice_name%5D=my-service\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=2\\u0026page%5Bsize%5D=2\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 02 Nov 2023 15:08:06 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/outcomes?page%5Bsize%5D=2&page%5Boffset%5D=2&fields%5Boutcome%5D=state&filter%5Boutcome%5D%5Bservice_name%5D=my-service"}, "response": {"body": {"string": "{\"data\":[],\"links\":{\"next\":\"/api/v2/scorecard/outcomes?fields%5Boutcome%5D=state\\u0026filter%5Boutcome%5D%5Bservice_name%5D=my-service\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=4\\u0026page%5Bsize%5D=2\",\"previous\":\"/api/v2/scorecard/outcomes?fields%5Boutcome%5D=state\\u0026filter%5Boutcome%5D%5Bservice_name%5D=my-service\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=0\\u0026page%5Bsize%5D=2\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 02 Nov 2023 15:08:06 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response.frozen new file mode 100644 index 000000000..5f65337aa --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-01T22:17:32.235Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response.json b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response.json new file mode 100644 index 000000000..0efd606e4 --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rule-outcomes-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/outcomes"}, "response": {"body": {"string": "{\"data\":[{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"modified_at\":\"2023-11-01T20:08:35.478323Z\",\"remarks\":\"See: \\u003ca href=\\\"https://app.datadoghq.com/services\\\"\\u003eServices\\u003c/a\\u003e\",\"service_name\":\"my-service\",\"state\":\"pass\"},\"relationships\":{\"rule\":{\"data\":{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\",\"type\":\"rule\"}}}},{\"id\":\"2609deb7-bbd0-4277-bf48-2265328bc4ca\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"modified_at\":\"2023-11-01T20:08:49.202899Z\",\"remarks\":\"See: \\u003ca href=\\\"https://app.datadoghq.com/services\\\"\\u003eServices\\u003c/a\\u003e\",\"service_name\":\"my-service\",\"state\":\"pass\"},\"relationships\":{\"rule\":{\"data\":{\"id\":\"2609deb7-bbd0-4277-bf48-2265328bc4ca\",\"type\":\"rule\"}}}},{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"modified_at\":\"2023-11-01T20:25:35.504243Z\",\"remarks\":\"See: \\u003ca href=\\\"https://app.datadoghq.com/services\\\"\\u003eServices\\u003c/a\\u003e\",\"service_name\":\"my-service\",\"state\":\"pass\"},\"relationships\":{\"rule\":{\"data\":{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\",\"type\":\"rule\"}}}}],\"links\":{\"next\":\"/api/v2/scorecard/outcomes?page%5Blimit%5D=100\\u0026page%5Boffset%5D=100\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Wed, 01 Nov 2023 22:17:32 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response-with-pagination.frozen b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response-with-pagination.frozen new file mode 100644 index 000000000..8249aadbe --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response-with-pagination.frozen @@ -0,0 +1 @@ +2023-11-02T15:06:55.772Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response-with-pagination.json b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response-with-pagination.json new file mode 100644 index 000000000..9342e4d3e --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response-with-pagination.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules?page%5Bsize%5D=2&fields%5Brule%5D=name&filter%5Brule%5D%5Bcustom%5D=true"}, "response": {"body": {"string": "{\"data\":[{\"id\":\"a5352494-7fad-4e4b-9c7a-3ecd90f30d27\",\"type\":\"rule\",\"attributes\":{\"name\":\"Test-Typescript-Create_a_new_rule_returns_Created_response-1698870335\"}},{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\",\"type\":\"rule\",\"attributes\":{\"name\":\"Test-Typescript-Create_outcomes_batch_returns_OK_response-1698869315\"}}],\"links\":{\"next\":\"/api/v2/scorecard/rules?fields%5Brule%5D=name\\u0026filter%5Brule%5D%5Bcustom%5D=true\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=2\\u0026page%5Bsize%5D=2\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 02 Nov 2023 15:06:55 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules?page%5Bsize%5D=2&page%5Boffset%5D=2&fields%5Brule%5D=name&filter%5Brule%5D%5Bcustom%5D=true"}, "response": {"body": {"string": "{\"data\":[{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\",\"type\":\"rule\",\"attributes\":{\"name\":\"Test-Typescript-Create_outcomes_batch_returns_OK_response-1698870335\"}},{\"id\":\"76460cec-323c-4215-81ae-b16aa160d0f1\",\"type\":\"rule\",\"attributes\":{\"name\":\"Test-Typescript-Delete_a_rule_returns_OK_response-1698870335\"}}],\"links\":{\"next\":\"/api/v2/scorecard/rules?fields%5Brule%5D=name\\u0026filter%5Brule%5D%5Bcustom%5D=true\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=4\\u0026page%5Bsize%5D=2\",\"previous\":\"/api/v2/scorecard/rules?fields%5Brule%5D=name\\u0026filter%5Brule%5D%5Bcustom%5D=true\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=0\\u0026page%5Bsize%5D=2\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 02 Nov 2023 15:06:55 GMT"}, {"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules?page%5Bsize%5D=2&page%5Boffset%5D=4&fields%5Brule%5D=name&filter%5Brule%5D%5Bcustom%5D=true"}, "response": {"body": {"string": "{\"data\":[],\"links\":{\"next\":\"/api/v2/scorecard/rules?fields%5Brule%5D=name\\u0026filter%5Brule%5D%5Bcustom%5D=true\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=6\\u0026page%5Bsize%5D=2\",\"previous\":\"/api/v2/scorecard/rules?fields%5Brule%5D=name\\u0026filter%5Brule%5D%5Bcustom%5D=true\\u0026page%5Blimit%5D=2\\u0026page%5Boffset%5D=2\\u0026page%5Bsize%5D=2\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 02 Nov 2023 15:06:55 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response.frozen new file mode 100644 index 000000000..4d4b6a9ca --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-02T17:23:59.660Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response.json b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response.json new file mode 100644 index 000000000..4e0d9a30d --- /dev/null +++ b/tests/scenarios/cassettes/v2/service_scorecards/List-all-rules-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/scorecard/rules"}, "response": {"body": {"string": "{\"data\":[{\"id\":\"a5352494-7fad-4e4b-9c7a-3ecd90f30d27\",\"type\":\"rule\",\"attributes\":{\"category\":\"Observability Best Practices\",\"created_at\":\"2023-11-01T20:25:35.217803Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:25:35.217803Z\",\"name\":\"Test-Typescript-Create_a_new_rule_returns_Created_response-1698870335\",\"scorecard_name\":\"Observability Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"hA5zOZJXXJ4K\",\"type\":\"scorecard\"}}}},{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T20:08:35.347219Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:08:35.347219Z\",\"name\":\"Test-Typescript-Create_outcomes_batch_returns_OK_response-1698869315\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}},{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T20:25:35.374915Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:25:35.374915Z\",\"name\":\"Test-Typescript-Create_outcomes_batch_returns_OK_response-1698870335\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}},{\"id\":\"76460cec-323c-4215-81ae-b16aa160d0f1\",\"type\":\"rule\",\"attributes\":{\"category\":\"OpenAPI Spec Test Best Practices\",\"created_at\":\"2023-11-01T20:25:35.637942Z\",\"custom\":true,\"enabled\":true,\"modified_at\":\"2023-11-01T20:25:35.637942Z\",\"name\":\"Test-Typescript-Delete_a_rule_returns_OK_response-1698870335\",\"owner\":\"Datadog\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"relationships\":{\"scorecard\":{\"data\":{\"id\":\"qsxpoYRhU_yz\",\"type\":\"scorecard\"}}}}],\"links\":{\"next\":\"/api/v2/scorecard/rules?page%5Blimit%5D=100\\u0026page%5Boffset%5D=100\"}}", "encoding": null}, "headers": {"Content-Type": ["application/vnd.api+json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 02 Nov 2023 17:23:59 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-Bad-Request-response.frozen new file mode 100644 index 000000000..7f0b1894b --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2023-11-16T19:41:02.013Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-Bad-Request-response.json new file mode 100644 index 000000000..b0aefbb6a --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-Bad-Request-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json;datetime-format=rfc3339"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/cost_by_tag/monthly_cost_attribution?start_month=2023-11-11T19%3A41%3A02.013Z&end_month=2023-11-13T19%3A41%3A02.013Z&fields=not_a_product"}, "response": {"body": {"string": "{\"errors\":[\"API called with non-parent org keys. Data is only available at the root level org\"]}", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 400, "message": "Bad Request"}}, "recorded_at": "Thu, 16 Nov 2023 19:41:02 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-OK-response.frozen new file mode 100644 index 000000000..fa2e3101e --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-16T19:43:19.607Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-OK-response.json b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-OK-response.json new file mode 100644 index 000000000..59176e83d --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-Monthly-Cost-Attribution-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json;datetime-format=rfc3339"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/cost_by_tag/monthly_cost_attribution?start_month=2023-11-11T19%3A43%3A19.607Z&end_month=2023-11-13T19%3A43%3A19.607Z&fields=infra_host_total_cost"}, "response": {"body": {"string": "{\"data\":[]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 16 Nov 2023 19:43:19 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-active-billing-dimensions-for-cost-attribution-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/usage_metering/Get-active-billing-dimensions-for-cost-attribution-returns-OK-response.frozen new file mode 100644 index 000000000..39059c18a --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-active-billing-dimensions-for-cost-attribution-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-16T16:03:39.691Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-active-billing-dimensions-for-cost-attribution-returns-OK-response.json b/tests/scenarios/cassettes/v2/usage_metering/Get-active-billing-dimensions-for-cost-attribution-returns-OK-response.json new file mode 100644 index 000000000..db2b5b3c3 --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-active-billing-dimensions-for-cost-attribution-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json;datetime-format=rfc3339"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/cost_by_tag/active_billing_dimensions"}, "response": {"body": {"string": "{\"data\":{\"type\":\"billing_dimensions\",\"id\":\"f145e21e840c6db03f75c179877629eb08531aa6f314f97658261680e49ab1f1\",\"attributes\":{\"values\":[\"apm_fargate\",\"apm_host\",\"apm_host_enterprise\",\"apm_host_no_usm\",\"apm_host_pro\",\"apm_profiler_host\",\"apm_trace_search\",\"application_security_fargate\",\"application_security_host\",\"application_vulnerability_management_oss_host\",\"audit_trail\",\"ci_pipeline\",\"ci_pipeline_indexed_spans\",\"ci_test_indexed_spans\",\"ci_testing\",\"cloud_cost_management\",\"csm_container_enterprise\",\"csm_host_enterprise\",\"csm_host_pro\",\"cspm_container\",\"cspm_host\",\"custom_event\",\"cws_container\",\"cws_host\",\"data_stream_monitoring\",\"dbm_host\",\"dbm_normalized_queries\",\"fargate_container\",\"fargate_container_apm_and_profiler\",\"fargate_container_profiler\",\"incident_management\",\"infra_and_apm_host\",\"infra_container\",\"infra_container_excl_agent\",\"infra_host\",\"ingested_spans\",\"ingested_timeseries\",\"iot\",\"lambda_function\",\"logs_forwarding\",\"logs_indexed_15day\",\"logs_indexed_180day\",\"logs_indexed_30day\",\"logs_indexed_360day\",\"logs_indexed_3day\",\"logs_indexed_45day\",\"logs_indexed_60day\",\"logs_indexed_7day\",\"logs_indexed_90day\",\"logs_indexed_custom_retention\",\"logs_ingested\",\"network_device\",\"npm_host\",\"observability_pipeline\",\"online_archive\",\"premier_support\",\"prof_container\",\"prof_host\",\"rum\",\"rum_lite\",\"rum_replay\",\"sensitive_data_scanner\",\"serverless_apm\",\"serverless_infra\",\"serverless_invocation\",\"siem\",\"standard_timeseries\",\"synthetics_api_tests\",\"synthetics_app_testing\",\"synthetics_browser_checks\",\"timeseries\",\"usm_standalone\",\"usm_within_infra_host\",\"workflow_execution\"],\"month\":\"2023-10-01T00:00:00Z\"}}}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 16 Nov 2023 16:03:39 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-projected-cost-across-your-account-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/usage_metering/Get-projected-cost-across-your-account-returns-OK-response.frozen new file mode 100644 index 000000000..36d8e279e --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-projected-cost-across-your-account-returns-OK-response.frozen @@ -0,0 +1 @@ +2023-11-16T09:28:12.658Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/usage_metering/Get-projected-cost-across-your-account-returns-OK-response.json b/tests/scenarios/cassettes/v2/usage_metering/Get-projected-cost-across-your-account-returns-OK-response.json new file mode 100644 index 000000000..fedba6b0d --- /dev/null +++ b/tests/scenarios/cassettes/v2/usage_metering/Get-projected-cost-across-your-account-returns-OK-response.json @@ -0,0 +1 @@ +{"http_interactions": [{"request": {"body": "", "headers": {"Accept": ["application/json;datetime-format=rfc3339"]}, "method": "get", "uri": "https://api.datadoghq.com/api/v2/usage/projected_cost?view=sub-org"}, "response": {"body": {"string": "{\"data\":[{\"type\":\"projected_cost\",\"id\":\"0e394fce15395fc02ab31e9968df0271e4b290e5647f44a56a47c91a03220f2d\",\"attributes\":{\"org_name\":\"Datadog \\u308c\\u304a \\ud83c\\udf7b\\u2600\\ufe0f\\ud83d\\ude0e\\ud83c\\udfd6\\ufe0f \\u30c7\\u30fc\\u30bf\\u30c9\\u30c3\\u30b0\",\"public_id\":\"yB5yjZ\",\"region\":\"us\",\"projected_total_cost\":270247170,\"date\":\"2023-11-30T00:00:00Z\",\"charges\":[{\"product_name\":\"apm_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"apm_host\",\"charge_type\":\"projected_on_demand\",\"cost\":3621671.999987},{\"product_name\":\"apm_host\",\"charge_type\":\"total\",\"cost\":3621671.999987},{\"product_name\":\"apm_trace_search\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"apm_trace_search\",\"charge_type\":\"projected_on_demand\",\"cost\":3478141.42732},{\"product_name\":\"apm_trace_search\",\"charge_type\":\"total\",\"cost\":3478141.42732},{\"product_name\":\"application_security_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"application_security_host\",\"charge_type\":\"projected_on_demand\",\"cost\":80748},{\"product_name\":\"application_security_host\",\"charge_type\":\"total\",\"cost\":80748},{\"product_name\":\"application_vulnerability_management_oss_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"application_vulnerability_management_oss_host\",\"charge_type\":\"projected_on_demand\",\"cost\":261075.000001},{\"product_name\":\"application_vulnerability_management_oss_host\",\"charge_type\":\"total\",\"cost\":261075.000001},{\"product_name\":\"audit_trail\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"audit_trail\",\"charge_type\":\"projected_on_demand\",\"cost\":7871276.838406},{\"product_name\":\"audit_trail\",\"charge_type\":\"total\",\"cost\":7871276.838406},{\"product_name\":\"ci_pipeline\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"ci_pipeline\",\"charge_type\":\"projected_on_demand\",\"cost\":30348},{\"product_name\":\"ci_pipeline\",\"charge_type\":\"total\",\"cost\":30348},{\"product_name\":\"ci_pipeline_indexed_spans\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"ci_pipeline_indexed_spans\",\"charge_type\":\"projected_on_demand\",\"cost\":0},{\"product_name\":\"ci_pipeline_indexed_spans\",\"charge_type\":\"total\",\"cost\":0},{\"product_name\":\"ci_test_indexed_spans\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"ci_test_indexed_spans\",\"charge_type\":\"projected_on_demand\",\"cost\":11280.06966},{\"product_name\":\"ci_test_indexed_spans\",\"charge_type\":\"total\",\"cost\":11280.06966},{\"product_name\":\"ci_testing\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"ci_testing\",\"charge_type\":\"projected_on_demand\",\"cost\":46458},{\"product_name\":\"ci_testing\",\"charge_type\":\"total\",\"cost\":46458},{\"product_name\":\"cloud_cost_management\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"cloud_cost_management\",\"charge_type\":\"projected_on_demand\",\"cost\":911206.8},{\"product_name\":\"cloud_cost_management\",\"charge_type\":\"total\",\"cost\":911206.8},{\"product_name\":\"cspm_container\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"cspm_container\",\"charge_type\":\"projected_on_demand\",\"cost\":975491.947438},{\"product_name\":\"cspm_container\",\"charge_type\":\"total\",\"cost\":975491.947438},{\"product_name\":\"cspm_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"cspm_host\",\"charge_type\":\"projected_on_demand\",\"cost\":939042.000004},{\"product_name\":\"cspm_host\",\"charge_type\":\"total\",\"cost\":939042.000004},{\"product_name\":\"custom_event\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"custom_event\",\"charge_type\":\"projected_on_demand\",\"cost\":0},{\"product_name\":\"custom_event\",\"charge_type\":\"total\",\"cost\":0},{\"product_name\":\"cws_container\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"cws_container\",\"charge_type\":\"projected_on_demand\",\"cost\":2046666.667701},{\"product_name\":\"cws_container\",\"charge_type\":\"total\",\"cost\":2046666.667701},{\"product_name\":\"cws_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"cws_host\",\"charge_type\":\"projected_on_demand\",\"cost\":1650114.000002},{\"product_name\":\"cws_host\",\"charge_type\":\"total\",\"cost\":1650114.000002},{\"product_name\":\"data_stream_monitoring\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"data_stream_monitoring\",\"charge_type\":\"projected_on_demand\",\"cost\":127476},{\"product_name\":\"data_stream_monitoring\",\"charge_type\":\"total\",\"cost\":127476},{\"product_name\":\"dbm_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"dbm_host\",\"charge_type\":\"projected_on_demand\",\"cost\":85680},{\"product_name\":\"dbm_host\",\"charge_type\":\"total\",\"cost\":85680},{\"product_name\":\"dbm_normalized_queries\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"dbm_normalized_queries\",\"charge_type\":\"projected_on_demand\",\"cost\":17961.482743},{\"product_name\":\"dbm_normalized_queries\",\"charge_type\":\"total\",\"cost\":17961.482743},{\"product_name\":\"fargate_container\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"fargate_container\",\"charge_type\":\"projected_on_demand\",\"cost\":12.6},{\"product_name\":\"fargate_container\",\"charge_type\":\"total\",\"cost\":12.6},{\"product_name\":\"infra_container_excl_agent\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"infra_container_excl_agent\",\"charge_type\":\"projected_on_demand\",\"cost\":983432.229551},{\"product_name\":\"infra_container_excl_agent\",\"charge_type\":\"total\",\"cost\":983432.229551},{\"product_name\":\"infra_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"infra_host\",\"charge_type\":\"projected_on_demand\",\"cost\":1948589.999991},{\"product_name\":\"infra_host\",\"charge_type\":\"total\",\"cost\":1948589.999991},{\"product_name\":\"ingested_spans\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"ingested_spans\",\"charge_type\":\"projected_on_demand\",\"cost\":763395.896172},{\"product_name\":\"ingested_spans\",\"charge_type\":\"total\",\"cost\":763395.896172},{\"product_name\":\"ingested_timeseries\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"ingested_timeseries\",\"charge_type\":\"projected_on_demand\",\"cost\":256290.95456},{\"product_name\":\"ingested_timeseries\",\"charge_type\":\"total\",\"cost\":256290.95456},{\"product_name\":\"iot\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"iot\",\"charge_type\":\"projected_on_demand\",\"cost\":86.4},{\"product_name\":\"iot\",\"charge_type\":\"total\",\"cost\":86.4},{\"product_name\":\"logs_forwarding\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_forwarding\",\"charge_type\":\"projected_on_demand\",\"cost\":34.75},{\"product_name\":\"logs_forwarding\",\"charge_type\":\"total\",\"cost\":34.75},{\"product_name\":\"logs_indexed_15day\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_15day\",\"charge_type\":\"projected_on_demand\",\"cost\":7970506.190932},{\"product_name\":\"logs_indexed_15day\",\"charge_type\":\"total\",\"cost\":7970506.190932},{\"product_name\":\"logs_indexed_180day\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_180day\",\"charge_type\":\"projected_on_demand\",\"cost\":2237.11},{\"product_name\":\"logs_indexed_180day\",\"charge_type\":\"total\",\"cost\":2237.11},{\"product_name\":\"logs_indexed_30day\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_30day\",\"charge_type\":\"projected_on_demand\",\"cost\":379727.51},{\"product_name\":\"logs_indexed_30day\",\"charge_type\":\"total\",\"cost\":379727.51},{\"product_name\":\"logs_indexed_3day\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_3day\",\"charge_type\":\"projected_on_demand\",\"cost\":1212.144311},{\"product_name\":\"logs_indexed_3day\",\"charge_type\":\"total\",\"cost\":1212.144311},{\"product_name\":\"logs_indexed_60day\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_60day\",\"charge_type\":\"projected_on_demand\",\"cost\":134101.664192},{\"product_name\":\"logs_indexed_60day\",\"charge_type\":\"total\",\"cost\":134101.664192},{\"product_name\":\"logs_indexed_7day\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_7day\",\"charge_type\":\"projected_on_demand\",\"cost\":278030.21},{\"product_name\":\"logs_indexed_7day\",\"charge_type\":\"total\",\"cost\":278030.21},{\"product_name\":\"logs_indexed_90day\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_90day\",\"charge_type\":\"projected_on_demand\",\"cost\":5078.064104},{\"product_name\":\"logs_indexed_90day\",\"charge_type\":\"total\",\"cost\":5078.064104},{\"product_name\":\"logs_indexed_custom_retention\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_indexed_custom_retention\",\"charge_type\":\"projected_on_demand\",\"cost\":1665269.902158},{\"product_name\":\"logs_indexed_custom_retention\",\"charge_type\":\"total\",\"cost\":1665269.902158},{\"product_name\":\"logs_ingested\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"logs_ingested\",\"charge_type\":\"projected_on_demand\",\"cost\":2023915.700005},{\"product_name\":\"logs_ingested\",\"charge_type\":\"total\",\"cost\":2023915.700005},{\"product_name\":\"network_device\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"network_device\",\"charge_type\":\"projected_on_demand\",\"cost\":153},{\"product_name\":\"network_device\",\"charge_type\":\"total\",\"cost\":153},{\"product_name\":\"npm_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"npm_host\",\"charge_type\":\"projected_on_demand\",\"cost\":668642.399999},{\"product_name\":\"npm_host\",\"charge_type\":\"total\",\"cost\":668642.399999},{\"product_name\":\"observability_pipeline\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"observability_pipeline\",\"charge_type\":\"projected_on_demand\",\"cost\":1.68},{\"product_name\":\"observability_pipeline\",\"charge_type\":\"total\",\"cost\":1.68},{\"product_name\":\"online_archive\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"online_archive\",\"charge_type\":\"projected_on_demand\",\"cost\":11650663.48518},{\"product_name\":\"online_archive\",\"charge_type\":\"total\",\"cost\":11650663.48518},{\"product_name\":\"prof_container\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"prof_container\",\"charge_type\":\"projected_on_demand\",\"cost\":0},{\"product_name\":\"prof_container\",\"charge_type\":\"total\",\"cost\":0},{\"product_name\":\"prof_host\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"prof_host\",\"charge_type\":\"projected_on_demand\",\"cost\":2064365.000008},{\"product_name\":\"prof_host\",\"charge_type\":\"total\",\"cost\":2064365.000008},{\"product_name\":\"rum_lite\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"rum_lite\",\"charge_type\":\"projected_on_demand\",\"cost\":1945.666125},{\"product_name\":\"rum_lite\",\"charge_type\":\"total\",\"cost\":1945.666125},{\"product_name\":\"rum_replay\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"rum_replay\",\"charge_type\":\"projected_on_demand\",\"cost\":47975.876199},{\"product_name\":\"rum_replay\",\"charge_type\":\"total\",\"cost\":47975.876199},{\"product_name\":\"sensitive_data_scanner\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"sensitive_data_scanner\",\"charge_type\":\"projected_on_demand\",\"cost\":19394406.000091},{\"product_name\":\"sensitive_data_scanner\",\"charge_type\":\"total\",\"cost\":19394406.000091},{\"product_name\":\"serverless_apm\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"serverless_apm\",\"charge_type\":\"projected_on_demand\",\"cost\":565.638894},{\"product_name\":\"serverless_apm\",\"charge_type\":\"total\",\"cost\":565.638894},{\"product_name\":\"serverless_infra\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"serverless_infra\",\"charge_type\":\"projected_on_demand\",\"cost\":1656},{\"product_name\":\"serverless_infra\",\"charge_type\":\"total\",\"cost\":1656},{\"product_name\":\"siem\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"siem\",\"charge_type\":\"projected_on_demand\",\"cost\":6063219.000025},{\"product_name\":\"siem\",\"charge_type\":\"total\",\"cost\":6063219.000025},{\"product_name\":\"synthetics_api_tests\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"synthetics_api_tests\",\"charge_type\":\"projected_on_demand\",\"cost\":2165315.836614},{\"product_name\":\"synthetics_api_tests\",\"charge_type\":\"total\",\"cost\":2165315.836614},{\"product_name\":\"synthetics_browser_checks\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"synthetics_browser_checks\",\"charge_type\":\"projected_on_demand\",\"cost\":700419.437998},{\"product_name\":\"synthetics_browser_checks\",\"charge_type\":\"total\",\"cost\":700419.437998},{\"product_name\":\"timeseries\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"timeseries\",\"charge_type\":\"projected_on_demand\",\"cost\":188889904.951552},{\"product_name\":\"timeseries\",\"charge_type\":\"total\",\"cost\":188889904.951552},{\"product_name\":\"usm_only_no_charge\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"usm_only_no_charge\",\"charge_type\":\"projected_on_demand\",\"cost\":0},{\"product_name\":\"usm_only_no_charge\",\"charge_type\":\"total\",\"cost\":0},{\"product_name\":\"workflow_execution\",\"charge_type\":\"projected_committed\",\"cost\":0},{\"product_name\":\"workflow_execution\",\"charge_type\":\"projected_on_demand\",\"cost\":31377.92},{\"product_name\":\"workflow_execution\",\"charge_type\":\"total\",\"cost\":31377.92}]}}]}\n", "encoding": null}, "headers": {"Content-Type": ["application/json"]}, "status": {"code": 200, "message": "OK"}}, "recorded_at": "Thu, 16 Nov 2023 09:28:12 GMT"}], "recorded_with": "VCR 6.0.0"} \ No newline at end of file diff --git a/tests/scenarios/features/v1/aws_integration.feature b/tests/scenarios/features/v1/aws_integration.feature index d86bff2b3..b37be660e 100644 --- a/tests/scenarios/features/v1/aws_integration.feature +++ b/tests/scenarios/features/v1/aws_integration.feature @@ -23,10 +23,10 @@ Feature: AWS Integration When the request is sent Then the response status is 409 Conflict Error - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/cloud-integrations Scenario: Create an AWS integration returns "OK" response Given new "CreateAWSAccount" request - And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false, "opswork": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} + And body with value {"account_id": "{{ timestamp("now") }}00", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 200 OK @@ -72,10 +72,11 @@ Feature: AWS Integration When the request is sent Then the response status is 409 Conflict Error - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/cloud-integrations Scenario: Delete an AWS integration returns "OK" response - Given new "DeleteAWSAccount" request - And body with value {"account_id": "123456789012", "role_name": "DatadogAWSIntegrationRole"} + Given there is a valid "aws_account" in the system + And new "DeleteAWSAccount" request + And body with value {"account_id": "{{ timestamp("now") }}00", "role_name": "DatadogAWSIntegrationRole"} When the request is sent Then the response status is 200 OK @@ -179,11 +180,12 @@ Feature: AWS Integration When the request is sent Then the response status is 409 Conflict Error - @replay-only @skip-typescript @team:DataDog/cloud-integrations + @team:DataDog/cloud-integrations Scenario: Update an AWS integration returns "OK" response - Given new "UpdateAWSAccount" request - And body with value {"account_id": "123456789012", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": true, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": false, "resource_collection_enabled": true, "role_name": "datadog-role"} - And request contains "account_id" parameter with value "123456789012" - And request contains "role_name" parameter with value "datadog-role" + Given there is a valid "aws_account" in the system + And new "UpdateAWSAccount" request + And body with value {"account_id": "{{ timestamp("now") }}00", "account_specific_namespace_rules": {"auto_scaling": false}, "cspm_resource_collection_enabled": false, "excluded_regions": ["us-east-1", "us-west-2"], "filter_tags": ["$KEY:$VALUE"], "host_tags": ["$KEY:$VALUE"], "metrics_collection_enabled": true, "resource_collection_enabled": true, "role_name": "DatadogAWSIntegrationRole"} + And request contains "account_id" parameter with value "{{ timestamp("now") }}00" + And request contains "role_name" parameter with value "DatadogAWSIntegrationRole" When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/azure_integration.feature b/tests/scenarios/features/v1/azure_integration.feature index c7ef5e4b8..eaa91dce6 100644 --- a/tests/scenarios/features/v1/azure_integration.feature +++ b/tests/scenarios/features/v1/azure_integration.feature @@ -9,70 +9,72 @@ Feature: Azure Integration And a valid "appKeyAuth" key in the system And an instance of "AzureIntegration" API - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "Bad Request" response Given new "CreateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/azure-integrations Scenario: Create an Azure integration returns "OK" response Given new "CreateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "Bad Request" response Given new "DeleteAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/azure-integrations Scenario: Delete an Azure integration returns "OK" response - Given new "DeleteAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + Given there is a valid "azure_account" in the system + And new "DeleteAzureIntegration" request + And body with value {"client_id": "{{ uuid }}", "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: List all Azure integrations returns "Bad Request" response Given new "ListAzureIntegration" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: List all Azure integrations returns "OK" response Given new "ListAzureIntegration" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "Bad Request" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Update Azure integration host filters returns "OK" response Given new "UpdateAzureHostFilters" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "Bad Request" response Given new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "resource_collection_enabled": true, "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/azure-integrations Scenario: Update an Azure integration returns "OK" response - Given new "UpdateAzureIntegration" request - And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"} + Given there is a valid "azure_account" in the system + And new "UpdateAzureIntegration" request + And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "{{ uuid }}", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "{{ uuid }}", "new_tenant_name": "{{ uuid }}", "resource_collection_enabled": true, "tenant_name": "{{ uuid }}"} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/dashboard_payload.json b/tests/scenarios/features/v1/dashboard_payload.json new file mode 100644 index 000000000..0a1d764ab --- /dev/null +++ b/tests/scenarios/features/v1/dashboard_payload.json @@ -0,0 +1,35 @@ +{ + "layout_type": "ordered", + "title": "{{ unique }} with Profile Metrics Query", + "widgets": [ + { + "definition": { + "type": "timeseries", + "requests": [ + { + "profile_metrics_query": { + "compute": { + "aggregation": "sum", + "facet": "@prof_core_cpu_cores" + }, + "search": { + "query": "runtime:jvm" + }, + "group_by": [ + { + "facet": "service", + "limit": 10, + "sort": { + "aggregation": "sum", + "order": "desc", + "facet": "@prof_core_cpu_cores" + } + } + ] + } + } + ] + } + } + ] +} diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature new file mode 100644 index 000000000..0177acd4f --- /dev/null +++ b/tests/scenarios/features/v1/dashboards.feature @@ -0,0 +1,1107 @@ +@endpoint(dashboards) @endpoint(dashboards-v1) +Feature: Dashboards + Interact with your dashboard lists through the API to make it easier to + organize, find, and share all of your dashboards with your team and + organization. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Dashboards" API + + @team:DataDog/dashboards-backend + Scenario: Create a distribution widget using a histogram request containing a formulas and functions APM Stats query + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "description": "", "widgets": [ { "definition": { "title": "APM Stats - Request latency HOP", "title_size": "16", "title_align": "left", "show_legend": false, "type": "distribution", "xaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "yaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "requests": [ { "query": { "primary_tag_value": "*", "stat": "latency_distribution", "data_source": "apm_resource_stats", "name": "query1", "service": "azure-bill-import", "group_by": [ "resource_name" ], "env": "staging", "primary_tag_name": "datacenter", "operation_name": "universal.http.client" }, "request_type": "histogram", "style": { "palette": "dog_classic" } } ] }, "layout": { "x": 8, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].request_type" is equal to "histogram" + And the response "widgets[0].definition.requests[0].style" is equal to { "palette": "dog_classic" } + And the response "widgets[0].definition.requests[0].query.primary_tag_value" is equal to "*" + And the response "widgets[0].definition.requests[0].query.stat" is equal to "latency_distribution" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "apm_resource_stats" + And the response "widgets[0].definition.requests[0].query.name" is equal to "query1" + And the response "widgets[0].definition.requests[0].query.service" is equal to "azure-bill-import" + And the response "widgets[0].definition.requests[0].query.group_by" is equal to ["resource_name"] + And the response "widgets[0].definition.requests[0].query.env" is equal to "staging" + And the response "widgets[0].definition.requests[0].query.primary_tag_name" is equal to "datacenter" + And the response "widgets[0].definition.requests[0].query.operation_name" is equal to "universal.http.client" + + @team:DataDog/dashboards-backend + Scenario: Create a distribution widget using a histogram request containing a formulas and functions events query + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "description": "{{ unique }}", "widgets": [ { "definition": { "title": "Events Platform - Request latency HOP", "title_size": "16", "title_align": "left", "show_legend": false, "type": "distribution", "xaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "yaxis": { "max": "auto", "include_zero": true, "scale": "linear", "min": "auto" }, "requests": [ { "query": { "search": { "query": "" }, "data_source": "events", "compute": { "metric": "@duration", "aggregation": "min" }, "name": "query1", "indexes": [ "*" ], "group_by": [] }, "request_type": "histogram" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].request_type" is equal to "histogram" + And the response "widgets[0].definition.requests[0].query.search.query" is equal to "" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "events" + And the response "widgets[0].definition.requests[0].query.compute.metric" is equal to "@duration" + And the response "widgets[0].definition.requests[0].query.compute.aggregation" is equal to "min" + And the response "widgets[0].definition.requests[0].query.name" is equal to "query1" + And the response "widgets[0].definition.requests[0].query.indexes" is equal to ["*"] + And the response "widgets[0].definition.requests[0].query.group_by" is equal to [] + + @team:DataDog/dashboards-backend + Scenario: Create a distribution widget using a histogram request containing a formulas and functions metrics query + Given new "CreateDashboard" request + And body with value {"title":"{{ unique }}","widgets":[{"definition":{"title":"Metrics HOP","title_size":"16","title_align":"left","show_legend":false,"type":"distribution","custom_links":[{"label":"Example","link":"https://example.org/"}],"xaxis":{"max":"auto","include_zero":true,"scale":"linear","min":"auto"},"yaxis":{"max":"auto","include_zero":true,"scale":"linear","min":"auto"},"requests":[{"query":{"query":"histogram:trace.Load{*}","data_source":"metrics","name":"query1"},"request_type":"histogram","style":{"palette":"dog_classic"}}]},"layout":{"x":0,"y":0,"width":4,"height":2}}],"layout_type":"ordered"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].request_type" is equal to "histogram" + And the response "widgets[0].definition.requests[0].style" is equal to { "palette": "dog_classic" } + And the response "widgets[0].definition.requests[0].query.query" is equal to "histogram:trace.Load{*}" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "metrics" + And the response "widgets[0].definition.requests[0].query.name" is equal to "query1" + And the response "widgets[0].definition.custom_links" has item with field "label" with value "Example" + + @team:DataDog/dashboards-backend + Scenario: Create a geomap widget using an event_list request + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }}","description": "{{ unique }}","widgets":[{"definition":{"title":"","title_size":"16","title_align":"left","type":"geomap","requests":[{"response_format":"event_list","query":{"data_source":"logs_stream","query_string":"","indexes":[]},"columns":[{"field":"@network.client.geoip.location.latitude","width":"auto"},{"field":"@network.client.geoip.location.longitude","width":"auto"},{"field":"@network.client.geoip.country.iso_code","width":"auto"},{"field":"@network.client.geoip.subdivision.name","width":"auto"},{"field":"classic","width":"auto"},{"field":"","width":"auto"}]}],"style":{"palette":"hostmap_blues","palette_flip":false},"view":{"focus":"WORLD"}},"layout":{"x":0,"y":0,"width":12,"height":6}}],"template_variables":[],"layout_type":"ordered","notify_list":[],"reflow_type":"fixed","tags":[]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_stream" + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Create a new dashboard returns "Bad Request" response + Given new "CreateDashboard" request + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard returns "OK" response + Given new "CreateDashboard" request + And body from file "dashboard_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "title" is equal to "{{ unique }} with Profile Metrics Query" + And the response "widgets[0].definition.requests[0].profile_metrics_query.search.query" is equal to "runtime:jvm" + And the response "widgets[0].definition.requests[0].profile_metrics_query.compute.facet" is equal to "@prof_core_cpu_cores" + And the response "widgets[0].definition.requests[0].profile_metrics_query.compute.aggregation" is equal to "sum" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with a change widget using formulas and functions slo query + Given there is a valid "slo" in the system + And new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": {"title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ {"formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ {"name": "query1", "data_source": "slo", "slo_id": "{{ slo.data[0].id }}", "measure": "slo_status", "group_mode": "overall", "slo_query_type": "metric", "additional_query_filters": "*" } ], "response_format": "scalar", "order_by": "change", "change_type": "absolute", "increase_good": true, "order_dir": "asc" } ] }, "layout": { "x":0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].increase_good" is equal to true + And the response "widgets[0].definition.requests[0].order_by" is equal to "change" + And the response "widgets[0].definition.requests[0].change_type" is equal to "absolute" + And the response "widgets[0].definition.requests[0].order_dir" is equal to "asc" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "slo" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].group_mode" is equal to "overall" + And the response "widgets[0].definition.requests[0].queries[0].measure" is equal to "slo_status" + And the response "widgets[0].definition.requests[0].queries[0].slo_query_type" is equal to "metric" + And the response "widgets[0].definition.requests[0].queries[0].slo_id" has the same value as "slo.data[0].id" + And the response "widgets[0].definition.requests[0].queries[0].additional_query_filters" is equal to "*" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "hour_before(query1)" + And the response "widgets[0].definition.requests[0].formulas[1].formula" is equal to "query1" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with a formulas and functions change widget + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].compare_to" is equal to "hour_before" + And the response "widgets[0].definition.requests[0].increase_good" is equal to true + And the response "widgets[0].definition.requests[0].order_by" is equal to "change" + And the response "widgets[0].definition.requests[0].change_type" is equal to "absolute" + And the response "widgets[0].definition.requests[0].order_dir" is equal to "desc" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "logs" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].compute.aggregation" is equal to "count" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "hour_before(query1)" + And the response "widgets[0].definition.requests[0].formulas[1].formula" is equal to "query1" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with a formulas and functions treemap widget + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "type": "treemap", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "logs" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].compute.aggregation" is equal to "count" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "hour_before(query1)" + And the response "widgets[0].definition.requests[0].formulas[1].formula" is equal to "query1" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with a query value widget using the percentile aggregator + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with QVW Percentile Aggregator", "widgets": [{"definition":{"title_size":"16","title":"","title_align":"left","precision":2,"time":{},"autoscale":true,"requests":[{"formulas":[{"formula":"query1"}],"response_format":"scalar","queries":[{"query":"p90:dist.dd.dogweb.latency{*}","data_source":"metrics","name":"query1","aggregator":"percentile"}]}],"type":"query_value"},"layout":{"y":0,"x":0,"height":2,"width":2}}]} + When the request is sent + Then the response status is 200 OK + And the response "title" is equal to "{{ unique }} with QVW Percentile Aggregator" + And the response "widgets[0].definition.title_size" is equal to "16" + And the response "widgets[0].definition.title_align" is equal to "left" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1" + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with a query value widget using timeseries background + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with QVW Timeseries Background", "widgets": [{"definition":{"title_size":"16","title":"","title_align":"left","precision":2,"time":{},"autoscale":true,"requests":[{"formulas":[{"formula":"query1"}],"response_format":"scalar","queries":[{"query":"sum:my.cool.count.metric{*}","data_source":"metrics","name":"query1","aggregator":"percentile"}]}],"type":"query_value","timeseries_background":{"type":"area","yaxis":{"include_zero":true}}},"layout":{"y":0,"x":0,"height":2,"width":2}}]} + When the request is sent + Then the response status is 200 OK + And the response "title" is equal to "{{ unique }} with QVW Timeseries Background" + And the response "widgets[0].definition.title_size" is equal to "16" + And the response "widgets[0].definition.title_align" is equal to "left" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1" + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "sum:my.cool.count.metric{*}" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with a timeseries widget and an overlay request + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }}", "widgets": [{"definition": {"type": "timeseries", "requests": [{"on_right_yaxis": false, "queries": [{"data_source": "metrics", "name": "mymetric", "query": "avg:system.cpu.user{*}"}], "response_format": "timeseries", "display_type": "line"}, {"response_format": "timeseries", "queries": [{"data_source": "metrics", "name": "mymetricoverlay", "query": "avg:system.cpu.user{*}"}], "style": {"palette": "purple", "line_type": "solid", "line_width": "normal"}, "display_type": "overlay"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "timeseries" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "metrics" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "mymetric" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "avg:system.cpu.user{*}" + And the response "widgets[0].definition.requests[1].display_type" is equal to "overlay" + And the response "widgets[0].definition.requests[1].queries[0].query" is equal to "avg:system.cpu.user{*}" + And the response "widgets[0].definition.requests[1].queries[0].name" is equal to "mymetricoverlay" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with a timeseries widget using formulas and functions cloud cost query + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "Example Cloud Cost Query", "title_size": "16", "title_align": "left", "type": "timeseries", "requests": [ { "formulas": [ { "formula": "query1" } ], "queries": [ { "data_source": "cloud_cost", "name": "query1", "query": "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)" } ], "response_format": "timeseries", "style": { "palette": "dog_classic", "line_type": "solid", "line_width": "normal" }, "display_type": "bars" } ], "time": { "live_span": "week_to_date" } } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "timeseries" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "cloud_cost" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1" + And the response "widgets[0].definition.time.live_span" is equal to "week_to_date" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with alert_graph widget + Given there is a valid "monitor" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/alert_graph_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "alert_graph" + And the response "widgets[0].definition.viz_type" is equal to "timeseries" + And the response "widgets[0].definition.alert_id" is equal to "{{ monitor.id }}" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with alert_value widget + Given there is a valid "monitor" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/alert_value_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "alert_value" + And the response "widgets[0].definition.alert_id" is equal to "{{ monitor.id }}" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with an audit logs query + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with Audit Logs Query", "widgets": [{"definition": {"type": "timeseries","requests": [{"response_format": "timeseries","queries": [{"search": {"query": ""},"data_source": "audit","compute": {"aggregation": "count"},"name": "query1","indexes": ["*"],"group_by": []}]}]},"layout": {"x": 2,"y": 0,"width": 4,"height": 2}}]} + When the request is sent + Then the response status is 200 OK + And the response "title" is equal to "{{ unique }} with Audit Logs Query" + And the response "widgets[0].definition.type" is equal to "timeseries" + And the response "widgets[0].definition.requests[0].response_format" is equal to "timeseries" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "audit" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with apm dependency stats widget + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [{"definition": { "title": "", "title_size": "16", "title_align": "left", "type": "query_table", "requests": [ { "response_format": "scalar", "queries": [ { "primary_tag_value": "edge-eu1.prod.dog", "stat": "avg_duration", "resource_name": "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?", "name": "query1", "service": "cassandra", "data_source": "apm_dependency_stats", "env": "ci", "primary_tag_name": "datacenter", "operation_name": "cassandra.query" } ] } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].queries[0].primary_tag_value" is equal to "edge-eu1.prod.dog" + And the response "widgets[0].definition.requests[0].queries[0].stat" is equal to "avg_duration" + And the response "widgets[0].definition.requests[0].queries[0].resource_name" is equal to "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].service" is equal to "cassandra" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "apm_dependency_stats" + And the response "widgets[0].definition.requests[0].queries[0].env" is equal to "ci" + And the response "widgets[0].definition.requests[0].queries[0].primary_tag_name" is equal to "datacenter" + And the response "widgets[0].definition.requests[0].queries[0].operation_name" is equal to "cassandra.query" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with apm resource stats widget + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [{"definition": { "title": "", "title_size": "16", "title_align": "left", "type": "query_table", "requests": [ { "response_format": "scalar", "queries": [ { "primary_tag_value": "edge-eu1.prod.dog", "stat": "hits", "name": "query1", "service": "cassandra", "data_source": "apm_resource_stats", "env": "ci", "primary_tag_name": "datacenter", "operation_name": "cassandra.query", "group_by": ["resource_name"] } ] } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].queries[0].primary_tag_value" is equal to "edge-eu1.prod.dog" + And the response "widgets[0].definition.requests[0].queries[0].stat" is equal to "hits" + And the response "widgets[0].definition.requests[0].queries[0].group_by[0]" is equal to "resource_name" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].service" is equal to "cassandra" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "apm_resource_stats" + And the response "widgets[0].definition.requests[0].queries[0].env" is equal to "ci" + And the response "widgets[0].definition.requests[0].queries[0].primary_tag_name" is equal to "datacenter" + And the response "widgets[0].definition.requests[0].queries[0].operation_name" is equal to "cassandra.query" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with apm_issue_stream list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"apm_issue_stream","query_string":""},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "title" is equal to "{{ unique }} with list_stream widget" + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].columns[0].width" is equal to "auto" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "apm_issue_stream" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with check_status widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/check_status_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "check_status" + And the response "widgets[0].definition.check" is equal to "datadog.agent.up" + And the response "widgets[0].definition.grouping" is equal to "check" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with ci_test_stream list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"ci_test_stream","query_string":"test_level:suite"},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "ci_test_stream" + And the response "widgets[0].definition.requests[0].query.query_string" is equal to "test_level:suite" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with distribution widget and apm stats data + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [{"definition": { "title": "", "title_size": "16", "title_align": "left", "type": "distribution", "requests": [{ "apm_stats_query": { "env": "prod", "service": "cassandra", "name": "cassandra.query", "primary_tag": "datacenter:dc1", "row_type": "service" }}] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].apm_stats_query.primary_tag" is equal to "datacenter:dc1" + And the response "widgets[0].definition.requests[0].apm_stats_query.row_type" is equal to "service" + And the response "widgets[0].definition.requests[0].apm_stats_query.env" is equal to "prod" + And the response "widgets[0].definition.requests[0].apm_stats_query.service" is equal to "cassandra" + And the response "widgets[0].definition.requests[0].apm_stats_query.name" is equal to "cassandra.query" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with event_stream list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered","title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns": [{"width": "auto","field": "timestamp"}],"query": {"data_source": "event_stream","query_string": "","event_size": "l"},"response_format": "event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "event_stream" + And the response "widgets[0].definition.requests[0].query.event_size" is equal to "l" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with event_stream widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/event_stream_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "event_stream" + And the response "widgets[0].definition.query" is equal to "example-query" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with event_timeline widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/event_timeline_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "event_timeline" + And the response "widgets[0].definition.query" is equal to "status:error priority:all" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with formula and function heatmap widget + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }}", "widgets": [{"layout": {"x": 0, "y": 0, "width": 47, "height": 15}, "definition": {"title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "heatmap", "requests": [{"response_format": "timeseries", "queries": [{"data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*}"}], "formulas": [{"formula": "query1"}], "style": {"palette": "dog_classic"}}]}}], "template_variables": [], "layout_type": "free", "is_read_only": false, "notify_list": []} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "heatmap" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "avg:system.cpu.user{*}" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "metrics" + And the response "widgets[0].definition.requests[0].style.palette" is equal to "dog_classic" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with formulas and functions scatterplot widget + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "id": 5346764334358972, "definition": { "title": "", "title_size": "16", "title_align": "left", "type": "scatterplot", "requests": { "table": { "formulas": [ { "formula": "query1", "dimension": "x", "alias": "my-query1" }, { "formula": "query2", "dimension": "y", "alias": "my-query2" } ], "queries": [ { "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {service}", "aggregator": "avg" }, { "data_source": "metrics", "name": "query2", "query": "avg:system.mem.used{*} by {service}", "aggregator": "avg" } ], "response_format": "scalar" } } }, "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests.table.formulas[0].formula" is equal to "query1" + And the response "widgets[0].definition.requests.table.formulas[0].dimension" is equal to "x" + And the response "widgets[0].definition.requests.table.formulas[0].alias" is equal to "my-query1" + And the response "widgets[0].definition.requests.table.formulas[1].formula" is equal to "query2" + And the response "widgets[0].definition.requests.table.formulas[1].dimension" is equal to "y" + And the response "widgets[0].definition.requests.table.formulas[1].alias" is equal to "my-query2" + And the response "widgets[0].definition.requests.table.queries[0].data_source" is equal to "metrics" + And the response "widgets[0].definition.requests.table.queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests.table.queries[0].query" is equal to "avg:system.cpu.user{*} by {service}" + And the response "widgets[0].definition.requests.table.queries[0].aggregator" is equal to "avg" + And the response "widgets[0].definition.requests.table.queries[1].data_source" is equal to "metrics" + And the response "widgets[0].definition.requests.table.queries[1].name" is equal to "query2" + And the response "widgets[0].definition.requests.table.queries[1].query" is equal to "avg:system.mem.used{*} by {service}" + And the response "widgets[0].definition.requests.table.queries[1].aggregator" is equal to "avg" + And the response "widgets[0].definition.requests.table.response_format" is equal to "scalar" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with free_text widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/free_text_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "free_text" + And the response "widgets[0].definition.text" is equal to "Example free text" + And the response "widgets[0].definition.color" is equal to "#4d4d4d" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with funnel widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with funnel widget","widgets": [{"definition": {"type": "funnel","requests": [{"query":{"data_source":"rum","query_string":"","steps":[]},"request_type":"funnel"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "title" is equal to "{{ unique }} with funnel widget" + And the response "widgets[0].definition.type" is equal to "funnel" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "rum" + And the response "widgets[0].definition.requests[0].request_type" is equal to "funnel" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with geomap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/geomap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "geomap" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with heatmap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/heatmap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "heatmap" + And the response "widgets[0].definition.requests[0].q" is equal to "avg:system.cpu.user{*} by {service}" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with hostmap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/hostmap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "hostmap" + And the response "widgets[0].definition.requests.fill.q" is equal to "avg:system.cpu.user{*} by {host}" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with iframe widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/iframe_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "iframe" + And the response "widgets[0].definition.url" is equal to "https://docs.datadoghq.com/api/latest/" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with image widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/image_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "image" + And the response "widgets[0].definition.url" is equal to "https://example.com/image.png" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with invalid team tags returns "Bad Request" response + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["tm:foobar"], "layout_type": "ordered" } + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"apm_issue_stream","query_string":""},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "apm_issue_stream" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with list_stream widget with a valid sort parameter ASC + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered","title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns": [{"width": "auto","field": "timestamp"}],"query": {"data_source": "event_stream","query_string": "","event_size": "l", "sort": {"column": "timestamp", "order": "asc"}},"response_format": "event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "event_stream" + And the response "widgets[0].definition.requests[0].query.event_size" is equal to "l" + And the response "widgets[0].definition.requests[0].query.sort.column" is equal to "timestamp" + And the response "widgets[0].definition.requests[0].query.sort.order" is equal to "asc" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with list_stream widget with a valid sort parameter DESC + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered","title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns": [{"width": "auto","field": "timestamp"}],"query": {"data_source": "event_stream","query_string": "","event_size": "l", "sort": {"column": "timestamp", "order": "desc"}},"response_format": "event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "event_stream" + And the response "widgets[0].definition.requests[0].query.event_size" is equal to "l" + And the response "widgets[0].definition.requests[0].query.sort.column" is equal to "timestamp" + And the response "widgets[0].definition.requests[0].query.sort.order" is equal to "desc" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with log_stream widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/log_stream_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "log_stream" + And the response "widgets[0].definition.query" is equal to "" + And the response "widgets[0].definition.indexes[0]" is equal to "main" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with logs query table widget and storage parameter + Given new "CreateDashboard" request + And body with value {"layout_type":"ordered","title":"{{ unique }} with query table widget and storage parameter","widgets":[{"definition":{"type":"query_table","requests":[{"queries":[{"data_source":"logs","name":"query1","search":{"query":""},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[],"storage":"online_archives"}],"formulas":[{"conditional_formats":[],"cell_display_mode":"bar","formula":"query1","limit":{"count":50,"order":"desc"}}],"response_format":"scalar"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "query_table" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "logs" + And the response "widgets[0].definition.requests[0].queries[0].storage" is equal to "online_archives" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with logs_pattern_stream list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"logs_pattern_stream","query_string":"","group_by":[{"facet":"service"}]},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_pattern_stream" + And the response "widgets[0].definition.requests[0].query.group_by[0].facet" is equal to "service" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with logs_stream list_stream widget and storage parameter + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"logs_stream","query_string":"", "storage": "hot"},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_stream" + And the response "widgets[0].definition.requests[0].query.storage" is equal to "hot" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with logs_transaction_stream list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"logs_transaction_stream","query_string":"","group_by":[{"facet":"service"}],"compute":[{"facet":"service","aggregation":"count"}]},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_transaction_stream" + And the response "widgets[0].definition.requests[0].query.group_by[0].facet" is equal to "service" + And the response "widgets[0].definition.requests[0].query.compute[0].facet" is equal to "service" + And the response "widgets[0].definition.requests[0].query.compute[0].aggregation" is equal to "count" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with manage_status widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/manage_status_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "manage_status" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with manage_status widget and show_priority parameter + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/manage_status_widget_priority_sort.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "manage_status" + And the response "widgets[0].definition.show_priority" is false + And the response "widgets[0].definition.sort" is equal to "priority,asc" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with note widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/note_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "note" + And the response "widgets[0].definition.content" is equal to "# Example Note" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with powerpack widget + Given new "CreateDashboard" request + And there is a valid "powerpack" in the system + And body from file "dashboards_json_payload/powerpack_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "powerpack" + And the response "widgets[0].definition.powerpack_id" has the same value as "powerpack.data.id" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with query_table widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/query_table_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "query_table" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with query_value widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/query_value_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "query_value" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "avg:system.cpu.user{*}" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with rum_issue_stream list_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"rum_issue_stream","query_string":""},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].response_format" is equal to "event_list" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with run-workflow widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/run_workflow_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "run_workflow" + And the response "widgets[0].definition.workflow_id" is equal to "2e055f16-8b6a-4cdd-b452-17a34c44b160" + And the response "widgets[0].definition.inputs[0]" is equal to {"name": "environment", "value": "$env.value"} + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with scatterplot widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/scatterplot_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "scatterplot" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with servicemap widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/servicemap_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "servicemap" + And the response "widgets[0].definition.filters" is equal to ["env:none","environment:*"] + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with slo list widget + Given there is a valid "slo" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/slo_list_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "slo_list" + And the response "widgets[0].definition.requests[0].query.query_string" is equal to "env:prod AND service:my-app" + And the response "widgets[0].definition.requests[0].query.limit" is equal to 75 + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with slo list widget with sort + Given there is a valid "slo" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/slo_list_widget_with_sort.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "slo_list" + And the response "widgets[0].definition.requests[0].query.query_string" is equal to "env:prod AND service:my-app" + And the response "widgets[0].definition.requests[0].query.limit" is equal to 75 + And the response "widgets[0].definition.requests[0].query.sort[0].column" is equal to "status.sli" + And the response "widgets[0].definition.requests[0].query.sort[0].order" is equal to "asc" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with slo widget + Given there is a valid "slo" in the system + And new "CreateDashboard" request + And body from file "dashboards_json_payload/slo_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "slo" + And the response "widgets[0].definition.slo_id" is equal to "{{ slo.data[0].id }}" + And the response "widgets[0].definition.additional_query_filters" is equal to "!host:excluded_host" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with split graph widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/split_graph_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "split_group" + And the response "widgets[0].definition.source_widget_definition.type" is equal to "timeseries" + And the response "widgets[0].definition.source_widget_definition.requests[0].response_format" is equal to "timeseries" + And the response "widgets[0].definition.source_widget_definition.requests[0].queries[0].data_source" is equal to "metrics" + And the response "widgets[0].definition.source_widget_definition.requests[0].queries[0].query" is equal to "avg:system.cpu.user{*}" + And the response "widgets[0].definition.source_widget_definition.requests[0].style.palette" is equal to "dog_classic" + And the response "widgets[0].definition.split_config.split_dimensions[0].one_graph_per" is equal to "service" + And the response "widgets[0].definition.split_config.limit" is equal to 24 + And the response "widgets[0].definition.split_config.sort.compute.aggregation" is equal to "sum" + And the response "widgets[0].definition.split_config.sort.compute.metric" is equal to "system.cpu.user" + And the response "widgets[0].definition.split_config.sort.order" is equal to "desc" + And the response "widgets[0].definition.split_config.static_splits[0][0].tag_key" is equal to "service" + And the response "widgets[0].definition.split_config.static_splits[0][0].tag_values[0]" is equal to "cassandra" + And the response "widgets[0].definition.split_config.static_splits[0][1].tag_key" is equal to "datacenter" + And the response "widgets[0].definition.split_config.static_splits[0][1].tag_values" has length 0 + And the response "widgets[0].definition.split_config.static_splits[1][0].tag_key" is equal to "demo" + And the response "widgets[0].definition.split_config.static_splits[1][0].tag_values[0]" is equal to "env" + And the response "widgets[0].definition.size" is equal to "md" + And the response "widgets[0].definition.has_uniform_y_axes" is equal to true + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with sunburst widget and metrics data + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "type": "sunburst", "requests": [ { "response_format": "scalar", "formulas": [ { "formula": "query1" } ], "queries": [ { "query": "sum:system.mem.used{*} by {service}", "data_source": "metrics", "name": "query1", "aggregator": "sum" } ], "style": { "palette": "dog_classic" } } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar" + And the response "widgets[0].definition.requests[0].queries[0].query" is equal to "sum:system.mem.used{*} by {service}" + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "metrics" + And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1" + And the response "widgets[0].definition.requests[0].queries[0].aggregator" is equal to "sum" + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1" + And the response "widgets[0].definition.requests[0].style.palette" is equal to "dog_classic" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with team tags returns "OK" response + Given new "CreateDashboard" request + And body with value { "title": "{{ unique }}", "widgets": [ { "definition": { "title": "", "title_size": "16", "title_align": "left", "time": {}, "type": "change", "requests": [ { "formulas": [ { "formula": "hour_before(query1)" }, { "formula": "query1" } ], "queries": [ { "data_source": "logs", "name": "query1", "search": { "query": "" }, "indexes": [ "*" ], "compute": { "aggregation": "count" }, "group_by": [] } ], "response_format": "scalar", "compare_to": "hour_before", "increase_good": true, "order_by": "change", "change_type": "absolute", "order_dir": "desc" } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "tags": ["team:foobar"], "layout_type": "ordered" } + When the request is sent + Then the response status is 200 OK + And the response "title" is equal to "{{ unique }}" + And the response "tags" array contains value "team:foobar" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with template variable defaults and default returns "Bad Request" response + Given new "CreateDashboard" request + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host"], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with template variable defaults returns "OK" response + Given new "CreateDashboard" request + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "defaults": ["my-host"], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 200 OK + And the response "template_variables[0].name" is equal to "host1" + And the response "template_variables[0].available_values[0]" is equal to "my-host" + And the response "template_variables[0].defaults[0]" is equal to "my-host" + + @skip-validation @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with template variable defaults whose value has no length returns "Bad Request" response + Given new "CreateDashboard" request + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "defaults": [""], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with template variable presets using values and value returns "Bad Request" response + Given new "CreateDashboard" request + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "template_variable_presets": [{"name": "my saved view", "template_variables": [{"name": "datacenter", "value": "*", "values": [ "*" ]}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "defaults": ["my-host"], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with template variable presets using values returns "OK" response + Given new "CreateDashboard" request + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "template_variable_presets": [{"name": "my saved view", "template_variables": [{"name": "datacenter", "values": ["*", "my-host"]}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "defaults": ["my-host"], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 200 OK + And the response "template_variable_presets[0].name" is equal to "my saved view" + And the response "template_variable_presets[0].template_variables[0].name" is equal to "datacenter" + And the response "template_variable_presets[0].template_variables[0].values[0]" is equal to "*" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with timeseries widget and formula style attributes + Given new "CreateDashboard" request + And body with value {"title": "{{ unique }} with formula style","widgets": [{"definition": {"title": "styled timeseries","show_legend": true,"legend_layout": "auto","legend_columns": ["avg","min","max","value","sum"],"time": {},"type": "timeseries","requests": [{"formulas": [{"formula": "query1","style": {"palette_index": 4,"palette": "classic"}}],"queries": [{"query": "avg:system.cpu.user{*}","data_source": "metrics","name": "query1"}],"response_format": "timeseries","style": {"palette": "dog_classic","line_type": "solid","line_width": "normal"},"display_type": "line"}]}}],"layout_type": "ordered","reflow_type": "auto"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].formulas[0].formula" is equal to "query1" + And the response "widgets[0].definition.requests[0].formulas[0].style.palette" is equal to "classic" + And the response "widgets[0].definition.requests[0].formulas[0].style.palette_index" is equal to 4 + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with timeseries widget containing style attributes + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with timeseries widget","widgets": [{"definition": {"type": "timeseries","requests": [{"q": "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()","on_right_yaxis": false,"style": {"palette": "warm","line_type": "solid","line_width": "normal"},"display_type": "bars"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].on_right_yaxis" is false + And the response "widgets[0].definition.requests[0].style" is equal to {"palette": "warm","line_type": "solid","line_width": "normal"} + And the response "widgets[0].definition.requests[0].display_type" is equal to "bars" + And the response "widgets[0].definition.requests[0].q" is equal to "sum:trace.test.errors{env:prod,service:datadog-api-spec} by {resource_name}.as_count()" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with toplist widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/toplist_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "toplist" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with topology_map widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/topology_map_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "topology_map" + And the response "widgets[0].definition.requests[0].request_type" is equal to "topology" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "service_map" + And the response "widgets[0].definition.requests[0].query.service" is equal to "" + And the response "widgets[0].definition.requests[0].query.filters" is equal to ["env:none","environment:*"] + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with trace_service widget + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/trace_service_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "trace_service" + And the response "widgets[0].definition.env" is equal to "none" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with trace_stream widget + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"},{"width":"auto","field":"service"}],"query":{"data_source":"trace_stream","query_string":""},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "list_stream" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "trace_stream" + + @team:DataDog/dashboards-backend + Scenario: Create a new timeseries widget with ci_pipelines data source + Given new "CreateDashboard" request + And body with value {"title":"{{ unique }} with ci_pipelines datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_pipelines","name":"query1","search":{"query":"ci_level:job"},"indexes":["*"],"compute":{"aggregation":"count", "metric": "@ci.queue_time"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "ci_pipelines" + And the response "widgets[0].definition.requests[0].queries[0].search.query" is equal to "ci_level:job" + + @team:DataDog/dashboards-backend + Scenario: Create a new timeseries widget with ci_tests data source + Given new "CreateDashboard" request + And body with value {"title":"{{ unique }} with ci_tests datasource","widgets":[{"definition":{"title":"","show_legend":true,"legend_layout":"auto","legend_columns":["avg","min","max","value","sum"],"time":{},"type":"timeseries","requests":[{"formulas":[{"formula":"query1"}],"queries":[{"data_source":"ci_tests","name":"query1","search":{"query":"test_level:test"},"indexes":["*"],"compute":{"aggregation":"count"},"group_by":[]}],"response_format":"timeseries","style":{"palette":"dog_classic","line_type":"solid","line_width":"normal"},"display_type":"line"}]}}],"layout_type":"ordered","reflow_type":"auto"} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "ci_tests" + And the response "widgets[0].definition.requests[0].queries[0].search.query" is equal to "test_level:test" + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Create a shared dashboard returns "Bad Request" response + Given new "CreatePublicDashboard" request + And body with value {"dashboard_id": "123-abc-456", "dashboard_type": "custom_timeboard", "global_time": {"live_span": "1h"}, "global_time_selectable_enabled": null, "selectable_template_vars": [{"default_value": "*", "name": "exampleVar", "prefix": "test", "visible_tags": ["selectableValue1", "selectableValue2"]}], "share_list": ["test@datadoghq.com", "test2@email.com"], "share_type": "open"} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Create a shared dashboard returns "Dashboard Not Found" response + Given new "CreatePublicDashboard" request + And body with value {"dashboard_id": "abc-123-def", "dashboard_type": "custom_timeboard", "share_type": "open", "global_time": {"live_span": "1h"}} + When the request is sent + Then the response status is 404 Dashboard Not Found + + @team:DataDog/dashboards-backend + Scenario: Create a shared dashboard returns "OK" response + Given there is a valid "dashboard" in the system + And new "CreatePublicDashboard" request + And body with value {"dashboard_id": "{{dashboard.id}}", "dashboard_type": "custom_timeboard", "share_type": "open", "global_time": {"live_span": "1h"}} + When the request is sent + Then the response status is 200 OK + And the response "dashboard_id" has the same value as "dashboard.id" + And the response "dashboard_type" is equal to "custom_timeboard" + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Delete a dashboard returns "Dashboards Not Found" response + Given new "DeleteDashboard" request + And request contains "dashboard_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Dashboards Not Found + + @team:DataDog/dashboards-backend + Scenario: Delete a dashboard returns "OK" response + Given there is a valid "dashboard" in the system + And new "DeleteDashboard" request + And request contains "dashboard_id" parameter from "dashboard.id" + When the request is sent + Then the response status is 200 OK + And the response "deleted_dashboard_id" is equal to "{{ dashboard.id }}" + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Delete dashboards returns "Bad Request" response + Given new "DeleteDashboards" request + And body with value {"data": [{"id": "123-abc-456", "type": "dashboard"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Delete dashboards returns "Dashboards Not Found" response + Given new "DeleteDashboards" request + And body with value {"data": [{"id": "123-abc-456", "type": "dashboard"}]} + When the request is sent + Then the response status is 404 Dashboards Not Found + + @team:DataDog/dashboards-backend + Scenario: Delete dashboards returns "No Content" response + Given there is a valid "dashboard" in the system + And new "DeleteDashboards" request + And body with value {"data": [{"id": "{{ dashboard.id }}", "type": "dashboard"}]} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Get a dashboard returns "Item Not Found" response + Given new "GetDashboard" request + And request contains "dashboard_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Item Not Found + + @team:DataDog/dashboards-backend + Scenario: Get a dashboard returns "OK" response + Given there is a valid "dashboard" in the system + And new "GetDashboard" request + And request contains "dashboard_id" parameter from "dashboard.id" + When the request is sent + Then the response status is 200 OK + And the response "description" is equal to null + + @replay-only @team:DataDog/dashboards-backend + Scenario: Get a dashboard returns 'author_name' + Given there is a valid "dashboard" in the system + And new "GetDashboard" request + And request contains "dashboard_id" parameter from "dashboard.id" + When the request is sent + Then the response status is 200 OK + And the response "author_name" is equal to "Frog Account" + + @team:DataDog/dashboards-backend + Scenario: Get a shared dashboard returns "OK" response + Given there is a valid "dashboard" in the system + And there is a valid "shared_dashboard" in the system + And new "GetPublicDashboard" request + And request contains "token" parameter from "shared_dashboard.token" + When the request is sent + Then the response status is 200 OK + And the response "dashboard_id" has the same value as "dashboard.id" + And the response "token" has the same value as "shared_dashboard.token" + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Get a shared dashboard returns "Shared Dashboard Not Found" response + Given new "GetPublicDashboard" request + And request contains "token" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Shared Dashboard Not Found + + @replay-only @team:DataDog/dashboards-backend + Scenario: Get all dashboards returns "OK" response + Given new "ListDashboards" request + And there is a valid "dashboard" in the system + And request contains "filter[shared]" parameter with value false + When the request is sent + Then the response status is 200 OK + And the response "dashboards[0].title" has the same value as "dashboard.title" + And the response "dashboards[0].id" has the same value as "dashboard.id" + + @replay-only @skip-validation @team:DataDog/dashboards-backend @with-pagination + Scenario: Get all dashboards returns "OK" response with pagination + Given new "ListDashboards" request + And request contains "count" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Get all invitations for a shared dashboard returns "Not Found" response + Given new "GetPublicDashboardInvitations" request + And request contains "token" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/dashboards-backend + Scenario: Get all invitations for a shared dashboard returns "OK" response + Given there is a valid "dashboard" in the system + And there is a valid "shared_dashboard" in the system + And new "GetPublicDashboardInvitations" request + And request contains "token" parameter from "shared_dashboard.token" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + + @replay-only @team:DataDog/dashboards-backend + Scenario: Get deleted dashboards returns "OK" response + Given new "ListDashboards" request + And there is a valid "dashboard" in the system + And the "dashboard" was deleted + And request contains "filter[deleted]" parameter with value true + When the request is sent + Then the response status is 200 OK + And the response "dashboards[0].title" has the same value as "dashboard.title" + And the response "dashboards[0].id" has the same value as "dashboard.id" + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Restore deleted dashboards returns "Bad Request" response + Given new "RestoreDashboards" request + And body with value {"data": [{"id": "123-abc-456", "type": "dashboard"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Restore deleted dashboards returns "Dashboards Not Found" response + Given new "RestoreDashboards" request + And body with value {"data": [{"id": "123-abc-456", "type": "dashboard"}]} + When the request is sent + Then the response status is 404 Dashboards Not Found + + @team:DataDog/dashboards-backend + Scenario: Restore deleted dashboards returns "No Content" response + Given there is a valid "dashboard" in the system + And the "dashboard" was deleted + And new "RestoreDashboards" request + And body with value {"data": [{"id": "{{ dashboard.id }}", "type": "dashboard"}]} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Revoke a shared dashboard URL returns "OK" response + Given new "DeletePublicDashboard" request + And request contains "token" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Revoke a shared dashboard URL returns "Shared Dashboard Not Found" response + Given new "DeletePublicDashboard" request + And request contains "token" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Shared Dashboard Not Found + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Revoke shared dashboard invitations returns "Not Found" response + Given new "DeletePublicDashboardInvitation" request + And request contains "token" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"email": "test@datadoghq.com"}, "type": "public_dashboard_invitation"}]} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Revoke shared dashboard invitations returns "OK" response + Given new "DeletePublicDashboardInvitation" request + And request contains "token" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"email": "test@datadoghq.com"}, "type": "public_dashboard_invitation"}]} + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Send shared dashboard invitation email returns "Bad Request" response + Given new "SendPublicDashboardInvitation" request + And request contains "token" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"email": "test@datadoghq.com"}, "type": "public_dashboard_invitation"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Send shared dashboard invitation email returns "Not Found" response + Given new "SendPublicDashboardInvitation" request + And request contains "token" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"email": "test@datadoghq.com"}, "type": "public_dashboard_invitation"}]} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/dashboards-backend + Scenario: Send shared dashboard invitation email returns "OK" response + Given there is a valid "dashboard" in the system + And there is a valid "shared_dashboard" in the system + And new "SendPublicDashboardInvitation" request + And request contains "token" parameter from "shared_dashboard.token" + And body with value {"data": {"attributes": {"email": "{{unique_lower_alnum}}@datadoghq.com"}, "type": "public_dashboard_invitation"}} + When the request is sent + Then the response status is 201 OK + And the response "data.attributes.email" has the same value as "shared_dashboard.share_list[0]" + And the response "data.attributes.share_token" has the same value as "shared_dashboard.token" + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Update a dashboard returns "Bad Request" response + Given new "UpdateDashboard" request + And request contains "dashboard_id" parameter from "REPLACE.ME" + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Update a dashboard returns "Item Not Found" response + Given new "UpdateDashboard" request + And request contains "dashboard_id" parameter from "REPLACE.ME" + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + When the request is sent + Then the response status is 404 Item Not Found + + @team:DataDog/dashboards-backend + Scenario: Update a dashboard returns "OK" response + Given there is a valid "dashboard" in the system + And new "UpdateDashboard" request + And request contains "dashboard_id" parameter from "dashboard.id" + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","description":"Updated description","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"apm_issue_stream","query_string":""},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "description" is equal to "Updated description" + + @team:DataDog/dashboards-backend + Scenario: Update a dashboard with tags returns "OK" response + Given there is a valid "dashboard" in the system + And new "UpdateDashboard" request + And request contains "dashboard_id" parameter from "dashboard.id" + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","description":"Updated description", "tags": ["team:foo", "team:bar"], "widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"apm_issue_stream","query_string":""},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "tags" is equal to ["team:foo", "team:bar"] + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Update a shared dashboard returns "Bad Request" response + Given new "UpdatePublicDashboard" request + And request contains "token" parameter from "REPLACE.ME" + And body with value {"global_time": {"live_span": "1h"}, "share_list": ["test@datadoghq.com", "test2@datadoghq.com"], "share_type": "invite"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dashboards-backend + Scenario: Update a shared dashboard returns "Item Not Found" response + Given new "UpdatePublicDashboard" request + And request contains "token" parameter from "REPLACE.ME" + And body with value {"global_time": {"live_span": "1h"}, "share_list": ["test@datadoghq.com", "test2@datadoghq.com"], "share_type": "invite"} + When the request is sent + Then the response status is 404 Item Not Found + + @team:DataDog/dashboards-backend + Scenario: Update a shared dashboard returns "OK" response + Given there is a valid "dashboard" in the system + And there is a valid "shared_dashboard" in the system + And new "UpdatePublicDashboard" request + And request contains "token" parameter from "shared_dashboard.token" + And body with value {"global_time": {"live_span": "15m"}, "share_list": [], "share_type": "open"} + When the request is sent + Then the response status is 200 OK + And the response "dashboard_id" has the same value as "dashboard.id" + And the response "dashboard_type" is equal to "custom_timeboard" + And the response "global_time.live_span" is equal to "15m" + And the response "share_type" is equal to "open" + And the response "share_list" has length 0 diff --git a/tests/scenarios/features/v1/dashboards_json_payload/alert_graph_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/alert_graph_widget.json new file mode 100644 index 000000000..e1777b338 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/alert_graph_widget.json @@ -0,0 +1,33 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"alert_graph", + "alert_id":"{{ monitor.id }}", + "viz_type":"timeseries" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/alert_value_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/alert_value_widget.json new file mode 100644 index 000000000..bd941285d --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/alert_value_widget.json @@ -0,0 +1,32 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":15, + "height":8 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"alert_value", + "alert_id":"{{ monitor.id }}", + "unit":"auto", + "text_align":"left", + "precision":2 + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/check_status_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/check_status_widget.json new file mode 100644 index 000000000..8e346f959 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/check_status_widget.json @@ -0,0 +1,32 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":15, + "height":8 + }, + "definition":{ + "title_size":"16", + "title_align":"left", + "type":"check_status", + "check":"datadog.agent.up", + "grouping":"check", + "tags":[ + "*" + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json new file mode 100644 index 000000000..db582c774 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/event_stream_widget.json @@ -0,0 +1,31 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":38 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"event_stream", + "query":"example-query", + "tags_execution":"and", + "event_size":"s" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/event_timeline_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/event_timeline_widget.json new file mode 100644 index 000000000..16d84984e --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/event_timeline_widget.json @@ -0,0 +1,30 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":9 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"event_timeline", + "query":"status:error priority:all", + "tags_execution":"and" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/free_text_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/free_text_widget.json new file mode 100644 index 000000000..25b242531 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/free_text_widget.json @@ -0,0 +1,29 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":24, + "height":6 + }, + "definition":{ + "type":"free_text", + "text":"Example free text", + "color":"#4d4d4d", + "font_size":"auto", + "text_align":"left" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/geomap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/geomap_widget.json new file mode 100644 index 000000000..7eff35698 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/geomap_widget.json @@ -0,0 +1,77 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":30 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"geomap", + "requests":[ + { + "formulas":[ + { + "formula":"query1", + "limit":{ + "count":250, + "order":"desc" + } + } + ], + "queries":[ + { + "name":"query1", + "data_source":"rum", + "search":{ + "query":"" + }, + "indexes":[ + "*" + ], + "compute":{ + "aggregation":"count" + }, + "group_by":[ + { + "facet":"@geo.country_iso_code", + "limit":250, + "sort":{ + "order":"desc", + "aggregation":"count" + } + } + ] + } + ], + "response_format":"scalar" + } + ], + "style":{ + "palette":"hostmap_blues", + "palette_flip":false + }, + "view":{ + "focus":"WORLD" + } + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/heatmap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/heatmap_widget.json new file mode 100644 index 000000000..9f31756de --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/heatmap_widget.json @@ -0,0 +1,39 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"heatmap", + "requests":[ + { + "q":"avg:system.cpu.user{*} by {service}", + "style":{ + "palette":"dog_classic" + } + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/hostmap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/hostmap_widget.json new file mode 100644 index 000000000..1318ee4e7 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/hostmap_widget.json @@ -0,0 +1,40 @@ +{ + "title":"{{ unique }}", + "description":null, + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":22 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"hostmap", + "requests":{ + "fill":{ + "q":"avg:system.cpu.user{*} by {host}" + } + }, + "node_type":"host", + "no_metric_hosts":true, + "no_group_hosts":true, + "style":{ + "palette":"green_to_orange", + "palette_flip":false + } + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/iframe_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/iframe_widget.json new file mode 100644 index 000000000..c6f0e167d --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/iframe_widget.json @@ -0,0 +1,26 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":12, + "height":12 + }, + "definition":{ + "type":"iframe", + "url":"https://docs.datadoghq.com/api/latest/" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/image_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/image_widget.json new file mode 100644 index 000000000..ca60ce72d --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/image_widget.json @@ -0,0 +1,27 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":12, + "height":12 + }, + "definition":{ + "type":"image", + "url":"https://example.com/image.png", + "sizing":"cover" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/log_stream_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/log_stream_widget.json new file mode 100644 index 000000000..0505c3d3a --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/log_stream_widget.json @@ -0,0 +1,43 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":36 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"log_stream", + "indexes":[ + "main" + ], + "query":"", + "sort":{ + "column":"time", + "order":"desc" + }, + "columns":[ + "host", + "service" + ], + "show_date_column":true, + "show_message_column":true, + "message_display":"expanded-md" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget.json new file mode 100644 index 000000000..086054cb4 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget.json @@ -0,0 +1,34 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":50, + "height":25 + }, + "definition":{ + "type":"manage_status", + "summary_type":"monitors", + "display_format":"countsAndList", + "color_preference":"text", + "hide_zero_counts":true, + "show_last_triggered":false, + "query":"", + "sort":"status,asc", + "count":50, + "start":0 + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget_priority_sort.json b/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget_priority_sort.json new file mode 100644 index 000000000..daf815145 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/manage_status_widget_priority_sort.json @@ -0,0 +1,35 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":50, + "height":25 + }, + "definition":{ + "type":"manage_status", + "summary_type":"monitors", + "display_format":"countsAndList", + "color_preference":"text", + "hide_zero_counts":true, + "show_last_triggered":false, + "query":"", + "sort":"priority,asc", + "count":50, + "start":0, + "show_priority": false + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/note_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/note_widget.json new file mode 100644 index 000000000..4b8abf1de --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/note_widget.json @@ -0,0 +1,26 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":18, + "height":24 + }, + "definition":{ + "type":"note", + "content":"# Example Note" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/powerpack_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/powerpack_widget.json new file mode 100644 index 000000000..de34784a6 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/powerpack_widget.json @@ -0,0 +1,29 @@ +{ + "title": "{{ unique }} with powerpack widget", + "layout_type": "ordered", + "widgets": [ + { + "definition": { + "type": "powerpack", + "powerpack_id": "{{ powerpack.data.id }}", + "template_variables": { + "controlled_externally": [], + "controlled_by_powerpack": [{ + "name": "foo", + "prefix": "bar", + "values": ["baz", "qux", "quuz"] + }] + } + }, + "layout": { + "x": 1, + "y": 1, + "width": 2, + "height": 2, + "is_column_break": false + } + } + ], + "description": "description", + "is_read_only": false +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/query_table_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/query_table_widget.json new file mode 100644 index 000000000..d9e516ff0 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/query_table_widget.json @@ -0,0 +1,58 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":54, + "height":32 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"query_table", + "requests":[ + { + "queries":[ + { + "data_source":"metrics", + "name":"query1", + "query":"avg:system.cpu.user{*} by {host}", + "aggregator":"avg" + } + ], + "formulas":[ + { + "formula":"query1", + "limit":{ + "count":500, + "order":"desc" + }, + "conditional_formats":[ + + ], + "cell_display_mode":"bar" + } + ], + "response_format":"scalar" + } + ], + "has_search_bar":"auto" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/query_value_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/query_value_widget.json new file mode 100644 index 000000000..4d02afe6d --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/query_value_widget.json @@ -0,0 +1,46 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"query_value", + "requests":[ + { + "response_format":"scalar", + "queries":[ + { + "name":"query1", + "data_source":"metrics", + "query":"avg:system.cpu.user{*}", + "aggregator":"avg" + } + ] + } + ], + "autoscale":true, + "precision":2 + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/run_workflow_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/run_workflow_widget.json new file mode 100644 index 000000000..8f0327593 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/run_workflow_widget.json @@ -0,0 +1,32 @@ +{ + "title": "{{ unique }}", + "description": "", + "widgets": [ + { + "layout": { + "x": 0, + "y": 0, + "width": 47, + "height": 15 + }, + "definition": { + "title": "Run workflow title", + "title_size": "16", + "title_align": "left", + "time": {}, + "type": "run_workflow", + "workflow_id": "2e055f16-8b6a-4cdd-b452-17a34c44b160", + "inputs": [ + { + "name": "environment", + "value": "$env.value" + } + ] + } + } + ], + "template_variables": [], + "layout_type": "free", + "is_read_only": false, + "notify_list": [] +} diff --git a/tests/scenarios/features/v1/dashboards_json_payload/scatterplot_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/scatterplot_widget.json new file mode 100644 index 000000000..44bec9993 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/scatterplot_widget.json @@ -0,0 +1,77 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "type":"scatterplot", + "requests":{ + "table":{ + "formulas":[ + { + "formula":"query1", + "dimension":"x", + "alias":"" + }, + { + "formula":"query2", + "dimension":"y", + "alias":"" + } + ], + "queries":[ + { + "data_source":"metrics", + "name":"query1", + "query":"avg:system.cpu.user{*} by {service}", + "aggregator":"avg" + }, + { + "data_source":"metrics", + "name":"query2", + "query":"avg:system.mem.used{*} by {service}", + "aggregator":"avg" + } + ], + "response_format":"scalar" + } + }, + "xaxis":{ + "scale":"linear", + "include_zero":true, + "min":"auto", + "max":"auto" + }, + "yaxis":{ + "scale":"linear", + "include_zero":true, + "min":"auto", + "max":"auto" + }, + "color_by_groups":[ + + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/servicemap_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/servicemap_widget.json new file mode 100644 index 000000000..ac958dfe1 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/servicemap_widget.json @@ -0,0 +1,33 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"servicemap", + "service":"", + "filters":[ + "env:none", + "environment:*" + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/slo_list_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/slo_list_widget.json new file mode 100644 index 000000000..74b591658 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/slo_list_widget.json @@ -0,0 +1,32 @@ +{ + "title": "{{ unique }}", + "description": "", + "widgets": [ + { + "layout": { + "x": 0, + "y": 0, + "width": 60, + "height": 21 + }, + "definition": { + "title_size": "16", + "title_align": "left", + "type": "slo_list", + "requests": [ + { + "query": { + "query_string": "env:prod AND service:my-app", + "limit": 75 + }, + "request_type": "slo_list" + } + ] + } + } + ], + "template_variables": [], + "layout_type": "free", + "is_read_only": false, + "notify_list": [] +} diff --git a/tests/scenarios/features/v1/dashboards_json_payload/slo_list_widget_with_sort.json b/tests/scenarios/features/v1/dashboards_json_payload/slo_list_widget_with_sort.json new file mode 100644 index 000000000..2cfb87cf0 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/slo_list_widget_with_sort.json @@ -0,0 +1,38 @@ +{ + "title": "{{ unique }}", + "description": "", + "widgets": [ + { + "layout": { + "x": 0, + "y": 0, + "width": 60, + "height": 21 + }, + "definition": { + "title_size": "16", + "title_align": "left", + "type": "slo_list", + "requests": [ + { + "query": { + "query_string": "env:prod AND service:my-app", + "limit": 75, + "sort": [ + { + "column": "status.sli", + "order": "asc" + } + ] + }, + "request_type": "slo_list" + } + ] + } + } + ], + "template_variables": [], + "layout_type": "free", + "is_read_only": false, + "notify_list": [] +} diff --git a/tests/scenarios/features/v1/dashboards_json_payload/slo_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/slo_widget.json new file mode 100644 index 000000000..ae88c387a --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/slo_widget.json @@ -0,0 +1,36 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":60, + "height":21 + }, + "definition":{ + "title_size":"16", + "title_align":"left", + "type":"slo", + "view_type":"detail", + "time_windows":[ + "7d" + ], + "slo_id":"{{ slo.data[0].id }}", + "show_error_budget":true, + "view_mode":"overall", + "global_time_target":"0", + "additional_query_filters": "!host:excluded_host" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/split_graph_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/split_graph_widget.json new file mode 100644 index 000000000..b3d6c4429 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/split_graph_widget.json @@ -0,0 +1,49 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":12, + "height":8 + }, + "definition":{ + "title": "", + "type": "split_group", + "source_widget_definition": { + "title": "", + "title_size": "16", + "title_align": "left", + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + {"name": "query1", "data_source": "metrics", "query": "avg:system.cpu.user{*}"} + ], + "style": {"palette": "dog_classic", "line_type": "solid", "line_width": "normal"}, + "display_type": "line" + } + ] + }, + "split_config": { + "split_dimensions":[{"one_graph_per": "service"}], + "limit": 24, + "sort": {"compute": {"aggregation": "sum", "metric": "system.cpu.user"}, "order": "desc"}, + "static_splits": [ + [{"tag_key": "service", "tag_values": ["cassandra"]}, {"tag_key": "datacenter", "tag_values": []}], + [{"tag_key": "demo", "tag_values": ["env"]}] + ] + }, + "size": "md", + "has_uniform_y_axes": true + } + } + ], + "template_variables":[], + "layout_type":"ordered", + "is_read_only":false, + "notify_list":[] + } \ No newline at end of file diff --git a/tests/scenarios/features/v1/dashboards_json_payload/toplist_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/toplist_widget.json new file mode 100644 index 000000000..9bee1724c --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/toplist_widget.json @@ -0,0 +1,60 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "time":{ + + }, + "style":{ + "display": { + "type": "stacked", + "legend": "inline" + }, + "scaling": "relative" + }, + "type":"toplist", + "requests":[ + { + "queries":[ + { + "data_source":"metrics", + "name":"query1", + "query":"avg:system.cpu.user{*} by {service}", + "aggregator":"avg" + } + ], + "formulas":[ + { + "formula":"query1", + "limit":{ + "count":10, + "order":"desc" + } + } + ], + "response_format":"scalar" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} diff --git a/tests/scenarios/features/v1/dashboards_json_payload/topology_map_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/topology_map_widget.json new file mode 100644 index 000000000..e3cf88351 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/topology_map_widget.json @@ -0,0 +1,34 @@ +{ + "title": "{{ unique }}", + "description": "", + "widgets": [ + { + "layout": { + "x": 0, + "y": 0, + "width": 47, + "height": 15 + }, + "definition": { + "title": "", + "title_size": "16", + "title_align": "left", + "type": "topology_map", + "requests": [ + { + "request_type": "topology", + "query": { + "data_source": "service_map", + "service": "", + "filters": ["env:none", "environment:*"] + } + } + ] + } + } + ], + "template_variables": [], + "layout_type": "free", + "is_read_only": false, + "notify_list": [] +} diff --git a/tests/scenarios/features/v1/dashboards_json_payload/trace_service_widget.json b/tests/scenarios/features/v1/dashboards_json_payload/trace_service_widget.json new file mode 100644 index 000000000..62b7bcaf0 --- /dev/null +++ b/tests/scenarios/features/v1/dashboards_json_payload/trace_service_widget.json @@ -0,0 +1,40 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":72, + "height":72 + }, + "definition":{ + "title":"Service Summary", + "time":{ + + }, + "type":"trace_service", + "env":"none", + "service":"", + "span_name":"", + "show_hits":true, + "show_errors":true, + "show_latency":true, + "show_breakdown":true, + "show_distribution":true, + "show_resource_list":false, + "size_format":"medium", + "display_format":"two_column" + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "is_read_only":false, + "notify_list":[ + + ] +} \ No newline at end of file diff --git a/tests/scenarios/features/v1/gcp_integration.feature b/tests/scenarios/features/v1/gcp_integration.feature index ae1f2eb90..cc078be2f 100644 --- a/tests/scenarios/features/v1/gcp_integration.feature +++ b/tests/scenarios/features/v1/gcp_integration.feature @@ -10,56 +10,58 @@ Feature: GCP Integration And a valid "appKeyAuth" key in the system And an instance of "GCPIntegration" API - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/gcp-integrations Scenario: Create a GCP integration returns "Bad Request" response Given new "CreateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/gcp-integrations Scenario: Create a GCP integration returns "OK" response Given new "CreateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "{{unique_hash}}@example.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/gcp-integrations Scenario: Delete a GCP integration returns "Bad Request" response Given new "DeleteGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/gcp-integrations Scenario: Delete a GCP integration returns "OK" response - Given new "DeleteGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + Given there is a valid "gcp_account" in the system + And new "DeleteGCPIntegration" request + And body with value {"client_email": "{{unique_hash}}@example.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "project_id": "datadog-apitest"} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/gcp-integrations Scenario: List all GCP integrations returns "Bad Request" response Given new "ListGCPIntegration" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/gcp-integrations Scenario: List all GCP integrations returns "OK" response Given new "ListGCPIntegration" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/cloud-integrations + @generated @skip @team:DataDog/gcp-integrations Scenario: Update a GCP integration returns "Bad Request" response Given new "UpdateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/cloud-integrations + @team:DataDog/gcp-integrations Scenario: Update a GCP integration returns "OK" response - Given new "UpdateGCPIntegration" request - And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} + Given there is a valid "gcp_account" in the system + And new "UpdateGCPIntegration" request + And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "{{unique_hash}}@example.com", "client_id": "{{ timestamp("now") }}{{ timestamp("now") }}0", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"} When the request is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/given.json b/tests/scenarios/features/v1/given.json index ea1945985..205b1ecb2 100644 --- a/tests/scenarios/features/v1/given.json +++ b/tests/scenarios/features/v1/given.json @@ -99,6 +99,45 @@ "tag": "Downtimes", "operationId": "CreateDowntime" }, + { + "parameters": [ + { + "name": "body", + "origin": "request", + "value": "{\n \"account_id\": \"{{ timestamp(\"now\") }}00\",\n \"account_specific_namespace_rules\": {\n \"auto_scaling\": false\n },\n \"cspm_resource_collection_enabled\": true,\n \"excluded_regions\": [\n \"us-east-1\",\n \"us-west-2\"\n ],\n \"filter_tags\": [\n \"$KEY:$VALUE\"\n ],\n \"host_tags\": [\n \"$KEY:$VALUE\"\n ],\n \"metrics_collection_enabled\": false,\n \"resource_collection_enabled\": true,\n \"role_name\": \"DatadogAWSIntegrationRole\"\n}" + } + ], + "step": "there is a valid \"aws_account\" in the system", + "key": "aws_account", + "tag": "AWS Integration", + "operationId": "CreateAWSAccount" + }, + { + "parameters": [ + { + "name": "body", + "origin": "request", + "value": "{\n \"app_service_plan_filters\": \"key:value,filter:example\",\n \"automute\": true,\n \"client_id\": \"{{ uuid }}\",\n \"client_secret\": \"testingx./Sw*g/Y33t..R1cH+hScMDt\",\n \"container_app_filters\": \"key:value,filter:example\",\n \"cspm_enabled\": true,\n \"custom_metrics_enabled\": true,\n \"errors\": [\"*\"],\n \"host_filters\": \"key:value,filter:example\",\n \"new_client_id\": \"{{ uuid }}\",\n \"new_tenant_name\": \"{{ uuid }}\",\n \"resource_collection_enabled\": true,\n \"tenant_name\": \"{{ uuid }}\"\n}" + } + ], + "step": "there is a valid \"azure_account\" in the system", + "key": "aws_account", + "tag": "Azure Integration", + "operationId": "CreateAzureIntegration" + }, + { + "parameters": [ + { + "name": "body", + "origin": "request", + "value": "{\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"client_email\": \"{{unique_hash}}@example.com\",\n \"client_id\": \"{{ timestamp(\"now\") }}{{ timestamp(\"now\") }}0\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL\",\n \"host_filters\": \"key:value,filter:example\",\n \"is_cspm_enabled\": true,\n \"is_security_command_center_enabled\": true,\n \"private_key\": \"private_key\",\n \"private_key_id\": \"123456789abcdefghi123456789abcdefghijklm\",\n \"project_id\": \"datadog-apitest\",\n \"resource_collection_enabled\": true,\n \"token_uri\": \"https://accounts.google.com/o/oauth2/token\",\n \"type\": \"service_account\"\n}" + } + ], + "step": "there is a valid \"gcp_account\" in the system", + "key": "gcp_account", + "tag": "GCP Integration", + "operationId": "CreateGCPIntegration" + }, { "parameters": [ { diff --git a/tests/scenarios/features/v1/logs_pipelines.feature b/tests/scenarios/features/v1/logs_pipelines.feature new file mode 100644 index 000000000..640b3cef9 --- /dev/null +++ b/tests/scenarios/features/v1/logs_pipelines.feature @@ -0,0 +1,114 @@ +@endpoint(logs-pipelines) @endpoint(logs-pipelines-v1) +Feature: Logs Pipelines + Pipelines and processors operate on incoming logs, parsing and + transforming them into structured attributes for easier querying. - See + the [pipelines configuration + page](https://app.datadoghq.com/logs/pipelines) for a list of the + pipelines and processors currently configured in web UI. - Additional + API-related information about processors can be found in the [processors + documentation](https://docs.datadoghq.com/logs/log_configuration/processor + s/?tab=api#lookup-processor). - For more information about Pipelines, see + the [pipeline documentation](https://docs.datadoghq.com/logs/log_configu + ration/pipelines). **Notes:** These endpoints are only available for + admin users. Make sure to use an application key created by an admin. + **Grok parsing rules may effect JSON output and require returned data to + be configured before using in a request.** For example, if you are using + the data returned from a request for another request body, and have a + parsing rule that uses a regex pattern like `\s` for spaces, you will need + to configure all escaped spaces as `%{space}` to use in the body data. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "LogsPipelines" API + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Create a pipeline returns "Bad Request" response + Given new "CreateLogsPipeline" request + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Create a pipeline returns "OK" response + Given new "CreateLogsPipeline" request + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Delete a pipeline returns "Bad Request" response + Given new "DeleteLogsPipeline" request + And request contains "pipeline_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Delete a pipeline returns "OK" response + Given new "DeleteLogsPipeline" request + And request contains "pipeline_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Get a pipeline returns "Bad Request" response + Given new "GetLogsPipeline" request + And request contains "pipeline_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Get a pipeline returns "OK" response + Given new "GetLogsPipeline" request + And request contains "pipeline_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Get all pipelines returns "OK" response + Given new "ListLogsPipelines" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Get pipeline order returns "OK" response + Given new "GetLogsPipelineOrder" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Update a pipeline returns "Bad Request" response + Given new "UpdateLogsPipeline" request + And request contains "pipeline_id" parameter from "REPLACE.ME" + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Update a pipeline returns "OK" response + Given new "UpdateLogsPipeline" request + And request contains "pipeline_id" parameter from "REPLACE.ME" + And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Update pipeline order returns "Bad Request" response + Given new "UpdateLogsPipelineOrder" request + And body with value {"pipeline_ids": ["tags", "org_ids", "products"]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Update pipeline order returns "OK" response + Given new "UpdateLogsPipelineOrder" request + And body with value {"pipeline_ids": ["tags", "org_ids", "products"]} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/event-platform-experience + Scenario: Update pipeline order returns "Unprocessable Entity" response + Given new "UpdateLogsPipelineOrder" request + And body with value {"pipeline_ids": ["tags", "org_ids", "products"]} + When the request is sent + Then the response status is 422 Unprocessable Entity diff --git a/tests/scenarios/features/v1/monitor_error_tracking_alert_payload.json b/tests/scenarios/features/v1/monitor_error_tracking_alert_payload.json new file mode 100644 index 000000000..e4ddca19e --- /dev/null +++ b/tests/scenarios/features/v1/monitor_error_tracking_alert_payload.json @@ -0,0 +1,9 @@ +{ + "name": "{{ unique}}", + "type": "error-tracking alert", + "query": "error-tracking-rum(\"service:foo AND @error.source:source\").rollup(\"count\").by(\"@issue.id\").last(\"1h\") >= 1", + "message": "some message", + "tags": ["test:{{ unique_lower_alnum }}", "env:ci"], + "priority": 3, + "options": { "thresholds": { "critical": 1 } } +} diff --git a/tests/scenarios/features/v1/monitor_payload.json b/tests/scenarios/features/v1/monitor_payload.json new file mode 100644 index 000000000..f17fbd01f --- /dev/null +++ b/tests/scenarios/features/v1/monitor_payload.json @@ -0,0 +1,26 @@ +{ + "name": "{{ unique }}", + "type": "log alert", + "query": "logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") > 2", + "message": "some message Notify: @hipchat-channel", + "tags": ["test:{{ unique_lower_alnum }}", "env:ci"], + "priority": 3, + "options": { + "enable_logs_sample": true, + "escalation_message": "the situation has escalated", + "evaluation_delay": 700, + "groupby_simple_monitor": true, + "include_tags": true, + "locked": false, + "new_host_delay": 600, + "no_data_timeframe": null, + "notify_audit": false, + "notify_no_data": false, + "on_missing_data": "show_and_notify_no_data", + "notification_preset_name": "hide_handles", + "renotify_interval": 60, + "require_full_window": true, + "timeout_h": 24, + "thresholds": { "critical": 2, "warning": 1 } + } +} diff --git a/tests/scenarios/features/v1/monitors.feature b/tests/scenarios/features/v1/monitors.feature new file mode 100644 index 000000000..46610ad69 --- /dev/null +++ b/tests/scenarios/features/v1/monitors.feature @@ -0,0 +1,331 @@ +@endpoint(monitors) @endpoint(monitors-v1) +Feature: Monitors + [Monitors](https://docs.datadoghq.com/monitors) allow you to watch a + metric or check that you care about and notifies your team when a defined + threshold has exceeded. For more information, see [Creating + Monitors](https://docs.datadoghq.com/monitors/create/types/). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Monitors" API + + @generated @skip @team:DataDog/monitor-app + Scenario: Check if a monitor can be deleted returns "Bad Request" response + Given new "CheckCanDeleteMonitor" request + And request contains "monitor_ids" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/monitor-app + Scenario: Check if a monitor can be deleted returns "Deletion conflict error" response + Given new "CheckCanDeleteMonitor" request + And request contains "monitor_ids" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Deletion conflict error + + @team:DataDog/monitor-app + Scenario: Check if a monitor can be deleted returns "OK" response + Given there is a valid "monitor" in the system + And new "CheckCanDeleteMonitor" request + And request contains "monitor_ids" parameter with value [{{monitor.id}}] + When the request is sent + Then the response status is 200 OK + And the response "data.ok[0]" has the same value as "monitor.id" + + @team:DataDog/monitor-app + Scenario: Create a RUM formula and functions monitor returns "OK" response + Given new "CreateMonitor" request + And body with value {"name": "{{ unique }}","type": "rum alert","query": "formula(\"query2 / query1 * 100\").last(\"15m\") >= 0.8","message": "some message Notify: @hipchat-channel", "tags": ["test:{{ unique_lower_alnum }}", "env:ci"],"priority": 3,"options":{"thresholds":{"critical":0.8},"variables":[{"data_source": "rum","name": "query2","search": {"query": ""},"indexes": ["*"],"compute": {"aggregation": "count"},"group_by": []}, {"data_source": "rum","name": "query1","search": {"query": "status:error"},"indexes": ["*"],"compute": {"aggregation": "count"},"group_by": []}]}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "rum alert" + + @team:DataDog/monitor-app + Scenario: Create a ci-pipelines formula and functions monitor returns "OK" response + Given new "CreateMonitor" request + And body with value {"name": "{{ unique }}","type": "ci-pipelines alert","query": "formula(\"query1 / query2 * 100\").last(\"15m\") >= 0.8","message": "some message Notify: @hipchat-channel","tags": ["test:{{ unique_lower_alnum }}", "env:ci"],"priority": 3,"options": {"thresholds": {"critical": 0.8},"variables": [{"data_source": "ci_pipelines","name": "query1","search": {"query": "@ci.status:error"},"indexes": ["*"],"compute": {"aggregation": "count"},"group_by": []},{"data_source": "ci_pipelines","name": "query2","search": {"query": ""},"indexes": ["*"],"compute": {"aggregation": "count"},"group_by": []}]}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "ci-pipelines alert" + And the response "query" is equal to "formula(\"query1 / query2 * 100\").last(\"15m\") >= 0.8" + + @team:DataDog/monitor-app + Scenario: Create a ci-pipelines monitor returns "OK" response + Given new "CreateMonitor" request + And body with value {"name": "{{ unique }}","type": "ci-pipelines alert","query": "ci-pipelines(\"ci_level:pipeline @git.branch:staging* @ci.status:error\").rollup(\"count\").by(\"@git.branch,@ci.pipeline.name\").last(\"5m\") >= 1","message": "some message Notify: @hipchat-channel", "tags": ["test:{{ unique_lower_alnum }}", "env:ci"],"priority": 3,"options":{"thresholds":{"critical":1}}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "ci-pipelines alert" + And the response "query" is equal to "ci-pipelines(\"ci_level:pipeline @git.branch:staging* @ci.status:error\").rollup(\"count\").by(\"@git.branch,@ci.pipeline.name\").last(\"5m\") >= 1" + + @team:DataDog/monitor-app + Scenario: Create a ci-tests formula and functions monitor returns "OK" response + Given new "CreateMonitor" request + And body with value {"name": "{{ unique }}","type": "ci-tests alert","query": "formula(\"query1 / query2 * 100\").last(\"15m\") >= 0.8","message": "some message Notify: @hipchat-channel","tags": ["test:{{ unique_lower_alnum }}", "env:ci"],"priority": 3,"options": {"thresholds": {"critical": 0.8},"variables": [{"data_source": "ci_tests","name": "query1","search": {"query": "@test.status:fail"},"indexes": ["*"],"compute": {"aggregation": "count"},"group_by": []},{"data_source": "ci_tests","name": "query2","search": {"query": ""},"indexes": ["*"],"compute": {"aggregation": "count"},"group_by": []}]}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "ci-tests alert" + And the response "query" is equal to "formula(\"query1 / query2 * 100\").last(\"15m\") >= 0.8" + + @team:DataDog/monitor-app + Scenario: Create a ci-tests monitor returns "OK" response + Given new "CreateMonitor" request + And body with value {"name": "{{ unique }}","type": "ci-tests alert","query": "ci-tests(\"type:test @git.branch:staging* @test.status:fail\").rollup(\"count\").by(\"@test.name\").last(\"5m\") >= 1","message": "some message Notify: @hipchat-channel", "tags": ["test:{{ unique_lower_alnum }}", "env:ci"],"priority": 3,"options":{"thresholds":{"critical":1}}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "ci-tests alert" + And the response "query" is equal to "ci-tests(\"type:test @git.branch:staging* @test.status:fail\").rollup(\"count\").by(\"@test.name\").last(\"5m\") >= 1" + + @team:DataDog/monitor-app + Scenario: Create a metric monitor returns "OK" response + Given new "CreateMonitor" request + And body with value {"name": "{{ unique }}", "type": "metric alert", "query": "avg(current_1mo):avg:system.load.5{*} > 0.5", "message": "some message Notify: @hipchat-channel", "options":{"thresholds":{"critical":0.5}, "scheduling_options":{"evaluation_window":{"day_starts":"04:00", "month_starts":1}}}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "query" is equal to "avg(current_1mo):avg:system.load.5{*} > 0.5" + + @team:DataDog/monitor-app + Scenario: Create a metric monitor with a custom schedule returns "OK" response + Given new "CreateMonitor" request + And body with value {"message":"some message Notify: @hipchat-channel","name":"{{ unique }}","query":"avg(current_1mo):avg:system.load.5{*} > 0.5","tags":[],"options":{"thresholds":{"critical":0.5},"notify_audit":false,"include_tags":false,"scheduling_options":{"evaluation_window":{"day_starts":"04:00", "month_starts":1},"custom_schedule":{"recurrences":[{"rrule":"FREQ=DAILY;INTERVAL=1","timezone":"America/Los_Angeles","start":"2024-10-26T09:13:00"}]}}},"type":"query alert"} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "options.scheduling_options.custom_schedule.recurrences[0].rrule" is equal to "FREQ=DAILY;INTERVAL=1" + And the response "options.scheduling_options.custom_schedule.recurrences[0].start" is equal to "2024-10-26T09:13:00" + And the response "options.scheduling_options.custom_schedule.recurrences[0].timezone" is equal to "America/Los_Angeles" + + @team:DataDog/monitor-app + Scenario: Create a monitor returns "Bad Request" response + Given new "CreateMonitor" request + And body with value {"type": "log alert", "query": "query"} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Create a monitor returns "OK" response + Given there is a valid "role" in the system + And new "CreateMonitor" request + And body with value {"name": "{{ unique }}", "type": "log alert", "query": "logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") > 2", "message": "some message Notify: @hipchat-channel", "tags": ["test:{{ unique_lower_alnum }}", "env:ci"], "priority": 3, "restricted_roles": ["{{ role.data.id }}"]} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "log alert" + And the response "query" is equal to "logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") > 2" + + @team:DataDog/monitor-app + Scenario: Create an Error Tracking monitor returns "OK" response + Given new "CreateMonitor" request + And body from file "monitor_error_tracking_alert_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "error-tracking alert" + And the response "query" is equal to "error-tracking-rum(\"service:foo AND @error.source:source\").rollup(\"count\").by(\"@issue.id\").last(\"1h\") >= 1" + + @generated @skip @team:DataDog/monitor-app + Scenario: Delete a monitor returns "Bad Request" response + Given new "DeleteMonitor" request + And request contains "monitor_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Delete a monitor returns "Item not found error" response + Given new "DeleteMonitor" request + And request contains "monitor_id" parameter with value 0 + When the request is sent + Then the response status is 404 Item not found error + + @team:DataDog/monitor-app + Scenario: Delete a monitor returns "OK" response + Given there is a valid "monitor" in the system + And new "DeleteMonitor" request + And request contains "monitor_id" parameter from "monitor.id" + When the request is sent + Then the response status is 200 OK + And the response "deleted_monitor_id" has the same value as "monitor.id" + + @generated @skip @team:DataDog/monitor-app + Scenario: Edit a monitor returns "Bad Request" response + Given new "UpdateMonitor" request + And request contains "monitor_id" parameter from "REPLACE.ME" + And body with value {"options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "restricted_roles": [], "tags": [], "type": "query alert"} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Edit a monitor returns "Monitor Not Found error" response + Given new "UpdateMonitor" request + And request contains "monitor_id" parameter with value 0 + And body with value {"name": "updated", "options": {"evaluation_delay": null, "new_group_delay": 600, "new_host_delay":null, "renotify_interval":null, "thresholds": {"critical":2, "warning": null}, "timeout_h": null}} + When the request is sent + Then the response status is 404 Monitor Not Found error + + @team:DataDog/monitor-app + Scenario: Edit a monitor returns "OK" response + Given there is a valid "monitor" in the system + And new "UpdateMonitor" request + And request contains "monitor_id" parameter from "monitor.id" + And body with value {"name": "{{ monitor.name }}-updated", "options": {"evaluation_delay": null, "new_group_delay": 600, "new_host_delay":null, "renotify_interval":null, "thresholds": {"critical":2, "warning": null}, "timeout_h": null}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ monitor.name }}-updated" + + @generated @skip @team:DataDog/monitor-app + Scenario: Get a monitor's details returns "Bad Request" response + Given new "GetMonitor" request + And request contains "monitor_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Get a monitor's details returns "Monitor Not Found error" response + Given new "GetMonitor" request + And request contains "monitor_id" parameter with value 12345 + When the request is sent + Then the response status is 404 Monitor Not Found error + + @team:DataDog/monitor-app + Scenario: Get a monitor's details returns "OK" response + Given there is a valid "monitor" in the system + And new "GetMonitor" request + And request contains "monitor_id" parameter from "monitor.id" + And request contains "with_downtimes" parameter with value true + When the request is sent + Then the response status is 200 OK + And the response "id" has the same value as "monitor.id" + + @replay-only @team:DataDog/monitor-app + Scenario: Get a monitor's details with downtime returns "OK" response + Given there is a valid "monitor" in the system + And there is a valid "downtime" for a "monitor" in the system + And new "GetMonitor" request + And request contains "monitor_id" parameter from "monitor.id" + And request contains "with_downtimes" parameter with value true + When the request is sent + Then the response status is 200 OK + And the response "id" has the same value as "monitor.id" + And the response "matching_downtimes" has length 1 + And the response "matching_downtimes[0].id" has the same value as "downtime_monitor.id" + + @team:DataDog/monitor-app + Scenario: Get a synthetics monitor's details + Given there is a valid "synthetics_api_test" in the system + And new "GetMonitor" request + And request contains "monitor_id" parameter from "synthetics_api_test.monitor_id" + When the request is sent + Then the response status is 200 OK + And the response "options.synthetics_check_id" has the same value as "synthetics_api_test.public_id" + + @team:DataDog/monitor-app + Scenario: Get all monitor details returns "Bad Request" response + Given new "ListMonitors" request + And request contains "group_states" parameter with value "notagroupstate" + When the request is sent + Then the response status is 400 Bad Request + + @integration-only @team:DataDog/monitor-app + Scenario: Get all monitor details returns "OK" response + Given new "ListMonitors" request + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:DataDog/monitor-app @with-pagination + Scenario: Get all monitor details returns "OK" response with pagination + Given new "ListMonitors" request + And request contains "page_size" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @skip @team:DataDog/monitor-app + Scenario: Get all monitor details with tags + Given there is a valid "monitor" in the system + And new "ListMonitors" request + And request contains "tags" parameter with value "test:{{ unique_lower_alnum }}" + And request contains "page_size" parameter with value 1 + When the request is sent + Then the response status is 200 OK + And the response "[0].id" has the same value as "monitor.id" + + @team:DataDog/monitor-app + Scenario: Monitors group search returns "Bad Request" response + Given new "SearchMonitorGroups" request + And request contains "query" parameter with value "status:notastatus" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Monitors group search returns "OK" response + Given new "SearchMonitorGroups" request + When the request is sent + Then the response status is 200 OK + And the response "metadata.page" is equal to 0 + + @team:DataDog/monitor-app + Scenario: Monitors search returns "Bad Request" response + Given new "SearchMonitors" request + And request contains "query" parameter with value "status:notastatus" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Monitors search returns "OK" response + Given new "SearchMonitors" request + When the request is sent + Then the response status is 200 OK + And the response "metadata.page" is equal to 0 + + @team:DataDog/monitor-app + Scenario: Validate a monitor returns "Invalid JSON" response + Given new "ValidateMonitor" request + And body with value {"type": "log alert", "query": "query"} + When the request is sent + Then the response status is 400 Invalid JSON + + @team:DataDog/monitor-app + Scenario: Validate a monitor returns "OK" response + Given new "ValidateMonitor" request + And body from file "monitor_payload.json" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/monitor-app + Scenario: Validate a multi-alert monitor returns "OK" response + Given new "ValidateMonitor" request + And body from file "multi_alert_monitor_payload.json" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/monitor-app + Scenario: Validate an existing monitor returns "Invalid JSON" response + Given there is a valid "monitor" in the system + And new "ValidateExistingMonitor" request + And request contains "monitor_id" parameter from "monitor.id" + And body with value {"type": "log alert", "query": "query"} + When the request is sent + Then the response status is 400 Invalid JSON + + @skip @team:DataDog/monitor-app + Scenario: Validate an existing monitor returns "Item not found error" response + Given new "ValidateExistingMonitor" request + And request contains "monitor_id" parameter with value 0 + When the request is sent + Then the response status is 404 Item not found error + + @team:DataDog/monitor-app + Scenario: Validate an existing monitor returns "OK" response + Given there is a valid "monitor" in the system + And new "ValidateExistingMonitor" request + And request contains "monitor_id" parameter from "monitor.id" + And body from file "monitor_payload.json" + When the request is sent + Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/multi_alert_monitor_payload.json b/tests/scenarios/features/v1/multi_alert_monitor_payload.json new file mode 100644 index 000000000..a0eb80488 --- /dev/null +++ b/tests/scenarios/features/v1/multi_alert_monitor_payload.json @@ -0,0 +1,27 @@ +{ + "name": "{{ unique }}", + "type": "log alert", + "query": "logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source,status\").last(\"5m\") > 2", + "message": "some message Notify: @hipchat-channel", + "tags": ["test:{{ unique_lower_alnum }}", "env:ci"], + "priority": 3, + "options": { + "enable_logs_sample": true, + "escalation_message": "the situation has escalated", + "evaluation_delay": 700, + "group_retention_duration": "2d", + "groupby_simple_monitor": false, + "include_tags": true, + "locked": false, + "new_host_delay": 600, + "no_data_timeframe": null, + "notify_audit": false, + "notify_by": ["status"], + "notify_no_data": false, + "on_missing_data": "show_and_notify_no_data", + "renotify_interval": 60, + "require_full_window": true, + "timeout_h": 24, + "thresholds": { "critical": 2, "warning": 1 } + } +} diff --git a/tests/scenarios/features/v1/notebook_payload.json b/tests/scenarios/features/v1/notebook_payload.json new file mode 100644 index 000000000..04b2b683f --- /dev/null +++ b/tests/scenarios/features/v1/notebook_payload.json @@ -0,0 +1,20 @@ +{ + "data": { + "type": "notebooks", + "attributes": { + "name": "{{ unique }}", + "time": { "live_span": "1h" }, + "cells": [ + { + "attributes": { + "definition": { + "text": "# {{ unique }} notebook text", + "type": "markdown" + } + }, + "type": "notebook_cells" + } + ] + } + } +} diff --git a/tests/scenarios/features/v1/notebooks.feature b/tests/scenarios/features/v1/notebooks.feature new file mode 100644 index 000000000..2788eb421 --- /dev/null +++ b/tests/scenarios/features/v1/notebooks.feature @@ -0,0 +1,130 @@ +@endpoint(notebooks) @endpoint(notebooks-v1) +Feature: Notebooks + Interact with your notebooks through the API to make it easier to + organize, find, and share all of your notebooks with your team and + organization. For more information, see the [Notebooks + documentation](https://docs.datadoghq.com/notebooks/). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Notebooks" API + + @generated @skip @team:DataDog/notebooks + Scenario: Create a notebook returns "Bad Request" response + Given new "CreateNotebook" request + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/notebooks + Scenario: Create a notebook returns "OK" response + Given new "CreateNotebook" request + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "notebooks" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.cells[0].attributes.definition.text" is equal to "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```" + + @skip @team:DataDog/notebooks + Scenario: Delete a notebook returns "Bad Request" response + Given new "DeleteNotebook" request + And request contains "notebook_id" parameter with value "ThisIsntANotebookId" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/notebooks + Scenario: Delete a notebook returns "Not Found" response + Given new "DeleteNotebook" request + And request contains "notebook_id" parameter with value 123456 + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/notebooks + Scenario: Delete a notebook returns "OK" response + Given new "DeleteNotebook" request + And there is a valid "notebook" in the system + And request contains "notebook_id" parameter from "notebook.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/notebooks + Scenario: Get a notebook returns "Bad Request" response + Given new "GetNotebook" request + And request contains "notebook_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/notebooks + Scenario: Get a notebook returns "Not Found" response + Given new "GetNotebook" request + And request contains "notebook_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/notebooks + Scenario: Get a notebook returns "OK" response + Given new "GetNotebook" request + And there is a valid "notebook" in the system + And request contains "notebook_id" parameter from "notebook.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" has the same value as "notebook.data.attributes.name" + And the response "data.attributes.cells[0].attributes.definition.type" has the same value as "notebook.data.attributes.cells[0].attributes.definition.type" + + @generated @skip @team:DataDog/notebooks + Scenario: Get all notebooks returns "Bad Request" response + Given new "ListNotebooks" request + When the request is sent + Then the response status is 400 Bad Request + + @skip-validation @team:DataDog/notebooks + Scenario: Get all notebooks returns "OK" response + Given new "ListNotebooks" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "attributes.status" with value "published" + + @replay-only @skip-validation @team:DataDog/notebooks @with-pagination + Scenario: Get all notebooks returns "OK" response with pagination + Given new "ListNotebooks" request + And request contains "count" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @generated @skip @team:DataDog/notebooks + Scenario: Update a notebook returns "Bad Request" response + Given new "UpdateNotebook" request + And request contains "notebook_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/notebooks + Scenario: Update a notebook returns "Conflict" response + Given new "UpdateNotebook" request + And request contains "notebook_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/notebooks + Scenario: Update a notebook returns "Not Found" response + Given new "UpdateNotebook" request + And request contains "notebook_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/notebooks + Scenario: Update a notebook returns "OK" response + Given new "UpdateNotebook" request + And there is a valid "notebook" in the system + And request contains "notebook_id" parameter from "notebook.data.id" + And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "{{ unique }}-updated", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{ unique }}-updated" + And the response "data.attributes.status" is equal to "published" diff --git a/tests/scenarios/features/v1/screenboard_dashboard_payload.json b/tests/scenarios/features/v1/screenboard_dashboard_payload.json new file mode 100644 index 000000000..082a34ca9 --- /dev/null +++ b/tests/scenarios/features/v1/screenboard_dashboard_payload.json @@ -0,0 +1,41 @@ +{ + "layout_type": "free", + "title": "{{ unique }} with Profile Metrics Query", + "widgets": [ + { + "layout": { + "height": 10, + "width": 10, + "x": 10, + "y": 10 + }, + "definition": { + "type": "timeseries", + "requests": [ + { + "profile_metrics_query": { + "compute": { + "aggregation": "sum", + "facet": "@prof_core_cpu_cores" + }, + "search": { + "query": "runtime:jvm" + }, + "group_by": [ + { + "facet": "service", + "limit": 10, + "sort": { + "aggregation": "sum", + "order": "desc", + "facet": "@prof_core_cpu_cores" + } + } + ] + } + } + ] + } + } + ] +} diff --git a/tests/scenarios/features/v1/synthetics.feature b/tests/scenarios/features/v1/synthetics.feature new file mode 100644 index 000000000..9b707a6ee --- /dev/null +++ b/tests/scenarios/features/v1/synthetics.feature @@ -0,0 +1,635 @@ +@endpoint(synthetics) @endpoint(synthetics-v1) +Feature: Synthetics + Datadog Synthetic Monitoring uses simulated user requests and browser + rendering to help you ensure uptime, identify regional issues, and track + your application performance. Synthetic tests come in two different + flavors, [API + tests](https://docs.datadoghq.com/synthetics/api_tests/?tab=httptest) and + [browser tests](https://docs.datadoghq.com/synthetics/browser_tests). You + can use Datadog’s API to manage both test types programmatically. For + more information, see the [Synthetic Monitoring + documentation](https://docs.datadoghq.com/synthetics/). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Synthetics" API + + @replay-only @skip-validation @team:DataDog/synthetics-app + Scenario: Client is resilient to enum and oneOf deserialization errors + Given new "ListTests" request + When the request is sent + Then the response status is 200 OK - Returns the list of all Synthetic tests. + And the response "tests" has length 6 + And the response "tests[0].config.assertions" has length 3 + And the response "tests[0].config.assertions[0].operator" is equal to "lessThan" + And the response "tests[0].config.assertions[2].operator" is equal to "A non existent operator" + And the response "tests[1].config.assertions[0].operator" is equal to "lessThan" + And the response "tests[1].config.assertions[1].type" is equal to "A non existent assertion type" + And the response "tests[2].options.device_ids" has length 3 + And the response "tests[2].options.device_ids[2]" is equal to "A non existent device ID" + And the response "tests[3].type" is equal to "A non existent test type" + And the response "tests[4].config.request.method" is equal to "A non existent method" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create a browser test returns "- JSON format is wrong" response + Given new "CreateSyntheticsBrowserTest" request + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @team:DataDog/synthetics-app + Scenario: Create a browser test returns "OK - Returns saved rumSettings." response + Given new "CreateSyntheticsBrowserTest" request + And body from file "synthetics_browser_test_payload_with_rum_settings.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "options.rumSettings.isEnabled" is equal to true + And the response "options.rumSettings.applicationId" is equal to "mockApplicationId" + And the response "options.rumSettings.clientTokenId" is equal to 12345 + + @team:DataDog/synthetics-app + Scenario: Create a browser test returns "OK - Returns the created test details." response + Given new "CreateSyntheticsBrowserTest" request + And body from file "synthetics_browser_test_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + And the response "config.configVariables" has item with field "secure" with value true + And the response "config.variables" has item with field "secure" with value true + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create a browser test returns "Test quota is reached" response + Given new "CreateSyntheticsBrowserTest" request + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + When the request is sent + Then the response status is 402 Test quota is reached + + @team:DataDog/synthetics-app + Scenario: Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response + Given new "CreateSyntheticsBrowserTest" request + And body from file "synthetics_browser_test_payload_with_advanced_scheduling.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + And the response "options.scheduling.timeframes[0].day" is equal to 1 + And the response "options.scheduling.timeframes[0].from" is equal to "07:00" + And the response "options.scheduling.timeframes[1].to" is equal to "16:00" + And the response "options.scheduling.timezone" is equal to "America/New_York" + + @team:DataDog/synthetics-app + Scenario: Create a global variable from test returns "OK" response + Given there is a valid "synthetics_api_test_multi_step" in the system + And new "CreateGlobalVariable" request + And body from file "synthetics_global_variable_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "GLOBAL_VARIABLE_PAYLOAD_{{ unique_upper_alnum }}" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create a global variable returns "Invalid request" response + Given new "CreateGlobalVariable" request + And body with value {"attributes": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "description": "Example description", "name": "MY_VARIABLE", "parse_test_options": {"field": "content-type", "localVariableName": "LOCAL_VARIABLE", "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}, "parse_test_public_id": "abc-def-123", "tags": ["team:front", "test:workflow-1"], "value": {"secure": true, "value": "value"}} + When the request is sent + Then the response status is 400 Invalid request + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create a global variable returns "OK" response + Given new "CreateGlobalVariable" request + And body with value {"attributes": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "description": "Example description", "name": "MY_VARIABLE", "parse_test_options": {"field": "content-type", "localVariableName": "LOCAL_VARIABLE", "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}, "parse_test_public_id": "abc-def-123", "tags": ["team:front", "test:workflow-1"], "value": {"secure": true, "value": "value"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/synthetics-app + Scenario: Create a private location returns "OK" response + Given there is a valid "role" in the system + And new "CreatePrivateLocation" request + And body with value {"description": "Test {{ unique }} description", "metadata": {"restricted_roles": ["{{ role.data.id }}"]}, "name": "{{ unique }}", "tags": ["test:{{ unique_lower_alnum }}"]} + When the request is sent + Then the response status is 200 OK + And the response "private_location.name" is equal to "{{ unique }}" + And the response "private_location.metadata.restricted_roles[0]" has the same value as "role.data.id" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create a private location returns "Private locations are not activated for the user" response + Given new "CreatePrivateLocation" request + And body with value {"description": "Description of private location", "metadata": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "name": "New private location", "tags": ["team:front"]} + When the request is sent + Then the response status is 404 Private locations are not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create a private location returns "Quota reached for private locations" response + Given new "CreatePrivateLocation" request + And body with value {"description": "Description of private location", "metadata": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "name": "New private location", "tags": ["team:front"]} + When the request is sent + Then the response status is 402 Quota reached for private locations + + @team:DataDog/synthetics-app + Scenario: Create an API GRPC test returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body from file "synthetics_api_grpc_test_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + + @team:DataDog/synthetics-app + Scenario: Create an API HTTP test returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body from file "synthetics_api_http_test_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + + @team:DataDog/synthetics-app + Scenario: Create an API HTTP with oauth-rop test returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body from file "synthetics_api_http_test_oauth_rop_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + + @team:DataDog/synthetics-app + Scenario: Create an API SSL test returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body from file "synthetics_api_ssl_test_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create an API test returns "- JSON format is wrong" response + Given new "CreateSyntheticsAPITest" request + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create an API test returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + When the request is sent + Then the response status is 200 OK - Returns the created test details. + + @generated @skip @team:DataDog/synthetics-app + Scenario: Create an API test returns "Test quota is reached" response + Given new "CreateSyntheticsAPITest" request + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + When the request is sent + Then the response status is 402 Test quota is reached + + @team:DataDog/synthetics-app + Scenario: Create an API test with UDP subtype returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body from file "synthetics_api_test_udp_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + + @team:DataDog/synthetics-app + Scenario: Create an API test with WEBSOCKET subtype returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body from file "synthetics_api_test_websocket_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + + @team:DataDog/synthetics-app + Scenario: Create an API test with multi subtype returns "OK - Returns the created test details." response + Given new "CreateSyntheticsAPITest" request + And body from file "synthetics_api_test_multi_step_payload.json" + When the request is sent + Then the response status is 200 OK - Returns the created test details. + And the response "name" is equal to "{{ unique }}" + And the response "config.steps[0].retry.count" is equal to 5 + And the response "config.steps[0].retry.interval" is equal to 1000 + And the response "config.steps[0].extractedValues[0].secure" is equal to true + + @generated @skip @team:DataDog/synthetics-app + Scenario: Delete a global variable returns "JSON format is wrong" response + Given new "DeleteGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 JSON format is wrong + + @generated @skip @team:DataDog/synthetics-app + Scenario: Delete a global variable returns "Not found" response + Given new "DeleteGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/synthetics-app + Scenario: Delete a global variable returns "OK" response + Given new "DeleteGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Delete a private location returns "- Private locations are not activated for the user" response + Given new "DeletePrivateLocation" request + And request contains "location_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Private locations are not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Delete a private location returns "OK" response + Given new "DeletePrivateLocation" request + And request contains "location_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Delete tests returns "- JSON format is wrong" response + Given new "DeleteTests" request + And body with value {"public_ids": []} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @generated @skip @team:DataDog/synthetics-app + Scenario: Delete tests returns "- Tests to be deleted can't be found" response + Given new "DeleteTests" request + And body with value {"public_ids": []} + When the request is sent + Then the response status is 404 - Tests to be deleted can't be found + + @skip @team:DataDog/synthetics-app + Scenario: Delete tests returns "OK." response + Given there is a valid "synthetics_api_test" in the system + And new "DeleteTests" request + And body with value {"public_ids": ["{{ synthetics_api_test.public_id }}"]} + When the request is sent + Then the response status is 200 OK. + And the response "deleted_tests[0].public_id" is equal to "{{ synthetics_api_test.public_id }}" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit a browser test returns "- JSON format is wrong" response + Given new "UpdateBrowserTest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit a browser test returns "- Synthetic Monitoring is not activated for the user" response + Given new "UpdateBrowserTest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit a browser test returns "OK" response + Given new "UpdateBrowserTest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"config": {"assertions": [], "configVariables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}], "request": {"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "bodyType": "text/plain", "callType": "unary", "certificate": {"cert": {}, "key": {}}, "certificateDomains": [], "proxy": {"url": "https://example.com"}, "service": "Greeter", "url": "https://example.com"}, "variables": [{"name": "VARIABLE_NAME", "type": "text"}]}, "locations": ["aws:eu-west-3"], "message": "", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "steps": [{"type": "assertElementContent"}], "tags": ["env:prod"], "type": "browser"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit a global variable returns "Invalid request" response + Given new "EditGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + And body with value {"attributes": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "description": "Example description", "name": "MY_VARIABLE", "parse_test_options": {"field": "content-type", "localVariableName": "LOCAL_VARIABLE", "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}, "parse_test_public_id": "abc-def-123", "tags": ["team:front", "test:workflow-1"], "value": {"secure": true, "value": "value"}} + When the request is sent + Then the response status is 400 Invalid request + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit a global variable returns "OK" response + Given new "EditGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + And body with value {"attributes": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "description": "Example description", "name": "MY_VARIABLE", "parse_test_options": {"field": "content-type", "localVariableName": "LOCAL_VARIABLE", "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}, "parse_test_public_id": "abc-def-123", "tags": ["team:front", "test:workflow-1"], "value": {"secure": true, "value": "value"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit a private location returns "- Private locations are not activated for the user" response + Given new "UpdatePrivateLocation" request + And request contains "location_id" parameter from "REPLACE.ME" + And body with value {"description": "Description of private location", "metadata": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "name": "New private location", "tags": ["team:front"]} + When the request is sent + Then the response status is 404 - Private locations are not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit a private location returns "OK" response + Given new "UpdatePrivateLocation" request + And request contains "location_id" parameter from "REPLACE.ME" + And body with value {"description": "Description of private location", "metadata": {"restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]}, "name": "New private location", "tags": ["team:front"]} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit an API test returns "- JSON format is wrong" response + Given new "UpdateAPITest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @generated @skip @team:DataDog/synthetics-app + Scenario: Edit an API test returns "- Synthetic Monitoring is not activated for the user" response + Given new "UpdateAPITest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"config": {"assertions": [{"operator": "lessThan", "target": 1000, "type": "responseTime"}], "request": {"method": "GET", "url": "https://example.com"}}, "locations": ["aws:eu-west-3"], "message": "Notification message", "name": "Example test name", "options": {"ci": {"executionRule": "blocking"}, "device_ids": ["laptop_large"], "httpVersion": "http1", "monitor_options": {}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "rumSettings": {"applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "clientTokenId": 12345, "isEnabled": true}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}}, "status": "live", "subtype": "http", "tags": ["env:production"], "type": "api"} + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @team:DataDog/synthetics-app + Scenario: Edit an API test returns "OK" response + Given there is a valid "synthetics_api_test" in the system + And new "UpdateAPITest" request + And request contains "public_id" parameter from "synthetics_api_test.public_id" + And body from file "synthetics_api_test_update_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ synthetics_api_test.name }}-updated" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a browser test result returns "- Synthetic Monitoring is not activated for the user" response + Given new "GetBrowserTestResult" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "result_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @replay-only @team:DataDog/synthetics-app + Scenario: Get a browser test result returns "OK" response + Given new "GetBrowserTestResult" request + And request contains "public_id" parameter with value "2yy-sem-mjh" + And request contains "result_id" parameter with value "5671719892074090418" + When the request is sent + Then the response status is 200 OK + And the response "result_id" is equal to "5671719892074090418" + And the response "probe_dc" is equal to "aws:ca-central-1" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a browser test returns "- Synthetic Monitoring is not activated for the user" response + Given new "GetBrowserTest" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a browser test returns "OK" response + Given new "GetBrowserTest" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a browser test's latest results summaries returns "- Synthetic Monitoring is not activated for the user" response + Given new "GetBrowserTestLatestResults" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @replay-only @team:DataDog/synthetics-app + Scenario: Get a browser test's latest results summaries returns "OK" response + Given new "GetBrowserTestLatestResults" request + And request contains "public_id" parameter with value "2yy-sem-mjh" + When the request is sent + Then the response status is 200 OK + And the response "results" has length 3 + And the response "results[0].status" is equal to 0 + And the response "results[0].probe_dc" is equal to "aws:ca-central-1" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a global variable returns "Not found" response + Given new "GetGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a global variable returns "OK" response + Given new "GetGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a private location returns "- Synthetic private locations are not activated for the user" response + Given new "GetPrivateLocation" request + And request contains "location_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic private locations are not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a private location returns "OK" response + Given new "GetPrivateLocation" request + And request contains "location_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a test configuration returns "- Synthetic is not activated for the user" response + Given new "GetTest" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic is not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get a test configuration returns "OK" response + Given new "GetTest" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get all global variables returns "OK" response + Given new "ListGlobalVariables" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get all locations (public and private) returns "OK" response + Given new "ListLocations" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get an API test result returns "- Synthetic Monitoring is not activated for the user" response + Given new "GetAPITestResult" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "result_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @replay-only @team:DataDog/synthetics-app + Scenario: Get an API test result returns "OK" response + Given new "GetAPITestResult" request + And request contains "public_id" parameter with value "hwb-332-3xe" + And request contains "result_id" parameter with value "3420446318379485707" + When the request is sent + Then the response status is 200 OK + And the response "result_id" is equal to "3420446318379485707" + And the response "probe_dc" is equal to "aws:us-west-1" + + @replay-only @team:DataDog/synthetics-app + Scenario: Get an API test result returns result with failure object + Given there is a "synthetics_api_test_with_wrong_dns" in the system + And the "synthetics_api_test_with_wrong_dns" is triggered + And new "GetAPITestResult" request + And request contains "public_id" parameter from "synthetics_api_test_with_wrong_dns.public_id" + And request contains "result_id" parameter from "synthetics_api_test_with_wrong_dns_result.results[0].result_id" + When the request is sent + Then the response status is 200 OK + And the response "result.failure.code" is equal to "DNS" + And the response "result.failure.message" is equal to "Error during DNS resolution of hostname app.datadfoghq.com (ENOTFOUND)." + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get an API test returns "- Synthetic Monitoring is not activated for the user" response + Given new "GetAPITest" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get an API test returns "OK" response + Given new "GetAPITest" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get an API test's latest results summaries returns "- Synthetic is not activated for the user" response + Given new "GetAPITestLatestResults" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 - Synthetic is not activated for the user + + @replay-only @team:DataDog/synthetics-app + Scenario: Get an API test's latest results summaries returns "OK" response + Given new "GetAPITestLatestResults" request + And request contains "public_id" parameter with value "hwb-332-3xe" + When the request is sent + Then the response status is 200 OK + And the response "results" has length 150 + And the response "results[0].status" is equal to 0 + And the response "results[0].probe_dc" is equal to "aws:us-west-1" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get details of batch returns "Batch does not exist." response + Given new "GetSyntheticsCIBatch" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Batch does not exist. + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get details of batch returns "OK" response + Given new "GetSyntheticsCIBatch" request + And request contains "batch_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get the default locations returns "OK" response + Given new "GetSyntheticsDefaultLocations" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response + Given new "ListTests" request + When the request is sent + Then the response status is 200 OK - Returns the list of all Synthetic tests. + + @replay-only @skip-validation @team:DataDog/synthetics-app @with-pagination + Scenario: Get the list of all Synthetic tests returns "OK - Returns the list of all Synthetic tests." response with pagination + Given new "ListTests" request + And request contains "page_size" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK - Returns the list of all Synthetic tests. + And the response has 3 items + + @generated @skip @team:DataDog/synthetics-app + Scenario: Get the list of all Synthetic tests returns "Synthetic Monitoring is not activated for the user." response + Given new "ListTests" request + When the request is sent + Then the response status is 404 Synthetic Monitoring is not activated for the user. + + @team:DataDog/synthetics-app + Scenario: Get the list of default locations returns "OK" response + Given new "GetSyntheticsDefaultLocations" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Patch a Synthetic test returns "- JSON format is wrong" response + Given new "PatchTest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": [{"op": "replace", "path": "/name", "value": "New test name"}, {"op": "remove", "path": "/config/assertions/0"}]} + When the request is sent + Then the response status is 400 - JSON format is wrong + + @generated @skip @team:DataDog/synthetics-app + Scenario: Patch a Synthetic test returns "- Synthetic Monitoring is not activated for the user" response + Given new "PatchTest" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": [{"op": "replace", "path": "/name", "value": "New test name"}, {"op": "remove", "path": "/config/assertions/0"}]} + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @team:DataDog/synthetics-app + Scenario: Patch a Synthetic test returns "OK" response + Given there is a valid "synthetics_api_test" in the system + And new "PatchTest" request + And request contains "public_id" parameter from "synthetics_api_test.public_id" + And body with value {"data": [{"op": "replace", "path": "/name", "value": "New test name"}, {"op": "remove", "path": "/config/assertions/0"}]} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-app + Scenario: Pause or start a test returns "- Synthetic Monitoring is not activated for the user" response + Given new "UpdateTestPauseStatus" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"new_status": "live"} + When the request is sent + Then the response status is 404 - Synthetic Monitoring is not activated for the user + + @generated @skip @team:DataDog/synthetics-app + Scenario: Pause or start a test returns "JSON format is wrong." response + Given new "UpdateTestPauseStatus" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"new_status": "live"} + When the request is sent + Then the response status is 400 JSON format is wrong. + + @generated @skip @team:DataDog/synthetics-app + Scenario: Pause or start a test returns "OK - Returns a boolean indicating if the update was successful." response + Given new "UpdateTestPauseStatus" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"new_status": "live"} + When the request is sent + Then the response status is 200 OK - Returns a boolean indicating if the update was successful. + + @generated @skip @team:DataDog/synthetics-app + Scenario: Trigger Synthetic tests returns "Bad Request" response + Given new "TriggerTests" request + And body with value {"tests": [{"metadata": {"ci": {"pipeline": {}, "provider": {}}, "git": {}}, "public_id": "aaa-aaa-aaa"}]} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/synthetics-app + Scenario: Trigger Synthetic tests returns "OK" response + Given there is a valid "synthetics_api_test" in the system + And new "TriggerTests" request + And body with value {"tests": [{"public_id": "{{ synthetics_api_test.public_id }}"}]} + When the request is sent + Then the response status is 200 OK + And the response "triggered_check_ids" array contains value "{{ synthetics_api_test.public_id }}" + And the response "results" has item with field "public_id" with value "{{ synthetics_api_test.public_id }}" + + @generated @skip @team:DataDog/synthetics-app + Scenario: Trigger tests from CI/CD pipelines returns "JSON format is wrong" response + Given new "TriggerCITests" request + And body with value {"tests": [{"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "deviceIds": ["laptop_large"], "locations": ["aws:eu-west-3"], "metadata": {"ci": {"pipeline": {}, "provider": {}}, "git": {}}, "public_id": "aaa-aaa-aaa", "retry": {}}]} + When the request is sent + Then the response status is 400 JSON format is wrong + + @generated @skip @team:DataDog/synthetics-app + Scenario: Trigger tests from CI/CD pipelines returns "OK" response + Given new "TriggerCITests" request + And body with value {"tests": [{"basicAuth": {"password": "PaSSw0RD!", "type": "web", "username": "my_username"}, "deviceIds": ["laptop_large"], "locations": ["aws:eu-west-3"], "metadata": {"ci": {"pipeline": {}, "provider": {}}, "git": {}}, "public_id": "aaa-aaa-aaa", "retry": {}}]} + When the request is sent + Then the response status is 200 OK diff --git a/tests/scenarios/features/v1/synthetics_api_grpc_test_payload.json b/tests/scenarios/features/v1/synthetics_api_grpc_test_payload.json new file mode 100644 index 000000000..987419317 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_grpc_test_payload.json @@ -0,0 +1,45 @@ +{ + "config": { + "assertions": [ + { + "operator": "is", + "target": 1, + "type": "grpcHealthcheckStatus" + }, + { + "operator": "is", + "target": "proto target", + "type": "grpcProto" + }, + { + "operator": "is", + "target": "123", + "property": "property", + "type": "grpcMetadata" + } + ], + "request": { + "host": "localhost", + "port": 50051, + "service": "Hello", + "method": "GET", + "message": "", + "metadata": {} + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_grpc_test_payload.json", + "name": "{{ unique }}", + "options": { + "min_failure_duration": 0, + "min_location_failed": 1, + "monitor_options": { + "renotify_interval": 0 + }, + "monitor_name": "{{ unique }}", + "tick_every": 60 + }, + "subtype": "grpc", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_http_test_oauth_rop_payload.json b/tests/scenarios/features/v1/synthetics_api_http_test_oauth_rop_payload.json new file mode 100644 index 000000000..27f90a6c3 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_http_test_oauth_rop_payload.json @@ -0,0 +1,90 @@ +{ + "config": { + "assertions": [ + { + "operator": "is", + "property": "{{ '{{ PROPERTY }}' }}", + "target": "text/html", + "type": "header" + }, + { "operator": "lessThan", "target": 2000, "type": "responseTime" }, + { + "operator": "validatesJSONPath", + "target": { + "jsonPath": "topKey", + "operator": "isNot", + "targetValue": "0" + }, + "type": "body" + }, + { + "operator": "validatesXPath", + "target": { + "xPath": "target-xpath", + "targetValue": "0", + "operator": "contains" + }, + "type": "body" + } + ], + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text" + } + ], + "request": { + "certificate": { + "cert": { + "content": "cert-content", + "filename": "cert-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + }, + "key": { + "content": "key-content", + "filename": "key-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + } + }, + "headers": { "unique": "{{ unique_lower_alnum }}" }, + "method": "GET", + "timeout": 10, + "url": "https://datadoghq.com", + "proxy": { + "url": "https://datadoghq.com", + "headers": {} + }, + "basicAuth": { + "accessTokenUrl": "https://datadog-token.com", + "audience": "audience", + "clientId": "client-id", + "clientSecret": "client-secret", + "resource": "resource", + "scope": "yoyo", + "tokenApiAuthentication": "body", + "type": "oauth-rop", + "username": "oauth-usermame", + "password": "oauth-password" + } + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_http_test_payload.json", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "monitor_name": "{{ unique }}", + "monitor_priority": 5, + "retry": { "count": 3, "interval": 10 }, + "tick_every": 60 + }, + "subtype": "http", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_http_test_payload.json b/tests/scenarios/features/v1/synthetics_api_http_test_payload.json new file mode 100644 index 000000000..023cf3bd3 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_http_test_payload.json @@ -0,0 +1,90 @@ +{ + "config": { + "assertions": [ + { + "operator": "is", + "property": "{{ '{{ PROPERTY }}' }}", + "target": "text/html", + "type": "header" + }, + { "operator": "lessThan", "target": 2000, "type": "responseTime", "timingsScope": "withoutDNS" }, + { + "operator": "validatesJSONPath", + "target": { + "jsonPath": "topKey", + "operator": "isNot", + "targetValue": "0" + }, + "type": "body" + }, + { + "operator": "validatesXPath", + "target": { + "xPath": "target-xpath", + "targetValue": "0", + "operator": "contains" + }, + "type": "body" + } + ], + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text" + } + ], + "request": { + "certificate": { + "cert": { + "content": "cert-content", + "filename": "cert-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + }, + "key": { + "content": "key-content", + "filename": "key-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + } + }, + "headers": { "unique": "{{ unique_lower_alnum }}" }, + "method": "GET", + "timeout": 10, + "url": "https://datadoghq.com", + "proxy": { + "url": "https://datadoghq.com", + "headers": {} + }, + "basicAuth": { + "accessTokenUrl": "https://datadog-token.com", + "audience": "audience", + "clientId": "client-id", + "clientSecret": "client-secret", + "resource": "resource", + "scope": "yoyo", + "tokenApiAuthentication": "header", + "type": "oauth-client" + }, + "persistCookies": true + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_http_test_payload.json", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "monitor_name": "{{ unique }}", + "monitor_priority": 5, + "retry": { "count": 3, "interval": 10 }, + "tick_every": 60, + "httpVersion": "http2" + }, + "subtype": "http", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_ssl_test_payload.json b/tests/scenarios/features/v1/synthetics_api_ssl_test_payload.json new file mode 100644 index 000000000..1c75cd299 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_ssl_test_payload.json @@ -0,0 +1,26 @@ +{ + "config": { + "assertions": [ + { + "operator": "isInMoreThan", + "target": 10, + "type": "certificate" + } + ], + "request": { + "host": "datadoghq.com", + "port": 443 + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_ssl_test_payload.json", + "name": "{{ unique }}", + "options": { + "accept_self_signed": true, + "checkCertificateRevocation": true, + "tick_every": 60 + }, + "subtype": "ssl", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_test_multi_step_payload.json b/tests/scenarios/features/v1/synthetics_api_test_multi_step_payload.json new file mode 100644 index 000000000..f514958ca --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_test_multi_step_payload.json @@ -0,0 +1,64 @@ +{ + "config": { + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text" + } + ], + "steps": [ + { + "allowFailure": true, + "assertions": [ + { + "operator": "is", + "type": "statusCode", + "target": 200 + } + ], + "extractedValues": [ + { + "field": "server", + "name": "EXTRACTED_VALUE", + "parser": { + "type": "raw" + }, + "type": "http_header", + "secure": true + } + ], + "isCritical": true, + "name": "request is sent", + "request": { + "method": "GET", + "timeout": 10, + "url": "https://datadoghq.com" + }, + "retry": { + "count": 5, + "interval": 1000 + }, + "subtype": "http" + } + ] + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_test_multi_step_payload.json", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "monitor_name": "{{ unique }}", + "monitor_priority": 5, + "retry": { "count": 3, "interval": 1000 }, + "tick_every": 60 + }, + "subtype": "multi", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_test_payload.json b/tests/scenarios/features/v1/synthetics_api_test_payload.json new file mode 100644 index 000000000..2d98948cc --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_test_payload.json @@ -0,0 +1,69 @@ +{ + "config": { + "assertions": [ + { + "operator": "is", + "property": "{{ '{{ PROPERTY }}' }}", + "target": "text/html", + "type": "header" + }, + { "operator": "lessThan", "target": 2000, "type": "responseTime" }, + { + "operator": "validatesJSONPath", + "target": { + "jsonPath": "topKey", + "operator": "isNot", + "targetValue": "0" + }, + "type": "body" + } + ], + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text" + } + ], + "request": { + "certificate": { + "cert": { + "content": "cert-content", + "filename": "cert-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + }, + "key": { + "content": "key-content", + "filename": "key-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + } + }, + "headers": { "unique": "{{ unique_lower_alnum }}" }, + "method": "GET", + "timeout": 10, + "url": "https://datadoghq.com", + "proxy": { + "url": "https://datadoghq.com", + "headers": {} + } + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_test_payload.json", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "monitor_name": "{{ unique }}", + "monitor_priority": 5, + "retry": { "count": 3, "interval": 10 }, + "tick_every": 60 + }, + "subtype": "http", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_test_udp_payload.json b/tests/scenarios/features/v1/synthetics_api_test_udp_payload.json new file mode 100644 index 000000000..798ad2439 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_test_udp_payload.json @@ -0,0 +1,35 @@ +{ + "config": { + "assertions": [ + { + "operator": "is", + "target": "message", + "type": "receivedMessage" + }, + { "operator": "lessThan", "target": 2000, "type": "responseTime" } + ], + "configVariables": [], + "request": { + "host": "https://datadoghq.com", + "message": "message", + "port": 443 + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_test_udp_payload.json", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "monitor_name": "{{ unique }}", + "monitor_priority": 5, + "retry": { "count": 3, "interval": 10 }, + "tick_every": 60 + }, + "subtype": "udp", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_test_update_payload.json b/tests/scenarios/features/v1/synthetics_api_test_update_payload.json new file mode 100644 index 000000000..042dd86c9 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_test_update_payload.json @@ -0,0 +1,64 @@ +{ + "config": { + "assertions": [ + { + "operator": "is", + "property": "{{ '{{ PROPERTY }}' }}", + "target": "text/html", + "type": "header" + }, + { "operator": "lessThan", "target": 2000, "type": "responseTime" }, + { + "operator": "validatesJSONPath", + "target": { + "jsonPath": "topKey", + "operator": "isNot", + "targetValue": "0" + }, + "type": "body" + } + ], + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text" + } + ], + "request": { + "certificate": { + "cert": { + "filename": "cert-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + }, + "key": { + "filename": "key-filename", + "updatedAt": "2020-10-16T09:23:24.857Z" + } + }, + "headers": { "unique": "{{ unique_lower_alnum }}" }, + "method": "GET", + "timeout": 10, + "url": "https://datadoghq.com" + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_test_payload.json", + "name": "{{ unique }}-updated", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "monitor_name": "Test-TestSyntheticsAPITestLifecycle-1623076664", + "monitor_priority": 5, + "retry": { "count": 3, "interval": 10 }, + "tick_every": 60 + }, + "status": "live", + "subtype": "http", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_test_websocket_payload.json b/tests/scenarios/features/v1/synthetics_api_test_websocket_payload.json new file mode 100644 index 000000000..4d9cccfc2 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_test_websocket_payload.json @@ -0,0 +1,34 @@ +{ + "config": { + "assertions": [ + { + "operator": "is", + "target": "message", + "type": "receivedMessage" + }, + { "operator": "lessThan", "target": 2000, "type": "responseTime" } + ], + "configVariables": [], + "request": { + "url": "ws://datadoghq.com", + "message": "message" + } + }, + "locations": ["aws:us-east-2"], + "message": "BDD test payload: synthetics_api_test_websocket_payload.json", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "monitor_name": "{{ unique }}", + "monitor_priority": 5, + "retry": { "count": 3, "interval": 10 }, + "tick_every": 60 + }, + "subtype": "websocket", + "tags": ["testing:api"], + "type": "api" +} diff --git a/tests/scenarios/features/v1/synthetics_api_test_with_wrong_dns.json b/tests/scenarios/features/v1/synthetics_api_test_with_wrong_dns.json new file mode 100644 index 000000000..ba69ff5a5 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_api_test_with_wrong_dns.json @@ -0,0 +1,29 @@ +{ + "message": "Testing wrong DNS error", + "name": "{{ unique }}", + "tags": [], + "type": "api", + "subtype": "http", + "locations": ["aws:eu-west-3"], + "config": { + "assertions": [ + { + "operator": "lessThan", + "type": "responseTime", + "target": 1000 + } + ], + "request": { + "method": "GET", + "url": "https://app.datadfoghq.com" + } + }, + "options": { + "tick_every": 86400, + "monitor_options": { + "renotify_interval": 0 + }, + "min_failure_duration": 0, + "min_location_failed": 1 + } +} diff --git a/tests/scenarios/features/v1/synthetics_browser_test_payload.json b/tests/scenarios/features/v1/synthetics_browser_test_payload.json new file mode 100644 index 000000000..8e30a78c9 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_browser_test_payload.json @@ -0,0 +1,51 @@ +{ + "config": { + "assertions": [], + "variables": [ + { + "type": "text", + "name": "TEST_VARIABLE", + "pattern": "secret", + "secure": true, + "example": "secret" + } + ], + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text", + "secure": true + } + ], + "request": { "method": "GET", "url": "https://datadoghq.com" }, + "setCookie": "name:test" + }, + "locations": ["aws:us-east-2"], + "message": "Test message", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "device_ids": ["tablet"], + "disableCors": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "noScreenshot": true, + "retry": { "count": 2, "interval": 10 }, + "tick_every": 300 + }, + "tags": ["testing:browser"], + "type": "browser", + "steps": [ + { + "allowFailure": false, + "isCritical": true, + "name": "Refresh page", + "params": {}, + "type": "refresh" + } + ] +} diff --git a/tests/scenarios/features/v1/synthetics_browser_test_payload_with_advanced_scheduling.json b/tests/scenarios/features/v1/synthetics_browser_test_payload_with_advanced_scheduling.json new file mode 100644 index 000000000..674fb2e30 --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_browser_test_payload_with_advanced_scheduling.json @@ -0,0 +1,48 @@ +{ + "config": { + "assertions": [], + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text" + } + ], + "request": { "method": "GET", "url": "https://datadoghq.com" }, + "setCookie": "name:test" + }, + "locations": ["aws:us-east-2"], + "message": "Test message", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "device_ids": ["tablet"], + "disableCors": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "noScreenshot": true, + "retry": { "count": 2, "interval": 10 }, + "tick_every": 300, + "scheduling": { + "timeframes": [ + {"day": 1, "from": "07:00", "to": "16:00"}, + {"day": 3, "from": "07:00", "to": "16:00"} + ], + "timezone": "America/New_York" + } + }, + "tags": ["testing:browser"], + "type": "browser", + "steps": [ + { + "allowFailure": false, + "isCritical": true, + "name": "Refresh page", + "params": {}, + "type": "refresh" + } + ] +} diff --git a/tests/scenarios/features/v1/synthetics_browser_test_payload_with_rum_settings.json b/tests/scenarios/features/v1/synthetics_browser_test_payload_with_rum_settings.json new file mode 100644 index 000000000..4c2bed01a --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_browser_test_payload_with_rum_settings.json @@ -0,0 +1,56 @@ +{ + "config": { + "assertions": [], + "configVariables": [ + { + "example": "content-type", + "name": "PROPERTY", + "pattern": "content-type", + "type": "text" + } + ], + "request": { + "method": "GET", + "url": "https://datadoghq.com", + "certificateDomains": ["https://datadoghq.com"] + }, + "setCookie": "name:test" + }, + "locations": ["aws:us-east-2"], + "message": "Test message", + "name": "{{ unique }}", + "options": { + "accept_self_signed": false, + "allow_insecure": true, + "device_ids": ["tablet"], + "disableCors": true, + "follow_redirects": true, + "min_failure_duration": 10, + "min_location_failed": 1, + "noScreenshot": true, + "retry": { "count": 2, "interval": 10 }, + "rumSettings": { + "isEnabled": true, + "applicationId": "mockApplicationId", + "clientTokenId": 12345 + }, + "tick_every": 300, + "ci": { + "executionRule": "skipped" + }, + "ignoreServerCertificateError": true, + "disableCsp": true, + "initialNavigationTimeout": 200 + }, + "tags": ["testing:browser"], + "type": "browser", + "steps": [ + { + "allowFailure": false, + "isCritical": true, + "name": "Refresh page", + "params": {}, + "type": "refresh" + } + ] + } diff --git a/tests/scenarios/features/v1/synthetics_global_variable_payload.json b/tests/scenarios/features/v1/synthetics_global_variable_payload.json new file mode 100644 index 000000000..f9ff937ab --- /dev/null +++ b/tests/scenarios/features/v1/synthetics_global_variable_payload.json @@ -0,0 +1,20 @@ +{ + "description": "", + "name": "GLOBAL_VARIABLE_PAYLOAD_{{ unique_upper_alnum }}", + "tags": [], + "value": { + "secure": false, + "value": "", + "options": { + "totp_parameters": { + "digits": 6, + "refresh_interval": 30 + } + } + }, + "parse_test_public_id": "{{ synthetics_api_test_multi_step.public_id }}", + "parse_test_options": { + "type": "local_variable", + "localVariableName": "EXTRACTED_VALUE" + } +} diff --git a/tests/scenarios/features/v1/undo.json b/tests/scenarios/features/v1/undo.json index cb8c82438..26834c705 100644 --- a/tests/scenarios/features/v1/undo.json +++ b/tests/scenarios/features/v1/undo.json @@ -356,7 +356,13 @@ "tag": "AWS Integration", "undo": { "operationId": "DeleteAWSAccount", - "parameters": [], + "parameters": [ + { + "name": "body", + "origin": "request", + "template": "{\"account_id\": \"{{account_id}}\", \"role_name\": \"{{role_name}}\"}" + } + ], "type": "unsafe" } }, @@ -479,7 +485,13 @@ "tag": "Azure Integration", "undo": { "operationId": "DeleteAzureIntegration", - "parameters": [], + "parameters": [ + { + "name": "body", + "origin": "request", + "template": "{\n \"client_id\": \"{{client_id}}\",\n \"tenant_name\": \"{{tenant_name}}\"\n}" + } + ], "type": "unsafe" } }, @@ -511,7 +523,13 @@ "tag": "GCP Integration", "undo": { "operationId": "DeleteGCPIntegration", - "parameters": [], + "parameters": [ + { + "name": "body", + "origin": "request", + "template": "{\"client_email\": \"{{ client_email }}\", \"client_id\": \"{{ client_id }}\", \"project_id\": \"{{ project_id }}\"}" + } + ], "type": "unsafe" } }, @@ -1196,6 +1214,12 @@ "type": "safe" } }, + "PatchTest": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, "GetAPITestLatestResults": { "tag": "Synthetics", "undo": { diff --git a/tests/scenarios/features/v2/apm_retention_filters.feature b/tests/scenarios/features/v2/apm_retention_filters.feature index 992405e38..7b80ee68b 100644 --- a/tests/scenarios/features/v2/apm_retention_filters.feature +++ b/tests/scenarios/features/v2/apm_retention_filters.feature @@ -68,7 +68,7 @@ Feature: APM Retention Filters And new "ListApmRetentionFilters" request When the request is sent Then the response status is 200 OK - And the response "data[2].id" has the same value as "retention_filter.data.id" + And the response "data" has item with field "id" with value "{{ retention_filter.data.id }}" @generated @skip @team:DataDog/apm-trace-intake Scenario: Re-order retention filters returns "Bad Request" response diff --git a/tests/scenarios/features/v2/authn_mappings.feature b/tests/scenarios/features/v2/authn_mappings.feature new file mode 100644 index 000000000..7fab254f7 --- /dev/null +++ b/tests/scenarios/features/v2/authn_mappings.feature @@ -0,0 +1,126 @@ +@endpoint(authn-mappings) @endpoint(authn-mappings-v2) +Feature: AuthN Mappings + [AuthN Mappings API](https://docs.datadoghq.com/account_management/authn_m + apping/?tab=example) is used to automatically map group of users to roles + in Datadog using attributes sent from Identity Providers. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "AuthNMappings" API + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Create an AuthN Mapping returns "Bad Request" response + Given new "CreateAuthNMapping" request + And body with value {"data": {"attributes": {"attribute_key": "member-of", "attribute_value": "Development"}, "relationships": {"role": {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Create an AuthN Mapping returns "Not Found" response + Given new "CreateAuthNMapping" request + And body with value {"data": {"attributes": {"attribute_key": "member-of", "attribute_value": "Development"}, "relationships": {"role": {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/aaa-core-access + Scenario: Create an AuthN Mapping returns "OK" response + Given there is a valid "role" in the system + And new "CreateAuthNMapping" request + And body with value {"data": {"attributes": {"attribute_key": "{{ unique_lower_alnum }}", "attribute_value": "{{ unique }}"}, "relationships": {"role": {"data": {"id": "{{ role.data.id }}", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.attribute_key" is equal to "{{ unique_lower_alnum }}" + And the response "data.attributes.attribute_value" is equal to "{{ unique }}" + And the response "data.relationships.role.data.id" is equal to "{{ role.data.id }}" + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Delete an AuthN Mapping returns "Not Found" response + Given new "DeleteAuthNMapping" request + And request contains "authn_mapping_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/aaa-core-access + Scenario: Delete an AuthN Mapping returns "OK" response + Given there is a valid "role" in the system + And there is a valid "authn_mapping" in the system + And new "DeleteAuthNMapping" request + And request contains "authn_mapping_id" parameter from "authn_mapping.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Edit an AuthN Mapping returns "Bad Request" response + Given new "UpdateAuthNMapping" request + And request contains "authn_mapping_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"attribute_key": "member-of", "attribute_value": "Development"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"role": {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Edit an AuthN Mapping returns "Conflict" response + Given new "UpdateAuthNMapping" request + And request contains "authn_mapping_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"attribute_key": "member-of", "attribute_value": "Development"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"role": {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Edit an AuthN Mapping returns "Not Found" response + Given new "UpdateAuthNMapping" request + And request contains "authn_mapping_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"attribute_key": "member-of", "attribute_value": "Development"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"role": {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/aaa-core-access + Scenario: Edit an AuthN Mapping returns "OK" response + Given there is a valid "role" in the system + And there is a valid "authn_mapping" in the system + And new "UpdateAuthNMapping" request + And request contains "authn_mapping_id" parameter from "authn_mapping.data.id" + And body with value {"data": {"attributes": {"attribute_key": "member-of", "attribute_value": "Development"}, "id": "{{ authn_mapping.data.id }}", "relationships": {"role": {"data": {"id": "{{ role.data.id }}", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{ authn_mapping.data.id }}" + And the response "data.attributes.attribute_key" is equal to "member-of" + And the response "data.attributes.attribute_value" is equal to "Development" + And the response "data.relationships.role.data.id" is equal to "{{ role.data.id }}" + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Edit an AuthN Mapping returns "Unprocessable Entity" response + Given new "UpdateAuthNMapping" request + And request contains "authn_mapping_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"attribute_key": "member-of", "attribute_value": "Development"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"role": {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}}}, "type": "authn_mappings"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/aaa-core-access + Scenario: Get an AuthN Mapping by UUID returns "Not Found" response + Given new "GetAuthNMapping" request + And request contains "authn_mapping_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/aaa-core-access + Scenario: Get an AuthN Mapping by UUID returns "OK" response + Given there is a valid "role" in the system + And there is a valid "authn_mapping" in the system + And new "GetAuthNMapping" request + And request contains "authn_mapping_id" parameter from "authn_mapping.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{ authn_mapping.data.id }}" + And the response "data.attributes.attribute_key" is equal to "{{ unique_lower_alnum }}" + And the response "data.attributes.attribute_value" is equal to "{{ unique }}" + And the response "data.relationships.role.data.id" is equal to "{{ role.data.id }}" + + @team:DataDog/aaa-core-access + Scenario: List all AuthN Mappings returns "OK" response + Given there is a valid "role" in the system + And there is a valid "authn_mapping" in the system + And new "ListAuthNMappings" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "authn_mappings" diff --git a/tests/scenarios/features/v2/ci_visibility_pipelines.feature b/tests/scenarios/features/v2/ci_visibility_pipelines.feature new file mode 100644 index 000000000..6134cb06a --- /dev/null +++ b/tests/scenarios/features/v2/ci_visibility_pipelines.feature @@ -0,0 +1,114 @@ +@endpoint(ci-visibility-pipelines) @endpoint(ci-visibility-pipelines-v2) +Feature: CI Visibility Pipelines + Search or aggregate your CI Visibility pipeline events and send them to + your Datadog site over HTTP. + + Background: + Given a valid "apiKeyAuth" key in the system + And an instance of "CIVisibilityPipelines" API + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Aggregate pipelines events returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "AggregateCIAppPipelineEvents" request + And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "group_by": [{"facet": "@ci.status", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Aggregate pipelines events returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "AggregateCIAppPipelineEvents" request + And body with value {"compute": [{"aggregation": "pc90", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@ci.provider.name:(gitlab OR github)", "to": "now"}, "group_by": [{ "facet": "@ci.status", "limit": 10, "total": false}], "options": {"timezone": "GMT"}} + When the request is sent + Then the response status is 200 OK + And the response "meta.status" is equal to "done" + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Get a list of pipelines events returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "ListCIAppPipelineEvents" request + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Get a list of pipelines events returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "ListCIAppPipelineEvents" request + And request contains "filter[query]" parameter with value "@ci.provider.name:circleci" + And request contains "filter[from]" parameter with value "{{ timeISO('now - 30m') }}" + And request contains "filter[to]" parameter with value "{{ timeISO('now') }}" + And request contains "page[limit]" parameter with value 5 + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + Scenario: Get a list of pipelines events returns "OK" response with pagination + Given a valid "appKeyAuth" key in the system + And new "ListCIAppPipelineEvents" request + And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}" + And request contains "filter[to]" parameter with value "{{ timeISO('now') }}" + And request contains "page[limit]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 2 items + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Search pipelines events returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "SearchCIAppPipelineEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Search pipelines events returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "SearchCIAppPipelineEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@ci.provider.name:github AND @ci.status:error", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 5}, "sort": "timestamp"} + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + Scenario: Search pipelines events returns "OK" response with pagination + Given a valid "appKeyAuth" key in the system + And new "SearchCIAppPipelineEvents" request + And body with value {"filter": {"from": "now-30s", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"} + When the request with pagination is sent + Then the response status is 200 OK + And the response has 2 items + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send pipeline event returns "Bad Request" response + Given new "CreateCIAppPipelineEvent" request + And body with value {"data": {"attributes": {"resource": "Details TBD"}, "type": "cipipeline_resource_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send pipeline event returns "Payload Too Large" response + Given new "CreateCIAppPipelineEvent" request + And body with value {"data": {"attributes": {"resource": "Details TBD"}, "type": "cipipeline_resource_request"}} + When the request is sent + Then the response status is 413 Payload Too Large + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send pipeline event returns "Request Timeout" response + Given new "CreateCIAppPipelineEvent" request + And body with value {"data": {"attributes": {"resource": "Details TBD"}, "type": "cipipeline_resource_request"}} + When the request is sent + Then the response status is 408 Request Timeout + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send pipeline event returns "Request accepted for processing" response + Given new "CreateCIAppPipelineEvent" request + And body with value {"data": {"attributes": {"resource": {"end": "{{ timeISO('now - 30s') }}", "level": "pipeline", "name": "Deploy to AWS", "partial_retry": false, "start": "{{ timeISO('now - 120s') }}", "status": "success", "unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a", "url": "https://my-ci-provider.example/pipelines/my-pipeline/run/1","git":{"repository_url":"https://github.com/DataDog/datadog-agent","sha":"7f263865994b76066c4612fd1965215e7dcb4cd2","author_email":"john.doe@email.com"}}}, "type": "cipipeline_resource_request"}} + When the request is sent + Then the response status is 202 Request accepted for processing + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send pipeline job event returns "Request accepted for processing" response + Given new "CreateCIAppPipelineEvent" request + And body with value {"data": {"attributes": {"resource": {"end": "{{ timeISO('now - 30s') }}", "level": "job", "name": "Build image", "start": "{{ timeISO('now - 120s') }}", "status": "error", "id": "cf9456de-8b9e-4c27-aa79-27b1e78c1a33", "pipeline_unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a", "pipeline_name": "Deploy to AWS", "url": "https://my-ci-provider.example/jobs/my-jobs/run/1"}}, "type": "cipipeline_resource_request"}} + When the request is sent + Then the response status is 202 Request accepted for processing diff --git a/tests/scenarios/features/v2/ci_visibility_tests.feature b/tests/scenarios/features/v2/ci_visibility_tests.feature new file mode 100644 index 000000000..3152496cf --- /dev/null +++ b/tests/scenarios/features/v2/ci_visibility_tests.feature @@ -0,0 +1,71 @@ +@endpoint(ci-visibility-tests) @endpoint(ci-visibility-tests-v2) +Feature: CI Visibility Tests + Search or aggregate your CI Visibility test events over HTTP. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CIVisibilityTests" API + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Aggregate tests events returns "Bad Request" response + Given new "AggregateCIAppTestEvents" request + And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:fail", "to": "now"}, "group_by": [{"facet": "@test.service", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Aggregate tests events returns "OK" response + Given new "AggregateCIAppTestEvents" request + And body with value {"compute": [{"aggregation": "count", "metric": "@test.is_flaky", "type": "total"}], "filter": {"from": "now-15m", "query": "@language:(python OR go)", "to": "now"}, "group_by": [{"facet": "@git.branch", "limit": 10, "sort": {"order": "asc"}, "total": false}], "options": {"timezone": "GMT"}} + When the request is sent + Then the response status is 200 OK + And the response "meta.status" is equal to "done" + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Get a list of tests events returns "Bad Request" response + Given new "ListCIAppTestEvents" request + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Get a list of tests events returns "OK" response + Given new "ListCIAppTestEvents" request + And request contains "filter[query]" parameter with value "@test.service:web-ui-tests" + And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}" + And request contains "filter[to]" parameter with value "{{ timeISO('now') }}" + And request contains "page[limit]" parameter with value 5 + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + Scenario: Get a list of tests events returns "OK" response with pagination + Given new "ListCIAppTestEvents" request + And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}" + And request contains "filter[to]" parameter with value "{{ timeISO('now') }}" + And request contains "page[limit]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 2 items + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Search tests events returns "Bad Request" response + Given new "SearchCIAppTestEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:fail", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Search tests events returns "OK" response + Given new "SearchCIAppTestEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@test.service:web-ui-tests AND @test.status:skip", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + Scenario: Search tests events returns "OK" response with pagination + Given new "SearchCIAppTestEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@test.status:pass AND -@language:python", "to": "now"}, "page": {"limit": 2}, "sort": "timestamp"} + When the request with pagination is sent + Then the response status is 200 OK + And the response has 2 items diff --git a/tests/scenarios/features/v2/cloud_cost_management.feature b/tests/scenarios/features/v2/cloud_cost_management.feature new file mode 100644 index 000000000..1dfb05bae --- /dev/null +++ b/tests/scenarios/features/v2/cloud_cost_management.feature @@ -0,0 +1,142 @@ +@endpoint(cloud-cost-management) @endpoint(cloud-cost-management-v2) +Feature: Cloud Cost Management + The Cloud Cost Management API allows you to setup, edit and delete cloud + cost management accounts for AWS & Azure. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CloudCostManagement" API + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Cloud Cost Enabled returns "OK" response + Given new "GetCloudCostActivity" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Create Cloud Cost Management AWS CUR config returns "Bad Request" response + Given new "CreateCostAWSCURConfig" request + And body with value {"data": {"attributes": {"account_id": "123456789123", "bucket_name": "dd-cost-bucket", "bucket_region": "us-east-1", "report_name": "dd-report-name", "report_prefix": "dd-report-prefix"}, "type": "aws_cur_config_post_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Create Cloud Cost Management AWS CUR config returns "OK" response + Given new "CreateCostAWSCURConfig" request + And body with value {"data": {"attributes": {"account_id": "123456789123", "bucket_name": "dd-cost-bucket", "bucket_region": "us-east-1", "report_name": "dd-report-name", "report_prefix": "dd-report-prefix"}, "type": "aws_cur_config_post_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.account_id" is equal to "123456789123" + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Create Cloud Cost Management Azure configs returns "Bad Request" response + Given new "CreateCostAzureUCConfigs" request + And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Create Cloud Cost Management Azure configs returns "OK" response + Given new "CreateCostAzureUCConfigs" request + And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "is_enabled": true, "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.configs[0].account_id" is equal to "1234abcd-1234-abcd-1234-1234abcd1234" + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Delete Cloud Cost Management AWS CUR config returns "Bad Request" response + Given new "DeleteCostAWSCURConfig" request + And request contains "cloud_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Delete Cloud Cost Management AWS CUR config returns "No Content" response + Given new "DeleteCostAWSCURConfig" request + And request contains "cloud_account_id" parameter with value "100" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Delete Cloud Cost Management AWS CUR config returns "Not Found" response + Given new "DeleteCostAWSCURConfig" request + And request contains "cloud_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Delete Cloud Cost Management Azure config returns "Bad Request" response + Given new "DeleteCostAzureUCConfig" request + And request contains "cloud_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Delete Cloud Cost Management Azure config returns "No Content" response + Given new "DeleteCostAzureUCConfig" request + And request contains "cloud_account_id" parameter with value "100" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Delete Cloud Cost Management Azure config returns "Not Found" response + Given new "DeleteCostAzureUCConfig" request + And request contains "cloud_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response + Given new "ListCostAWSCURConfigs" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.bucket_name" is equal to "test_bucket_name" + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: List Cloud Cost Management Azure configs returns "OK" response + Given new "ListCostAzureUCConfigs" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.configs[0].export_name" is equal to "test_export_name" + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: List related AWS accounts returns "Bad Request" response + Given new "ListAWSRelatedAccounts" request + And request contains "filter[management_account_id]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: List related AWS accounts returns "OK" response + Given new "ListAWSRelatedAccounts" request + And request contains "filter[management_account_id]" parameter with value "123456789123" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "test_name" + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response + Given new "UpdateCostAWSCURConfig" request + And request contains "cloud_account_id" parameter with value "100" + And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.account_id" is equal to "000000000000" + + @generated @skip @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Update Cloud Cost Management Azure config returns "Bad Request" response + Given new "UpdateCostAzureUCConfigs" request + And request contains "cloud_account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management @team:Datadog/integrations-tools-and-libraries + Scenario: Update Cloud Cost Management Azure config returns "OK" response + Given new "UpdateCostAzureUCConfigs" request + And request contains "cloud_account_id" parameter with value "100" + And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "azure_uc_configs" diff --git a/tests/scenarios/features/v2/container_images.feature b/tests/scenarios/features/v2/container_images.feature new file mode 100644 index 000000000..7de87bcb6 --- /dev/null +++ b/tests/scenarios/features/v2/container_images.feature @@ -0,0 +1,35 @@ +@endpoint(container-images) @endpoint(container-images-v2) +Feature: Container Images + The Container Images API allows you to query Container Image data for your + organization. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ContainerImages" API + And new "ListContainerImages" request + + @replay-only @team:DataDog/processes + Scenario: Get all Container Image groups returns "OK" response + Given request contains "group_by" parameter with value "short_image" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "test_name" + + @generated @skip @team:DataDog/processes + Scenario: Get all Container Images returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/processes + Scenario: Get all Container Images returns "OK" response + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "test_name" + + @replay-only @skip-validation @team:DataDog/processes @with-pagination + Scenario: Get all Container Images returns "OK" response with pagination + Given request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items diff --git a/tests/scenarios/features/v2/containers.feature b/tests/scenarios/features/v2/containers.feature new file mode 100644 index 000000000..302f1ab0a --- /dev/null +++ b/tests/scenarios/features/v2/containers.feature @@ -0,0 +1,35 @@ +@endpoint(containers) @endpoint(containers-v2) +Feature: Containers + The Containers API allows you to query container data for your + organization. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Containers" API + And new "ListContainers" request + + @replay-only @team:DataDog/processes + Scenario: Get All Container groups returns "OK" response + Given request contains "group_by" parameter with value "short_image" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.count" is equal to 123 + + @generated @skip @team:DataDog/processes + Scenario: Get All Containers returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/processes + Scenario: Get All Containers returns "OK" response + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "test_name" + + @replay-only @skip-validation @team:DataDog/processes @with-pagination + Scenario: Get All Containers returns "OK" response with pagination + Given request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items diff --git a/tests/scenarios/features/v2/dora_metrics.feature b/tests/scenarios/features/v2/dora_metrics.feature new file mode 100644 index 000000000..b9ae75168 --- /dev/null +++ b/tests/scenarios/features/v2/dora_metrics.feature @@ -0,0 +1,55 @@ +@endpoint(dora-metrics) @endpoint(dora-metrics-v2) +Feature: DORA Metrics + Send events for DORA Metrics to measure and improve software delivery. + + Background: + Given a valid "apiKeyAuth" key in the system + And an instance of "DORAMetrics" API + + @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send a deployment event for DORA Metrics returns "Bad Request" response + Given operation "CreateDORADeployment" enabled + And new "CreateDORADeployment" request + And body with value {"data": {"attributes": {}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send a deployment event for DORA Metrics returns "OK - but delayed due to incident" response + Given operation "CreateDORADeployment" enabled + And new "CreateDORADeployment" request + And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "version": "v1.12.07"}}} + When the request is sent + Then the response status is 202 OK - but delayed due to incident + + @replay-only @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send a deployment event for DORA Metrics returns "OK" response + Given operation "CreateDORADeployment" enabled + And new "CreateDORADeployment" request + And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "version": "v1.12.07"}}} + When the request is sent + Then the response status is 200 OK + + @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send an incident event for DORA Metrics returns "Bad Request" response + Given operation "CreateDORAIncident" enabled + And new "CreateDORAIncident" request + And body with value {"data": {"attributes": {}}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send an incident event for DORA Metrics returns "OK - but delayed due to incident" response + Given operation "CreateDORAIncident" enabled + And new "CreateDORAIncident" request + And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "service": "shopist", "severity": "High", "started_at": 1693491974000000000, "version": "v1.12.07"}}} + When the request is sent + Then the response status is 202 OK - but delayed due to incident + + @replay-only @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries + Scenario: Send an incident event for DORA Metrics returns "OK" response + Given operation "CreateDORAIncident" enabled + And new "CreateDORAIncident" request + And body with value {"data": {"attributes": {"finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "service": "shopist", "severity": "High", "started_at": 1693491974000000000, "version": "v1.12.07"}}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/downtimes.feature b/tests/scenarios/features/v2/downtimes.feature new file mode 100644 index 000000000..5f5d45407 --- /dev/null +++ b/tests/scenarios/features/v2/downtimes.feature @@ -0,0 +1,139 @@ +@endpoint(downtimes) @endpoint(downtimes-v2) +Feature: Downtimes + **Note**: Downtime V2 is currently in private beta. To request access, + contact [Datadog support](https://docs.datadoghq.com/help/). + [Downtiming](https://docs.datadoghq.com/monitors/notify/downtimes) gives + you greater control over monitor notifications by allowing you to globally + exclude scopes from alerting. Downtime settings, which can be scheduled + with start and end times, prevent all alerting related to specified + Datadog tags. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Downtimes" API + + @skip-validation @team:DataDog/monitor-app + Scenario: Cancel a downtime returns "Downtime not found" response + Given new "CancelDowntime" request + And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000" + When the request is sent + Then the response status is 404 Downtime not found + + @team:DataDog/monitor-app + Scenario: Cancel a downtime returns "OK" response + Given there is a valid "downtime_v2" in the system + And new "CancelDowntime" request + And request contains "downtime_id" parameter from "downtime_v2.data.id" + When the request is sent + Then the response status is 204 OK + + @skip-validation @team:DataDog/monitor-app + Scenario: Get a downtime returns "Bad Request" response + Given new "GetDowntime" request + And request contains "downtime_id" parameter with value "INVALID_UUID_LENGTH" + When the request is sent + Then the response status is 400 Bad Request + + @skip-validation @team:DataDog/monitor-app + Scenario: Get a downtime returns "Not Found" response + Given new "GetDowntime" request + And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/monitor-app + Scenario: Get a downtime returns "OK" response + Given there is a valid "downtime_v2" in the system + And new "GetDowntime" request + And request contains "downtime_id" parameter from "downtime_v2.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.message" is equal to "test message" + + @generated @skip @team:DataDog/monitor-app + Scenario: Get active downtimes for a monitor returns "Monitor Not Found error" response + Given new "ListMonitorDowntimes" request + And request contains "monitor_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Monitor Not Found error + + @replay-only @team:DataDog/monitor-app + Scenario: Get active downtimes for a monitor returns "OK" response + Given new "ListMonitorDowntimes" request + And request contains "monitor_id" parameter with value 35534610 + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data" has item with field "id" with value "aeefc6a8-15d8-11ee-a8ef-da7ad0900002" + + @generated @skip @team:DataDog/monitor-app @with-pagination + Scenario: Get active downtimes for a monitor returns "OK" response with pagination + Given new "ListMonitorDowntimes" request + And request contains "monitor_id" parameter from "REPLACE.ME" + When the request with pagination is sent + Then the response status is 200 OK + + @team:DataDog/monitor-app + Scenario: Get all downtimes for a monitor returns "Monitor Not Found error" response + Given new "ListMonitorDowntimes" request + And request contains "monitor_id" parameter with value 0 + When the request is sent + Then the response status is 404 Monitor Not Found error + + @replay-only @team:DataDog/monitor-app + Scenario: Get all downtimes returns "OK" response + Given new "ListDowntimes" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "id" with value "1dcb33f8-b23a-11ed-ae77-da7ad0900002" + + @replay-only @skip-validation @team:DataDog/monitor-app @with-pagination + Scenario: Get all downtimes returns "OK" response with pagination + Given new "ListDowntimes" request + And request contains "page[limit]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @skip-validation @team:DataDog/monitor-app + Scenario: Schedule a downtime returns "Bad Request" response + Given new "CreateDowntime" request + And body with value { "data": { "attributes": { "monitor_identifier": { "monitor_tags": ["cat:hat"] }, "scope": "BAD_SCOPE_MISSING_KEY_VALUE_FORMAT", "schedule": {"start": null } }, "type": "downtime" } } + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Schedule a downtime returns "OK" response + Given new "CreateDowntime" request + And body with value { "data": { "attributes": { "message": "dark forest", "monitor_identifier": { "monitor_tags": ["cat:hat"] }, "scope": "test:{{ unique_lower_alnum }}", "schedule": {"start": null } }, "type": "downtime" } } + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.message" is equal to "dark forest" + + @skip-java @skip-python @skip-ruby @skip-typescript @skip-validation @team:DataDog/monitor-app + Scenario: Update a downtime returns "Bad Request" response + Given there is a valid "downtime_v2" in the system + And new "UpdateDowntime" request + And request contains "downtime_id" parameter from "downtime_v2.data.id" + And body with value {"data": {"attributes": {"invalid_field": "sophon"}, "id": "{{ downtime_v2.data.id }}", "type": "downtime"}} + When the request is sent + Then the response status is 400 Bad Request + + @skip-validation @team:DataDog/monitor-app + Scenario: Update a downtime returns "Downtime not found" response + Given new "UpdateDowntime" request + And request contains "downtime_id" parameter with value "00000000-0000-1234-0000-000000000000" + And body with value {"data": {"attributes": {"message": "test msg"}, "id": "00000000-0000-1234-0000-000000000000", "type": "downtime"}} + When the request is sent + Then the response status is 404 Downtime not found + + @team:DataDog/monitor-app + Scenario: Update a downtime returns "OK" response + Given there is a valid "downtime_v2" in the system + And new "UpdateDowntime" request + And request contains "downtime_id" parameter from "downtime_v2.data.id" + And body with value {"data": {"attributes": {"message": "light speed"}, "id": "{{ downtime_v2.data.id }}", "type": "downtime"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.message" is equal to "light speed" diff --git a/tests/scenarios/features/v2/events.feature b/tests/scenarios/features/v2/events.feature index 8c900fbc9..50954f2b2 100644 --- a/tests/scenarios/features/v2/events.feature +++ b/tests/scenarios/features/v2/events.feature @@ -12,22 +12,19 @@ Feature: Events @generated @skip @team:DataDog/event-management Scenario: Get a list of events returns "Bad Request" response - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request When the request is sent Then the response status is 400 Bad Request @skip-validation @team:DataDog/event-management Scenario: Get a list of events returns "OK" response - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request When the request is sent Then the response status is 200 OK @replay-only @skip-validation @team:DataDog/event-management @with-pagination Scenario: Get a list of events returns "OK" response with pagination - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request And request contains "filter[from]" parameter with value "now-15m" And request contains "filter[to]" parameter with value "now" And request contains "page[limit]" parameter with value 2 @@ -37,8 +34,7 @@ Feature: Events @team:DataDog/event-management Scenario: Get a quick list of events returns "OK" response - Given operation "ListEvents" enabled - And new "ListEvents" request + Given new "ListEvents" request And request contains "filter[query]" parameter with value "datadog-agent" And request contains "filter[from]" parameter with value "2020-09-17T11:48:36+01:00" And request contains "filter[to]" parameter with value "2020-09-17T12:48:36+01:00" @@ -49,16 +45,14 @@ Feature: Events @team:DataDog/event-management Scenario: Search events returns "Bad Request" response - Given operation "SearchEvents" enabled - And new "SearchEvents" request + Given new "SearchEvents" request And body with value {"filter": {"from": "now-15m", "query": "service:web* AND @http.status_code:[200 TO 299]", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} When the request is sent Then the response status is 400 Bad Request @team:DataDog/event-management Scenario: Search events returns "OK" response - Given operation "SearchEvents" enabled - And new "SearchEvents" request + Given new "SearchEvents" request And body with value {"filter": {"query": "datadog-agent", "from": "2020-09-17T11:48:36+01:00", "to": "2020-09-17T12:48:36+01:00"}, "sort": "timestamp", "page": {"limit": 5}} When the request is sent Then the response status is 200 OK @@ -66,8 +60,7 @@ Feature: Events @replay-only @skip-validation @team:DataDog/event-management @with-pagination Scenario: Search events returns "OK" response with pagination - Given operation "SearchEvents" enabled - And new "SearchEvents" request + Given new "SearchEvents" request And body with value {"filter": {"from": "now-15m", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"} When the request with pagination is sent Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/fixtures/organizations/saml_configurations/invalid_idp_metadata.xml b/tests/scenarios/features/v2/fixtures/organizations/saml_configurations/invalid_idp_metadata.xml new file mode 100644 index 000000000..ed40beb51 --- /dev/null +++ b/tests/scenarios/features/v2/fixtures/organizations/saml_configurations/invalid_idp_metadata.xml @@ -0,0 +1,2 @@ + +i am > bad xml diff --git a/tests/scenarios/features/v2/fixtures/organizations/saml_configurations/valid_idp_metadata.xml b/tests/scenarios/features/v2/fixtures/organizations/saml_configurations/valid_idp_metadata.xml new file mode 100644 index 000000000..266aa108e --- /dev/null +++ b/tests/scenarios/features/v2/fixtures/organizations/saml_configurations/valid_idp_metadata.xml @@ -0,0 +1,197 @@ + + + + + + + MIIC8jCCAlugAwIBAgIJAJHg2V5J31I8MA0GCSqGSIb3DQEBBQUAMFoxCzAJBgNV + BAYTAlNFMQ0wCwYDVQQHEwRVbWVhMRgwFgYDVQQKEw9VbWVhIFVuaXZlcnNpdHkx + EDAOBgNVBAsTB0lUIFVuaXQxEDAOBgNVBAMTB1Rlc3QgU1AwHhcNMDkxMDI2MTMz + MTE1WhcNMTAxMDI2MTMzMTE1WjBaMQswCQYDVQQGEwJTRTENMAsGA1UEBxMEVW1l + YTEYMBYGA1UEChMPVW1lYSBVbml2ZXJzaXR5MRAwDgYDVQQLEwdJVCBVbml0MRAw + DgYDVQQDEwdUZXN0IFNQMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkJWP7 + bwOxtH+E15VTaulNzVQ/0cSbM5G7abqeqSNSs0l0veHr6/ROgW96ZeQ57fzVy2MC + FiQRw2fzBs0n7leEmDJyVVtBTavYlhAVXDNa3stgvh43qCfLx+clUlOvtnsoMiiR + mo7qf0BoPKTj7c0uLKpDpEbAHQT4OF1HRYVxMwIDAQABo4G/MIG8MB0GA1UdDgQW + BBQ7RgbMJFDGRBu9o3tDQDuSoBy7JjCBjAYDVR0jBIGEMIGBgBQ7RgbMJFDGRBu9 + o3tDQDuSoBy7JqFepFwwWjELMAkGA1UEBhMCU0UxDTALBgNVBAcTBFVtZWExGDAW + BgNVBAoTD1VtZWEgVW5pdmVyc2l0eTEQMA4GA1UECxMHSVQgVW5pdDEQMA4GA1UE + AxMHVGVzdCBTUIIJAJHg2V5J31I8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF + BQADgYEAMuRwwXRnsiyWzmRikpwinnhTmbooKm5TINPE7A7gSQ710RxioQePPhZO + zkM27NnHTrCe2rBVg0EGz7QTd1JIwLPvgoj4VTi/fSha/tXrYUaqc9AqU1kWI4WN + +vffBGQ09mo+6CffuFTZYeOhzP/2stAPwCTU4kxEoiy0KpZMANI= + + + + + + + + MIIC8jCCAlugAwIBAgIJAJHg2V5J31I8MA0GCSqGSIb3DQEBBQUAMFoxCzAJBgNV + BAYTAlNFMQ0wCwYDVQQHEwRVbWVhMRgwFgYDVQQKEw9VbWVhIFVuaXZlcnNpdHkx + EDAOBgNVBAsTB0lUIFVuaXQxEDAOBgNVBAMTB1Rlc3QgU1AwHhcNMDkxMDI2MTMz + MTE1WhcNMTAxMDI2MTMzMTE1WjBaMQswCQYDVQQGEwJTRTENMAsGA1UEBxMEVW1l + YTEYMBYGA1UEChMPVW1lYSBVbml2ZXJzaXR5MRAwDgYDVQQLEwdJVCBVbml0MRAw + DgYDVQQDEwdUZXN0IFNQMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkJWP7 + bwOxtH+E15VTaulNzVQ/0cSbM5G7abqeqSNSs0l0veHr6/ROgW96ZeQ57fzVy2MC + FiQRw2fzBs0n7leEmDJyVVtBTavYlhAVXDNa3stgvh43qCfLx+clUlOvtnsoMiiR + mo7qf0BoPKTj7c0uLKpDpEbAHQT4OF1HRYVxMwIDAQABo4G/MIG8MB0GA1UdDgQW + BBQ7RgbMJFDGRBu9o3tDQDuSoBy7JjCBjAYDVR0jBIGEMIGBgBQ7RgbMJFDGRBu9 + o3tDQDuSoBy7JqFepFwwWjELMAkGA1UEBhMCU0UxDTALBgNVBAcTBFVtZWExGDAW + BgNVBAoTD1VtZWEgVW5pdmVyc2l0eTEQMA4GA1UECxMHSVQgVW5pdDEQMA4GA1UE + AxMHVGVzdCBTUIIJAJHg2V5J31I8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF + BQADgYEAMuRwwXRnsiyWzmRikpwinnhTmbooKm5TINPE7A7gSQ710RxioQePPhZO + zkM27NnHTrCe2rBVg0EGz7QTd1JIwLPvgoj4VTi/fSha/tXrYUaqc9AqU1kWI4WN + +vffBGQ09mo+6CffuFTZYeOhzP/2stAPwCTU4kxEoiy0KpZMANI= + + + + + + + + + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + + + + + + + + + + + + MIIC8jCCAlugAwIBAgIJAJHg2V5J31I8MA0GCSqGSIb3DQEBBQUAMFoxCzAJBgNV + BAYTAlNFMQ0wCwYDVQQHEwRVbWVhMRgwFgYDVQQKEw9VbWVhIFVuaXZlcnNpdHkx + EDAOBgNVBAsTB0lUIFVuaXQxEDAOBgNVBAMTB1Rlc3QgU1AwHhcNMDkxMDI2MTMz + MTE1WhcNMTAxMDI2MTMzMTE1WjBaMQswCQYDVQQGEwJTRTENMAsGA1UEBxMEVW1l + YTEYMBYGA1UEChMPVW1lYSBVbml2ZXJzaXR5MRAwDgYDVQQLEwdJVCBVbml0MRAw + DgYDVQQDEwdUZXN0IFNQMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkJWP7 + bwOxtH+E15VTaulNzVQ/0cSbM5G7abqeqSNSs0l0veHr6/ROgW96ZeQ57fzVy2MC + FiQRw2fzBs0n7leEmDJyVVtBTavYlhAVXDNa3stgvh43qCfLx+clUlOvtnsoMiiR + mo7qf0BoPKTj7c0uLKpDpEbAHQT4OF1HRYVxMwIDAQABo4G/MIG8MB0GA1UdDgQW + BBQ7RgbMJFDGRBu9o3tDQDuSoBy7JjCBjAYDVR0jBIGEMIGBgBQ7RgbMJFDGRBu9 + o3tDQDuSoBy7JqFepFwwWjELMAkGA1UEBhMCU0UxDTALBgNVBAcTBFVtZWExGDAW + BgNVBAoTD1VtZWEgVW5pdmVyc2l0eTEQMA4GA1UECxMHSVQgVW5pdDEQMA4GA1UE + AxMHVGVzdCBTUIIJAJHg2V5J31I8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF + BQADgYEAMuRwwXRnsiyWzmRikpwinnhTmbooKm5TINPE7A7gSQ710RxioQePPhZO + zkM27NnHTrCe2rBVg0EGz7QTd1JIwLPvgoj4VTi/fSha/tXrYUaqc9AqU1kWI4WN + +vffBGQ09mo+6CffuFTZYeOhzP/2stAPwCTU4kxEoiy0KpZMANI= + + + + + + + + MIIC8jCCAlugAwIBAgIJAJHg2V5J31I8MA0GCSqGSIb3DQEBBQUAMFoxCzAJBgNV + BAYTAlNFMQ0wCwYDVQQHEwRVbWVhMRgwFgYDVQQKEw9VbWVhIFVuaXZlcnNpdHkx + EDAOBgNVBAsTB0lUIFVuaXQxEDAOBgNVBAMTB1Rlc3QgU1AwHhcNMDkxMDI2MTMz + MTE1WhcNMTAxMDI2MTMzMTE1WjBaMQswCQYDVQQGEwJTRTENMAsGA1UEBxMEVW1l + YTEYMBYGA1UEChMPVW1lYSBVbml2ZXJzaXR5MRAwDgYDVQQLEwdJVCBVbml0MRAw + DgYDVQQDEwdUZXN0IFNQMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkJWP7 + bwOxtH+E15VTaulNzVQ/0cSbM5G7abqeqSNSs0l0veHr6/ROgW96ZeQ57fzVy2MC + FiQRw2fzBs0n7leEmDJyVVtBTavYlhAVXDNa3stgvh43qCfLx+clUlOvtnsoMiiR + mo7qf0BoPKTj7c0uLKpDpEbAHQT4OF1HRYVxMwIDAQABo4G/MIG8MB0GA1UdDgQW + BBQ7RgbMJFDGRBu9o3tDQDuSoBy7JjCBjAYDVR0jBIGEMIGBgBQ7RgbMJFDGRBu9 + o3tDQDuSoBy7JqFepFwwWjELMAkGA1UEBhMCU0UxDTALBgNVBAcTBFVtZWExGDAW + BgNVBAoTD1VtZWEgVW5pdmVyc2l0eTEQMA4GA1UECxMHSVQgVW5pdDEQMA4GA1UE + AxMHVGVzdCBTUIIJAJHg2V5J31I8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF + BQADgYEAMuRwwXRnsiyWzmRikpwinnhTmbooKm5TINPE7A7gSQ710RxioQePPhZO + zkM27NnHTrCe2rBVg0EGz7QTd1JIwLPvgoj4VTi/fSha/tXrYUaqc9AqU1kWI4WN + +vffBGQ09mo+6CffuFTZYeOhzP/2stAPwCTU4kxEoiy0KpZMANI= + + + + + + + + + + + MIIC8jCCAlugAwIBAgIJAJHg2V5J31I8MA0GCSqGSIb3DQEBBQUAMFoxCzAJBgNV + BAYTAlNFMQ0wCwYDVQQHEwRVbWVhMRgwFgYDVQQKEw9VbWVhIFVuaXZlcnNpdHkx + EDAOBgNVBAsTB0lUIFVuaXQxEDAOBgNVBAMTB1Rlc3QgU1AwHhcNMDkxMDI2MTMz + MTE1WhcNMTAxMDI2MTMzMTE1WjBaMQswCQYDVQQGEwJTRTENMAsGA1UEBxMEVW1l + YTEYMBYGA1UEChMPVW1lYSBVbml2ZXJzaXR5MRAwDgYDVQQLEwdJVCBVbml0MRAw + DgYDVQQDEwdUZXN0IFNQMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkJWP7 + bwOxtH+E15VTaulNzVQ/0cSbM5G7abqeqSNSs0l0veHr6/ROgW96ZeQ57fzVy2MC + FiQRw2fzBs0n7leEmDJyVVtBTavYlhAVXDNa3stgvh43qCfLx+clUlOvtnsoMiiR + mo7qf0BoPKTj7c0uLKpDpEbAHQT4OF1HRYVxMwIDAQABo4G/MIG8MB0GA1UdDgQW + BBQ7RgbMJFDGRBu9o3tDQDuSoBy7JjCBjAYDVR0jBIGEMIGBgBQ7RgbMJFDGRBu9 + o3tDQDuSoBy7JqFepFwwWjELMAkGA1UEBhMCU0UxDTALBgNVBAcTBFVtZWExGDAW + BgNVBAoTD1VtZWEgVW5pdmVyc2l0eTEQMA4GA1UECxMHSVQgVW5pdDEQMA4GA1UE + AxMHVGVzdCBTUIIJAJHg2V5J31I8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF + BQADgYEAMuRwwXRnsiyWzmRikpwinnhTmbooKm5TINPE7A7gSQ710RxioQePPhZO + zkM27NnHTrCe2rBVg0EGz7QTd1JIwLPvgoj4VTi/fSha/tXrYUaqc9AqU1kWI4WN + +vffBGQ09mo+6CffuFTZYeOhzP/2stAPwCTU4kxEoiy0KpZMANI= + + + + + + + + MIIC8jCCAlugAwIBAgIJAJHg2V5J31I8MA0GCSqGSIb3DQEBBQUAMFoxCzAJBgNV + BAYTAlNFMQ0wCwYDVQQHEwRVbWVhMRgwFgYDVQQKEw9VbWVhIFVuaXZlcnNpdHkx + EDAOBgNVBAsTB0lUIFVuaXQxEDAOBgNVBAMTB1Rlc3QgU1AwHhcNMDkxMDI2MTMz + MTE1WhcNMTAxMDI2MTMzMTE1WjBaMQswCQYDVQQGEwJTRTENMAsGA1UEBxMEVW1l + YTEYMBYGA1UEChMPVW1lYSBVbml2ZXJzaXR5MRAwDgYDVQQLEwdJVCBVbml0MRAw + DgYDVQQDEwdUZXN0IFNQMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkJWP7 + bwOxtH+E15VTaulNzVQ/0cSbM5G7abqeqSNSs0l0veHr6/ROgW96ZeQ57fzVy2MC + FiQRw2fzBs0n7leEmDJyVVtBTavYlhAVXDNa3stgvh43qCfLx+clUlOvtnsoMiiR + mo7qf0BoPKTj7c0uLKpDpEbAHQT4OF1HRYVxMwIDAQABo4G/MIG8MB0GA1UdDgQW + BBQ7RgbMJFDGRBu9o3tDQDuSoBy7JjCBjAYDVR0jBIGEMIGBgBQ7RgbMJFDGRBu9 + o3tDQDuSoBy7JqFepFwwWjELMAkGA1UEBhMCU0UxDTALBgNVBAcTBFVtZWExGDAW + BgNVBAoTD1VtZWEgVW5pdmVyc2l0eTEQMA4GA1UECxMHSVQgVW5pdDEQMA4GA1UE + AxMHVGVzdCBTUIIJAJHg2V5J31I8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF + BQADgYEAMuRwwXRnsiyWzmRikpwinnhTmbooKm5TINPE7A7gSQ710RxioQePPhZO + zkM27NnHTrCe2rBVg0EGz7QTd1JIwLPvgoj4VTi/fSha/tXrYUaqc9AqU1kWI4WN + +vffBGQ09mo+6CffuFTZYeOhzP/2stAPwCTU4kxEoiy0KpZMANI= + + + + + + urn:oasis:names:tc:SAML:2.0:nameid-format:transient + urn:oasis:names:tc:SAML:2.0:nameid-format:persistent + + + Rolands Identiteter + Rolands Identiteter + http://www.example.com + + + Roland + Hedberg + technical@example.com + + + Support + support@example.com + + diff --git a/tests/scenarios/features/v2/gcp_integration.feature b/tests/scenarios/features/v2/gcp_integration.feature index 994a17e72..e18714ba2 100644 --- a/tests/scenarios/features/v2/gcp_integration.feature +++ b/tests/scenarios/features/v2/gcp_integration.feature @@ -34,14 +34,14 @@ Feature: GCP Integration @generated @skip @team:DataDog/gcp-integrations Scenario: Create a new entry for your service account returns "Bad Request" response Given new "CreateGCPSTSAccount" request - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "type": "gcp_service_account"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/gcp-integrations Scenario: Create a new entry for your service account returns "Conflict" response Given new "CreateGCPSTSAccount" request - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "type": "gcp_service_account"}} When the request is sent Then the response status is 409 Conflict @@ -64,6 +64,43 @@ Feature: GCP Integration And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com" And the response "data.attributes.account_tags" is equal to ["lorem", "ipsum"] + @team:DataDog/gcp-integrations + Scenario: Create a new entry for your service account with cspm enabled returns "OK" response + Given new "CreateGCPSTSAccount" request + And body with value {"data": {"attributes": {"is_cspm_enabled": true, "resource_collection_enabled": true, "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} + When the request is sent + Then the response status is 201 OK + And the response "data.type" is equal to "gcp_service_account" + And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com" + And the response "data.attributes.is_cspm_enabled" is equal to true + + @team:DataDog/gcp-integrations + Scenario: Create a new entry for your service account with resource collection enabled disabled and cspm enabled returns "Bad Request" response + Given new "CreateGCPSTSAccount" request + And body with value {"data": {"attributes": {"resource_collection_enabled": false, "is_cspm_enabled": true, "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/gcp-integrations + Scenario: Create a new entry for your service account with resource collection enabled returns "OK" response + Given new "CreateGCPSTSAccount" request + And body with value {"data": {"attributes": {"resource_collection_enabled": true, "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} + When the request is sent + Then the response status is 201 OK + And the response "data.type" is equal to "gcp_service_account" + And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com" + And the response "data.attributes.resource_collection_enabled" is equal to true + + @team:DataDog/gcp-integrations + Scenario: Create a new entry for your service account with security command center enabled returns "OK" response + Given new "CreateGCPSTSAccount" request + And body with value {"data": {"attributes": {"is_security_command_center_enabled": true, "client_email": "{{ unique_hash }}@test-project.iam.gserviceaccount.com", "host_filters": []}, "type": "gcp_service_account"}} + When the request is sent + Then the response status is 201 OK + And the response "data.type" is equal to "gcp_service_account" + And the response "data.attributes.client_email" is equal to "{{ unique_hash }}@test-project.iam.gserviceaccount.com" + And the response "data.attributes.is_security_command_center_enabled" is equal to true + @generated @skip @team:DataDog/gcp-integrations Scenario: Delete an STS enabled GCP Account returns "Bad Request" response Given new "DeleteGCPSTSAccount" request @@ -103,7 +140,7 @@ Feature: GCP Integration Scenario: Update STS Service Account returns "Bad Request" response Given new "UpdateGCPSTSAccount" request And request contains "account_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} When the request is sent Then the response status is 400 Bad Request @@ -111,7 +148,7 @@ Feature: GCP Integration Scenario: Update STS Service Account returns "Not Found" response Given new "UpdateGCPSTSAccount" request And request contains "account_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": []}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} When the request is sent Then the response status is 404 Not Found @@ -123,3 +160,12 @@ Feature: GCP Integration And body with value {"data": {"attributes": {"client_email": "{{ unique_hash }}@example.com", "host_filters": ["foo:bar"]}, "id": "{{ gcp_sts_account.data.id }}", "type": "gcp_service_account"}} When the request is sent Then the response status is 201 OK + + @team:DataDog/gcp-integrations + Scenario: Update STS Service Account returns "OK" response with enable resource collection turned on + Given there is a valid "gcp_sts_account" in the system + And new "UpdateGCPSTSAccount" request + And request contains "account_id" parameter from "gcp_sts_account.data.id" + And body with value {"data": {"attributes": {"client_email": "{{ unique_hash }}@example.com", "resource_collection_enabled": true}, "id": "{{ gcp_sts_account.data.id }}", "type": "gcp_service_account"}} + When the request is sent + Then the response status is 201 OK diff --git a/tests/scenarios/features/v2/given.json b/tests/scenarios/features/v2/given.json index e5b00be81..87cad5da3 100644 --- a/tests/scenarios/features/v2/given.json +++ b/tests/scenarios/features/v2/given.json @@ -223,6 +223,18 @@ "tag": "Fastly Integration", "operationId": "CreateFastlyAccount" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"okta-accounts\",\n \"attributes\": {\n \"auth_method\": \"oauth\",\n \"name\": \"{{ unique_lower_alnum }}\",\n \"domain\": \"https://dev-test.okta.com/\",\n \"client_id\": \"fakeclientid\",\n \"client_secret\": \"fakeclientsecret\"\n }\n }\n}" + } + ], + "step": "there is a valid \"okta_account\" in the system", + "key": "okta_account", + "tag": "Okta Integration", + "operationId": "CreateOktaAccount" + }, { "parameters": [ { @@ -374,6 +386,18 @@ "tag": "RUM", "operationId": "CreateRUMApplication" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"rule\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"enabled\": true,\n \"owner\": \"Datadog\",\n \"scorecard_name\": \"OpenAPI Spec Test Best Practices\"\n }\n }\n}" + } + ], + "step": "there is a valid \"create_scorecard_rule\" in the system", + "key": "create_scorecard_rule", + "tag": "Service Scorecards", + "operationId": "CreateScorecardRule" + }, { "parameters": [ { diff --git a/tests/scenarios/features/v2/incident_services.feature b/tests/scenarios/features/v2/incident_services.feature new file mode 100644 index 000000000..66eb74e5d --- /dev/null +++ b/tests/scenarios/features/v2/incident_services.feature @@ -0,0 +1,144 @@ +@endpoint(incident-services) @endpoint(incident-services-v2) +Feature: Incident Services + Create, update, delete, and retrieve services which can be associated with + incidents. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "IncidentServices" API + + @generated @skip @team:Datadog/incident-app + Scenario: Create a new incident service returns "Bad Request" response + Given operation "CreateIncidentService" enabled + And new "CreateIncidentService" request + And body with value {"data": {"attributes": {"name": "an example service name"}, "type": "services"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/incident-app + Scenario: Create a new incident service returns "CREATED" response + Given operation "CreateIncidentService" enabled + And new "CreateIncidentService" request + And body with value {"data": {"type": "services", "attributes": {"name": "{{ unique }}"}}} + When the request is sent + Then the response status is 201 CREATED + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.type" is equal to "services" + + @generated @skip @team:Datadog/incident-app + Scenario: Create a new incident service returns "Not Found" response + Given operation "CreateIncidentService" enabled + And new "CreateIncidentService" request + And body with value {"data": {"attributes": {"name": "an example service name"}, "type": "services"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/incident-app + Scenario: Delete an existing incident service returns "Bad Request" response + Given operation "DeleteIncidentService" enabled + And new "DeleteIncidentService" request + And request contains "service_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Delete an existing incident service returns "Not Found" response + Given operation "DeleteIncidentService" enabled + And new "DeleteIncidentService" request + And request contains "service_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Delete an existing incident service returns "OK" response + Given there is a valid "service" in the system + And operation "DeleteIncidentService" enabled + And new "DeleteIncidentService" request + And request contains "service_id" parameter from "service.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:Datadog/incident-app + Scenario: Get a list of all incident services returns "Bad Request" response + Given operation "ListIncidentServices" enabled + And new "ListIncidentServices" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Get a list of all incident services returns "Not Found" response + Given operation "ListIncidentServices" enabled + And new "ListIncidentServices" request + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Get a list of all incident services returns "OK" response + Given there is a valid "service" in the system + And operation "ListIncidentServices" enabled + And new "ListIncidentServices" request + And request contains "filter" parameter from "service.data.attributes.name" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].attributes.name" has the same value as "service.data.attributes.name" + + @generated @skip @team:Datadog/incident-app + Scenario: Get details of an incident service returns "Bad Request" response + Given operation "GetIncidentService" enabled + And new "GetIncidentService" request + And request contains "service_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Get details of an incident service returns "Not Found" response + Given operation "GetIncidentService" enabled + And new "GetIncidentService" request + And request contains "service_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Get details of an incident service returns "OK" response + Given there is a valid "service" in the system + And operation "GetIncidentService" enabled + And new "GetIncidentService" request + And request contains "service_id" parameter from "service.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{service.data.id}}" + And the response "data.type" is equal to "services" + And the response "data.attributes.name" has the same value as "service.data.attributes.name" + + @generated @skip @team:Datadog/incident-app + Scenario: Update an existing incident service returns "Bad Request" response + Given operation "UpdateIncidentService" enabled + And new "UpdateIncidentService" request + And request contains "service_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "an example service name"}, "id": "00000000-0000-0000-0000-000000000000", "type": "services"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Update an existing incident service returns "Not Found" response + Given operation "UpdateIncidentService" enabled + And new "UpdateIncidentService" request + And request contains "service_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "an example service name"}, "id": "00000000-0000-0000-0000-000000000000", "type": "services"}} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Update an existing incident service returns "OK" response + Given there is a valid "service" in the system + And operation "UpdateIncidentService" enabled + And new "UpdateIncidentService" request + And request contains "service_id" parameter from "service.data.id" + And body with value {"data": {"type": "services", "attributes": {"name": "{{ service.data.attributes.name }}-updated"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{service.data.id}}" + And the response "data.type" is equal to "services" + And the response "data.attributes.name" is equal to "{{ service.data.attributes.name }}-updated" diff --git a/tests/scenarios/features/v2/incident_teams.feature b/tests/scenarios/features/v2/incident_teams.feature new file mode 100644 index 000000000..5bbb49263 --- /dev/null +++ b/tests/scenarios/features/v2/incident_teams.feature @@ -0,0 +1,146 @@ +@endpoint(incident-teams) @endpoint(incident-teams-v2) +Feature: Incident Teams + The Incident Teams endpoints are deprecated. See the [Teams API + endpoints](https://docs.datadoghq.com/api/latest/teams/) to create, + update, delete, and retrieve teams which can be associated with incidents. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "IncidentTeams" API + + @generated @skip @team:Datadog/incident-app + Scenario: Create a new incident team returns "Bad Request" response + Given operation "CreateIncidentTeam" enabled + And new "CreateIncidentTeam" request + And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/incident-app + Scenario: Create a new incident team returns "CREATED" response + Given operation "CreateIncidentTeam" enabled + And new "CreateIncidentTeam" request + And body with value {"data": {"type": "teams", "attributes": {"name": "{{ unique }}"}}} + When the request is sent + Then the response status is 201 CREATED + And the response "data.type" is equal to "teams" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @generated @skip @team:Datadog/incident-app + Scenario: Create a new incident team returns "Not Found" response + Given operation "CreateIncidentTeam" enabled + And new "CreateIncidentTeam" request + And body with value {"data": {"attributes": {"name": "team name"}, "type": "teams"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/incident-app + Scenario: Delete an existing incident team returns "Bad Request" response + Given operation "DeleteIncidentTeam" enabled + And new "DeleteIncidentTeam" request + And request contains "team_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Delete an existing incident team returns "Not Found" response + Given operation "DeleteIncidentTeam" enabled + And new "DeleteIncidentTeam" request + And request contains "team_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Delete an existing incident team returns "OK" response + Given there is a valid "team" in the system + And operation "DeleteIncidentTeam" enabled + And new "DeleteIncidentTeam" request + And request contains "team_id" parameter from "team.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:Datadog/incident-app + Scenario: Get a list of all incident teams returns "Bad Request" response + Given operation "ListIncidentTeams" enabled + And new "ListIncidentTeams" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Get a list of all incident teams returns "Not Found" response + Given operation "ListIncidentTeams" enabled + And new "ListIncidentTeams" request + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Get a list of all incident teams returns "OK" response + Given there is a valid "team" in the system + And operation "ListIncidentTeams" enabled + And new "ListIncidentTeams" request + And request contains "filter" parameter from "team.data.attributes.name" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].type" is equal to "teams" + And the response "data[0].attributes.name" has the same value as "team.data.attributes.name" + + @generated @skip @team:Datadog/incident-app + Scenario: Get details of an incident team returns "Bad Request" response + Given operation "GetIncidentTeam" enabled + And new "GetIncidentTeam" request + And request contains "team_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Get details of an incident team returns "Not Found" response + Given operation "GetIncidentTeam" enabled + And new "GetIncidentTeam" request + And request contains "team_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Get details of an incident team returns "OK" response + Given there is a valid "team" in the system + And operation "GetIncidentTeam" enabled + And new "GetIncidentTeam" request + And request contains "team_id" parameter from "team.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "teams" + And the response "data.id" is equal to "{{ team.data.id }}" + And the response "data.attributes.name" has the same value as "team.data.attributes.name" + + @generated @skip @team:Datadog/incident-app + Scenario: Update an existing incident team returns "Bad Request" response + Given operation "UpdateIncidentTeam" enabled + And new "UpdateIncidentTeam" request + And request contains "team_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Update an existing incident team returns "Not Found" response + Given operation "UpdateIncidentTeam" enabled + And new "UpdateIncidentTeam" request + And request contains "team_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "team name"}, "id": "00000000-7ea3-0000-0001-000000000000", "type": "teams"}} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Update an existing incident team returns "OK" response + Given there is a valid "team" in the system + And operation "UpdateIncidentTeam" enabled + And new "UpdateIncidentTeam" request + And request contains "team_id" parameter from "team.data.id" + And body with value {"data": {"type": "teams", "attributes": {"name": "{{ team.data.attributes.name }}-updated"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "teams" + And the response "data.id" is equal to "{{ team.data.id }}" + And the response "data.attributes.name" is equal to "{{ team.data.attributes.name }}-updated" diff --git a/tests/scenarios/features/v2/incidents.feature b/tests/scenarios/features/v2/incidents.feature new file mode 100644 index 000000000..796d1e7d9 --- /dev/null +++ b/tests/scenarios/features/v2/incidents.feature @@ -0,0 +1,586 @@ +@endpoint(incidents) @endpoint(incidents-v2) +Feature: Incidents + Manage incident response. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Incidents" API + + @team:DataDog/incident-app + Scenario: Add commander to an incident returns "OK" response + Given operation "UpdateIncident" enabled + And there is a valid "user" in the system + And there is a valid "incident" in the system + And new "UpdateIncident" request + And request contains "incident_id" parameter from "incident.data.id" + And body with value {"data": {"id": "{{incident.data.id}}", "type": "incidents", "relationships": {"commander_user": {"data": {"id": "{{user.data.id}}", "type": "users"}}}}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/incident-app + Scenario: Create an incident attachment returns "OK" response + Given operation "UpdateIncidentAttachments" enabled + And there is a valid "incident" in the system + And new "UpdateIncidentAttachments" request + And request contains "incident_id" parameter from "incident.data.id" + And body with value {"data": [{"type": "incident_attachments", "attributes": {"attachment_type": "link", "attachment": {"documentUrl": "https://www.example.com/doc", "title": "{{unique}}"}}}]} + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].type" is equal to "incident_attachments" + And the response "data[0].attributes.attachment_type" is equal to "link" + And the response "data[0].attributes.attachment.documentUrl" is equal to "https://www.example.com/doc" + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident integration metadata returns "Bad Request" response + Given operation "CreateIncidentIntegration" enabled + And new "CreateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/incident-app + Scenario: Create an incident integration metadata returns "CREATED" response + Given operation "CreateIncidentIntegration" enabled + And new "CreateIncidentIntegration" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And body with value {"data": {"attributes": {"incident_id": "{{ incident.data.id }}", "integration_type": 1, "metadata": {"channels": [{"channel_id": "C0123456789", "channel_name": "#new-channel", "team_id": "T01234567", "redirect_url": "https://slack.com/app_redirect?channel=C0123456789&team=T01234567"}]}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data.type" is equal to "incident_integrations" + And the response "data.attributes.metadata.channels" has length 1 + And the response "data.attributes.metadata.channels[0].channel_name" is equal to "#new-channel" + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident integration metadata returns "Not Found" response + Given operation "CreateIncidentIntegration" enabled + And new "CreateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident returns "Bad Request" response + Given operation "CreateIncident" enabled + And new "CreateIncident" request + And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/incident-app + Scenario: Create an incident returns "CREATED" response + Given there is a valid "user" in the system + And operation "CreateIncident" enabled + And new "CreateIncident" request + And body with value {"data": {"type": "incidents", "attributes": {"title": "{{unique}}", "customer_impacted": false, "fields": {"state": {"type": "dropdown", "value": "resolved"}}}, "relationships": {"commander_user": {"data": {"type": "{{ user.data.type }}", "id": "{{ user.data.id }}"}}}}} + When the request is sent + Then the response status is 201 CREATED + And the response "data.relationships.commander_user.data.id" has the same value as "user.data.id" + And the response "data.attributes.title" has the same value as "unique" + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident returns "Not Found" response + Given operation "CreateIncident" enabled + And new "CreateIncident" request + And body with value {"data": {"attributes": {"customer_impact_scope": "Example customer impact scope", "customer_impacted": false, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "initial_cells": [{"cell_type": "markdown", "content": {"content": "An example timeline cell message."}, "important": false}], "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}}, "type": "incidents"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/incident-app + Scenario: Create an incident todo returns "Bad Request" response + Given operation "CreateIncidentTodo" enabled + And new "CreateIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"assignees": ["@test.user@test.com"], "completed": "2023-03-06T22:00:00.000000+00:00", "content": "Restore lost data.", "due_date": "2023-07-10T05:00:00.000000+00:00", "incident_id": "00000000-aaaa-0000-0000-000000000000"}, "type": "incident_todos"}} + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/incident-app + Scenario: Create an incident todo returns "CREATED" response + Given operation "CreateIncidentTodo" enabled + And new "CreateIncidentTodo" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And body with value {"data": {"attributes": {"assignees": ["@test.user@test.com"], "content": "Restore lost data."}, "type": "incident_todos"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data.attributes.assignees" has length 1 + + @generated @skip @team:Datadog/incident-app + Scenario: Create an incident todo returns "Not Found" response + Given operation "CreateIncidentTodo" enabled + And new "CreateIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"assignees": ["@test.user@test.com"], "completed": "2023-03-06T22:00:00.000000+00:00", "content": "Restore lost data.", "due_date": "2023-07-10T05:00:00.000000+00:00", "incident_id": "00000000-aaaa-0000-0000-000000000000"}, "type": "incident_todos"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create, update, and delete incident attachments returns "Bad Request" response + Given operation "UpdateIncidentAttachments" enabled + And new "UpdateIncidentAttachments" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"attachment": {"documentUrl": "https://app.datadoghq.com/notebook/123", "title": "Postmortem IR-123"}, "attachment_type": "postmortem"}, "id": "00000000-abcd-0002-0000-000000000000", "type": "incident_attachments"}, {"attributes": {"attachment": {"documentUrl": "https://www.example.com/webstore-failure-runbook", "title": "Runbook for webstore service failures"}, "attachment_type": "link"}, "type": "incident_attachments"}, {"id": "00000000-abcd-0003-0000-000000000000", "type": "incident_attachments"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create, update, and delete incident attachments returns "Not Found" response + Given operation "UpdateIncidentAttachments" enabled + And new "UpdateIncidentAttachments" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"attachment": {"documentUrl": "https://app.datadoghq.com/notebook/123", "title": "Postmortem IR-123"}, "attachment_type": "postmortem"}, "id": "00000000-abcd-0002-0000-000000000000", "type": "incident_attachments"}, {"attributes": {"attachment": {"documentUrl": "https://www.example.com/webstore-failure-runbook", "title": "Runbook for webstore service failures"}, "attachment_type": "link"}, "type": "incident_attachments"}, {"id": "00000000-abcd-0003-0000-000000000000", "type": "incident_attachments"}]} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create, update, and delete incident attachments returns "OK" response + Given operation "UpdateIncidentAttachments" enabled + And new "UpdateIncidentAttachments" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": [{"attributes": {"attachment": {"documentUrl": "https://app.datadoghq.com/notebook/123", "title": "Postmortem IR-123"}, "attachment_type": "postmortem"}, "id": "00000000-abcd-0002-0000-000000000000", "type": "incident_attachments"}, {"attributes": {"attachment": {"documentUrl": "https://www.example.com/webstore-failure-runbook", "title": "Runbook for webstore service failures"}, "attachment_type": "link"}, "type": "incident_attachments"}, {"id": "00000000-abcd-0003-0000-000000000000", "type": "incident_attachments"}]} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an existing incident returns "Bad Request" response + Given operation "DeleteIncident" enabled + And new "DeleteIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an existing incident returns "Not Found" response + Given operation "DeleteIncident" enabled + And new "DeleteIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Delete an existing incident returns "OK" response + Given operation "DeleteIncident" enabled + And there is a valid "incident" in the system + And new "DeleteIncident" request + And request contains "incident_id" parameter from "incident.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident integration metadata returns "Bad Request" response + Given operation "DeleteIncidentIntegration" enabled + And new "DeleteIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident integration metadata returns "Not Found" response + Given operation "DeleteIncidentIntegration" enabled + And new "DeleteIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Delete an incident integration metadata returns "OK" response + Given operation "DeleteIncidentIntegration" enabled + And new "DeleteIncidentIntegration" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And the "incident" has an "incident_integration_metadata" + And request contains "integration_metadata_id" parameter from "incident_integration_metadata.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:Datadog/incident-app + Scenario: Delete an incident todo returns "Bad Request" response + Given operation "DeleteIncidentTodo" enabled + And new "DeleteIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "todo_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Delete an incident todo returns "Not Found" response + Given operation "DeleteIncidentTodo" enabled + And new "DeleteIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "todo_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:Datadog/incident-app + Scenario: Delete an incident todo returns "OK" response + Given operation "DeleteIncidentTodo" enabled + And new "DeleteIncidentTodo" request + And there is a valid "incident" in the system + And the "incident" has an "incident_todo" + And request contains "incident_id" parameter from "incident.data.id" + And request contains "todo_id" parameter from "incident_todo.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of an incident's integration metadata returns "Bad Request" response + Given operation "ListIncidentIntegrations" enabled + And new "ListIncidentIntegrations" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of an incident's integration metadata returns "Not Found" response + Given operation "ListIncidentIntegrations" enabled + And new "ListIncidentIntegrations" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Get a list of an incident's integration metadata returns "OK" response + Given operation "ListIncidentIntegrations" enabled + And new "ListIncidentIntegrations" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And the "incident" has an "incident_integration_metadata" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.metadata.channels[0].channel_name" is equal to "#example-channel-name" + + @generated @skip @team:Datadog/incident-app + Scenario: Get a list of an incident's todos returns "Bad Request" response + Given operation "ListIncidentTodos" enabled + And new "ListIncidentTodos" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Get a list of an incident's todos returns "Not Found" response + Given operation "ListIncidentTodos" enabled + And new "ListIncidentTodos" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:Datadog/incident-app + Scenario: Get a list of an incident's todos returns "OK" response + Given operation "ListIncidentTodos" enabled + And new "ListIncidentTodos" request + And there is a valid "incident" in the system + And the "incident" has an "incident_todo" + And request contains "incident_id" parameter from "incident.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].attributes.assignees" has length 2 + And the response "data[0].attributes.content" is equal to "Follow up with customer about the impact they saw." + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of attachments returns "Bad Request" response + Given operation "ListIncidentAttachments" enabled + And new "ListIncidentAttachments" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of attachments returns "Not Found" response + Given operation "ListIncidentAttachments" enabled + And new "ListIncidentAttachments" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of attachments returns "OK" response + Given operation "ListIncidentAttachments" enabled + And new "ListIncidentAttachments" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of incidents returns "Bad Request" response + Given operation "ListIncidents" enabled + And new "ListIncidents" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of incidents returns "Not Found" response + Given operation "ListIncidents" enabled + And new "ListIncidents" request + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Get a list of incidents returns "OK" response + Given operation "ListIncidents" enabled + And there is a valid "incident" in the system + And new "ListIncidents" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "incidents" + + @replay-only @skip-validation @team:DataDog/incident-app @with-pagination + Scenario: Get a list of incidents returns "OK" response with pagination + Given operation "ListIncidents" enabled + And new "ListIncidents" request + And request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @team:DataDog/incident-app + Scenario: Get incident attachments returns "OK" response + Given operation "ListIncidentAttachments" enabled + And there is a valid "incident" in the system + And the "incident" has an "incident_attachment" + And new "ListIncidentAttachments" request + And request contains "incident_id" parameter from "incident.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].type" is equal to "incident_attachments" + And the response "data[0].attributes.attachment_type" is equal to "link" + And the response "data[0].attributes.attachment.documentUrl" is equal to "https://www.example.com/doc" + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident integration metadata details returns "Bad Request" response + Given operation "GetIncidentIntegration" enabled + And new "GetIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident integration metadata details returns "Not Found" response + Given operation "GetIncidentIntegration" enabled + And new "GetIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Get incident integration metadata details returns "OK" response + Given operation "GetIncidentIntegration" enabled + And new "GetIncidentIntegration" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And the "incident" has an "incident_integration_metadata" + And request contains "integration_metadata_id" parameter from "incident_integration_metadata.data.id" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/incident-app + Scenario: Get incident todo details returns "Bad Request" response + Given operation "GetIncidentTodo" enabled + And new "GetIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "todo_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Get incident todo details returns "Not Found" response + Given operation "GetIncidentTodo" enabled + And new "GetIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "todo_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:Datadog/incident-app + Scenario: Get incident todo details returns "OK" response + Given operation "GetIncidentTodo" enabled + And new "GetIncidentTodo" request + And there is a valid "incident" in the system + And the "incident" has an "incident_todo" + And request contains "incident_id" parameter from "incident.data.id" + And request contains "todo_id" parameter from "incident_todo.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.assignees" has length 2 + And the response "data.attributes.content" is equal to "Follow up with customer about the impact they saw." + + @generated @skip @team:DataDog/incident-app + Scenario: Get the details of an incident returns "Bad Request" response + Given operation "GetIncident" enabled + And new "GetIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get the details of an incident returns "Not Found" response + Given operation "GetIncident" enabled + And new "GetIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Get the details of an incident returns "OK" response + Given operation "GetIncident" enabled + And there is a valid "incident" in the system + And new "GetIncident" request + And request contains "incident_id" parameter from "incident.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.title" has the same value as "incident.data.attributes.title" + + @team:DataDog/incident-app + Scenario: Remove commander from an incident returns "OK" response + Given operation "UpdateIncident" enabled + And there is a valid "incident" in the system + And new "UpdateIncident" request + And request contains "incident_id" parameter from "incident.data.id" + And body with value {"data": {"id": "{{incident.data.id}}", "type": "incidents", "relationships": {"commander_user": {"data": null}}}} + When the request is sent + Then the response status is 200 OK + And the response "data.relationships.commander_user.data" is equal to null + + @generated @skip @team:DataDog/incident-app + Scenario: Search for incidents returns "Bad Request" response + Given operation "SearchIncidents" enabled + And new "SearchIncidents" request + And request contains "query" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Search for incidents returns "Not Found" response + Given operation "SearchIncidents" enabled + And new "SearchIncidents" request + And request contains "query" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @skip-validation @team:DataDog/incident-app + Scenario: Search for incidents returns "OK" response + Given operation "SearchIncidents" enabled + And there is a valid "incident" in the system + And new "SearchIncidents" request + And request contains "query" parameter with value "state:(active OR stable OR resolved)" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "incidents_search_results" + And the response "data.attributes.incidents[0].data.type" is equal to "incidents" + + @replay-only @skip-validation @team:DataDog/incident-app @with-pagination + Scenario: Search for incidents returns "OK" response with pagination + Given operation "SearchIncidents" enabled + And new "SearchIncidents" request + And request contains "query" parameter with value "state:(active OR stable OR resolved)" + And request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @generated @skip @team:DataDog/incident-app + Scenario: Update an existing incident integration metadata returns "Bad Request" response + Given operation "UpdateIncidentIntegration" enabled + And new "UpdateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an existing incident integration metadata returns "Not Found" response + Given operation "UpdateIncidentIntegration" enabled + And new "UpdateIncidentIntegration" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "integration_metadata_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"incident_id": "00000000-aaaa-0000-0000-000000000000", "integration_type": 1, "metadata": {"channels": []}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Update an existing incident integration metadata returns "OK" response + Given operation "UpdateIncidentIntegration" enabled + And new "UpdateIncidentIntegration" request + And there is a valid "incident" in the system + And request contains "incident_id" parameter from "incident.data.id" + And the "incident" has an "incident_integration_metadata" + And request contains "integration_metadata_id" parameter from "incident_integration_metadata.data.id" + And body with value {"data": {"attributes": {"incident_id": "{{ incident.data.id }}", "integration_type": 1, "metadata": {"channels": [{"channel_id": "C0123456789", "channel_name": "#updated-channel-name", "team_id": "T01234567", "redirect_url": "https://slack.com/app_redirect?channel=C0123456789&team=T01234567"}]}}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.metadata.channels[0].channel_name" is equal to "#updated-channel-name" + + @generated @skip @team:DataDog/incident-app + Scenario: Update an existing incident returns "Bad Request" response + Given operation "UpdateIncident" enabled + And new "UpdateIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"customer_impact_end": null, "customer_impact_scope": "Example customer impact scope", "customer_impact_start": null, "customer_impacted": false, "detected": null, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "id": "00000000-0000-0000-4567-000000000000", "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "integrations": {"data": [{"id": "00000000-abcd-0005-0000-000000000000", "type": "incident_integrations"}, {"id": "00000000-abcd-0006-0000-000000000000", "type": "incident_integrations"}]}, "postmortem": {"data": {"id": "00000000-0000-abcd-3000-000000000000", "type": "incident_postmortems"}}}, "type": "incidents"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an existing incident returns "Not Found" response + Given operation "UpdateIncident" enabled + And new "UpdateIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"customer_impact_end": null, "customer_impact_scope": "Example customer impact scope", "customer_impact_start": null, "customer_impacted": false, "detected": null, "fields": {"severity": {"type": "dropdown", "value": "SEV-5"}}, "notification_handles": [{"display_name": "Jane Doe", "handle": "@test.user@test.com"}], "title": "A test incident title"}, "id": "00000000-0000-0000-4567-000000000000", "relationships": {"commander_user": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "integrations": {"data": [{"id": "00000000-abcd-0005-0000-000000000000", "type": "incident_integrations"}, {"id": "00000000-abcd-0006-0000-000000000000", "type": "incident_integrations"}]}, "postmortem": {"data": {"id": "00000000-0000-abcd-3000-000000000000", "type": "incident_postmortems"}}}, "type": "incidents"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/incident-app + Scenario: Update an existing incident returns "OK" response + Given operation "UpdateIncident" enabled + And there is a valid "incident" in the system + And new "UpdateIncident" request + And request contains "incident_id" parameter from "incident.data.id" + And body with value {"data": {"id": "{{incident.data.id}}", "type": "incidents", "attributes": {"fields": {"state": {"type": "dropdown", "value":"resolved"}}, "title": "{{ incident.data.attributes.title }}-updated"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.title" is equal to "{{ incident.data.attributes.title }}-updated" + + @generated @skip @team:Datadog/incident-app + Scenario: Update an incident todo returns "Bad Request" response + Given operation "UpdateIncidentTodo" enabled + And new "UpdateIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "todo_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"assignees": ["@test.user@test.com"], "completed": "2023-03-06T22:00:00.000000+00:00", "content": "Restore lost data.", "due_date": "2023-07-10T05:00:00.000000+00:00", "incident_id": "00000000-aaaa-0000-0000-000000000000"}, "type": "incident_todos"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Update an incident todo returns "Not Found" response + Given operation "UpdateIncidentTodo" enabled + And new "UpdateIncidentTodo" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "todo_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"assignees": ["@test.user@test.com"], "completed": "2023-03-06T22:00:00.000000+00:00", "content": "Restore lost data.", "due_date": "2023-07-10T05:00:00.000000+00:00", "incident_id": "00000000-aaaa-0000-0000-000000000000"}, "type": "incident_todos"}} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Update an incident todo returns "OK" response + Given operation "UpdateIncidentTodo" enabled + And new "UpdateIncidentTodo" request + And there is a valid "incident" in the system + And the "incident" has an "incident_todo" + And request contains "incident_id" parameter from "incident.data.id" + And request contains "todo_id" parameter from "incident_todo.data.id" + And body with value {"data": {"attributes": {"assignees": ["@test.user@test.com"], "content": "Restore lost data.", "completed": "2023-03-06T22:00:00.000000+00:00", "due_date": "2023-07-10T05:00:00.000000+00:00"}, "type": "incident_todos"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.assignees" has length 1 + And the response "data.attributes.content" is equal to "Restore lost data." diff --git a/tests/scenarios/features/v2/key_management.feature b/tests/scenarios/features/v2/key_management.feature new file mode 100644 index 000000000..47a50604b --- /dev/null +++ b/tests/scenarios/features/v2/key_management.feature @@ -0,0 +1,290 @@ +@endpoint(key-management) @endpoint(key-management-v2) +Feature: Key Management + Manage your Datadog API and application keys. You need an API key and an + application key for a user with the required permissions to interact with + these endpoints. The full list of API and application keys can be seen on + your [Datadog API page](https://app.datadoghq.com/account/settings#api). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "KeyManagement" API + + @generated @skip @team:DataDog/credentials-management + Scenario: Create an API key returns "Bad Request" response + Given new "CreateAPIKey" request + And body with value {"data": {"attributes": {"name": "API Key for submitting metrics"}, "type": "api_keys"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/credentials-management + Scenario: Create an API key returns "Created" response + Given new "CreateAPIKey" request + And body with value {"data": {"type": "api_keys", "attributes": {"name": "{{ unique }}"}}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "api_keys" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @team:DataDog/credentials-management + Scenario: Create an Application key with scopes for current user returns "Created" response + Given new "CreateCurrentUserApplicationKey" request + And body with value {"data": {"type": "application_keys", "attributes": {"name": "{{ unique }}", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.scopes" is equal to ["dashboards_read", "dashboards_write", "dashboards_public_share"] + + @generated @skip @team:DataDog/credentials-management + Scenario: Create an application key for current user returns "Bad Request" response + Given new "CreateCurrentUserApplicationKey" request + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "type": "application_keys"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/credentials-management + Scenario: Create an application key for current user returns "Created" response + Given new "CreateCurrentUserApplicationKey" request + And body with value {"data": {"type": "application_keys", "attributes": {"name": "{{ unique }}"}}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "application_keys" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @team:DataDog/credentials-management + Scenario: Delete an API key returns "No Content" response + Given there is a valid "api_key" in the system + And new "DeleteAPIKey" request + And request contains "api_key_id" parameter from "api_key.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/credentials-management + Scenario: Delete an API key returns "Not Found" response + Given new "DeleteAPIKey" request + And request contains "api_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Delete an application key owned by current user returns "No Content" response + Given there is a valid "application_key" in the system + And new "DeleteCurrentUserApplicationKey" request + And request contains "app_key_id" parameter from "application_key.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/credentials-management + Scenario: Delete an application key owned by current user returns "Not Found" response + Given new "DeleteCurrentUserApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Delete an application key returns "No Content" response + Given there is a valid "application_key" in the system + And new "DeleteApplicationKey" request + And request contains "app_key_id" parameter from "application_key.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/credentials-management + Scenario: Delete an application key returns "Not Found" response + Given new "DeleteApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management + Scenario: Edit an API key returns "Bad Request" response + Given new "UpdateAPIKey" request + And request contains "api_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "API Key for submitting metrics"}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "api_keys"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Edit an API key returns "Not Found" response + Given new "UpdateAPIKey" request + And request contains "api_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "API Key for submitting metrics"}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "api_keys"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Edit an API key returns "OK" response + Given there is a valid "api_key" in the system + And new "UpdateAPIKey" request + And request contains "api_key_id" parameter from "api_key.data.id" + And body with value {"data": {"type": "api_keys", "id": "{{ api_key.data.id }}", "attributes": {"name": "{{ unique }}"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "api_keys" + And the response "data.id" is equal to "{{ api_key.data.id }}" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @generated @skip @team:DataDog/credentials-management + Scenario: Edit an application key owned by current user returns "Bad Request" response + Given new "UpdateCurrentUserApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Edit an application key owned by current user returns "Not Found" response + Given new "UpdateCurrentUserApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Edit an application key owned by current user returns "OK" response + Given there is a valid "application_key" in the system + And new "UpdateCurrentUserApplicationKey" request + And request contains "app_key_id" parameter from "application_key.data.id" + And body with value {"data": {"id": "{{ application_key.data.id }}", "type": "application_keys", "attributes": {"name" : "{{ application_key.data.attributes.name }}-updated"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "application_keys" + And the response "data.id" is equal to "{{ application_key.data.id }}" + And the response "data.attributes.name" is equal to "{{ application_key.data.attributes.name }}-updated" + + @generated @skip @team:DataDog/credentials-management + Scenario: Edit an application key returns "Bad Request" response + Given new "UpdateApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Edit an application key returns "Not Found" response + Given new "UpdateApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Edit an application key returns "OK" response + Given there is a valid "application_key" in the system + And new "UpdateApplicationKey" request + And request contains "app_key_id" parameter from "application_key.data.id" + And body with value {"data": {"id": "{{ application_key.data.id }}", "type": "application_keys", "attributes": {"name" : "{{ application_key.data.attributes.name }}-updated"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "application_keys" + And the response "data.id" is equal to "{{ application_key.data.id }}" + And the response "data.attributes.name" is equal to "{{ application_key.data.attributes.name }}-updated" + + @generated @skip @team:DataDog/credentials-management + Scenario: Get API key returns "Not Found" response + Given new "GetAPIKey" request + And request contains "api_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Get API key returns "OK" response + Given there is a valid "api_key" in the system + And new "GetAPIKey" request + And request contains "api_key_id" parameter from "api_key.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "api_keys" + And the response "data.id" is equal to "{{ api_key.data.id }}" + + @generated @skip @team:DataDog/credentials-management + Scenario: Get all API keys returns "Bad Request" response + Given new "ListAPIKeys" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/credentials-management + Scenario: Get all API keys returns "OK" response + Given there is a valid "api_key" in the system + And new "ListAPIKeys" request + And request contains "filter" parameter from "api_key.data.attributes.name" + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "api_keys" + + @generated @skip @team:DataDog/credentials-management + Scenario: Get all application keys owned by current user returns "Bad Request" response + Given new "ListCurrentUserApplicationKeys" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Get all application keys owned by current user returns "Not Found" response + Given new "ListCurrentUserApplicationKeys" request + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Get all application keys owned by current user returns "OK" response + Given new "ListCurrentUserApplicationKeys" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "application_keys" + + @generated @skip @team:DataDog/credentials-management + Scenario: Get all application keys returns "Bad Request" response + Given new "ListApplicationKeys" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Get all application keys returns "Not Found" response + Given new "ListApplicationKeys" request + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Get all application keys returns "OK" response + Given there is a valid "application_key" in the system + And new "ListApplicationKeys" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "application_keys" + + @generated @skip @team:DataDog/credentials-management + Scenario: Get an application key returns "Bad Request" response + Given new "GetApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Get an application key returns "Not Found" response + Given new "GetApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management + Scenario: Get an application key returns "OK" response + Given there is a valid "application_key" in the system + And new "GetApplicationKey" request + And request contains "app_key_id" parameter from "application_key.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "application_keys" + And the response "data.id" has the same value as "application_key.data.id" + + @generated @skip @team:DataDog/credentials-management + Scenario: Get one application key owned by current user returns "Not Found" response + Given new "GetCurrentUserApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management + Scenario: Get one application key owned by current user returns "OK" response + Given new "GetCurrentUserApplicationKey" request + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/logs_archives.feature b/tests/scenarios/features/v2/logs_archives.feature new file mode 100644 index 000000000..257a3fd11 --- /dev/null +++ b/tests/scenarios/features/v2/logs_archives.feature @@ -0,0 +1,192 @@ +@endpoint(logs-archives) @endpoint(logs-archives-v2) +Feature: Logs Archives + Archives forward all the logs ingested to a cloud storage system. See the + [Archives Page](https://app.datadoghq.com/logs/pipelines/archives) for a + list of the archives currently configured in web UI. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "LogsArchives" API + + @generated @skip @team:DataDog/logs-backend + Scenario: Create an archive returns "Bad Request" response + Given new "CreateLogsArchive" request + And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: Create an archive returns "OK" response + Given new "CreateLogsArchive" request + And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Delete an archive returns "Bad Request" response + Given new "DeleteLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: Delete an archive returns "Not found" response + Given new "DeleteLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/logs-backend + Scenario: Delete an archive returns "OK" response + Given new "DeleteLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Get all archives returns "OK" response + Given new "ListLogsArchives" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Get an archive returns "Bad Request" response + Given new "GetLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: Get an archive returns "Not found" response + Given new "GetLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/logs-backend + Scenario: Get an archive returns "OK" response + Given new "GetLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Get archive order returns "OK" response + Given new "GetLogsArchiveOrder" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Grant role to an archive returns "Bad Request" response + Given new "AddReadRoleToArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: Grant role to an archive returns "Not found" response + Given new "AddReadRoleToArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}} + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/logs-backend + Scenario: Grant role to an archive returns "OK" response + Given new "AddReadRoleToArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}} + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: List read roles for an archive returns "Bad Request" response + Given new "ListArchiveReadRoles" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: List read roles for an archive returns "Not found" response + Given new "ListArchiveReadRoles" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/logs-backend + Scenario: List read roles for an archive returns "OK" response + Given new "ListArchiveReadRoles" request + And request contains "archive_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Revoke role from an archive returns "Bad Request" response + Given new "RemoveRoleFromArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: Revoke role from an archive returns "Not found" response + Given new "RemoveRoleFromArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}} + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/logs-backend + Scenario: Revoke role from an archive returns "OK" response + Given new "RemoveRoleFromArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}} + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Update an archive returns "Bad Request" response + Given new "UpdateLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: Update an archive returns "Not found" response + Given new "UpdateLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/logs-backend + Scenario: Update an archive returns "OK" response + Given new "UpdateLogsArchive" request + And request contains "archive_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Update archive order returns "Bad Request" response + Given new "UpdateLogsArchiveOrder" request + And body with value {"data": {"attributes": {"archive_ids": ["a2zcMylnM4OCHpYusxIi1g", "a2zcMylnM4OCHpYusxIi2g", "a2zcMylnM4OCHpYusxIi3g"]}, "type": "archive_order"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-backend + Scenario: Update archive order returns "OK" response + Given new "UpdateLogsArchiveOrder" request + And body with value {"data": {"attributes": {"archive_ids": ["a2zcMylnM4OCHpYusxIi1g", "a2zcMylnM4OCHpYusxIi2g", "a2zcMylnM4OCHpYusxIi3g"]}, "type": "archive_order"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-backend + Scenario: Update archive order returns "Unprocessable Entity" response + Given new "UpdateLogsArchiveOrder" request + And body with value {"data": {"attributes": {"archive_ids": ["a2zcMylnM4OCHpYusxIi1g", "a2zcMylnM4OCHpYusxIi2g", "a2zcMylnM4OCHpYusxIi3g"]}, "type": "archive_order"}} + When the request is sent + Then the response status is 422 Unprocessable Entity diff --git a/tests/scenarios/features/v2/monitors.feature b/tests/scenarios/features/v2/monitors.feature new file mode 100644 index 000000000..7585d0663 --- /dev/null +++ b/tests/scenarios/features/v2/monitors.feature @@ -0,0 +1,115 @@ +@endpoint(monitors) @endpoint(monitors-v2) +Feature: Monitors + [Monitors](https://docs.datadoghq.com/monitors) allow you to watch a + metric or check that you care about and notifies your team when a defined + threshold has exceeded. For more information, see [Creating + Monitors](https://docs.datadoghq.com/monitors/create/types/) and [Tag + Policies](https://docs.datadoghq.com/monitors/settings/). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Monitors" API + + @skip-validation @team:DataDog/monitor-app + Scenario: Create a monitor configuration policy returns "Bad Request" response + Given new "CreateMonitorConfigPolicy" request + And body with value {"data": {"attributes": {"policy_type": "INVALID", "policy": {"tag_key": "datacenter", "tag_key_required": true, "valid_tag_values": ["prod", "staging"]}}, "type": "monitor-config-policy"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Create a monitor configuration policy returns "OK" response + Given new "CreateMonitorConfigPolicy" request + And body with value {"data": {"attributes": {"policy_type": "tag", "policy": {"tag_key": "{{ unique_lower_alnum }}", "tag_key_required": false, "valid_tag_values": ["prod", "staging"]}}, "type": "monitor-config-policy"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "monitor-config-policy" + And the response "data.attributes.policy_type" is equal to "tag" + And the response "data.attributes.policy.tag_key" is equal to "{{ unique_lower_alnum }}" + And the response "data.attributes.policy.valid_tag_values" is equal to ["prod", "staging"] + + @team:DataDog/monitor-app + Scenario: Delete a monitor configuration policy returns "Bad Request" response + Given new "DeleteMonitorConfigPolicy" request + And request contains "policy_id" parameter with value "INVALID_UUID" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/monitor-app + Scenario: Delete a monitor configuration policy returns "Not Found" response + Given new "DeleteMonitorConfigPolicy" request + And request contains "policy_id" parameter with value "00000000-0000-1234-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/monitor-app + Scenario: Delete a monitor configuration policy returns "OK" response + Given there is a valid "monitor_configuration_policy" in the system + And new "DeleteMonitorConfigPolicy" request + And request contains "policy_id" parameter from "monitor_configuration_policy.data.id" + When the request is sent + Then the response status is 204 OK + + @team:DataDog/monitor-app + Scenario: Edit a monitor configuration policy returns "Not Found" response + Given new "UpdateMonitorConfigPolicy" request + And request contains "policy_id" parameter with value "00000000-0000-1234-0000-000000000000" + And body with value {"data": {"attributes": {"policy": {"tag_key": "datacenter", "tag_key_required": false, "valid_tag_values": ["prod", "staging"]}, "policy_type": "tag"}, "id": "00000000-0000-1234-0000-000000000000", "type": "monitor-config-policy"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/monitor-app + Scenario: Edit a monitor configuration policy returns "OK" response + Given there is a valid "monitor_configuration_policy" in the system + And new "UpdateMonitorConfigPolicy" request + And request contains "policy_id" parameter from "monitor_configuration_policy.data.id" + And body with value {"data": {"attributes": {"policy": {"tag_key": "{{ unique_lower_alnum }}", "tag_key_required": false, "valid_tag_values": ["prod", "staging"]}, "policy_type": "tag"}, "id": "{{ monitor_configuration_policy.data.id }}", "type": "monitor-config-policy"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "monitor-config-policy" + And the response "data.id" is equal to "{{ monitor_configuration_policy.data.id }}" + And the response "data.attributes.policy_type" is equal to "tag" + And the response "data.attributes.policy.tag_key" is equal to "{{ unique_lower_alnum }}" + And the response "data.attributes.policy.valid_tag_values" is equal to ["prod", "staging"] + + @team:DataDog/monitor-app + Scenario: Edit a monitor configuration policy returns "Unprocessable Entity" response + Given there is a valid "monitor_configuration_policy" in the system + And new "UpdateMonitorConfigPolicy" request + And request contains "policy_id" parameter from "monitor_configuration_policy.data.id" + And body with value {"data": {"attributes": {"policy": {"tag_key": "{{ unique_lower_alnum }}", "tag_key_required": false, "valid_tag_values": ["prod", "staging"]}, "policy_type": "tag"}, "id": "00000000-0000-1234-0000-000000000000", "type": "monitor-config-policy"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @team:DataDog/monitor-app + Scenario: Get a monitor configuration policy returns "Not Found" response + Given new "GetMonitorConfigPolicy" request + And request contains "policy_id" parameter with value "12340000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/monitor-app + Scenario: Get a monitor configuration policy returns "OK" response + Given there is a valid "monitor_configuration_policy" in the system + And new "GetMonitorConfigPolicy" request + And request contains "policy_id" parameter from "monitor_configuration_policy.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "monitor-config-policy" + And the response "data.id" is equal to "{{ monitor_configuration_policy.data.id }}" + And the response "data.attributes.policy_type" is equal to "tag" + And the response "data.attributes.policy.tag_key" is equal to "{{ unique_lower_alnum }}" + And the response "data.attributes.policy.valid_tag_values" is equal to ["prod", "staging"] + + @team:DataDog/monitor-app + Scenario: Get all monitor configuration policies returns "OK" response + Given there is a valid "monitor_configuration_policy" in the system + And new "ListMonitorConfigPolicies" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "type" with value "monitor-config-policy" + And the response "data" has item with field "id" with value "{{ monitor_configuration_policy.data.id }}" + And the response "data" has item with field "attributes.policy_type" with value "tag" + And the response "data" has item with field "attributes.policy.tag_key" with value "{{ unique_lower_alnum }}" + And the response "data" has item with field "attributes.policy.valid_tag_values" with value ["prod", "staging"] diff --git a/tests/scenarios/features/v2/okta_integration.feature b/tests/scenarios/features/v2/okta_integration.feature new file mode 100644 index 000000000..a623c27e5 --- /dev/null +++ b/tests/scenarios/features/v2/okta_integration.feature @@ -0,0 +1,117 @@ +@endpoint(okta-integration) @endpoint(okta-integration-v2) +Feature: Okta Integration + Configure your Datadog Okta integration directly through the Datadog API. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "OktaIntegration" API + + @generated @skip @team:Datadog/web-integrations + Scenario: Add Okta account returns "Bad Request" response + Given new "CreateOktaAccount" request + And body with value {"data": {"attributes": {"auth_method": "oauth", "domain": "https://example.okta.com/", "name": "Okta-Prod"}, "id": "f749daaf-682e-4208-a38d-c9b43162c609", "type": "okta-accounts"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Add Okta account returns "Not Found" response + Given new "CreateOktaAccount" request + And body with value {"data": {"attributes": {"auth_method": "oauth", "domain": "https://example.okta.com/", "name": "Okta-Prod"}, "id": "f749daaf-682e-4208-a38d-c9b43162c609", "type": "okta-accounts"}} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: Add Okta account returns "OK" response + Given new "CreateOktaAccount" request + And body with value {"data": {"attributes": {"auth_method": "oauth", "domain": "https://example.okta.com/", "name": "Okta_Prod", "client_id": "client_id", "client_secret":"client_secret"},"id": "f749daaf-682e-4208-a38d-c9b43162c609", "type": "okta-accounts"}} + When the request is sent + Then the response status is 201 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Okta account returns "Bad Request" response + Given new "DeleteOktaAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Okta account returns "Not Found" response + Given new "DeleteOktaAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/web-integrations + Scenario: Delete Okta account returns "OK" response + Given new "DeleteOktaAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Get Okta account returns "Bad Request" response + Given new "GetOktaAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Get Okta account returns "Not Found" response + Given new "GetOktaAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: Get Okta account returns "OK" response + Given there is a valid "okta_account" in the system + And new "GetOktaAccount" request + And request contains "account_id" parameter from "okta_account.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "okta-accounts" + + @generated @skip @team:Datadog/web-integrations + Scenario: List Okta accounts returns "Bad Request" response + Given new "ListOktaAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: List Okta accounts returns "Not Found" response + Given new "ListOktaAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: List Okta accounts returns "OK" response + Given there is a valid "okta_account" in the system + And new "ListOktaAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/web-integrations + Scenario: Update Okta account returns "Bad Request" response + Given new "UpdateOktaAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/web-integrations + Scenario: Update Okta account returns "Not Found" response + Given new "UpdateOktaAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/web-integrations + Scenario: Update Okta account returns "OK" response + Given there is a valid "okta_account" in the system + And new "UpdateOktaAccount" request + And request contains "account_id" parameter from "okta_account.data.id" + And body with value {"data": {"attributes": {"auth_method": "oauth", "domain": "https://example.okta.com/", "client_id": "client_id", "client_secret":"client_secret"}, "type": "okta-accounts"}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/powerpack.feature b/tests/scenarios/features/v2/powerpack.feature new file mode 100644 index 000000000..b6d4b7701 --- /dev/null +++ b/tests/scenarios/features/v2/powerpack.feature @@ -0,0 +1,159 @@ +@endpoint(powerpack) @endpoint(powerpack-v2) +Feature: Powerpack + The powerpack endpoints allow you to: - Get a powerpack - Create a + powerpack - Delete a powerpack - Get a list of all powerpacks The Patch + and Delete API methods can only be performed on a powerpack by a user who + has the powerpack create permission for that specific powerpack. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Powerpack" API + + @team:DataDog/dashboards-backend + Scenario: Create a new powerpack returns "Bad Request" response + Given new "CreatePowerpack" request + And body with value {"data": {"attributes": {"description": "Powerpack for ABC", "group_widget": {"definition": {"type": "group1", "layout_type": "ordered", "widgets": []}}, "name": "Sample Powerpack", "tags": ["tag:foo1"], "template_variables": [{"defaults": ["*"], "name": "test"}]}, "type": "powerpack"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Create a new powerpack returns "OK" response + Given new "CreatePowerpack" request + And body from file "powerpack_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "powerpack" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.description" is equal to "Sample powerpack" + And the response "data.attributes.template_variables[0].name" is equal to "sample" + And the response "data.attributes.template_variables[0].defaults[0]" is equal to "*" + And the response "data.attributes.group_widget.layout.width" is equal to 12 + And the response "data.attributes.group_widget.layout.height" is equal to 3 + And the response "data.attributes.group_widget.layout.x" is equal to 0 + And the response "data.attributes.group_widget.layout.y" is equal to 0 + And the response "data.attributes.group_widget.definition.type" is equal to "group" + And the response "data.attributes.group_widget.definition.layout_type" is equal to "ordered" + And the response "data.attributes.group_widget.definition.show_title" is equal to true + And the response "data.attributes.group_widget.definition.title" is equal to "Sample Powerpack" + And the response "data.attributes.group_widget.definition.widgets[0].definition.type" is equal to "note" + + @team:DataDog/dashboards-backend + Scenario: Delete a powerpack returns "OK" response + Given there is a valid "powerpack" in the system + And new "DeletePowerpack" request + And request contains "powerpack_id" parameter from "powerpack.data.id" + When the request is sent + Then the response status is 204 OK + + @team:DataDog/dashboards-backend + Scenario: Delete a powerpack returns "Powerpack Not Found" response + Given new "DeletePowerpack" request + And request contains "powerpack_id" parameter with value "made-up-id" + When the request is sent + Then the response status is 404 Powerpack Not Found + + @team:DataDog/dashboards-backend + Scenario: Get a Powerpack returns "OK" response + Given there is a valid "powerpack" in the system + And new "GetPowerpack" request + And request contains "powerpack_id" parameter from "powerpack.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "powerpack" + And the response "data.id" has the same value as "powerpack.data.id" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.description" is equal to "Sample powerpack" + And the response "data.attributes.template_variables[0].name" is equal to "sample" + And the response "data.attributes.template_variables[0].defaults[0]" is equal to "*" + And the response "data.attributes.group_widget.layout.width" is equal to 12 + And the response "data.attributes.group_widget.layout.height" is equal to 3 + And the response "data.attributes.group_widget.layout.x" is equal to 0 + And the response "data.attributes.group_widget.layout.y" is equal to 0 + And the response "data.attributes.group_widget.definition.type" is equal to "group" + And the response "data.attributes.group_widget.definition.layout_type" is equal to "ordered" + And the response "data.attributes.group_widget.definition.show_title" is equal to true + And the response "data.attributes.group_widget.definition.title" is equal to "Sample Powerpack" + And the response "data.attributes.group_widget.definition.widgets[0].definition.type" is equal to "note" + And the response "data.attributes.group_widget.definition.widgets[0].definition.content" is equal to "test" + + @team:DataDog/dashboards-backend + Scenario: Get a Powerpack returns "Powerpack Not Found." response + Given new "GetPowerpack" request + And request contains "powerpack_id" parameter with value "made-up-id" + When the request is sent + Then the response status is 404 Powerpack Not Found. + + @team:DataDog/dashboards-backend + Scenario: Get all powerpacks returns "OK" response + Given there is a valid "powerpack" in the system + And new "ListPowerpacks" request + And request contains "page[limit]" parameter with value 1000 + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "type" with value "powerpack" + And the response "data" has item with field "id" with value "{{ powerpack.data.id }}" + And the response "data" has item with field "attributes.name" with value "{{ unique }}" + And the response "data" has item with field "attributes.description" with value "Sample powerpack" + And the response "data" has item with field "attributes.template_variables[0].name" with value "sample" + And the response "data" has item with field "attributes.template_variables[0].defaults[0]" with value "*" + And the response "data" has item with field "attributes.group_widget.layout.width" with value 12 + And the response "data" has item with field "attributes.group_widget.layout.height" with value 3 + And the response "data" has item with field "attributes.group_widget.layout.x" with value 0 + And the response "data" has item with field "attributes.group_widget.layout.y" with value 0 + And the response "data" has item with field "attributes.group_widget.definition.type" with value "group" + And the response "data" has item with field "attributes.group_widget.definition.layout_type" with value "ordered" + And the response "data" has item with field "attributes.group_widget.definition.show_title" with value true + And the response "data" has item with field "attributes.group_widget.definition.title" with value "Sample Powerpack" + And the response "data" has item with field "attributes.group_widget.definition.widgets[0].definition.type" with value "note" + And the response "data" has item with field "attributes.group_widget.definition.widgets[0].definition.content" with value "test" + + @replay-only @skip-validation @team:DataDog/dashboards-backend @with-pagination + Scenario: Get all powerpacks returns "OK" response with pagination + Given new "ListPowerpacks" request + And request contains "page[limit]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @team:DataDog/dashboards-backend + Scenario: Update a powerpack returns "Bad Request" response + Given there is a valid "powerpack" in the system + And new "UpdatePowerpack" request + And request contains "powerpack_id" parameter from "powerpack.data.id" + And body with value {"data":{"type": "powerpack","attributes": {"name": "Sample Powerpack","description": "Sample powerpack","group_widget": {"definition": {"type": "group1", "layout_type": "ordered", "widgets": []}},"template_variables": [{"name": "sample", "defaults": ["*"]}],"tags": ["tag:sample"]}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/dashboards-backend + Scenario: Update a powerpack returns "OK" response + Given there is a valid "powerpack" in the system + And new "UpdatePowerpack" request + And request contains "powerpack_id" parameter from "powerpack.data.id" + And body from file "powerpack_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "powerpack" + And the response "data.id" has the same value as "powerpack.data.id" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.description" is equal to "Sample powerpack" + And the response "data.attributes.template_variables[0].name" is equal to "sample" + And the response "data.attributes.template_variables[0].defaults[0]" is equal to "*" + And the response "data.attributes.group_widget.layout.width" is equal to 12 + And the response "data.attributes.group_widget.layout.height" is equal to 3 + And the response "data.attributes.group_widget.layout.x" is equal to 0 + And the response "data.attributes.group_widget.layout.y" is equal to 0 + And the response "data.attributes.group_widget.definition.type" is equal to "group" + And the response "data.attributes.group_widget.definition.layout_type" is equal to "ordered" + And the response "data.attributes.group_widget.definition.show_title" is equal to true + And the response "data.attributes.group_widget.definition.title" is equal to "Sample Powerpack" + And the response "data.attributes.group_widget.definition.widgets[0].definition.type" is equal to "note" + And the response "data.attributes.group_widget.definition.widgets[0].definition.content" is equal to "test" + + @team:DataDog/dashboards-backend + Scenario: Update a powerpack returns "Powerpack Not Found" response + Given new "UpdatePowerpack" request + And request contains "powerpack_id" parameter with value "made-up-id" + And body from file "powerpack_payload.json" + When the request is sent + Then the response status is 404 Powerpack Not Found diff --git a/tests/scenarios/features/v2/powerpack_payload.json b/tests/scenarios/features/v2/powerpack_payload.json new file mode 100644 index 000000000..741678957 --- /dev/null +++ b/tests/scenarios/features/v2/powerpack_payload.json @@ -0,0 +1,43 @@ +{ + "data": { + "attributes": { + "description": "Sample powerpack", + "group_widget": { + "definition": { + "layout_type": "ordered", + "show_title": true, + "title": "Sample Powerpack", + "type": "group", + "widgets": [ + { + "definition": { + "content": "test", + "type": "note" + } + } + ] + }, + "layout": { + "height": 3, + "width": 12, + "x": 0, + "y": 0 + }, + "live_span": "1h" + }, + "name": "{{ unique }}", + "tags": [ + "tag:sample" + ], + "template_variables": [ + { + "defaults": [ + "*" + ], + "name": "sample" + } + ] + }, + "type": "powerpack" + } +} \ No newline at end of file diff --git a/tests/scenarios/features/v2/rum.feature b/tests/scenarios/features/v2/rum.feature new file mode 100644 index 000000000..c008a272f --- /dev/null +++ b/tests/scenarios/features/v2/rum.feature @@ -0,0 +1,168 @@ +@endpoint(rum) @endpoint(rum-v2) +Feature: RUM + Search or aggregate your RUM events over HTTP. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUM" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Aggregate RUM events returns "Bad Request" response + Given new "AggregateRUMEvents" request + And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.time_spent", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/rum-backend + Scenario: Aggregate RUM events returns "OK" response + Given new "AggregateRUMEvents" request + And body with value {"compute": [{"aggregation": "pc90", "metric": "@view.time_spent", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:view AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.time_spent", "limit": 10, "total": false}], "options": {"timezone": "GMT"}, "page": { "limit": 25}} + When the request is sent + Then the response status is 200 OK + And the response "meta.status" is equal to "done" + And the response "data.buckets" has length 0 + + @skip @team:DataDog/rum-backend + Scenario: Create a new RUM application returns "Bad Request" response + Given new "CreateRUMApplication" request + And body with value {"data": {"attributes": {"name": "wrong_rum_application", "type": "wrong_android"}, "type": "wrong_rum_application_type"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/rum-backend + Scenario: Create a new RUM application returns "OK" response + Given new "CreateRUMApplication" request + And body with value {"data": {"attributes": {"name": "test-rum-{{ unique_hash }}", "type": "ios"}, "type": "rum_application_create"}} + When the request is sent + Then the response status is 200 RUM application. + And the response "data.type" is equal to "rum_application" + And the response "data.attributes.type" is equal to "ios" + And the response "data.attributes.name" is equal to "test-rum-{{ unique_hash }}" + + @team:DataDog/rum-backend + Scenario: Delete a RUM application returns "No Content" response + Given there is a valid "rum_application" in the system + And new "DeleteRUMApplication" request + And request contains "id" parameter from "rum_application.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/rum-backend + Scenario: Delete a RUM application returns "Not Found" response + Given new "DeleteRUMApplication" request + And request contains "id" parameter with value "abcde-12345" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/rum-backend + Scenario: Get a RUM application returns "Not Found" response + Given new "GetRUMApplication" request + And request contains "id" parameter with value "abcd1234-0000-0000-abcd-1234abcd5678" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/rum-backend + Scenario: Get a RUM application returns "OK" response + Given there is a valid "rum_application" in the system + And new "GetRUMApplication" request + And request contains "id" parameter from "rum_application.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "rum_application" + And the response "data.attributes.type" is equal to "browser" + And the response "data.attributes.name" is equal to "test_name_create" + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a list of RUM events returns "Bad Request" response + Given new "ListRUMEvents" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/rum-backend + Scenario: Get a list of RUM events returns "OK" response + Given new "ListRUMEvents" request + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:DataDog/rum-backend @with-pagination + Scenario: Get a list of RUM events returns "OK" response with pagination + Given new "ListRUMEvents" request + And request contains "page[limit]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @generated @skip @team:DataDog/rum-backend + Scenario: List all the RUM applications returns "Not Found" response + Given new "GetRUMApplications" request + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/rum-backend + Scenario: List all the RUM applications returns "OK" response + Given there is a valid "rum_application" in the system + And new "GetRUMApplications" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "attributes.application_id" with value "{{ rum_application.data.id }}" + + @generated @skip @team:DataDog/rum-backend + Scenario: Search RUM events returns "Bad Request" response + Given new "SearchRUMEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/rum-backend + Scenario: Search RUM events returns "OK" response + Given new "SearchRUMEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "options": {"time_offset": 0, "timezone": "GMT"}, "page": {"limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:DataDog/rum-backend @with-pagination + Scenario: Search RUM events returns "OK" response with pagination + Given new "SearchRUMEvents" request + And body with value {"filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "options": {"time_offset": 0, "timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"} + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM application returns "Bad Request" response + Given new "UpdateRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM application returns "Not Found" response + Given new "UpdateRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/rum-backend + Scenario: Update a RUM application returns "OK" response + Given there is a valid "rum_application" in the system + And new "UpdateRUMApplication" request + And request contains "id" parameter from "rum_application.data.id" + And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "{{ rum_application.data.id }}","type": "rum_application_update"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "rum_application" + And the response "data.attributes.application_id" is equal to "{{ rum_application.data.id }}" + And the response "data.attributes.type" is equal to "browser" + And the response "data.attributes.name" is equal to "updated_name_for_my_existing_rum_application" + + @team:DataDog/rum-backend + Scenario: Update a RUM application returns "Unprocessable Entity." response + Given there is a valid "rum_application" in the system + And new "UpdateRUMApplication" request + And request contains "id" parameter from "rum_application.data.id" + And body with value {"data": {"id": "this_id_will_not_match", "type": "rum_application_update"}} + When the request is sent + Then the response status is 422 Unprocessable Entity. diff --git a/tests/scenarios/features/v2/security_monitoring.feature b/tests/scenarios/features/v2/security_monitoring.feature index fdde409bc..2ed8263d9 100644 --- a/tests/scenarios/features/v2/security_monitoring.feature +++ b/tests/scenarios/features/v2/security_monitoring.feature @@ -83,6 +83,17 @@ Feature: Security Monitoring And the response "type" is equal to "log_detection" And the response "message" is equal to "Test rule" + @team:DataDog/k9-cloud-security-platform + Scenario: Create a detection rule with detection method 'third_party' returns "OK" response + Given new "CreateSecurityMonitoringRule" request + And body with value {"name":"{{ unique }}","type":"log_detection","isEnabled":true,"thirdPartyCases":[{"query":"status:error","name":"high","status":"high"},{"query":"status:info","name":"low","status":"low"}],"queries":[],"cases":[],"message":"This is a third party rule","options":{"detectionMethod":"third_party","keepAlive":0,"maxSignalDuration":0,"thirdPartyRuleOptions":{"defaultStatus":"info","rootQueries":[{"query":"source:guardduty @details.alertType:*EC2*", "groupByFields":["instance-id"]},{"query":"source:guardduty", "groupByFields":[]}]}}} + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "{{ unique }}" + And the response "type" is equal to "log_detection" + And the response "options.detectionMethod" is equal to "third_party" + And the response "thirdPartyCases[0].query" is equal to "status:error" + @skip-validation @team:DataDog/k9-cloud-security-platform Scenario: Create a detection rule with type 'impossible_travel' returns "OK" response Given new "CreateSecurityMonitoringRule" request @@ -413,7 +424,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found: The requested finding cannot be found. - @team:DataDog/cloud-security-posture-management + @replay-only @team:DataDog/cloud-security-posture-management Scenario: Mute or unmute a batch of findings returns "OK" response Given operation "MuteFindings" enabled And new "MuteFindings" request diff --git a/tests/scenarios/features/v2/sensitive_data_scanner.feature b/tests/scenarios/features/v2/sensitive_data_scanner.feature new file mode 100644 index 000000000..8513e27ce --- /dev/null +++ b/tests/scenarios/features/v2/sensitive_data_scanner.feature @@ -0,0 +1,201 @@ +@endpoint(sensitive-data-scanner) @endpoint(sensitive-data-scanner-v2) @endpoint(sensitivedatascanner) @endpoint(sensitivedatascanner-v2) +Feature: Sensitive Data Scanner + Create, update, delete, and retrieve sensitive data scanner groups and + rules. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "SensitiveDataScanner" API + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Create Scanning Group returns "Bad Request" response + Given new "CreateScanningGroup" request + And body with value {"data": {"attributes": {"filter": {}, "product_list": ["logs"]}, "relationships": {"configuration": {"data": {"type": "sensitive_data_scanner_configuration"}}, "rules": {"data": [{"type": "sensitive_data_scanner_rule"}]}}, "type": "sensitive_data_scanner_group"}, "meta": {"version": 0}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Create Scanning Group returns "OK" response + Given a valid "configuration" in the system + And new "CreateScanningGroup" request + And body with value {"meta":{},"data":{"type":"sensitive_data_scanner_group","attributes":{"name":"{{ unique }}","is_enabled":false,"product_list":["logs"],"filter":{"query":"*"}},"relationships":{"configuration":{"data":{"type":"sensitive_data_scanner_configuration","id":"{{ configuration.data.id }}"}},"rules":{"data":[]}}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "sensitive_data_scanner_group" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Create Scanning Rule returns "Bad Request" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And new "CreateScanningRule" request + And body with value {"meta":{},"data":{"type":"sensitive_data_scanner_rule","attributes":{"pattern":"pattern","text_replacement":{"type":"none"},"tags":["sensitive_data:true"],"is_enabled":true},"relationships":{"group":{"data":{"type":"{{ group.data.type }}","id":"{{ group.data.id }}"}}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Create Scanning Rule returns "OK" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And new "CreateScanningRule" request + And body with value {"meta":{},"data":{"type":"sensitive_data_scanner_rule","attributes":{"name":"{{ unique }}","pattern":"pattern", "namespaces": ["admin"], "excluded_namespaces": ["admin.name"], "text_replacement":{"type":"none"},"tags":["sensitive_data:true"],"is_enabled":true,"priority":1},"relationships":{"group":{"data":{"type":"{{ group.data.type }}","id":"{{ group.data.id }}"}}}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "sensitive_data_scanner_rule" + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.pattern" is equal to "pattern" + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Delete Scanning Group returns "Bad Request" response + Given new "DeleteScanningGroup" request + And request contains "group_id" parameter from "REPLACE.ME" + And body with value {"meta": {"version": 0}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Delete Scanning Group returns "Not Found" response + Given new "DeleteScanningGroup" request + And request contains "group_id" parameter from "REPLACE.ME" + And body with value {"meta": {"version": 0}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Delete Scanning Group returns "OK" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And new "DeleteScanningGroup" request + And request contains "group_id" parameter from "group.data.id" + And body with value {"meta": {}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Delete Scanning Rule returns "Bad Request" response + Given new "DeleteScanningRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"meta": {"version": 0}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Delete Scanning Rule returns "Not Found" response + Given new "DeleteScanningRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"meta": {"version": 0}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Delete Scanning Rule returns "OK" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And the "scanning_group" has a "scanning_rule" + And new "DeleteScanningRule" request + And request contains "rule_id" parameter from "rule.data.id" + And body with value {"meta": {}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: List Scanning Groups returns "Bad Request" response + Given new "ListScanningGroups" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: List Scanning Groups returns "OK" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And new "ListScanningGroups" request + When the request is sent + Then the response status is 200 OK + And the response "included" has item with field "id" with value "{{ group.data.id }}" + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: List standard patterns returns "Bad Request" response + Given new "ListStandardPatterns" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: List standard patterns returns "OK" response + Given new "ListStandardPatterns" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Reorder Groups returns "Bad Request" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And new "ReorderScanningGroups" request + And body with value {"data": {"relationships": {"groups": {"data": [{"type": "sensitive_data_scanner_group", "id": "{{ unique }}"}]}}, "type": "sensitive_data_scanner_configuration", "id": "{{ configuration.data.id }}"}, "meta": {}} + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Reorder Groups returns "OK" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And new "ReorderScanningGroups" request + And body with value {"data": {"relationships": {"groups": {"data": [{"type": "sensitive_data_scanner_group", "id": "{{ group.data.id }}"}]}}, "type": "sensitive_data_scanner_configuration", "id": "{{ configuration.data.id }}"}, "meta": {}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Update Scanning Group returns "Bad Request" response + Given new "UpdateScanningGroup" request + And request contains "group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": {}, "product_list": ["logs"]}, "relationships": {"configuration": {"data": {"type": "sensitive_data_scanner_configuration"}}, "rules": {"data": [{"type": "sensitive_data_scanner_rule"}]}}, "type": "sensitive_data_scanner_group"}, "meta": {"version": 0}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Update Scanning Group returns "Not Found" response + Given new "UpdateScanningGroup" request + And request contains "group_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"filter": {}, "product_list": ["logs"]}, "relationships": {"configuration": {"data": {"type": "sensitive_data_scanner_configuration"}}, "rules": {"data": [{"type": "sensitive_data_scanner_rule"}]}}, "type": "sensitive_data_scanner_group"}, "meta": {"version": 0}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Update Scanning Group returns "OK" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And new "UpdateScanningGroup" request + And request contains "group_id" parameter from "group.data.id" + And body with value {"meta": {},"data":{"id": "{{ group.data.id }}", "type":"sensitive_data_scanner_group","attributes":{"name":"{{ unique }}","is_enabled":false,"product_list":["logs"],"filter":{"query":"*"}},"relationships":{"configuration":{"data":{"type":"sensitive_data_scanner_configuration","id":"{{ configuration.data.id }}"}},"rules":{"data":[]}}}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Update Scanning Rule returns "Bad Request" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And the "scanning_group" has a "scanning_rule" + And new "UpdateScanningRule" request + And request contains "rule_id" parameter from "rule.data.id" + And body with value {"meta":{},"data":{"type":"sensitive_data_scanner_rule","attributes":{"name":"{{ unique }}","pattern":"pattern","text_replacement":{"type":"none"},"tags":["sensitive_data:true"],"is_enabled":true},"relationships":{"group":{"data":{"type":"{{ group.data.type }}","id":"{{ group.data.id }}"}}}}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Update Scanning Rule returns "Not Found" response + Given new "UpdateScanningRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"excluded_namespaces": ["admin.name"], "namespaces": ["admin"], "tags": [], "text_replacement": {"type": "none"}}, "relationships": {"group": {"data": {"type": "sensitive_data_scanner_group"}}, "standard_pattern": {"data": {"type": "sensitive_data_scanner_standard_pattern"}}}, "type": "sensitive_data_scanner_rule"}, "meta": {"version": 0}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/logs-app @team:DataDog/logs-core + Scenario: Update Scanning Rule returns "OK" response + Given a valid "configuration" in the system + And there is a valid "scanning_group" in the system + And the "scanning_group" has a "scanning_rule" + And new "UpdateScanningRule" request + And request contains "rule_id" parameter from "rule.data.id" + And body with value {"meta":{},"data":{"id": "{{ rule.data.id }}", "type":"sensitive_data_scanner_rule","attributes":{"name":"{{ unique }}","pattern":"pattern","text_replacement":{"type":"none"},"tags":["sensitive_data:true"],"is_enabled":true,"priority":5},"relationships":{"group":{"data":{"type":"{{ group.data.type }}","id":"{{ group.data.id }}"}}}}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/service_accounts.feature b/tests/scenarios/features/v2/service_accounts.feature new file mode 100644 index 000000000..c41493e18 --- /dev/null +++ b/tests/scenarios/features/v2/service_accounts.feature @@ -0,0 +1,153 @@ +@endpoint(service-accounts) @endpoint(service-accounts-v2) +Feature: Service Accounts + Create, edit, and disable service accounts. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ServiceAccounts" API + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Create a service account returns "Bad Request" response + Given new "CreateServiceAccount" request + And body with value {"data": {"attributes": {"email": "jane.doe@example.com", "service_account": true}, "relationships": {"roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "users"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Create a service account returns "OK" response + Given there is a valid "role" in the system + And new "CreateServiceAccount" request + And body with value {"data": {"type": "users", "attributes": {"name": "Test API Client", "email": "{{ unique }}@datadoghq.com", "service_account": true}, "relationships": {"roles": {"data": [{"id": "{{ role.data.id }}", "type": "roles"}]}}}} + When the request is sent + Then the response status is 201 OK + And the response "data.attributes.email" is equal to "{{ unique_lower }}@datadoghq.com" + And the response "data.attributes.name" is equal to "Test API Client" + And the response "data.attributes.disabled" is false + And the response "data.attributes.service_account" is equal to true + And the response "data.relationships.roles.data[0].id" is equal to "{{ role.data.id }}" + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Create an application key for this service account returns "Bad Request" response + Given new "CreateServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "type": "application_keys"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Create an application key for this service account returns "Created" response + Given there is a valid "service_account_user" in the system + And new "CreateServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "service_account_user.data.id" + And body with value {"data": {"attributes": {"name": "{{ unique }}"}, "type": "application_keys"}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.relationships.owned_by.data.id" has the same value as "service_account_user.data.id" + + @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Create an application key with scopes for this service account returns "Created" response + Given there is a valid "service_account_user" in the system + And new "CreateServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "service_account_user.data.id" + And body with value {"data": {"attributes": {"name": "{{ unique }}", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "type": "application_keys"}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.name" is equal to "{{ unique }}" + And the response "data.attributes.scopes" is equal to ["dashboards_read", "dashboards_write", "dashboards_public_share"] + And the response "data.relationships.owned_by.data.id" has the same value as "service_account_user.data.id" + + @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Delete an application key for this service account returns "No Content" response + Given there is a valid "service_account_user" in the system + And there is a valid "service_account_application_key" for "service_account_user" + And new "DeleteServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "service_account_user.data.id" + And request contains "app_key_id" parameter from "service_account_application_key.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Delete an application key for this service account returns "Not Found" response + Given new "DeleteServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "REPLACE.ME" + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Edit an application key for this service account returns "Bad Request" response + Given new "UpdateServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "REPLACE.ME" + And request contains "app_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Edit an application key for this service account returns "Not Found" response + Given new "UpdateServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "REPLACE.ME" + And request contains "app_key_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Edit an application key for this service account returns "OK" response + Given there is a valid "service_account_user" in the system + And there is a valid "service_account_application_key" for "service_account_user" + And new "UpdateServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "service_account_user.data.id" + And request contains "app_key_id" parameter from "service_account_application_key.data.id" + And body with value {"data": {"id": "{{ service_account_application_key.data.id }}", "type": "application_keys", "attributes": {"name" : "{{ service_account_application_key.data.attributes.name }}-updated"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{ service_account_application_key.data.attributes.name }}-updated" + And the response "data.type" is equal to "application_keys" + And the response "data.id" is equal to "{{ service_account_application_key.data.id }}" + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Get one application key for this service account returns "Not Found" response + Given new "GetServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "REPLACE.ME" + And request contains "app_key_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: Get one application key for this service account returns "OK" response + Given there is a valid "service_account_user" in the system + And there is a valid "service_account_application_key" for "service_account_user" + And new "GetServiceAccountApplicationKey" request + And request contains "service_account_id" parameter from "service_account_user.data.id" + And request contains "app_key_id" parameter from "service_account_application_key.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" has the same value as "service_account_application_key.data.attributes.name" + And the response "data.type" is equal to "application_keys" + And the response "data.id" is equal to "{{ service_account_application_key.data.id }}" + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: List application keys for this service account returns "Bad Request" response + Given new "ListServiceAccountApplicationKeys" request + And request contains "service_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: List application keys for this service account returns "Not Found" response + Given new "ListServiceAccountApplicationKeys" request + And request contains "service_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/credentials-management @team:DataDog/team-aaa-identity + Scenario: List application keys for this service account returns "OK" response + Given there is a valid "service_account_user" in the system + And new "ListServiceAccountApplicationKeys" request + And request contains "service_account_id" parameter from "service_account_user.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 diff --git a/tests/scenarios/features/v2/service_definition.feature b/tests/scenarios/features/v2/service_definition.feature new file mode 100644 index 000000000..b7de3667d --- /dev/null +++ b/tests/scenarios/features/v2/service_definition.feature @@ -0,0 +1,128 @@ +@endpoint(service-definition) @endpoint(service-definition-v2) +Feature: Service Definition + API to create, update, retrieve and delete service definitions. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ServiceDefinition" API + + @generated @skip @team:DataDog/service-catalog + Scenario: Create or update service definition returns "Bad Request" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"application": "my-app", "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/service-catalog + Scenario: Create or update service definition returns "CREATED" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"application": "my-app", "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} + When the request is sent + Then the response status is 200 CREATED + + @generated @skip @team:DataDog/service-catalog + Scenario: Create or update service definition returns "Conflict" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"application": "my-app", "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/service-catalog + Scenario: Create or update service definition using schema v2 returns "CREATED" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"contacts": [{"contact": "contact@datadoghq.com", "name": "Team Email", "type": "email"}], "dd-service": "service-{{ unique_lower_alnum }}", "dd-team": "my-team", "docs": [{"name": "Architecture", "provider": "google drive", "url": "https://gdrive/mydoc"}], "extensions": {"myorgextension": "extensionvalue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": "https://my-org.pagerduty.com/service-directory/PMyService"}, "links": [{"name": "Runbook", "type": "runbook", "url": "https://my-runbook"}], "repos": [{"name": "Source Code", "provider": "GitHub", "url": "https://github.com/DataDog/schema"}], "schema-version": "v2", "tags": ["my:tag", "service:tag"], "team": "my-team"} + When the request is sent + Then the response status is 200 CREATED + And the response "data[0].attributes.meta.ingested-schema-version" is equal to "v2" + And the response "data[0].attributes.schema.dd-service" is equal to "service-{{ unique_lower_alnum }}" + + @team:DataDog/service-catalog + Scenario: Create or update service definition using schema v2-1 returns "CREATED" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"contacts":[{"contact":"contact@datadoghq.com","name":"Team Email","type":"email"}],"dd-service":"service-{{ unique_lower_alnum }}","extensions":{"myorgextension":"extensionvalue"},"integrations":{"opsgenie":{"region":"US","service-url":"https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"},"pagerduty":{"service-url":"https://my-org.pagerduty.com/service-directory/PMyService"}},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"},{"name":"Source Code","type":"repo","provider":"GitHub","url":"https://github.com/DataDog/schema"},{"name":"Architecture","type":"doc","provider":"Gigoogle drivetHub","url":"https://my-runbook"}],"schema-version":"v2.1","tags":["my:tag","service:tag"],"team":"my-team"} + When the request is sent + Then the response status is 200 CREATED + And the response "data[0].attributes.meta.ingested-schema-version" is equal to "v2.1" + And the response "data[0].attributes.schema.dd-service" is equal to "service-{{ unique_lower_alnum }}" + + @team:DataDog/service-catalog + Scenario: Create or update service definition using schema v2-2 returns "CREATED" response + Given new "CreateOrUpdateServiceDefinitions" request + And body with value {"contacts":[{"contact":"contact@datadoghq.com","name":"Team Email","type":"email"}],"dd-service":"service-{{ unique_lower_alnum }}","extensions":{"myorgextension":"extensionvalue"},"integrations":{"opsgenie":{"region":"US","service-url":"https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"},"pagerduty":{"service-url":"https://my-org.pagerduty.com/service-directory/PMyService"}},"links":[{"name":"Runbook","type":"runbook","url":"https://my-runbook"},{"name":"Source Code","type":"repo","provider":"GitHub","url":"https://github.com/DataDog/schema"},{"name":"Architecture","type":"doc","provider":"Gigoogle drivetHub","url":"https://my-runbook"}],"schema-version":"v2.2","tags":["my:tag","service:tag"],"team":"my-team"} + When the request is sent + Then the response status is 200 CREATED + And the response "data[0].attributes.meta.ingested-schema-version" is equal to "v2.2" + And the response "data[0].attributes.schema.dd-service" is equal to "service-{{ unique_lower_alnum }}" + + @generated @skip @team:DataDog/service-catalog + Scenario: Delete a single service definition returns "Bad Request" response + Given new "DeleteServiceDefinition" request + And request contains "service_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/service-catalog + Scenario: Delete a single service definition returns "Not Found" response + Given new "DeleteServiceDefinition" request + And request contains "service_name" parameter with value "not-a-service" + When the request is sent + Then the response status is 404 Not Found + And the response "errors[0]" is equal to "Not Found" + + @replay-only @team:DataDog/service-catalog + Scenario: Delete a single service definition returns "OK" response + Given new "DeleteServiceDefinition" request + And request contains "service_name" parameter with value "service-definition-test" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/service-catalog + Scenario: Get a single service definition returns "Bad Request" response + Given new "GetServiceDefinition" request + And request contains "service_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/service-catalog + Scenario: Get a single service definition returns "Conflict" response + Given new "GetServiceDefinition" request + And request contains "service_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/service-catalog + Scenario: Get a single service definition returns "Not Found" response + Given new "GetServiceDefinition" request + And request contains "service_name" parameter with value "not-a-service" + When the request is sent + Then the response status is 404 Not Found + And the response "errors[0]" is equal to "Not Found" + + @team:DataDog/service-catalog + Scenario: Get a single service definition returns "OK" response + Given new "GetServiceDefinition" request + And request contains "service_name" parameter with value "service-definition-test" + And request contains "schema_version" parameter with value "v2.1" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.meta.ingested-schema-version" is equal to "v2" + And the response "data.attributes.schema.schema-version" is equal to "v2.1" + And the response "data.attributes.schema.dd-service" is equal to "service-definition-test" + + @team:DataDog/service-catalog + Scenario: Get all service definitions returns "OK" response + Given new "ListServiceDefinitions" request + And request contains "schema_version" parameter with value "v2.1" + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.meta.ingestion-source" is equal to "api" + And the response "data[0].attributes.schema.schema-version" is equal to "v2.1" + + @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination + Scenario: Get all service definitions returns "OK" response with pagination + Given new "ListServiceDefinitions" request + And request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items diff --git a/tests/scenarios/features/v2/service_scorecards.feature b/tests/scenarios/features/v2/service_scorecards.feature new file mode 100644 index 000000000..8d17ab585 --- /dev/null +++ b/tests/scenarios/features/v2/service_scorecards.feature @@ -0,0 +1,121 @@ +@endpoint(service-scorecards) @endpoint(service-scorecards-v2) +Feature: Service Scorecards + API to create, update scorecard rules and outcomes. This feature is + currently in BETA. If you have any feedback, contact [Datadog + support](https://docs.datadoghq.com/help/). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ServiceScorecards" API + + @generated @skip @team:DataDog/service-catalog + Scenario: Create a new rule returns "Bad Request" response + Given operation "CreateScorecardRule" enabled + And new "CreateScorecardRule" request + And body with value {"data": {"attributes": {"enabled": true, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/service-catalog + Scenario: Create a new rule returns "Created" response + Given operation "CreateScorecardRule" enabled + And new "CreateScorecardRule" request + And body with value {"data": {"attributes": {"enabled": true, "name": "{{unique}}", "scorecard_name": "Observability Best Practices"}, "type": "rule"}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.scorecard_name" is equal to "Observability Best Practices" + And the response "data.relationships.scorecard.data" has field "id" + + @team:DataDog/service-catalog + Scenario: Create outcomes batch returns "Bad Request" response + Given there is a valid "create_scorecard_rule" in the system + And operation "CreateScorecardOutcomesBatch" enabled + And new "CreateScorecardOutcomesBatch" request + And body with value {"data": {"attributes": {"results": [{"remarks": "See: Services", "rule_id": "{{ create_scorecard_rule.data.id }}", "state": "pass", "service_name": ""}]}, "type": "batched-outcome"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/service-catalog + Scenario: Create outcomes batch returns "OK" response + Given there is a valid "create_scorecard_rule" in the system + And operation "CreateScorecardOutcomesBatch" enabled + And new "CreateScorecardOutcomesBatch" request + And body with value {"data": {"attributes": {"results": [{"remarks": "See: Services", "rule_id": "{{ create_scorecard_rule.data.id }}", "service_name": "my-service", "state": "pass"}]}, "type": "batched-outcome"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/service-catalog + Scenario: Delete a rule returns "Bad Request" response + Given operation "DeleteScorecardRule" enabled + And new "DeleteScorecardRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/service-catalog + Scenario: Delete a rule returns "Not Found" response + Given operation "DeleteScorecardRule" enabled + And new "DeleteScorecardRule" request + And request contains "rule_id" parameter with value "2a4f524e-168a-429d-bb75-7b1ffeab0cbb" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/service-catalog + Scenario: Delete a rule returns "OK" response + Given operation "DeleteScorecardRule" enabled + And there is a valid "create_scorecard_rule" in the system + And new "DeleteScorecardRule" request + And request contains "rule_id" parameter from "create_scorecard_rule.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/service-catalog + Scenario: List all rule outcomes returns "Bad Request" response + Given operation "ListScorecardOutcomes" enabled + And new "ListScorecardOutcomes" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/service-catalog + Scenario: List all rule outcomes returns "OK" response + Given operation "ListScorecardOutcomes" enabled + And new "ListScorecardOutcomes" request + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination + Scenario: List all rule outcomes returns "OK" response with pagination + Given operation "ListScorecardOutcomes" enabled + And new "ListScorecardOutcomes" request + And request contains "page[size]" parameter with value 2 + And request contains "fields[outcome]" parameter with value "state" + And request contains "filter[outcome][service_name]" parameter with value "my-service" + When the request with pagination is sent + Then the response status is 200 OK + And the response has 2 items + + @generated @skip @team:DataDog/service-catalog + Scenario: List all rules returns "Bad Request" response + Given operation "ListScorecardRules" enabled + And new "ListScorecardRules" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/service-catalog + Scenario: List all rules returns "OK" response + Given operation "ListScorecardRules" enabled + And new "ListScorecardRules" request + When the request is sent + Then the response status is 200 OK + + @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination + Scenario: List all rules returns "OK" response with pagination + Given operation "ListScorecardRules" enabled + And new "ListScorecardRules" request + And request contains "page[size]" parameter with value 2 + And request contains "fields[rule]" parameter with value "name" + And request contains "filter[rule][custom]" parameter with value true + When the request with pagination is sent + Then the response status is 200 OK + And the response has 4 items diff --git a/tests/scenarios/features/v2/spans.feature b/tests/scenarios/features/v2/spans.feature new file mode 100644 index 000000000..bd1cfba58 --- /dev/null +++ b/tests/scenarios/features/v2/spans.feature @@ -0,0 +1,82 @@ +@endpoint(spans) @endpoint(spans-v2) +Feature: Spans + Search and aggregate your spans from your Datadog platform over HTTP. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Spans" API + + @skip @team:DataDog/apm + Scenario: Aggregate spans returns "Bad Request" response + Given new "AggregateSpans" request + And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "service:web* AND @http.status_code:[200 TO 299]", "to": "now"}, "group_by": [{"facet": "host", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/apm + Scenario: Aggregate spans returns "OK" response + Given new "AggregateSpans" request + And body with value {"data":{"attributes": {"compute": [{"aggregation": "count", "interval": "5m", "type": "timeseries"}],"filter": {"from": "now-15m", "query": "*", "to": "now"}},"type":"aggregate_request"}} + When the request is sent + Then the response status is 200 OK + And the response "meta.status" is equal to "done" + + @generated @skip @team:DataDog/apm + Scenario: Get a list of spans returns "Bad Request." response + Given new "ListSpansGet" request + When the request is sent + Then the response status is 400 Bad Request. + + @replay-only @team:DataDog/apm + Scenario: Get a list of spans returns "OK" response + Given new "ListSpansGet" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "spans" + + @replay-only @skip-validation @team:DataDog/apm @with-pagination + Scenario: Get a list of spans returns "OK" response with pagination + Given new "ListSpansGet" request + And request contains "page[limit]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @team:DataDog/apm + Scenario: Get a list of spans returns "Unprocessable Entity." response + Given new "ListSpansGet" request + And request contains "filter[from]" parameter with value "now" + And request contains "filter[to]" parameter with value "now-1m" + When the request is sent + Then the response status is 422 Unprocessable Entity. + + @skip @team:DataDog/apm + Scenario: Search spans returns "Bad Request." response + Given new "ListSpans" request + And body with value {"filter": {"from": "now-15m", "query": "service:web*", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/apm + Scenario: Search spans returns "OK" response + Given new "ListSpans" request + And body with value {"data": {"attributes": {"filter": {"from": "now-15m", "query": "*", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 25}, "sort": "timestamp"}, "type": "search_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "spans" + + @replay-only @skip-validation @team:DataDog/apm @with-pagination + Scenario: Search spans returns "OK" response with pagination + Given new "ListSpans" request + And body with value {"data": {"attributes": {"filter": {"from": "now-15m", "query": "service:python*", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"}, "type": "search_request"}} + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @team:DataDog/apm + Scenario: Search spans returns "Unprocessable Entity." response + Given new "ListSpans" request + And body with value {"data": {"attributes": {"filter": {"from": "now", "query": "service:web* AND @http.status_code:[200 TO 299]", "to": "now-15m"}, "options": {"timezone": "GMT"}, "page": {"limit": 10}, "sort": "timestamp"}, "type": "search_request"}} + When the request is sent + Then the response status is 422 Unprocessable Entity. diff --git a/tests/scenarios/features/v2/teams.feature b/tests/scenarios/features/v2/teams.feature new file mode 100644 index 000000000..c59a3a365 --- /dev/null +++ b/tests/scenarios/features/v2/teams.feature @@ -0,0 +1,347 @@ +@endpoint(team) @endpoint(team-v2) @endpoint(teams) @endpoint(teams-v2) +Feature: Teams + View and manage teams within Datadog. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Teams" API + + @generated @skip @team:DataDog/core-app + Scenario: Add a user to a team returns "API error response." response + Given new "CreateTeamMembership" request + And request contains "team_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"team": {"data": {"id": "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9", "type": "team"}}, "user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}} + When the request is sent + Then the response status is 409 API error response. + + @generated @skip @team:DataDog/core-app + Scenario: Add a user to a team returns "Represents a user's association to a team" response + Given new "CreateTeamMembership" request + And request contains "team_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"team": {"data": {"id": "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9", "type": "team"}}, "user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}} + When the request is sent + Then the response status is 200 Represents a user's association to a team + + @team:DataDog/core-app + Scenario: Create a team link returns "API error response." response + Given new "CreateTeamLink" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And body with value {"data": {"attributes": {"label": "", "url": "https://example.com", "position": 0}, "type": "team_links"}} + When the request is sent + Then the response status is 422 API error response. + + @team:DataDog/core-app + Scenario: Create a team link returns "OK" response + Given new "CreateTeamLink" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And body with value {"data": {"attributes": {"label": "Link label", "url": "https://example.com", "position": 0}, "type": "team_links"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.label" is equal to "Link label" + And the response "data.attributes.url" is equal to "https://example.com" + And the response "data.attributes.position" is equal to 0 + + @team:DataDog/core-app + Scenario: Create a team returns "API error response." response + Given new "CreateTeam" request + And there is a valid "dd_team" in the system + And body with value {"data": {"attributes": {"handle": "{{dd_team.data.attributes.handle}}", "name": "Example Team"}, "relationships": {"users": {"data": []}}, "type": "team"}} + When the request is sent + Then the response status is 409 API error response. + + @team:DataDog/core-app + Scenario: Create a team returns "CREATED" response + Given new "CreateTeam" request + And body with value {"data": {"attributes": {"handle": "test-handle-{{ unique_hash }}", "name": "test-name-{{ unique_hash }}"}, "relationships": {"users": {"data": []}}, "type": "team"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data" has field "id" + And the response "data.attributes.handle" is equal to "test-handle-{{ unique_hash }}" + And the response "data.attributes.name" is equal to "test-name-{{ unique_hash }}" + + @team:DataDog/core-app + Scenario: Create a team with V2 fields returns "CREATED" response + Given new "CreateTeam" request + And body with value {"data": {"attributes": {"handle": "test-handle-{{ unique_hash }}","name": "test-name-{{ unique_hash }}", "avatar": "🥑", "banner": 7, "visible_modules": ["m1","m2"], "hidden_modules": ["m3"]}, "type": "team"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data" has field "id" + And the response "data.attributes.handle" is equal to "test-handle-{{ unique_hash }}" + And the response "data.attributes.name" is equal to "test-name-{{ unique_hash }}" + And the response "data.attributes.avatar" is equal to "🥑" + And the response "data.attributes.banner" is equal to 7 + And the response "data.attributes.visible_modules" is equal to ["m1","m2"] + And the response "data.attributes.hidden_modules" is equal to ["m3"] + + @team:DataDog/core-app + Scenario: Get a team link returns "API error response." response + Given new "GetTeamLink" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "link_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Get a team link returns "OK" response + Given new "GetTeamLink" request + And there is a valid "dd_team" in the system + And there is a valid "team_link" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "link_id" parameter from "team_link.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/core-app + Scenario: Get a team returns "API error response." response + Given new "GetTeam" request + And request contains "team_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Get a team returns "OK" response + Given new "GetTeam" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/core-app + Scenario: Get all teams returns "OK" response + Given new "ListTeams" request + And there is a valid "dd_team" in the system + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "id" with value "{{ dd_team.data.id }}" + + @replay-only @skip-validation @team:DataDog/core-app @with-pagination + Scenario: Get all teams returns "OK" response with pagination + Given new "ListTeams" request + And request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @team:DataDog/core-app + Scenario: Get all teams with fields_team parameter returns "OK" response + Given new "ListTeams" request + And request contains "fields[team]" parameter with value ["id", "name", "handle"] + When the request is sent + Then the response status is 200 OK + And the response "data[0]" has field "id" + And the response "data[0].attributes" has field "name" + And the response "data[0].attributes" has field "handle" + + @team:DataDog/core-app + Scenario: Get links for a team returns "API error response." response + Given new "GetTeamLinks" request + And request contains "team_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Get links for a team returns "OK" response + Given new "GetTeamLinks" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/core-app + Scenario: Get permission settings for a team returns "API error response." response + Given new "GetTeamPermissionSettings" request + And request contains "team_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Get permission settings for a team returns "OK" response + Given new "GetTeamPermissionSettings" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/core-app + Scenario: Get team memberships returns "API error response." response + Given new "GetTeamMemberships" request + And request contains "team_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Get team memberships returns "Represents a user's association to a team" response + Given new "GetTeamMemberships" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + When the request is sent + Then the response status is 200 Represents a user's association to a team + + @generated @skip @team:DataDog/core-app + Scenario: Get user memberships returns "API error response." response + Given new "GetUserMemberships" request + And request contains "user_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Get user memberships returns "Represents a user's association to a team" response + Given new "GetUserMemberships" request + And there is a valid "user" in the system + And request contains "user_uuid" parameter from "user.data.id" + When the request is sent + Then the response status is 200 Represents a user's association to a team + And the response "data" has length 0 + + @team:DataDog/core-app + Scenario: Remove a team link returns "API error response." response + Given new "DeleteTeamLink" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "link_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Remove a team link returns "No Content" response + Given new "DeleteTeamLink" request + And there is a valid "dd_team" in the system + And there is a valid "team_link" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "link_id" parameter from "team_link.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/core-app + Scenario: Remove a team returns "API error response." response + Given new "DeleteTeam" request + And request contains "team_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Remove a team returns "No Content" response + Given new "DeleteTeam" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/core-app + Scenario: Remove a user from a team returns "API error response." response + Given new "DeleteTeamMembership" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "user_id" parameter with value "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @skip @team:DataDog/core-app + Scenario: Remove a user from a team returns "No Content" response + Given new "DeleteTeamMembership" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/core-app + Scenario: Update a team link returns "API error response." response + Given new "UpdateTeamLink" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "link_id" parameter with value "REPLACE.ME" + And body with value {"data": {"attributes": {"label": "Link label", "url": "https://example.com"}, "type": "team_links"}} + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Update a team link returns "OK" response + Given new "UpdateTeamLink" request + And there is a valid "dd_team" in the system + And there is a valid "team_link" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "link_id" parameter from "team_link.data.id" + And body with value {"data": {"attributes": {"label": "New Label", "url": "https://example.com"}, "type": "team_links"}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{ team_link.data.id }}" + And the response "data.attributes.team_id" is equal to "{{ dd_team.data.id }}" + And the response "data.attributes.label" is equal to "New Label" + And the response "data.attributes.url" is equal to "https://example.com" + + @generated @skip @team:DataDog/core-app + Scenario: Update a team returns "API error response." response + Given new "UpdateTeam" request + And request contains "team_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"avatar": "\ud83e\udd51", "banner": null, "handle": "example-team", "hidden_modules": [], "name": "Example Team", "visible_modules": []}, "relationships": {"team_links": {"data": [{"id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001", "type": "team_links"}], "links": {"related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"}}}, "type": "team"}} + When the request is sent + Then the response status is 409 API error response. + + @team:DataDog/core-app + Scenario: Update a team returns "OK" response + Given new "UpdateTeam" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And body with value {"data": {"attributes": {"handle": "{{dd_team.data.attributes.handle}}", "name": "{{dd_team.data.attributes.name}} updated", "avatar": "🥑", "banner": 7, "hidden_modules": ["m3"], "visible_modules": ["m1", "m2"]}, "type": "team"}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{ dd_team.data.id }}" + And the response "data.attributes.handle" is equal to "{{dd_team.data.attributes.handle}}" + And the response "data.attributes.name" is equal to "{{dd_team.data.attributes.name}} updated" + And the response "data.attributes.avatar" is equal to "🥑" + And the response "data.attributes.banner" is equal to 7 + And the response "data.attributes.hidden_modules" is equal to ["m3"] + And the response "data.attributes.visible_modules" is equal to ["m1", "m2"] + + @generated @skip @team:DataDog/core-app + Scenario: Update a user's membership attributes on a team returns "API error response." response + Given new "UpdateTeamMembership" request + And request contains "team_id" parameter from "REPLACE.ME" + And request contains "user_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"role": "admin"}, "type": "team_memberships"}} + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/core-app + Scenario: Update a user's membership attributes on a team returns "Represents a user's association to a team" response + Given new "UpdateTeamMembership" request + And request contains "team_id" parameter from "REPLACE.ME" + And request contains "user_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"role": "admin"}, "type": "team_memberships"}} + When the request is sent + Then the response status is 200 Represents a user's association to a team + + @team:DataDog/core-app + Scenario: Update a user's role on a team returns "API error response." response + Given new "UpdateTeamMembership" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "user_id" parameter with value "REPLACE.ME" + And body with value {"data": {"attributes": {"role": "admin"}, "type": "team_memberships"}} + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Update permission setting for team returns "API error response." response + Given new "UpdateTeamPermissionSetting" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "action" parameter with value "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "admins"}, "type": "team_permission_settings"}} + When the request is sent + Then the response status is 404 API error response. + + @team:DataDog/core-app + Scenario: Update permission setting for team returns "OK" response + Given new "UpdateTeamPermissionSetting" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "action" parameter with value "manage_membership" + And body with value {"data": {"attributes": {"value": "admins"}, "type": "team_permission_settings"}} + When the request is sent + Then the response status is 200 OK diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index 8f2d7f67b..d4ee6f5c8 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -243,6 +243,78 @@ "type": "safe" } }, + "ListCostAWSCURConfigs": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "CreateCostAWSCURConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "DeleteCostAWSCURConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "UpdateCostAWSCURConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ListAWSRelatedAccounts": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "ListCostAzureUCConfigs": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "CreateCostAzureUCConfigs": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "DeleteCostAzureUCConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "UpdateCostAzureUCConfigs": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GetCloudCostActivity": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "GetActiveBillingDimensions": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, + "GetMonthlyCostAttribution": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, "ListCurrentUserApplicationKeys": { "tag": "Key Management", "undo": { @@ -304,6 +376,18 @@ "type": "safe" } }, + "CreateDORADeployment": { + "tag": "DORA Metrics", + "undo": { + "type": "idempotent" + } + }, + "CreateDORAIncident": { + "tag": "DORA Metrics", + "undo": { + "type": "idempotent" + } + }, "ListDowntimes": { "tag": "Downtimes", "undo": { @@ -748,6 +832,43 @@ "type": "safe" } }, + "ListOktaAccounts": { + "tag": "Okta Integration", + "undo": { + "type": "safe" + } + }, + "CreateOktaAccount": { + "tag": "Okta Integration", + "undo": { + "operationId": "DeleteOktaAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteOktaAccount": { + "tag": "Okta Integration", + "undo": { + "type": "idempotent" + } + }, + "GetOktaAccount": { + "tag": "Okta Integration", + "undo": { + "type": "safe" + } + }, + "UpdateOktaAccount": { + "tag": "Okta Integration", + "undo": { + "type": "idempotent" + } + }, "GetIPAllowlist": { "tag": "IP Allowlist", "undo": { @@ -907,7 +1028,7 @@ "parameters": [ { "name": "body", - "source": "" + "template": "{\n \"data\": {\n \"id\":\"{{ data.id }}\",\n \"type\":\"metric_bulk_configure_tags\",\n \"attributes\": {\n \"emails\": [\"{{ data.attributes.emails[0] }}\"]\n }\n }\n}" } ], "type": "unsafe" @@ -1255,6 +1376,43 @@ "type": "idempotent" } }, + "ListScorecardOutcomes": { + "tag": "Service Scorecards", + "undo": { + "type": "safe" + } + }, + "CreateScorecardOutcomesBatch": { + "tag": "Service Scorecards", + "undo": { + "type": "idempotent" + } + }, + "ListScorecardRules": { + "tag": "Service Scorecards", + "undo": { + "type": "safe" + } + }, + "CreateScorecardRule": { + "tag": "Service Scorecards", + "undo": { + "operationId": "DeleteScorecardRule", + "parameters": [ + { + "name": "rule_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteScorecardRule": { + "tag": "Service Scorecards", + "undo": { + "type": "idempotent" + } + }, "DownloadCloudWorkloadPolicyFile": { "tag": "Cloud Workload Security", "undo": { @@ -1847,6 +2005,12 @@ "type": "safe" } }, + "GetProjectedCost": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, "SendInvitations": { "tag": "Users", "undo": { diff --git a/tests/scenarios/features/v2/usage_metering.feature b/tests/scenarios/features/v2/usage_metering.feature index 9c393c3f9..7a84a90e2 100644 --- a/tests/scenarios/features/v2/usage_metering.feature +++ b/tests/scenarios/features/v2/usage_metering.feature @@ -14,6 +14,40 @@ Feature: Usage Metering And a valid "appKeyAuth" key in the system And an instance of "UsageMetering" API + @replay-only @team:DataDog/red-zone-revenue-query + Scenario: Get Monthly Cost Attribution returns "Bad Request" response + Given operation "GetMonthlyCostAttribution" enabled + And new "GetMonthlyCostAttribution" request + And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_month" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "fields" parameter with value "not_a_product" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/red-zone-revenue-query + Scenario: Get Monthly Cost Attribution returns "OK" response + Given operation "GetMonthlyCostAttribution" enabled + And new "GetMonthlyCostAttribution" request + And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_month" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "fields" parameter with value "infra_host_total_cost" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/red-zone-revenue-query + Scenario: Get active billing dimensions for cost attribution returns "Bad Request" response + Given operation "GetActiveBillingDimensions" enabled + And new "GetActiveBillingDimensions" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/red-zone-revenue-query + Scenario: Get active billing dimensions for cost attribution returns "OK" response + Given operation "GetActiveBillingDimensions" enabled + And new "GetActiveBillingDimensions" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get cost across multi-org account returns "Bad Request" response Given new "GetCostByOrg" request @@ -149,6 +183,19 @@ Feature: Usage Metering And the response "data[0].type" is equal to "usage_timeseries" And the response "data[0].attributes.product_family" is equal to "observability-pipelines" + @generated @skip @team:DataDog/red-zone-revenue-query + Scenario: Get projected cost across your account returns "Bad Request" response + Given new "GetProjectedCost" request + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/red-zone-revenue-query + Scenario: Get projected cost across your account returns "OK" response + Given new "GetProjectedCost" request + And request contains "view" parameter with value "sub-org" + When the request is sent + Then the response status is 200 OK + @team:DataDog/red-zone-revenue-query Scenario: GetEstimatedCostByOrg with both start_month and start_date returns "Bad Request" response Given new "GetEstimatedCostByOrg" request diff --git a/tests/scenarios/features/v2/users.feature b/tests/scenarios/features/v2/users.feature new file mode 100644 index 000000000..ce27d7299 --- /dev/null +++ b/tests/scenarios/features/v2/users.feature @@ -0,0 +1,194 @@ +@endpoint(users) @endpoint(users-v2) +Feature: Users + Create, edit, and disable users. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Users" API + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Create a user returns "Bad Request" response + Given new "CreateUser" request + And body with value {"data": {"attributes": {"email": "jane.doe@example.com"}, "relationships": {"roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "users"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/team-aaa-identity + Scenario: Create a user returns "OK" response + Given new "CreateUser" request + And body with value {"data": {"type": "users", "attributes": {"name": "Datadog API Client Python", "email": "{{ unique }}@datadoghq.com"}}} + When the request is sent + Then the response status is 201 OK + And the response "data.attributes.email" is equal to "{{ unique_lower }}@datadoghq.com" + And the response "data.attributes.name" is equal to "Datadog API Client Python" + And the response "data.attributes.disabled" is false + And the response "data.attributes.service_account" is false + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Disable a user returns "Not found" response + Given new "DisableUser" request + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @team:DataDog/team-aaa-identity + Scenario: Disable a user returns "OK" response + Given there is a valid "user" in the system + And new "DisableUser" request + And request contains "user_id" parameter from "user.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Get a user invitation returns "Not found" response + Given new "GetInvitation" request + And request contains "user_invitation_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @team:DataDog/team-aaa-identity + Scenario: Get a user invitation returns "OK" response + Given there is a valid "user" in the system + And the "user" has a "user_invitation" + And new "GetInvitation" request + And request contains "user_invitation_uuid" parameter from "user_invitation.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.invite_type" is equal to "openid_invite" + And the response "data.attributes.uuid" is equal to "{{user_invitation.id}}" + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Get a user organization returns "Not found" response + Given new "ListUserOrganizations" request + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Get a user organization returns "OK" response + Given new "ListUserOrganizations" request + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Get a user permissions returns "Not found" response + Given new "ListUserPermissions" request + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @team:DataDog/team-aaa-identity + Scenario: Get a user permissions returns "OK" response + Given there is a valid "user" in the system + And new "ListUserPermissions" request + And request contains "user_id" parameter from "user.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Get user details returns "Not found" response + Given new "GetUser" request + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @team:DataDog/team-aaa-identity + Scenario: Get user details returns "OK" response + Given there is a valid "user" in the system + And new "GetUser" request + And request contains "user_id" parameter from "user.data.id" + When the request is sent + Then the response status is 200 OK for get user + And the response "data.id" is equal to "{{ user.data.id }}" + And the response "data.type" is equal to "users" + And the response "data.attributes.handle" is equal to "{{ unique_lower }}@datadoghq.com" + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: List all users returns "Bad Request" response + Given new "ListUsers" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/team-aaa-identity + Scenario: List all users returns "OK" response + Given there is a valid "user" in the system + And new "ListUsers" request + And request contains "filter" parameter from "user.data.attributes.email" + When the request is sent + Then the response status is 200 OK + And the response "meta.page.total_filtered_count" is equal to 1 + And the response "data[0].attributes.email" has the same value as "user.data.attributes.email" + + @replay-only @skip-validation @team:DataDog/team-aaa-identity @with-pagination + Scenario: List all users returns "OK" response with pagination + Given new "ListUsers" request + And request contains "page[size]" parameter with value 2 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 3 items + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Send invitation emails returns "Bad Request" response + Given new "SendInvitations" request + And body with value {"data": []} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/team-aaa-identity + Scenario: Send invitation emails returns "OK" response + Given there is a valid "user" in the system + And new "SendInvitations" request + And body with value {"data": [{"type": "user_invitations", "relationships": {"user": {"data": {"type": "{{ user.data.type }}", "id": "{{ user.data.id }}"}}}}]} + When the request is sent + Then the response status is 201 OK + And the response "data" has length 1 + And the response "data[0].attributes.invite_type" is equal to "openid_invite" + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Update a user returns "Bad Request" response + Given new "UpdateUser" request + And request contains "user_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {}, "id": "00000000-0000-feed-0000-000000000000", "type": "users"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/team-aaa-identity + Scenario: Update a user returns "Bad User ID in Request" response + Given there is a valid "user" in the system + And new "UpdateUser" request + And request contains "user_id" parameter from "user.data.id" + And body with value {"data": {"id": "00000000-mismatch-body-id-ffffffffffff", "type": "users", "attributes": {"name": "updated", "disabled": true}}} + When the request is sent + Then the response status is 422 Bad User ID in Request + + @team:DataDog/team-aaa-identity + Scenario: Update a user returns "Not found" response + Given new "UpdateUser" request + And request contains "user_id" parameter with value "00000000-dead-beef-dead-ffffffffffff" + And body with value {"data": {"id": "00000000-dead-beef-dead-ffffffffffff", "type": "users", "attributes": {"name": "updated", "disabled": true}}} + When the request is sent + Then the response status is 404 Not found + + @team:DataDog/team-aaa-identity + Scenario: Update a user returns "OK" response + Given there is a valid "user" in the system + And new "UpdateUser" request + And request contains "user_id" parameter from "user.data.id" + And body with value {"data": {"id": "{{ user.data.id }}", "type": "users", "attributes": {"name": "updated", "disabled": true}}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.email" has the same value as "user.data.attributes.email" + And the response "data.attributes.title" has the same value as "user.data.attributes.title" + And the response "data.attributes.name" is equal to "updated" + And the response "data.attributes.disabled" is equal to true + + @generated @skip @team:DataDog/team-aaa-identity + Scenario: Update a user returns "Unprocessable Entity" response + Given new "UpdateUser" request + And request contains "user_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {}, "id": "00000000-0000-feed-0000-000000000000", "type": "users"}} + When the request is sent + Then the response status is 422 Unprocessable Entity diff --git a/tests/scenarios/fixtures.rs b/tests/scenarios/fixtures.rs index 962e63582..a497ac85b 100644 --- a/tests/scenarios/fixtures.rs +++ b/tests/scenarios/fixtures.rs @@ -18,8 +18,7 @@ use sha256::digest; use std::{ collections::{HashMap, HashSet}, env, - fs::{create_dir_all, read_to_string, File}, - io::BufReader, + fs::{create_dir_all, read_to_string}, ops::Add, path::PathBuf, str::FromStr, @@ -50,13 +49,13 @@ pub struct DatadogWorld { pub parameters: HashMap, pub response: Response, pub api_instances: ApiInstances, - given_map: Value, - undo_map: Value, + pub given_map: Value, + pub undo_map: Value, undo_operations: Vec, } lazy_static! { - static ref API_VERSION_RE: Regex = Regex::new(r"tests/scenarios/features/v(\d+)/").unwrap(); + pub static ref API_VERSION_RE: Regex = Regex::new(r"tests/scenarios/features/v(\d+)/").unwrap(); static ref NUMBER_RE: Regex = Regex::new(r"^\d+$").unwrap(); static ref BOOL_RE: Regex = Regex::new(r"^(true|false)$").unwrap(); static ref INDEX_RE: Regex = Regex::new(r"\[(\d+)\]+").unwrap(); @@ -79,31 +78,7 @@ pub async fn before_scenario( scenario: &Scenario, world: &mut DatadogWorld, ) { - // TODO: refactor this lol - world.api_version = API_VERSION_RE - .captures(feature.path.as_ref().unwrap().to_str().unwrap()) - .unwrap() - .get(1) - .unwrap() - .as_str() - .parse() - .unwrap(); - collect_function_calls(world); - let given_file = File::open(format!( - "tests/scenarios/features/v{}/given.json", - world.api_version - )) - .expect("failed to open given.json file"); - world.given_map = serde_json::from_reader(BufReader::new(given_file)) - .expect("failed to deserialize given.json"); - let undo_file = File::open(format!( - "tests/scenarios/features/v{}/undo.json", - world.api_version - )) - .expect("failed to open undo.json file"); - world.undo_map = serde_json::from_reader(BufReader::new(undo_file)) - .expect("failed to deserialize undo.json"); let escaped_filename = NON_ALNUM_RE .replace_all(scenario.name.as_str(), "-") diff --git a/tests/scenarios/function_mappings.rs b/tests/scenarios/function_mappings.rs index c975a2104..8b165bc11 100644 --- a/tests/scenarios/function_mappings.rs +++ b/tests/scenarios/function_mappings.rs @@ -13,7 +13,9 @@ pub struct ApiInstances { pub v1_api_key_management: Option, pub v1_api_service_checks: Option, pub v1_api_usage_metering: Option, + pub v1_api_dashboards: Option, pub v1_api_dashboard_lists: Option, + pub v1_api_metrics: Option, pub v1_api_downtimes: Option, pub v1_api_events: Option, pub v1_api_snapshots: Option, @@ -27,36 +29,63 @@ pub struct ApiInstances { pub v1_api_webhooks_integration: Option, pub v1_api_logs: Option, pub v1_api_logs_indexes: Option, - pub v1_api_metrics: Option, + pub v1_api_logs_pipelines: Option, + pub v1_api_monitors: Option, + pub v1_api_notebooks: Option, pub v1_api_organizations: Option, pub v1_api_security_monitoring: Option, pub v1_api_service_level_objectives: Option, pub v1_api_service_level_objective_corrections: Option, + pub v1_api_synthetics: Option, pub v1_api_tags: Option, pub v1_api_users: Option, pub v1_api_authentication: Option, + pub v2_api_key_management: Option, pub v2_api_spans_metrics: Option, pub v2_api_apm_retention_filters: Option, pub v2_api_audit: Option, + pub v2_api_auth_n_mappings: Option, + pub v2_api_ci_visibility_pipelines: Option, + pub v2_api_ci_visibility_tests: Option, + pub v2_api_container_images: Option, + pub v2_api_containers: Option, + pub v2_api_cloud_cost_management: Option, + pub v2_api_usage_metering: Option, pub v2_api_dashboard_lists: Option, + pub v2_api_dora_metrics: Option, + pub v2_api_downtimes: Option, pub v2_api_events: Option, + pub v2_api_incidents: Option, pub v2_api_gcp_integration: Option, pub v2_api_opsgenie_integration: Option, pub v2_api_cloudflare_integration: Option, pub v2_api_confluent_cloud: Option, pub v2_api_fastly_integration: Option, + pub v2_api_okta_integration: Option, pub v2_api_ip_allowlist: Option, pub v2_api_logs: Option, + pub v2_api_logs_archives: Option, pub v2_api_logs_metrics: Option, + pub v2_api_metrics: Option, + pub v2_api_monitors: Option, pub v2_api_roles: Option, pub v2_api_security_monitoring: Option, + pub v2_api_powerpack: Option, pub v2_api_processes: Option, pub v2_api_restriction_policies: Option, + pub v2_api_rum: Option, pub v2_api_organizations: Option, + pub v2_api_service_scorecards: Option, pub v2_api_cloud_workload_security: Option, - pub v2_api_metrics: Option, + pub v2_api_sensitive_data_scanner: Option, + pub v2_api_service_accounts: Option, + pub v2_api_incident_services: Option, + pub v2_api_service_definition: Option, + pub v2_api_spans: Option, pub v2_api_synthetics: Option, - pub v2_api_usage_metering: Option, + pub v2_api_teams: Option, + pub v2_api_incident_teams: Option, + pub v2_api_users: Option, } pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { @@ -76,6 +105,13 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ), ); } + if world.api_instances.v2_api_key_management.is_none() { + world.api_instances.v2_api_key_management = Some( + datadogV2::api::api_key_management::KeyManagementAPI::with_config( + world.config.clone(), + ), + ); + } } "ServiceChecks" => { if world.api_instances.v1_api_service_checks.is_none() { @@ -102,6 +138,14 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } + "Dashboards" => { + if world.api_instances.v1_api_dashboards.is_none() { + world.api_instances.v1_api_dashboards = + Some(datadogV1::api::api_dashboards::DashboardsAPI::with_config( + world.config.clone(), + )); + } + } "DashboardLists" => { if world.api_instances.v1_api_dashboard_lists.is_none() { world.api_instances.v1_api_dashboard_lists = Some( @@ -118,12 +162,29 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } + "Metrics" => { + if world.api_instances.v1_api_metrics.is_none() { + world.api_instances.v1_api_metrics = Some( + datadogV1::api::api_metrics::MetricsAPI::with_config(world.config.clone()), + ); + } + if world.api_instances.v2_api_metrics.is_none() { + world.api_instances.v2_api_metrics = Some( + datadogV2::api::api_metrics::MetricsAPI::with_config(world.config.clone()), + ); + } + } "Downtimes" => { if world.api_instances.v1_api_downtimes.is_none() { world.api_instances.v1_api_downtimes = Some( datadogV1::api::api_downtimes::DowntimesAPI::with_config(world.config.clone()), ); } + if world.api_instances.v2_api_downtimes.is_none() { + world.api_instances.v2_api_downtimes = Some( + datadogV2::api::api_downtimes::DowntimesAPI::with_config(world.config.clone()), + ); + } } "Events" => { if world.api_instances.v1_api_events.is_none() { @@ -238,15 +299,31 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } - "Metrics" => { - if world.api_instances.v1_api_metrics.is_none() { - world.api_instances.v1_api_metrics = Some( - datadogV1::api::api_metrics::MetricsAPI::with_config(world.config.clone()), + "LogsPipelines" => { + if world.api_instances.v1_api_logs_pipelines.is_none() { + world.api_instances.v1_api_logs_pipelines = Some( + datadogV1::api::api_logs_pipelines::LogsPipelinesAPI::with_config( + world.config.clone(), + ), ); } - if world.api_instances.v2_api_metrics.is_none() { - world.api_instances.v2_api_metrics = Some( - datadogV2::api::api_metrics::MetricsAPI::with_config(world.config.clone()), + } + "Monitors" => { + if world.api_instances.v1_api_monitors.is_none() { + world.api_instances.v1_api_monitors = Some( + datadogV1::api::api_monitors::MonitorsAPI::with_config(world.config.clone()), + ); + } + if world.api_instances.v2_api_monitors.is_none() { + world.api_instances.v2_api_monitors = Some( + datadogV2::api::api_monitors::MonitorsAPI::with_config(world.config.clone()), + ); + } + } + "Notebooks" => { + if world.api_instances.v1_api_notebooks.is_none() { + world.api_instances.v1_api_notebooks = Some( + datadogV1::api::api_notebooks::NotebooksAPI::with_config(world.config.clone()), ); } } @@ -300,6 +377,20 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { world.api_instances.v1_api_service_level_objective_corrections = Some(datadogV1::api::api_service_level_objective_corrections::ServiceLevelObjectiveCorrectionsAPI::with_config(world.config.clone())); } } + "Synthetics" => { + if world.api_instances.v1_api_synthetics.is_none() { + world.api_instances.v1_api_synthetics = + Some(datadogV1::api::api_synthetics::SyntheticsAPI::with_config( + world.config.clone(), + )); + } + if world.api_instances.v2_api_synthetics.is_none() { + world.api_instances.v2_api_synthetics = + Some(datadogV2::api::api_synthetics::SyntheticsAPI::with_config( + world.config.clone(), + )); + } + } "Tags" => { if world.api_instances.v1_api_tags.is_none() { world.api_instances.v1_api_tags = Some( @@ -313,6 +404,11 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { datadogV1::api::api_users::UsersAPI::with_config(world.config.clone()), ); } + if world.api_instances.v2_api_users.is_none() { + world.api_instances.v2_api_users = Some( + datadogV2::api::api_users::UsersAPI::with_config(world.config.clone()), + ); + } } "Authentication" => { if world.api_instances.v1_api_authentication.is_none() { @@ -348,6 +444,71 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } + "AuthNMappings" => { + if world.api_instances.v2_api_auth_n_mappings.is_none() { + world.api_instances.v2_api_auth_n_mappings = Some( + datadogV2::api::api_auth_n_mappings::AuthNMappingsAPI::with_config( + world.config.clone(), + ), + ); + } + } + "CiVisibilityPipelines" => { + if world.api_instances.v2_api_ci_visibility_pipelines.is_none() { + world.api_instances.v2_api_ci_visibility_pipelines = Some(datadogV2::api::api_ci_visibility_pipelines::CiVisibilityPipelinesAPI::with_config(world.config.clone())); + } + } + "CiVisibilityTests" => { + if world.api_instances.v2_api_ci_visibility_tests.is_none() { + world.api_instances.v2_api_ci_visibility_tests = Some( + datadogV2::api::api_ci_visibility_tests::CiVisibilityTestsAPI::with_config( + world.config.clone(), + ), + ); + } + } + "ContainerImages" => { + if world.api_instances.v2_api_container_images.is_none() { + world.api_instances.v2_api_container_images = Some( + datadogV2::api::api_container_images::ContainerImagesAPI::with_config( + world.config.clone(), + ), + ); + } + } + "Containers" => { + if world.api_instances.v2_api_containers.is_none() { + world.api_instances.v2_api_containers = + Some(datadogV2::api::api_containers::ContainersAPI::with_config( + world.config.clone(), + )); + } + } + "CloudCostManagement" => { + if world.api_instances.v2_api_cloud_cost_management.is_none() { + world.api_instances.v2_api_cloud_cost_management = Some( + datadogV2::api::api_cloud_cost_management::CloudCostManagementAPI::with_config( + world.config.clone(), + ), + ); + } + } + "DoraMetrics" => { + if world.api_instances.v2_api_dora_metrics.is_none() { + world.api_instances.v2_api_dora_metrics = Some( + datadogV2::api::api_dora_metrics::DoraMetricsAPI::with_config( + world.config.clone(), + ), + ); + } + } + "Incidents" => { + if world.api_instances.v2_api_incidents.is_none() { + world.api_instances.v2_api_incidents = Some( + datadogV2::api::api_incidents::IncidentsAPI::with_config(world.config.clone()), + ); + } + } "OpsgenieIntegration" => { if world.api_instances.v2_api_opsgenie_integration.is_none() { world.api_instances.v2_api_opsgenie_integration = Some( @@ -380,6 +541,15 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } + "OktaIntegration" => { + if world.api_instances.v2_api_okta_integration.is_none() { + world.api_instances.v2_api_okta_integration = Some( + datadogV2::api::api_okta_integration::OktaIntegrationAPI::with_config( + world.config.clone(), + ), + ); + } + } "IpAllowlist" => { if world.api_instances.v2_api_ip_allowlist.is_none() { world.api_instances.v2_api_ip_allowlist = Some( @@ -389,6 +559,15 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } + "LogsArchives" => { + if world.api_instances.v2_api_logs_archives.is_none() { + world.api_instances.v2_api_logs_archives = Some( + datadogV2::api::api_logs_archives::LogsArchivesAPI::with_config( + world.config.clone(), + ), + ); + } + } "LogsMetrics" => { if world.api_instances.v2_api_logs_metrics.is_none() { world.api_instances.v2_api_logs_metrics = Some( @@ -405,6 +584,13 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } + "Powerpack" => { + if world.api_instances.v2_api_powerpack.is_none() { + world.api_instances.v2_api_powerpack = Some( + datadogV2::api::api_powerpack::PowerpackAPI::with_config(world.config.clone()), + ); + } + } "Processes" => { if world.api_instances.v2_api_processes.is_none() { world.api_instances.v2_api_processes = Some( @@ -421,17 +607,80 @@ pub fn initialize_api_instance(world: &mut DatadogWorld, api: String) { ); } } + "Rum" => { + if world.api_instances.v2_api_rum.is_none() { + world.api_instances.v2_api_rum = Some( + datadogV2::api::api_rum::RumAPI::with_config(world.config.clone()), + ); + } + } + "ServiceScorecards" => { + if world.api_instances.v2_api_service_scorecards.is_none() { + world.api_instances.v2_api_service_scorecards = Some( + datadogV2::api::api_service_scorecards::ServiceScorecardsAPI::with_config( + world.config.clone(), + ), + ); + } + } "CloudWorkloadSecurity" => { if world.api_instances.v2_api_cloud_workload_security.is_none() { world.api_instances.v2_api_cloud_workload_security = Some(datadogV2::api::api_cloud_workload_security::CloudWorkloadSecurityAPI::with_config(world.config.clone())); } } - "Synthetics" => { - if world.api_instances.v2_api_synthetics.is_none() { - world.api_instances.v2_api_synthetics = - Some(datadogV2::api::api_synthetics::SyntheticsAPI::with_config( + "SensitiveDataScanner" => { + if world.api_instances.v2_api_sensitive_data_scanner.is_none() { + world.api_instances.v2_api_sensitive_data_scanner = Some(datadogV2::api::api_sensitive_data_scanner::SensitiveDataScannerAPI::with_config(world.config.clone())); + } + } + "ServiceAccounts" => { + if world.api_instances.v2_api_service_accounts.is_none() { + world.api_instances.v2_api_service_accounts = Some( + datadogV2::api::api_service_accounts::ServiceAccountsAPI::with_config( world.config.clone(), - )); + ), + ); + } + } + "IncidentServices" => { + if world.api_instances.v2_api_incident_services.is_none() { + world.api_instances.v2_api_incident_services = Some( + datadogV2::api::api_incident_services::IncidentServicesAPI::with_config( + world.config.clone(), + ), + ); + } + } + "ServiceDefinition" => { + if world.api_instances.v2_api_service_definition.is_none() { + world.api_instances.v2_api_service_definition = Some( + datadogV2::api::api_service_definition::ServiceDefinitionAPI::with_config( + world.config.clone(), + ), + ); + } + } + "Spans" => { + if world.api_instances.v2_api_spans.is_none() { + world.api_instances.v2_api_spans = Some( + datadogV2::api::api_spans::SpansAPI::with_config(world.config.clone()), + ); + } + } + "Teams" => { + if world.api_instances.v2_api_teams.is_none() { + world.api_instances.v2_api_teams = Some( + datadogV2::api::api_teams::TeamsAPI::with_config(world.config.clone()), + ); + } + } + "IncidentTeams" => { + if world.api_instances.v2_api_incident_teams.is_none() { + world.api_instances.v2_api_incident_teams = Some( + datadogV2::api::api_incident_teams::IncidentTeamsAPI::with_config( + world.config.clone(), + ), + ); } } _ => panic!("{api} API instance not found"), @@ -623,6 +872,56 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { "v1.GetUsageTopAvgMetrics".to_string(), test_v1_get_usage_top_avg_metrics, ); + world + .function_mappings + .insert("v1.DeleteDashboards".to_string(), test_v1_delete_dashboards); + world + .function_mappings + .insert("v1.ListDashboards".to_string(), test_v1_list_dashboards); + world.function_mappings.insert( + "v1.RestoreDashboards".to_string(), + test_v1_restore_dashboards, + ); + world + .function_mappings + .insert("v1.CreateDashboard".to_string(), test_v1_create_dashboard); + world.function_mappings.insert( + "v1.CreatePublicDashboard".to_string(), + test_v1_create_public_dashboard, + ); + world.function_mappings.insert( + "v1.DeletePublicDashboard".to_string(), + test_v1_delete_public_dashboard, + ); + world.function_mappings.insert( + "v1.GetPublicDashboard".to_string(), + test_v1_get_public_dashboard, + ); + world.function_mappings.insert( + "v1.UpdatePublicDashboard".to_string(), + test_v1_update_public_dashboard, + ); + world.function_mappings.insert( + "v1.DeletePublicDashboardInvitation".to_string(), + test_v1_delete_public_dashboard_invitation, + ); + world.function_mappings.insert( + "v1.GetPublicDashboardInvitations".to_string(), + test_v1_get_public_dashboard_invitations, + ); + world.function_mappings.insert( + "v1.SendPublicDashboardInvitation".to_string(), + test_v1_send_public_dashboard_invitation, + ); + world + .function_mappings + .insert("v1.DeleteDashboard".to_string(), test_v1_delete_dashboard); + world + .function_mappings + .insert("v1.GetDashboard".to_string(), test_v1_get_dashboard); + world + .function_mappings + .insert("v1.UpdateDashboard".to_string(), test_v1_update_dashboard); world.function_mappings.insert( "v1.ListDashboardLists".to_string(), test_v1_list_dashboard_lists, @@ -643,6 +942,31 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { "v1.UpdateDashboardList".to_string(), test_v1_update_dashboard_list, ); + world.function_mappings.insert( + "v1.SubmitDistributionPoints".to_string(), + test_v1_submit_distribution_points, + ); + world.function_mappings.insert( + "v1.ListActiveMetrics".to_string(), + test_v1_list_active_metrics, + ); + world.function_mappings.insert( + "v1.GetMetricMetadata".to_string(), + test_v1_get_metric_metadata, + ); + world.function_mappings.insert( + "v1.UpdateMetricMetadata".to_string(), + test_v1_update_metric_metadata, + ); + world + .function_mappings + .insert("v1.QueryMetrics".to_string(), test_v1_query_metrics); + world + .function_mappings + .insert("v1.ListMetrics".to_string(), test_v1_list_metrics); + world + .function_mappings + .insert("v1.SubmitMetrics".to_string(), test_v1_submit_metrics); world .function_mappings .insert("v1.ListDowntimes".to_string(), test_v1_list_downtimes); @@ -897,26 +1221,80 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { .function_mappings .insert("v1.UpdateLogsIndex".to_string(), test_v1_update_logs_index); world.function_mappings.insert( - "v1.ListActiveMetrics".to_string(), - test_v1_list_active_metrics, + "v1.GetLogsPipelineOrder".to_string(), + test_v1_get_logs_pipeline_order, ); world.function_mappings.insert( - "v1.GetMetricMetadata".to_string(), - test_v1_get_metric_metadata, + "v1.UpdateLogsPipelineOrder".to_string(), + test_v1_update_logs_pipeline_order, ); world.function_mappings.insert( - "v1.UpdateMetricMetadata".to_string(), - test_v1_update_metric_metadata, + "v1.ListLogsPipelines".to_string(), + test_v1_list_logs_pipelines, + ); + world.function_mappings.insert( + "v1.CreateLogsPipeline".to_string(), + test_v1_create_logs_pipeline, + ); + world.function_mappings.insert( + "v1.DeleteLogsPipeline".to_string(), + test_v1_delete_logs_pipeline, ); world .function_mappings - .insert("v1.QueryMetrics".to_string(), test_v1_query_metrics); + .insert("v1.GetLogsPipeline".to_string(), test_v1_get_logs_pipeline); + world.function_mappings.insert( + "v1.UpdateLogsPipeline".to_string(), + test_v1_update_logs_pipeline, + ); world .function_mappings - .insert("v1.ListMetrics".to_string(), test_v1_list_metrics); + .insert("v1.ListMonitors".to_string(), test_v1_list_monitors); world .function_mappings - .insert("v1.SubmitMetrics".to_string(), test_v1_submit_metrics); + .insert("v1.CreateMonitor".to_string(), test_v1_create_monitor); + world.function_mappings.insert( + "v1.CheckCanDeleteMonitor".to_string(), + test_v1_check_can_delete_monitor, + ); + world.function_mappings.insert( + "v1.SearchMonitorGroups".to_string(), + test_v1_search_monitor_groups, + ); + world + .function_mappings + .insert("v1.SearchMonitors".to_string(), test_v1_search_monitors); + world + .function_mappings + .insert("v1.ValidateMonitor".to_string(), test_v1_validate_monitor); + world + .function_mappings + .insert("v1.DeleteMonitor".to_string(), test_v1_delete_monitor); + world + .function_mappings + .insert("v1.GetMonitor".to_string(), test_v1_get_monitor); + world + .function_mappings + .insert("v1.UpdateMonitor".to_string(), test_v1_update_monitor); + world.function_mappings.insert( + "v1.ValidateExistingMonitor".to_string(), + test_v1_validate_existing_monitor, + ); + world + .function_mappings + .insert("v1.ListNotebooks".to_string(), test_v1_list_notebooks); + world + .function_mappings + .insert("v1.CreateNotebook".to_string(), test_v1_create_notebook); + world + .function_mappings + .insert("v1.DeleteNotebook".to_string(), test_v1_delete_notebook); + world + .function_mappings + .insert("v1.GetNotebook".to_string(), test_v1_get_notebook); + world + .function_mappings + .insert("v1.UpdateNotebook".to_string(), test_v1_update_notebook); world .function_mappings .insert("v1.ListOrgs".to_string(), test_v1_list_orgs); @@ -1001,21 +1379,127 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { "v1.UpdateSLOCorrection".to_string(), test_v1_update_slo_correction, ); + world.function_mappings.insert( + "v1.GetSyntheticsCIBatch".to_string(), + test_v1_get_synthetics_ci_batch, + ); world .function_mappings - .insert("v1.ListHostTags".to_string(), test_v1_list_host_tags); - world - .function_mappings - .insert("v1.DeleteHostTags".to_string(), test_v1_delete_host_tags); + .insert("v1.ListLocations".to_string(), test_v1_list_locations); + world.function_mappings.insert( + "v1.CreatePrivateLocation".to_string(), + test_v1_create_private_location, + ); + world.function_mappings.insert( + "v1.DeletePrivateLocation".to_string(), + test_v1_delete_private_location, + ); + world.function_mappings.insert( + "v1.GetPrivateLocation".to_string(), + test_v1_get_private_location, + ); + world.function_mappings.insert( + "v1.UpdatePrivateLocation".to_string(), + test_v1_update_private_location, + ); + world.function_mappings.insert( + "v1.GetSyntheticsDefaultLocations".to_string(), + test_v1_get_synthetics_default_locations, + ); world .function_mappings - .insert("v1.GetHostTags".to_string(), test_v1_get_host_tags); + .insert("v1.ListTests".to_string(), test_v1_list_tests); + world.function_mappings.insert( + "v1.CreateSyntheticsAPITest".to_string(), + test_v1_create_synthetics_api_test, + ); world .function_mappings - .insert("v1.CreateHostTags".to_string(), test_v1_create_host_tags); + .insert("v1.GetAPITest".to_string(), test_v1_get_api_test); world .function_mappings - .insert("v1.UpdateHostTags".to_string(), test_v1_update_host_tags); + .insert("v1.UpdateAPITest".to_string(), test_v1_update_api_test); + world.function_mappings.insert( + "v1.CreateSyntheticsBrowserTest".to_string(), + test_v1_create_synthetics_browser_test, + ); + world + .function_mappings + .insert("v1.GetBrowserTest".to_string(), test_v1_get_browser_test); + world.function_mappings.insert( + "v1.UpdateBrowserTest".to_string(), + test_v1_update_browser_test, + ); + world.function_mappings.insert( + "v1.GetBrowserTestLatestResults".to_string(), + test_v1_get_browser_test_latest_results, + ); + world.function_mappings.insert( + "v1.GetBrowserTestResult".to_string(), + test_v1_get_browser_test_result, + ); + world + .function_mappings + .insert("v1.DeleteTests".to_string(), test_v1_delete_tests); + world + .function_mappings + .insert("v1.TriggerTests".to_string(), test_v1_trigger_tests); + world + .function_mappings + .insert("v1.TriggerCITests".to_string(), test_v1_trigger_ci_tests); + world + .function_mappings + .insert("v1.GetTest".to_string(), test_v1_get_test); + world + .function_mappings + .insert("v1.PatchTest".to_string(), test_v1_patch_test); + world.function_mappings.insert( + "v1.GetAPITestLatestResults".to_string(), + test_v1_get_api_test_latest_results, + ); + world.function_mappings.insert( + "v1.GetAPITestResult".to_string(), + test_v1_get_api_test_result, + ); + world.function_mappings.insert( + "v1.UpdateTestPauseStatus".to_string(), + test_v1_update_test_pause_status, + ); + world.function_mappings.insert( + "v1.ListGlobalVariables".to_string(), + test_v1_list_global_variables, + ); + world.function_mappings.insert( + "v1.CreateGlobalVariable".to_string(), + test_v1_create_global_variable, + ); + world.function_mappings.insert( + "v1.DeleteGlobalVariable".to_string(), + test_v1_delete_global_variable, + ); + world.function_mappings.insert( + "v1.GetGlobalVariable".to_string(), + test_v1_get_global_variable, + ); + world.function_mappings.insert( + "v1.EditGlobalVariable".to_string(), + test_v1_edit_global_variable, + ); + world + .function_mappings + .insert("v1.ListHostTags".to_string(), test_v1_list_host_tags); + world + .function_mappings + .insert("v1.DeleteHostTags".to_string(), test_v1_delete_host_tags); + world + .function_mappings + .insert("v1.GetHostTags".to_string(), test_v1_get_host_tags); + world + .function_mappings + .insert("v1.CreateHostTags".to_string(), test_v1_create_host_tags); + world + .function_mappings + .insert("v1.UpdateHostTags".to_string(), test_v1_update_host_tags); world .function_mappings .insert("v1.ListUsers".to_string(), test_v1_list_users); @@ -1034,6 +1518,57 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { world .function_mappings .insert("v1.Validate".to_string(), test_v1_validate); + world + .function_mappings + .insert("v2.ListAPIKeys".to_string(), test_v2_list_api_keys); + world + .function_mappings + .insert("v2.CreateAPIKey".to_string(), test_v2_create_api_key); + world + .function_mappings + .insert("v2.DeleteAPIKey".to_string(), test_v2_delete_api_key); + world + .function_mappings + .insert("v2.GetAPIKey".to_string(), test_v2_get_api_key); + world + .function_mappings + .insert("v2.UpdateAPIKey".to_string(), test_v2_update_api_key); + world.function_mappings.insert( + "v2.ListApplicationKeys".to_string(), + test_v2_list_application_keys, + ); + world.function_mappings.insert( + "v2.DeleteApplicationKey".to_string(), + test_v2_delete_application_key, + ); + world.function_mappings.insert( + "v2.GetApplicationKey".to_string(), + test_v2_get_application_key, + ); + world.function_mappings.insert( + "v2.UpdateApplicationKey".to_string(), + test_v2_update_application_key, + ); + world.function_mappings.insert( + "v2.ListCurrentUserApplicationKeys".to_string(), + test_v2_list_current_user_application_keys, + ); + world.function_mappings.insert( + "v2.CreateCurrentUserApplicationKey".to_string(), + test_v2_create_current_user_application_key, + ); + world.function_mappings.insert( + "v2.DeleteCurrentUserApplicationKey".to_string(), + test_v2_delete_current_user_application_key, + ); + world.function_mappings.insert( + "v2.GetCurrentUserApplicationKey".to_string(), + test_v2_get_current_user_application_key, + ); + world.function_mappings.insert( + "v2.UpdateCurrentUserApplicationKey".to_string(), + test_v2_update_current_user_application_key, + ); world.function_mappings.insert( "v2.ListSpansMetrics".to_string(), test_v2_list_spans_metrics, @@ -1083,6 +1618,138 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { world .function_mappings .insert("v2.SearchAuditLogs".to_string(), test_v2_search_audit_logs); + world.function_mappings.insert( + "v2.ListAuthNMappings".to_string(), + test_v2_list_auth_n_mappings, + ); + world.function_mappings.insert( + "v2.CreateAuthNMapping".to_string(), + test_v2_create_auth_n_mapping, + ); + world.function_mappings.insert( + "v2.DeleteAuthNMapping".to_string(), + test_v2_delete_auth_n_mapping, + ); + world + .function_mappings + .insert("v2.GetAuthNMapping".to_string(), test_v2_get_auth_n_mapping); + world.function_mappings.insert( + "v2.UpdateAuthNMapping".to_string(), + test_v2_update_auth_n_mapping, + ); + world.function_mappings.insert( + "v2.CreateCIAppPipelineEvent".to_string(), + test_v2_create_ci_app_pipeline_event, + ); + world.function_mappings.insert( + "v2.AggregateCIAppPipelineEvents".to_string(), + test_v2_aggregate_ci_app_pipeline_events, + ); + world.function_mappings.insert( + "v2.ListCIAppPipelineEvents".to_string(), + test_v2_list_ci_app_pipeline_events, + ); + world.function_mappings.insert( + "v2.SearchCIAppPipelineEvents".to_string(), + test_v2_search_ci_app_pipeline_events, + ); + world.function_mappings.insert( + "v2.AggregateCIAppTestEvents".to_string(), + test_v2_aggregate_ci_app_test_events, + ); + world.function_mappings.insert( + "v2.ListCIAppTestEvents".to_string(), + test_v2_list_ci_app_test_events, + ); + world.function_mappings.insert( + "v2.SearchCIAppTestEvents".to_string(), + test_v2_search_ci_app_test_events, + ); + world.function_mappings.insert( + "v2.ListContainerImages".to_string(), + test_v2_list_container_images, + ); + world + .function_mappings + .insert("v2.ListContainers".to_string(), test_v2_list_containers); + world.function_mappings.insert( + "v2.ListCostAWSCURConfigs".to_string(), + test_v2_list_cost_awscur_configs, + ); + world.function_mappings.insert( + "v2.CreateCostAWSCURConfig".to_string(), + test_v2_create_cost_awscur_config, + ); + world.function_mappings.insert( + "v2.DeleteCostAWSCURConfig".to_string(), + test_v2_delete_cost_awscur_config, + ); + world.function_mappings.insert( + "v2.UpdateCostAWSCURConfig".to_string(), + test_v2_update_cost_awscur_config, + ); + world.function_mappings.insert( + "v2.ListAWSRelatedAccounts".to_string(), + test_v2_list_aws_related_accounts, + ); + world.function_mappings.insert( + "v2.ListCostAzureUCConfigs".to_string(), + test_v2_list_cost_azure_uc_configs, + ); + world.function_mappings.insert( + "v2.CreateCostAzureUCConfigs".to_string(), + test_v2_create_cost_azure_uc_configs, + ); + world.function_mappings.insert( + "v2.DeleteCostAzureUCConfig".to_string(), + test_v2_delete_cost_azure_uc_config, + ); + world.function_mappings.insert( + "v2.UpdateCostAzureUCConfigs".to_string(), + test_v2_update_cost_azure_uc_configs, + ); + world.function_mappings.insert( + "v2.GetCloudCostActivity".to_string(), + test_v2_get_cloud_cost_activity, + ); + world.function_mappings.insert( + "v2.GetActiveBillingDimensions".to_string(), + test_v2_get_active_billing_dimensions, + ); + world.function_mappings.insert( + "v2.GetMonthlyCostAttribution".to_string(), + test_v2_get_monthly_cost_attribution, + ); + world.function_mappings.insert( + "v2.GetUsageApplicationSecurityMonitoring".to_string(), + test_v2_get_usage_application_security_monitoring, + ); + world + .function_mappings + .insert("v2.GetCostByOrg".to_string(), test_v2_get_cost_by_org); + world.function_mappings.insert( + "v2.GetEstimatedCostByOrg".to_string(), + test_v2_get_estimated_cost_by_org, + ); + world.function_mappings.insert( + "v2.GetHistoricalCostByOrg".to_string(), + test_v2_get_historical_cost_by_org, + ); + world + .function_mappings + .insert("v2.GetHourlyUsage".to_string(), test_v2_get_hourly_usage); + world.function_mappings.insert( + "v2.GetUsageLambdaTracedInvocations".to_string(), + test_v2_get_usage_lambda_traced_invocations, + ); + world.function_mappings.insert( + "v2.GetUsageObservabilityPipelines".to_string(), + test_v2_get_usage_observability_pipelines, + ); + world.function_mappings.insert( + "v2.GetProjectedCost".to_string(), + test_v2_get_projected_cost, + ); world.function_mappings.insert( "v2.DeleteDashboardListItems".to_string(), test_v2_delete_dashboard_list_items, @@ -1099,12 +1766,104 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { "v2.UpdateDashboardListItems".to_string(), test_v2_update_dashboard_list_items, ); + world.function_mappings.insert( + "v2.CreateDORADeployment".to_string(), + test_v2_create_dora_deployment, + ); + world.function_mappings.insert( + "v2.CreateDORAIncident".to_string(), + test_v2_create_dora_incident, + ); + world + .function_mappings + .insert("v2.ListDowntimes".to_string(), test_v2_list_downtimes); + world + .function_mappings + .insert("v2.CreateDowntime".to_string(), test_v2_create_downtime); + world + .function_mappings + .insert("v2.CancelDowntime".to_string(), test_v2_cancel_downtime); + world + .function_mappings + .insert("v2.GetDowntime".to_string(), test_v2_get_downtime); + world + .function_mappings + .insert("v2.UpdateDowntime".to_string(), test_v2_update_downtime); + world.function_mappings.insert( + "v2.ListMonitorDowntimes".to_string(), + test_v2_list_monitor_downtimes, + ); world .function_mappings .insert("v2.ListEvents".to_string(), test_v2_list_events); world .function_mappings .insert("v2.SearchEvents".to_string(), test_v2_search_events); + world + .function_mappings + .insert("v2.ListIncidents".to_string(), test_v2_list_incidents); + world + .function_mappings + .insert("v2.CreateIncident".to_string(), test_v2_create_incident); + world + .function_mappings + .insert("v2.SearchIncidents".to_string(), test_v2_search_incidents); + world + .function_mappings + .insert("v2.DeleteIncident".to_string(), test_v2_delete_incident); + world + .function_mappings + .insert("v2.GetIncident".to_string(), test_v2_get_incident); + world + .function_mappings + .insert("v2.UpdateIncident".to_string(), test_v2_update_incident); + world.function_mappings.insert( + "v2.ListIncidentAttachments".to_string(), + test_v2_list_incident_attachments, + ); + world.function_mappings.insert( + "v2.UpdateIncidentAttachments".to_string(), + test_v2_update_incident_attachments, + ); + world.function_mappings.insert( + "v2.ListIncidentIntegrations".to_string(), + test_v2_list_incident_integrations, + ); + world.function_mappings.insert( + "v2.CreateIncidentIntegration".to_string(), + test_v2_create_incident_integration, + ); + world.function_mappings.insert( + "v2.DeleteIncidentIntegration".to_string(), + test_v2_delete_incident_integration, + ); + world.function_mappings.insert( + "v2.GetIncidentIntegration".to_string(), + test_v2_get_incident_integration, + ); + world.function_mappings.insert( + "v2.UpdateIncidentIntegration".to_string(), + test_v2_update_incident_integration, + ); + world.function_mappings.insert( + "v2.ListIncidentTodos".to_string(), + test_v2_list_incident_todos, + ); + world.function_mappings.insert( + "v2.CreateIncidentTodo".to_string(), + test_v2_create_incident_todo, + ); + world.function_mappings.insert( + "v2.DeleteIncidentTodo".to_string(), + test_v2_delete_incident_todo, + ); + world + .function_mappings + .insert("v2.GetIncidentTodo".to_string(), test_v2_get_incident_todo); + world.function_mappings.insert( + "v2.UpdateIncidentTodo".to_string(), + test_v2_update_incident_todo, + ); world.function_mappings.insert( "v2.ListGCPSTSAccounts".to_string(), test_v2_list_gcpsts_accounts, @@ -1249,135 +2008,7994 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { "v2.UpdateFastlyService".to_string(), test_v2_update_fastly_service, ); - world - .function_mappings - .insert("v2.GetIPAllowlist".to_string(), test_v2_get_ip_allowlist); world.function_mappings.insert( - "v2.UpdateIPAllowlist".to_string(), - test_v2_update_ip_allowlist, + "v2.ListOktaAccounts".to_string(), + test_v2_list_okta_accounts, ); - world - .function_mappings - .insert("v2.SubmitLog".to_string(), test_v2_submit_log); - world - .function_mappings - .insert("v2.ListLogsMetrics".to_string(), test_v2_list_logs_metrics); world.function_mappings.insert( - "v2.CreateLogsMetric".to_string(), - test_v2_create_logs_metric, + "v2.CreateOktaAccount".to_string(), + test_v2_create_okta_account, ); world.function_mappings.insert( - "v2.DeleteLogsMetric".to_string(), - test_v2_delete_logs_metric, + "v2.DeleteOktaAccount".to_string(), + test_v2_delete_okta_account, ); world .function_mappings - .insert("v2.GetLogsMetric".to_string(), test_v2_get_logs_metric); + .insert("v2.GetOktaAccount".to_string(), test_v2_get_okta_account); world.function_mappings.insert( - "v2.UpdateLogsMetric".to_string(), - test_v2_update_logs_metric, + "v2.UpdateOktaAccount".to_string(), + test_v2_update_okta_account, ); world .function_mappings - .insert("v2.ListPermissions".to_string(), test_v2_list_permissions); + .insert("v2.GetIPAllowlist".to_string(), test_v2_get_ip_allowlist); + world.function_mappings.insert( + "v2.UpdateIPAllowlist".to_string(), + test_v2_update_ip_allowlist, + ); world .function_mappings - .insert("v2.ListFindings".to_string(), test_v2_list_findings); + .insert("v2.SubmitLog".to_string(), test_v2_submit_log); world .function_mappings - .insert("v2.GetFinding".to_string(), test_v2_get_finding); + .insert("v2.AggregateLogs".to_string(), test_v2_aggregate_logs); world .function_mappings - .insert("v2.UpdateFinding".to_string(), test_v2_update_finding); + .insert("v2.ListLogsGet".to_string(), test_v2_list_logs_get); world .function_mappings - .insert("v2.ListProcesses".to_string(), test_v2_list_processes); + .insert("v2.ListLogs".to_string(), test_v2_list_logs); world.function_mappings.insert( - "v2.DeleteRestrictionPolicy".to_string(), - test_v2_delete_restriction_policy, + "v2.GetLogsArchiveOrder".to_string(), + test_v2_get_logs_archive_order, ); world.function_mappings.insert( - "v2.GetRestrictionPolicy".to_string(), - test_v2_get_restriction_policy, + "v2.UpdateLogsArchiveOrder".to_string(), + test_v2_update_logs_archive_order, ); world.function_mappings.insert( - "v2.UpdateRestrictionPolicy".to_string(), - test_v2_update_restriction_policy, + "v2.ListLogsArchives".to_string(), + test_v2_list_logs_archives, ); world.function_mappings.insert( - "v2.UploadIdPMetadata".to_string(), - test_v2_upload_id_p_metadata, + "v2.CreateLogsArchive".to_string(), + test_v2_create_logs_archive, ); world.function_mappings.insert( - "v2.DownloadCloudWorkloadPolicyFile".to_string(), - test_v2_download_cloud_workload_policy_file, + "v2.DeleteLogsArchive".to_string(), + test_v2_delete_logs_archive, ); + world + .function_mappings + .insert("v2.GetLogsArchive".to_string(), test_v2_get_logs_archive); world.function_mappings.insert( - "v2.ListCloudWorkloadSecurityAgentRules".to_string(), - test_v2_list_cloud_workload_security_agent_rules, + "v2.UpdateLogsArchive".to_string(), + test_v2_update_logs_archive, ); world.function_mappings.insert( - "v2.CreateCloudWorkloadSecurityAgentRule".to_string(), - test_v2_create_cloud_workload_security_agent_rule, + "v2.RemoveRoleFromArchive".to_string(), + test_v2_remove_role_from_archive, ); world.function_mappings.insert( - "v2.DeleteCloudWorkloadSecurityAgentRule".to_string(), - test_v2_delete_cloud_workload_security_agent_rule, + "v2.ListArchiveReadRoles".to_string(), + test_v2_list_archive_read_roles, ); world.function_mappings.insert( - "v2.GetCloudWorkloadSecurityAgentRule".to_string(), - test_v2_get_cloud_workload_security_agent_rule, + "v2.AddReadRoleToArchive".to_string(), + test_v2_add_read_role_to_archive, ); + world + .function_mappings + .insert("v2.ListLogsMetrics".to_string(), test_v2_list_logs_metrics); world.function_mappings.insert( - "v2.UpdateCloudWorkloadSecurityAgentRule".to_string(), - test_v2_update_cloud_workload_security_agent_rule, + "v2.CreateLogsMetric".to_string(), + test_v2_create_logs_metric, + ); + world.function_mappings.insert( + "v2.DeleteLogsMetric".to_string(), + test_v2_delete_logs_metric, + ); + world + .function_mappings + .insert("v2.GetLogsMetric".to_string(), test_v2_get_logs_metric); + world.function_mappings.insert( + "v2.UpdateLogsMetric".to_string(), + test_v2_update_logs_metric, + ); + world.function_mappings.insert( + "v2.ListTagConfigurations".to_string(), + test_v2_list_tag_configurations, + ); + world.function_mappings.insert( + "v2.DeleteBulkTagsMetricsConfiguration".to_string(), + test_v2_delete_bulk_tags_metrics_configuration, + ); + world.function_mappings.insert( + "v2.CreateBulkTagsMetricsConfiguration".to_string(), + test_v2_create_bulk_tags_metrics_configuration, + ); + world.function_mappings.insert( + "v2.ListActiveMetricConfigurations".to_string(), + test_v2_list_active_metric_configurations, + ); + world.function_mappings.insert( + "v2.ListTagsByMetricName".to_string(), + test_v2_list_tags_by_metric_name, + ); + world.function_mappings.insert( + "v2.EstimateMetricsOutputSeries".to_string(), + test_v2_estimate_metrics_output_series, + ); + world.function_mappings.insert( + "v2.DeleteTagConfiguration".to_string(), + test_v2_delete_tag_configuration, + ); + world.function_mappings.insert( + "v2.ListTagConfigurationByName".to_string(), + test_v2_list_tag_configuration_by_name, + ); + world.function_mappings.insert( + "v2.UpdateTagConfiguration".to_string(), + test_v2_update_tag_configuration, + ); + world.function_mappings.insert( + "v2.CreateTagConfiguration".to_string(), + test_v2_create_tag_configuration, + ); + world.function_mappings.insert( + "v2.ListVolumesByMetricName".to_string(), + test_v2_list_volumes_by_metric_name, + ); + world + .function_mappings + .insert("v2.QueryScalarData".to_string(), test_v2_query_scalar_data); + world.function_mappings.insert( + "v2.QueryTimeseriesData".to_string(), + test_v2_query_timeseries_data, ); world .function_mappings .insert("v2.SubmitMetrics".to_string(), test_v2_submit_metrics); world.function_mappings.insert( - "v2.GetOnDemandConcurrencyCap".to_string(), - test_v2_get_on_demand_concurrency_cap, + "v2.ListMonitorConfigPolicies".to_string(), + test_v2_list_monitor_config_policies, ); world.function_mappings.insert( - "v2.SetOnDemandConcurrencyCap".to_string(), - test_v2_set_on_demand_concurrency_cap, + "v2.CreateMonitorConfigPolicy".to_string(), + test_v2_create_monitor_config_policy, ); world.function_mappings.insert( - "v2.GetUsageApplicationSecurityMonitoring".to_string(), - test_v2_get_usage_application_security_monitoring, + "v2.DeleteMonitorConfigPolicy".to_string(), + test_v2_delete_monitor_config_policy, + ); + world.function_mappings.insert( + "v2.GetMonitorConfigPolicy".to_string(), + test_v2_get_monitor_config_policy, + ); + world.function_mappings.insert( + "v2.UpdateMonitorConfigPolicy".to_string(), + test_v2_update_monitor_config_policy, ); world .function_mappings - .insert("v2.GetCostByOrg".to_string(), test_v2_get_cost_by_org); + .insert("v2.ListPermissions".to_string(), test_v2_list_permissions); + world + .function_mappings + .insert("v2.ListRoles".to_string(), test_v2_list_roles); + world + .function_mappings + .insert("v2.CreateRole".to_string(), test_v2_create_role); + world + .function_mappings + .insert("v2.DeleteRole".to_string(), test_v2_delete_role); + world + .function_mappings + .insert("v2.GetRole".to_string(), test_v2_get_role); + world + .function_mappings + .insert("v2.UpdateRole".to_string(), test_v2_update_role); + world + .function_mappings + .insert("v2.CloneRole".to_string(), test_v2_clone_role); world.function_mappings.insert( - "v2.GetEstimatedCostByOrg".to_string(), - test_v2_get_estimated_cost_by_org, + "v2.RemovePermissionFromRole".to_string(), + test_v2_remove_permission_from_role, ); world.function_mappings.insert( - "v2.GetHistoricalCostByOrg".to_string(), - test_v2_get_historical_cost_by_org, + "v2.ListRolePermissions".to_string(), + test_v2_list_role_permissions, + ); + world.function_mappings.insert( + "v2.AddPermissionToRole".to_string(), + test_v2_add_permission_to_role, + ); + world.function_mappings.insert( + "v2.RemoveUserFromRole".to_string(), + test_v2_remove_user_from_role, ); world .function_mappings - .insert("v2.GetHourlyUsage".to_string(), test_v2_get_hourly_usage); + .insert("v2.ListRoleUsers".to_string(), test_v2_list_role_users); + world + .function_mappings + .insert("v2.AddUserToRole".to_string(), test_v2_add_user_to_role); + world + .function_mappings + .insert("v2.ListFindings".to_string(), test_v2_list_findings); + world + .function_mappings + .insert("v2.MuteFindings".to_string(), test_v2_mute_findings); + world + .function_mappings + .insert("v2.GetFinding".to_string(), test_v2_get_finding); world.function_mappings.insert( - "v2.GetUsageLambdaTracedInvocations".to_string(), - test_v2_get_usage_lambda_traced_invocations, + "v2.ListSecurityFilters".to_string(), + test_v2_list_security_filters, ); world.function_mappings.insert( - "v2.GetUsageObservabilityPipelines".to_string(), - test_v2_get_usage_observability_pipelines, + "v2.CreateSecurityFilter".to_string(), + test_v2_create_security_filter, + ); + world.function_mappings.insert( + "v2.DeleteSecurityFilter".to_string(), + test_v2_delete_security_filter, + ); + world.function_mappings.insert( + "v2.GetSecurityFilter".to_string(), + test_v2_get_security_filter, + ); + world.function_mappings.insert( + "v2.UpdateSecurityFilter".to_string(), + test_v2_update_security_filter, + ); + world.function_mappings.insert( + "v2.ListSecurityMonitoringRules".to_string(), + test_v2_list_security_monitoring_rules, + ); + world.function_mappings.insert( + "v2.CreateSecurityMonitoringRule".to_string(), + test_v2_create_security_monitoring_rule, + ); + world.function_mappings.insert( + "v2.DeleteSecurityMonitoringRule".to_string(), + test_v2_delete_security_monitoring_rule, + ); + world.function_mappings.insert( + "v2.GetSecurityMonitoringRule".to_string(), + test_v2_get_security_monitoring_rule, + ); + world.function_mappings.insert( + "v2.UpdateSecurityMonitoringRule".to_string(), + test_v2_update_security_monitoring_rule, + ); + world.function_mappings.insert( + "v2.ListSecurityMonitoringSignals".to_string(), + test_v2_list_security_monitoring_signals, + ); + world.function_mappings.insert( + "v2.SearchSecurityMonitoringSignals".to_string(), + test_v2_search_security_monitoring_signals, + ); + world.function_mappings.insert( + "v2.GetSecurityMonitoringSignal".to_string(), + test_v2_get_security_monitoring_signal, + ); + world.function_mappings.insert( + "v2.EditSecurityMonitoringSignalAssignee".to_string(), + test_v2_edit_security_monitoring_signal_assignee, + ); + world.function_mappings.insert( + "v2.EditSecurityMonitoringSignalIncidents".to_string(), + test_v2_edit_security_monitoring_signal_incidents, + ); + world.function_mappings.insert( + "v2.EditSecurityMonitoringSignalState".to_string(), + test_v2_edit_security_monitoring_signal_state, + ); + world + .function_mappings + .insert("v2.ListPowerpacks".to_string(), test_v2_list_powerpacks); + world + .function_mappings + .insert("v2.CreatePowerpack".to_string(), test_v2_create_powerpack); + world + .function_mappings + .insert("v2.DeletePowerpack".to_string(), test_v2_delete_powerpack); + world + .function_mappings + .insert("v2.GetPowerpack".to_string(), test_v2_get_powerpack); + world + .function_mappings + .insert("v2.UpdatePowerpack".to_string(), test_v2_update_powerpack); + world + .function_mappings + .insert("v2.ListProcesses".to_string(), test_v2_list_processes); + world.function_mappings.insert( + "v2.DeleteRestrictionPolicy".to_string(), + test_v2_delete_restriction_policy, + ); + world.function_mappings.insert( + "v2.GetRestrictionPolicy".to_string(), + test_v2_get_restriction_policy, + ); + world.function_mappings.insert( + "v2.UpdateRestrictionPolicy".to_string(), + test_v2_update_restriction_policy, + ); + world.function_mappings.insert( + "v2.AggregateRUMEvents".to_string(), + test_v2_aggregate_rum_events, + ); + world.function_mappings.insert( + "v2.GetRUMApplications".to_string(), + test_v2_get_rum_applications, + ); + world.function_mappings.insert( + "v2.CreateRUMApplication".to_string(), + test_v2_create_rum_application, + ); + world.function_mappings.insert( + "v2.DeleteRUMApplication".to_string(), + test_v2_delete_rum_application, + ); + world.function_mappings.insert( + "v2.GetRUMApplication".to_string(), + test_v2_get_rum_application, + ); + world.function_mappings.insert( + "v2.UpdateRUMApplication".to_string(), + test_v2_update_rum_application, + ); + world + .function_mappings + .insert("v2.ListRUMEvents".to_string(), test_v2_list_rum_events); + world + .function_mappings + .insert("v2.SearchRUMEvents".to_string(), test_v2_search_rum_events); + world.function_mappings.insert( + "v2.UploadIdPMetadata".to_string(), + test_v2_upload_id_p_metadata, + ); + world.function_mappings.insert( + "v2.ListScorecardOutcomes".to_string(), + test_v2_list_scorecard_outcomes, + ); + world.function_mappings.insert( + "v2.CreateScorecardOutcomesBatch".to_string(), + test_v2_create_scorecard_outcomes_batch, + ); + world.function_mappings.insert( + "v2.ListScorecardRules".to_string(), + test_v2_list_scorecard_rules, + ); + world.function_mappings.insert( + "v2.CreateScorecardRule".to_string(), + test_v2_create_scorecard_rule, + ); + world.function_mappings.insert( + "v2.DeleteScorecardRule".to_string(), + test_v2_delete_scorecard_rule, + ); + world.function_mappings.insert( + "v2.DownloadCloudWorkloadPolicyFile".to_string(), + test_v2_download_cloud_workload_policy_file, + ); + world.function_mappings.insert( + "v2.ListCloudWorkloadSecurityAgentRules".to_string(), + test_v2_list_cloud_workload_security_agent_rules, + ); + world.function_mappings.insert( + "v2.CreateCloudWorkloadSecurityAgentRule".to_string(), + test_v2_create_cloud_workload_security_agent_rule, + ); + world.function_mappings.insert( + "v2.DeleteCloudWorkloadSecurityAgentRule".to_string(), + test_v2_delete_cloud_workload_security_agent_rule, + ); + world.function_mappings.insert( + "v2.GetCloudWorkloadSecurityAgentRule".to_string(), + test_v2_get_cloud_workload_security_agent_rule, + ); + world.function_mappings.insert( + "v2.UpdateCloudWorkloadSecurityAgentRule".to_string(), + test_v2_update_cloud_workload_security_agent_rule, + ); + world.function_mappings.insert( + "v2.ListScanningGroups".to_string(), + test_v2_list_scanning_groups, + ); + world.function_mappings.insert( + "v2.ReorderScanningGroups".to_string(), + test_v2_reorder_scanning_groups, + ); + world.function_mappings.insert( + "v2.CreateScanningGroup".to_string(), + test_v2_create_scanning_group, + ); + world.function_mappings.insert( + "v2.DeleteScanningGroup".to_string(), + test_v2_delete_scanning_group, + ); + world.function_mappings.insert( + "v2.UpdateScanningGroup".to_string(), + test_v2_update_scanning_group, + ); + world.function_mappings.insert( + "v2.CreateScanningRule".to_string(), + test_v2_create_scanning_rule, + ); + world.function_mappings.insert( + "v2.DeleteScanningRule".to_string(), + test_v2_delete_scanning_rule, + ); + world.function_mappings.insert( + "v2.UpdateScanningRule".to_string(), + test_v2_update_scanning_rule, + ); + world.function_mappings.insert( + "v2.ListStandardPatterns".to_string(), + test_v2_list_standard_patterns, + ); + world.function_mappings.insert( + "v2.CreateServiceAccount".to_string(), + test_v2_create_service_account, + ); + world.function_mappings.insert( + "v2.ListServiceAccountApplicationKeys".to_string(), + test_v2_list_service_account_application_keys, + ); + world.function_mappings.insert( + "v2.CreateServiceAccountApplicationKey".to_string(), + test_v2_create_service_account_application_key, + ); + world.function_mappings.insert( + "v2.DeleteServiceAccountApplicationKey".to_string(), + test_v2_delete_service_account_application_key, + ); + world.function_mappings.insert( + "v2.GetServiceAccountApplicationKey".to_string(), + test_v2_get_service_account_application_key, + ); + world.function_mappings.insert( + "v2.UpdateServiceAccountApplicationKey".to_string(), + test_v2_update_service_account_application_key, + ); + world.function_mappings.insert( + "v2.ListIncidentServices".to_string(), + test_v2_list_incident_services, + ); + world.function_mappings.insert( + "v2.CreateIncidentService".to_string(), + test_v2_create_incident_service, + ); + world.function_mappings.insert( + "v2.DeleteIncidentService".to_string(), + test_v2_delete_incident_service, + ); + world.function_mappings.insert( + "v2.GetIncidentService".to_string(), + test_v2_get_incident_service, + ); + world.function_mappings.insert( + "v2.UpdateIncidentService".to_string(), + test_v2_update_incident_service, + ); + world.function_mappings.insert( + "v2.ListServiceDefinitions".to_string(), + test_v2_list_service_definitions, + ); + world.function_mappings.insert( + "v2.CreateOrUpdateServiceDefinitions".to_string(), + test_v2_create_or_update_service_definitions, + ); + world.function_mappings.insert( + "v2.DeleteServiceDefinition".to_string(), + test_v2_delete_service_definition, + ); + world.function_mappings.insert( + "v2.GetServiceDefinition".to_string(), + test_v2_get_service_definition, ); + world + .function_mappings + .insert("v2.AggregateSpans".to_string(), test_v2_aggregate_spans); + world + .function_mappings + .insert("v2.ListSpansGet".to_string(), test_v2_list_spans_get); + world + .function_mappings + .insert("v2.ListSpans".to_string(), test_v2_list_spans); + world.function_mappings.insert( + "v2.GetOnDemandConcurrencyCap".to_string(), + test_v2_get_on_demand_concurrency_cap, + ); + world.function_mappings.insert( + "v2.SetOnDemandConcurrencyCap".to_string(), + test_v2_set_on_demand_concurrency_cap, + ); + world + .function_mappings + .insert("v2.ListTeams".to_string(), test_v2_list_teams); + world + .function_mappings + .insert("v2.CreateTeam".to_string(), test_v2_create_team); + world + .function_mappings + .insert("v2.DeleteTeam".to_string(), test_v2_delete_team); + world + .function_mappings + .insert("v2.GetTeam".to_string(), test_v2_get_team); + world + .function_mappings + .insert("v2.UpdateTeam".to_string(), test_v2_update_team); + world + .function_mappings + .insert("v2.GetTeamLinks".to_string(), test_v2_get_team_links); + world + .function_mappings + .insert("v2.CreateTeamLink".to_string(), test_v2_create_team_link); + world + .function_mappings + .insert("v2.DeleteTeamLink".to_string(), test_v2_delete_team_link); + world + .function_mappings + .insert("v2.GetTeamLink".to_string(), test_v2_get_team_link); + world + .function_mappings + .insert("v2.UpdateTeamLink".to_string(), test_v2_update_team_link); + world.function_mappings.insert( + "v2.GetTeamMemberships".to_string(), + test_v2_get_team_memberships, + ); + world.function_mappings.insert( + "v2.CreateTeamMembership".to_string(), + test_v2_create_team_membership, + ); + world.function_mappings.insert( + "v2.DeleteTeamMembership".to_string(), + test_v2_delete_team_membership, + ); + world.function_mappings.insert( + "v2.UpdateTeamMembership".to_string(), + test_v2_update_team_membership, + ); + world.function_mappings.insert( + "v2.GetTeamPermissionSettings".to_string(), + test_v2_get_team_permission_settings, + ); + world.function_mappings.insert( + "v2.UpdateTeamPermissionSetting".to_string(), + test_v2_update_team_permission_setting, + ); + world.function_mappings.insert( + "v2.GetUserMemberships".to_string(), + test_v2_get_user_memberships, + ); + world.function_mappings.insert( + "v2.ListIncidentTeams".to_string(), + test_v2_list_incident_teams, + ); + world.function_mappings.insert( + "v2.CreateIncidentTeam".to_string(), + test_v2_create_incident_team, + ); + world.function_mappings.insert( + "v2.DeleteIncidentTeam".to_string(), + test_v2_delete_incident_team, + ); + world + .function_mappings + .insert("v2.GetIncidentTeam".to_string(), test_v2_get_incident_team); + world.function_mappings.insert( + "v2.UpdateIncidentTeam".to_string(), + test_v2_update_incident_team, + ); + world + .function_mappings + .insert("v2.SendInvitations".to_string(), test_v2_send_invitations); + world + .function_mappings + .insert("v2.GetInvitation".to_string(), test_v2_get_invitation); + world + .function_mappings + .insert("v2.ListUsers".to_string(), test_v2_list_users); + world + .function_mappings + .insert("v2.CreateUser".to_string(), test_v2_create_user); + world + .function_mappings + .insert("v2.DisableUser".to_string(), test_v2_disable_user); + world + .function_mappings + .insert("v2.GetUser".to_string(), test_v2_get_user); + world + .function_mappings + .insert("v2.UpdateUser".to_string(), test_v2_update_user); + world.function_mappings.insert( + "v2.ListUserOrganizations".to_string(), + test_v2_list_user_organizations, + ); + world.function_mappings.insert( + "v2.ListUserPermissions".to_string(), + test_v2_list_user_permissions, + ); +} + +fn test_v1_get_ip_ranges(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_ip_ranges + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.get_ip_ranges_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_api_keys(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_api_keys_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::CreateAPIKeyParams { body }; + let response = match block_on(api.create_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::DeleteAPIKeyParams { key }; + let response = match block_on(api.delete_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::GetAPIKeyParams { key }; + let response = match block_on(api.get_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::UpdateAPIKeyParams { key, body }; + let response = match block_on(api.update_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_application_keys(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_application_keys_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::CreateApplicationKeyParams { body }; + let response = match block_on(api.create_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::DeleteApplicationKeyParams { key }; + let response = match block_on(api.delete_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::GetApplicationKeyParams { key }; + let response = match block_on(api.get_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_key_management + .as_ref() + .expect("api instance not found"); + let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_key_management::UpdateApplicationKeyParams { key, body }; + let response = match block_on(api.update_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_submit_service_check(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_checks + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_service_checks::SubmitServiceCheckParams { body }; + let response = match block_on(api.submit_service_check_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_daily_custom_reports( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_dir = if let Some(param) = _parameters.get("sort_dir") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetDailyCustomReportsParams { + page_size, + page_number, + sort_dir, + sort, + }; + let response = match block_on(api.get_daily_custom_reports_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_specified_daily_custom_reports( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let report_id = serde_json::from_value(_parameters.get("report_id").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_usage_metering::GetSpecifiedDailyCustomReportsParams { report_id }; + let response = match block_on(api.get_specified_daily_custom_reports_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_monthly_custom_reports( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_dir = if let Some(param) = _parameters.get("sort_dir") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetMonthlyCustomReportsParams { + page_size, + page_number, + sort_dir, + sort, + }; + let response = match block_on(api.get_monthly_custom_reports_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_specified_monthly_custom_reports( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let report_id = serde_json::from_value(_parameters.get("report_id").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_usage_metering::GetSpecifiedMonthlyCustomReportsParams { report_id }; + let response = match block_on(api.get_specified_monthly_custom_reports_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_analyzed_logs(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageAnalyzedLogsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_analyzed_logs_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_attribution(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_month = + serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); + let fields = serde_json::from_value(_parameters.get("fields").unwrap().clone()).unwrap(); + let end_month = if let Some(param) = _parameters.get("end_month") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_direction = if let Some(param) = _parameters.get("sort_direction") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_name = if let Some(param) = _parameters.get("sort_name") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_descendants = if let Some(param) = _parameters.get("include_descendants") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let offset = if let Some(param) = _parameters.get("offset") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let limit = if let Some(param) = _parameters.get("limit") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageAttributionParams { + start_month, + fields, + end_month, + sort_direction, + sort_name, + include_descendants, + offset, + limit, + }; + let response = match block_on(api.get_usage_attribution_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageAuditLogsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_audit_logs_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_lambda(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageLambdaParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_lambda_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_billable_summary( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let month = if let Some(param) = _parameters.get("month") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageBillableSummaryParams { month }; + let response = match block_on(api.get_usage_billable_summary_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_ci_app(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageCIAppParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_ci_app_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_cloud_security_posture_management( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageCloudSecurityPostureManagementParams { + start_hr, + end_hr, + }; + let response = + match block_on(api.get_usage_cloud_security_posture_management_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_cws(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageCWSParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_cws_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_dbm(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageDBMParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_dbm_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_fargate(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageFargateParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_fargate_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_hosts(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageHostsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_hosts_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_hourly_usage_attribution( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let usage_type = + serde_json::from_value(_parameters.get("usage_type").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let next_record_id = if let Some(param) = _parameters.get("next_record_id") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let tag_breakdown_keys = if let Some(param) = _parameters.get("tag_breakdown_keys") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_descendants = if let Some(param) = _parameters.get("include_descendants") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetHourlyUsageAttributionParams { + start_hr, + usage_type, + end_hr, + next_record_id, + tag_breakdown_keys, + include_descendants, + }; + let response = match block_on(api.get_hourly_usage_attribution_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_incident_management(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetIncidentManagementParams { start_hr, end_hr }; + let response = match block_on(api.get_incident_management_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_indexed_spans(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageIndexedSpansParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_indexed_spans_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_ingested_spans(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetIngestedSpansParams { start_hr, end_hr }; + let response = match block_on(api.get_ingested_spans_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_internet_of_things( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageInternetOfThingsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_internet_of_things_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_logs(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageLogsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_logs_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_logs_by_retention( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageLogsByRetentionParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_logs_by_retention_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_logs_by_index(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let index_name = if let Some(param) = _parameters.get("index_name") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageLogsByIndexParams { + start_hr, + end_hr, + index_name, + }; + let response = match block_on(api.get_usage_logs_by_index_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_monthly_usage_attribution( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_month = + serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); + let fields = serde_json::from_value(_parameters.get("fields").unwrap().clone()).unwrap(); + let end_month = if let Some(param) = _parameters.get("end_month") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_direction = if let Some(param) = _parameters.get("sort_direction") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_name = if let Some(param) = _parameters.get("sort_name") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let tag_breakdown_keys = if let Some(param) = _parameters.get("tag_breakdown_keys") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let next_record_id = if let Some(param) = _parameters.get("next_record_id") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_descendants = if let Some(param) = _parameters.get("include_descendants") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetMonthlyUsageAttributionParams { + start_month, + fields, + end_month, + sort_direction, + sort_name, + tag_breakdown_keys, + next_record_id, + include_descendants, + }; + let response = match block_on(api.get_monthly_usage_attribution_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_network_flows(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageNetworkFlowsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_network_flows_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_network_hosts(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageNetworkHostsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_network_hosts_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_online_archive( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageOnlineArchiveParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_online_archive_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_profiling(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageProfilingParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_profiling_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_rum_units(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageRumUnitsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_rum_units_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_rum_sessions(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let type_ = if let Some(param) = _parameters.get("type") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageRumSessionsParams { + start_hr, + end_hr, + type_, + }; + let response = match block_on(api.get_usage_rum_sessions_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_sds(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageSDSParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_sds_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_snmp(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageSNMPParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_snmp_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_summary(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_month = + serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); + let end_month = if let Some(param) = _parameters.get("end_month") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_org_details = if let Some(param) = _parameters.get("include_org_details") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageSummaryParams { + start_month, + end_month, + include_org_details, + }; + let response = match block_on(api.get_usage_summary_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_synthetics(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageSyntheticsParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_synthetics_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_synthetics_api( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageSyntheticsAPIParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_synthetics_api_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_synthetics_browser( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV1::api::api_usage_metering::GetUsageSyntheticsBrowserParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_synthetics_browser_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_timeseries(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageTimeseriesParams { start_hr, end_hr }; + let response = match block_on(api.get_usage_timeseries_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_usage_top_avg_metrics( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_usage_metering + .as_ref() + .expect("api instance not found"); + let month = if let Some(param) = _parameters.get("month") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let day = if let Some(param) = _parameters.get("day") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let names = if let Some(param) = _parameters.get("names") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let limit = if let Some(param) = _parameters.get("limit") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let next_record_id = if let Some(param) = _parameters.get("next_record_id") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_usage_metering::GetUsageTopAvgMetricsParams { + month, + day, + names, + limit, + next_record_id, + }; + let response = match block_on(api.get_usage_top_avg_metrics_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_dashboards(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::DeleteDashboardsParams { body }; + let response = match block_on(api.delete_dashboards_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_dashboards(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let filter_shared = if let Some(param) = _parameters.get("filter[shared]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_deleted = if let Some(param) = _parameters.get("filter[deleted]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let count = if let Some(param) = _parameters.get("count") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let start = if let Some(param) = _parameters.get("start") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_dashboards::ListDashboardsParams { + filter_shared, + filter_deleted, + count, + start, + }; + let response = match block_on(api.list_dashboards_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_restore_dashboards(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::RestoreDashboardsParams { body }; + let response = match block_on(api.restore_dashboards_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::CreateDashboardParams { body }; + let response = match block_on(api.create_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_public_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::CreatePublicDashboardParams { body }; + let response = match block_on(api.create_public_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_public_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::DeletePublicDashboardParams { token }; + let response = match block_on(api.delete_public_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_public_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::GetPublicDashboardParams { token }; + let response = match block_on(api.get_public_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_public_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::UpdatePublicDashboardParams { token, body }; + let response = match block_on(api.update_public_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_public_dashboard_invitation( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_dashboards::DeletePublicDashboardInvitationParams { token, body }; + let response = match block_on(api.delete_public_dashboard_invitation_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_public_dashboard_invitations( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); + let page_size = if let Some(param) = _parameters.get("page_size") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page_number") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_dashboards::GetPublicDashboardInvitationsParams { + token, + page_size, + page_number, + }; + let response = match block_on(api.get_public_dashboard_invitations_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_send_public_dashboard_invitation( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let token = serde_json::from_value(_parameters.get("token").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_dashboards::SendPublicDashboardInvitationParams { token, body }; + let response = match block_on(api.send_public_dashboard_invitation_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let dashboard_id = + serde_json::from_value(_parameters.get("dashboard_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::DeleteDashboardParams { dashboard_id }; + let response = match block_on(api.delete_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let dashboard_id = + serde_json::from_value(_parameters.get("dashboard_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::GetDashboardParams { dashboard_id }; + let response = match block_on(api.get_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_dashboard(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboards + .as_ref() + .expect("api instance not found"); + let dashboard_id = + serde_json::from_value(_parameters.get("dashboard_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboards::UpdateDashboardParams { dashboard_id, body }; + let response = match block_on(api.update_dashboard_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_dashboard_lists(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboard_lists + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_dashboard_lists_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboard_lists + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboard_lists::CreateDashboardListParams { body }; + let response = match block_on(api.create_dashboard_list_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboard_lists + .as_ref() + .expect("api instance not found"); + let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboard_lists::DeleteDashboardListParams { list_id }; + let response = match block_on(api.delete_dashboard_list_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboard_lists + .as_ref() + .expect("api instance not found"); + let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboard_lists::GetDashboardListParams { list_id }; + let response = match block_on(api.get_dashboard_list_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_dashboard_lists + .as_ref() + .expect("api instance not found"); + let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_dashboard_lists::UpdateDashboardListParams { list_id, body }; + let response = match block_on(api.update_dashboard_list_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_submit_distribution_points( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_metrics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_metrics::SubmitDistributionPointsParams { + body, + content_encoding, + }; + let response = match block_on(api.submit_distribution_points_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_active_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_metrics + .as_ref() + .expect("api instance not found"); + let from = serde_json::from_value(_parameters.get("from").unwrap().clone()).unwrap(); + let host = if let Some(param) = _parameters.get("host") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let tag_filter = if let Some(param) = _parameters.get("tag_filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_metrics::ListActiveMetricsParams { + from, + host, + tag_filter, + }; + let response = match block_on(api.list_active_metrics_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_metric_metadata(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_metrics + .as_ref() + .expect("api instance not found"); + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_metrics::GetMetricMetadataParams { metric_name }; + let response = match block_on(api.get_metric_metadata_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_metric_metadata(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_metrics + .as_ref() + .expect("api instance not found"); + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_metrics::UpdateMetricMetadataParams { metric_name, body }; + let response = match block_on(api.update_metric_metadata_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_query_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_metrics + .as_ref() + .expect("api instance not found"); + let from = serde_json::from_value(_parameters.get("from").unwrap().clone()).unwrap(); + let to = serde_json::from_value(_parameters.get("to").unwrap().clone()).unwrap(); + let query = serde_json::from_value(_parameters.get("query").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_metrics::QueryMetricsParams { from, to, query }; + let response = match block_on(api.query_metrics_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_metrics + .as_ref() + .expect("api instance not found"); + let q = serde_json::from_value(_parameters.get("q").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_metrics::ListMetricsParams { q }; + let response = match block_on(api.list_metrics_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_submit_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_metrics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_metrics::SubmitMetricsParams { + body, + content_encoding, + }; + let response = match block_on(api.submit_metrics_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_downtimes(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_downtimes + .as_ref() + .expect("api instance not found"); + let current_only = if let Some(param) = _parameters.get("current_only") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let with_creator = if let Some(param) = _parameters.get("with_creator") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_downtimes::ListDowntimesParams { + current_only, + with_creator, + }; + let response = match block_on(api.list_downtimes_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_downtimes + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_downtimes::CreateDowntimeParams { body }; + let response = match block_on(api.create_downtime_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_cancel_downtimes_by_scope( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_downtimes + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_downtimes::CancelDowntimesByScopeParams { body }; + let response = match block_on(api.cancel_downtimes_by_scope_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_cancel_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_downtimes + .as_ref() + .expect("api instance not found"); + let downtime_id = + serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_downtimes::CancelDowntimeParams { downtime_id }; + let response = match block_on(api.cancel_downtime_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_downtimes + .as_ref() + .expect("api instance not found"); + let downtime_id = + serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_downtimes::GetDowntimeParams { downtime_id }; + let response = match block_on(api.get_downtime_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_downtimes + .as_ref() + .expect("api instance not found"); + let downtime_id = + serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_downtimes::UpdateDowntimeParams { downtime_id, body }; + let response = match block_on(api.update_downtime_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_monitor_downtimes(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_downtimes + .as_ref() + .expect("api instance not found"); + let monitor_id = + serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_downtimes::ListMonitorDowntimesParams { monitor_id }; + let response = match block_on(api.list_monitor_downtimes_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_events(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_events + .as_ref() + .expect("api instance not found"); + let start = serde_json::from_value(_parameters.get("start").unwrap().clone()).unwrap(); + let end = serde_json::from_value(_parameters.get("end").unwrap().clone()).unwrap(); + let priority = if let Some(param) = _parameters.get("priority") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sources = if let Some(param) = _parameters.get("sources") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let tags = if let Some(param) = _parameters.get("tags") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let unaggregated = if let Some(param) = _parameters.get("unaggregated") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let exclude_aggregate = if let Some(param) = _parameters.get("exclude_aggregate") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page = if let Some(param) = _parameters.get("page") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_events::ListEventsParams { + start, + end, + priority, + sources, + tags, + unaggregated, + exclude_aggregate, + page, + }; + let response = match block_on(api.list_events_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_event(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_events + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_events::CreateEventParams { body }; + let response = match block_on(api.create_event_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_event(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_events + .as_ref() + .expect("api instance not found"); + let event_id = serde_json::from_value(_parameters.get("event_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_events::GetEventParams { event_id }; + let response = match block_on(api.get_event_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_graph_snapshot(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_snapshots + .as_ref() + .expect("api instance not found"); + let start = serde_json::from_value(_parameters.get("start").unwrap().clone()).unwrap(); + let end = serde_json::from_value(_parameters.get("end").unwrap().clone()).unwrap(); + let metric_query = if let Some(param) = _parameters.get("metric_query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let event_query = if let Some(param) = _parameters.get("event_query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let graph_def = if let Some(param) = _parameters.get("graph_def") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let title = if let Some(param) = _parameters.get("title") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let height = if let Some(param) = _parameters.get("height") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let width = if let Some(param) = _parameters.get("width") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_snapshots::GetGraphSnapshotParams { + start, + end, + metric_query, + event_query, + graph_def, + title, + height, + width, + }; + let response = match block_on(api.get_graph_snapshot_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_mute_host(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_hosts + .as_ref() + .expect("api instance not found"); + let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_hosts::MuteHostParams { host_name, body }; + let response = match block_on(api.mute_host_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_unmute_host(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_hosts + .as_ref() + .expect("api instance not found"); + let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_hosts::UnmuteHostParams { host_name }; + let response = match block_on(api.unmute_host_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_hosts(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_hosts + .as_ref() + .expect("api instance not found"); + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_field = if let Some(param) = _parameters.get("sort_field") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_dir = if let Some(param) = _parameters.get("sort_dir") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let start = if let Some(param) = _parameters.get("start") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let count = if let Some(param) = _parameters.get("count") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let from = if let Some(param) = _parameters.get("from") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_muted_hosts_data = if let Some(param) = _parameters.get("include_muted_hosts_data") + { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_hosts_metadata = if let Some(param) = _parameters.get("include_hosts_metadata") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_hosts::ListHostsParams { + filter, + sort_field, + sort_dir, + start, + count, + from, + include_muted_hosts_data, + include_hosts_metadata, + }; + let response = match block_on(api.list_hosts_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_host_totals(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_hosts + .as_ref() + .expect("api instance not found"); + let from = if let Some(param) = _parameters.get("from") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_hosts::GetHostTotalsParams { from }; + let response = match block_on(api.get_host_totals_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_aws_account(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::DeleteAWSAccountParams { body }; + let response = match block_on(api.delete_aws_account_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_aws_accounts(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let account_id = if let Some(param) = _parameters.get("account_id") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let role_name = if let Some(param) = _parameters.get("role_name") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let access_key_id = if let Some(param) = _parameters.get("access_key_id") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_aws_integration::ListAWSAccountsParams { + account_id, + role_name, + access_key_id, + }; + let response = match block_on(api.list_aws_accounts_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_aws_account(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::CreateAWSAccountParams { body }; + let response = match block_on(api.create_aws_account_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_aws_account(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let account_id = if let Some(param) = _parameters.get("account_id") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let role_name = if let Some(param) = _parameters.get("role_name") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let access_key_id = if let Some(param) = _parameters.get("access_key_id") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_aws_integration::UpdateAWSAccountParams { + body, + account_id, + role_name, + access_key_id, + }; + let response = match block_on(api.update_aws_account_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_available_aws_namespaces( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_available_aws_namespaces_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_aws_event_bridge_source( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::DeleteAWSEventBridgeSourceParams { body }; + let response = match block_on(api.delete_aws_event_bridge_source_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_aws_event_bridge_sources( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_aws_event_bridge_sources_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_aws_event_bridge_source( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::CreateAWSEventBridgeSourceParams { body }; + let response = match block_on(api.create_aws_event_bridge_source_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::DeleteAWSTagFilterParams { body }; + let response = match block_on(api.delete_aws_tag_filter_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_aws_tag_filters(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::ListAWSTagFiltersParams { account_id }; + let response = match block_on(api.list_aws_tag_filters_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::CreateAWSTagFilterParams { body }; + let response = match block_on(api.create_aws_tag_filter_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_new_aws_external_id( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_integration::CreateNewAWSExternalIDParams { body }; + let response = match block_on(api.create_new_aws_external_id_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_logs_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_logs_integration::DeleteAWSLambdaARNParams { body }; + let response = match block_on(api.delete_aws_lambda_arn_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_aws_logs_integrations( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_logs_integration + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_aws_logs_integrations_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_logs_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_logs_integration::CreateAWSLambdaARNParams { body }; + let response = match block_on(api.create_aws_lambda_arn_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_check_aws_logs_lambda_async( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_logs_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_logs_integration::CheckAWSLogsLambdaAsyncParams { body }; + let response = match block_on(api.check_aws_logs_lambda_async_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_aws_logs_services(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_logs_integration + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_aws_logs_services_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_enable_aws_log_services(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_aws_logs_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_logs_integration::EnableAWSLogServicesParams { body }; + let response = match block_on(api.enable_aws_log_services_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_check_aws_logs_services_async( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_aws_logs_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_aws_logs_integration::CheckAWSLogsServicesAsyncParams { body }; + let response = match block_on(api.check_aws_logs_services_async_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_azure_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_azure_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_azure_integration::DeleteAzureIntegrationParams { body }; + let response = match block_on(api.delete_azure_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_azure_integration(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_azure_integration + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_azure_integration_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_azure_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_azure_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_azure_integration::CreateAzureIntegrationParams { body }; + let response = match block_on(api.create_azure_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_azure_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_azure_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_azure_integration::UpdateAzureIntegrationParams { body }; + let response = match block_on(api.update_azure_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_azure_host_filters( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_azure_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_azure_integration::UpdateAzureHostFiltersParams { body }; + let response = match block_on(api.update_azure_host_filters_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_gcp_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_gcp_integration::DeleteGCPIntegrationParams { body }; + let response = match block_on(api.delete_gcp_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_gcp_integration + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_gcp_integration_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_gcp_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_gcp_integration::CreateGCPIntegrationParams { body }; + let response = match block_on(api.create_gcp_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_gcp_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_gcp_integration::UpdateGCPIntegrationParams { body }; + let response = match block_on(api.update_gcp_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_pager_duty_integration_service( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_pager_duty_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_pager_duty_integration::CreatePagerDutyIntegrationServiceParams { + body, + }; + let response = match block_on(api.create_pager_duty_integration_service_with_http_info(params)) + { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_pager_duty_integration_service( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_pager_duty_integration + .as_ref() + .expect("api instance not found"); + let service_name = + serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_pager_duty_integration::DeletePagerDutyIntegrationServiceParams { + service_name, + }; + let response = match block_on(api.delete_pager_duty_integration_service_with_http_info(params)) + { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_pager_duty_integration_service( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_pager_duty_integration + .as_ref() + .expect("api instance not found"); + let service_name = + serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_pager_duty_integration::GetPagerDutyIntegrationServiceParams { + service_name, + }; + let response = match block_on(api.get_pager_duty_integration_service_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_pager_duty_integration_service( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_pager_duty_integration + .as_ref() + .expect("api instance not found"); + let service_name = + serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_pager_duty_integration::UpdatePagerDutyIntegrationServiceParams { + service_name, + body, + }; + let response = match block_on(api.update_pager_duty_integration_service_with_http_info(params)) + { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_slack_integration_channels( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_slack_integration + .as_ref() + .expect("api instance not found"); + let account_name = + serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_slack_integration::GetSlackIntegrationChannelsParams { account_name }; + let response = match block_on(api.get_slack_integration_channels_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_slack_integration_channel( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_slack_integration + .as_ref() + .expect("api instance not found"); + let account_name = + serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_slack_integration::CreateSlackIntegrationChannelParams { + account_name, + body, + }; + let response = match block_on(api.create_slack_integration_channel_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_remove_slack_integration_channel( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_slack_integration + .as_ref() + .expect("api instance not found"); + let account_name = + serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); + let channel_name = + serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_slack_integration::RemoveSlackIntegrationChannelParams { + account_name, + channel_name, + }; + let response = match block_on(api.remove_slack_integration_channel_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_slack_integration_channel( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_slack_integration + .as_ref() + .expect("api instance not found"); + let account_name = + serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); + let channel_name = + serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_slack_integration::GetSlackIntegrationChannelParams { + account_name, + channel_name, + }; + let response = match block_on(api.get_slack_integration_channel_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_slack_integration_channel( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_slack_integration + .as_ref() + .expect("api instance not found"); + let account_name = + serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); + let channel_name = + serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_slack_integration::UpdateSlackIntegrationChannelParams { + account_name, + channel_name, + body, + }; + let response = match block_on(api.update_slack_integration_channel_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_webhooks_integration_custom_variable( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_webhooks_integration::CreateWebhooksIntegrationCustomVariableParams { + body, + }; + let response = + match block_on(api.create_webhooks_integration_custom_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_webhooks_integration_custom_variable( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let custom_variable_name = + serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_webhooks_integration::DeleteWebhooksIntegrationCustomVariableParams { + custom_variable_name, + }; + let response = + match block_on(api.delete_webhooks_integration_custom_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_webhooks_integration_custom_variable( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let custom_variable_name = + serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_webhooks_integration::GetWebhooksIntegrationCustomVariableParams { + custom_variable_name, + }; + let response = + match block_on(api.get_webhooks_integration_custom_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_webhooks_integration_custom_variable( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let custom_variable_name = + serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_webhooks_integration::UpdateWebhooksIntegrationCustomVariableParams { + custom_variable_name, + body, + }; + let response = + match block_on(api.update_webhooks_integration_custom_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_webhooks_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_webhooks_integration::CreateWebhooksIntegrationParams { body }; + let response = match block_on(api.create_webhooks_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_webhooks_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let webhook_name = + serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_webhooks_integration::DeleteWebhooksIntegrationParams { webhook_name }; + let response = match block_on(api.delete_webhooks_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_webhooks_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let webhook_name = + serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_webhooks_integration::GetWebhooksIntegrationParams { webhook_name }; + let response = match block_on(api.get_webhooks_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_webhooks_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_webhooks_integration + .as_ref() + .expect("api instance not found"); + let webhook_name = + serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_webhooks_integration::UpdateWebhooksIntegrationParams { + webhook_name, + body, + }; + let response = match block_on(api.update_webhooks_integration_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_logs(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs::ListLogsParams { body }; + let response = match block_on(api.list_logs_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_submit_log(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let ddtags = if let Some(param) = _parameters.get("ddtags") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_logs::SubmitLogParams { + body, + content_encoding, + ddtags, + }; + let response = match block_on(api.submit_log_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_logs_index_order(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_indexes + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.get_logs_index_order_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_logs_index_order(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_indexes + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_indexes::UpdateLogsIndexOrderParams { body }; + let response = match block_on(api.update_logs_index_order_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_log_indexes(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_indexes + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_log_indexes_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_logs_index(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_indexes + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_indexes::CreateLogsIndexParams { body }; + let response = match block_on(api.create_logs_index_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_logs_index(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_indexes + .as_ref() + .expect("api instance not found"); + let name = serde_json::from_value(_parameters.get("name").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_indexes::GetLogsIndexParams { name }; + let response = match block_on(api.get_logs_index_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_logs_index(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_indexes + .as_ref() + .expect("api instance not found"); + let name = serde_json::from_value(_parameters.get("name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_indexes::UpdateLogsIndexParams { name, body }; + let response = match block_on(api.update_logs_index_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_logs_pipeline_order(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_pipelines + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.get_logs_pipeline_order_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_logs_pipeline_order( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_logs_pipelines + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_pipelines::UpdateLogsPipelineOrderParams { body }; + let response = match block_on(api.update_logs_pipeline_order_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_logs_pipelines(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_pipelines + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_logs_pipelines_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_pipelines + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_pipelines::CreateLogsPipelineParams { body }; + let response = match block_on(api.create_logs_pipeline_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_pipelines + .as_ref() + .expect("api instance not found"); + let pipeline_id = + serde_json::from_value(_parameters.get("pipeline_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_pipelines::DeleteLogsPipelineParams { pipeline_id }; + let response = match block_on(api.delete_logs_pipeline_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_pipelines + .as_ref() + .expect("api instance not found"); + let pipeline_id = + serde_json::from_value(_parameters.get("pipeline_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_pipelines::GetLogsPipelineParams { pipeline_id }; + let response = match block_on(api.get_logs_pipeline_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_logs_pipeline(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_logs_pipelines + .as_ref() + .expect("api instance not found"); + let pipeline_id = + serde_json::from_value(_parameters.get("pipeline_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_logs_pipelines::UpdateLogsPipelineParams { pipeline_id, body }; + let response = match block_on(api.update_logs_pipeline_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_monitors(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let group_states = if let Some(param) = _parameters.get("group_states") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let name = if let Some(param) = _parameters.get("name") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let tags = if let Some(param) = _parameters.get("tags") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let monitor_tags = if let Some(param) = _parameters.get("monitor_tags") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let with_downtimes = if let Some(param) = _parameters.get("with_downtimes") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let id_offset = if let Some(param) = _parameters.get("id_offset") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page = if let Some(param) = _parameters.get("page") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page_size") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_monitors::ListMonitorsParams { + group_states, + name, + tags, + monitor_tags, + with_downtimes, + id_offset, + page, + page_size, + }; + let response = match block_on(api.list_monitors_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_monitor(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_monitors::CreateMonitorParams { body }; + let response = match block_on(api.create_monitor_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_check_can_delete_monitor( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let monitor_ids = + serde_json::from_value(_parameters.get("monitor_ids").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_monitors::CheckCanDeleteMonitorParams { monitor_ids }; + let response = match block_on(api.check_can_delete_monitor_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_search_monitor_groups(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let query = if let Some(param) = _parameters.get("query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page = if let Some(param) = _parameters.get("page") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let per_page = if let Some(param) = _parameters.get("per_page") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_monitors::SearchMonitorGroupsParams { + query, + page, + per_page, + sort, + }; + let response = match block_on(api.search_monitor_groups_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_search_monitors(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let query = if let Some(param) = _parameters.get("query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page = if let Some(param) = _parameters.get("page") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let per_page = if let Some(param) = _parameters.get("per_page") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_monitors::SearchMonitorsParams { + query, + page, + per_page, + sort, + }; + let response = match block_on(api.search_monitors_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_validate_monitor(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_monitors::ValidateMonitorParams { body }; + let response = match block_on(api.validate_monitor_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_monitor(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let monitor_id = + serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); + let force = if let Some(param) = _parameters.get("force") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_monitors::DeleteMonitorParams { monitor_id, force }; + let response = match block_on(api.delete_monitor_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_monitor(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let monitor_id = + serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); + let group_states = if let Some(param) = _parameters.get("group_states") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let with_downtimes = if let Some(param) = _parameters.get("with_downtimes") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_monitors::GetMonitorParams { + monitor_id, + group_states, + with_downtimes, + }; + let response = match block_on(api.get_monitor_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_monitor(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let monitor_id = + serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_monitors::UpdateMonitorParams { monitor_id, body }; + let response = match block_on(api.update_monitor_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_validate_existing_monitor( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_monitors + .as_ref() + .expect("api instance not found"); + let monitor_id = + serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_monitors::ValidateExistingMonitorParams { monitor_id, body }; + let response = match block_on(api.validate_existing_monitor_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_notebooks(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_notebooks + .as_ref() + .expect("api instance not found"); + let author_handle = if let Some(param) = _parameters.get("author_handle") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let exclude_author_handle = if let Some(param) = _parameters.get("exclude_author_handle") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let start = if let Some(param) = _parameters.get("start") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let count = if let Some(param) = _parameters.get("count") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_field = if let Some(param) = _parameters.get("sort_field") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort_dir = if let Some(param) = _parameters.get("sort_dir") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let query = if let Some(param) = _parameters.get("query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_cells = if let Some(param) = _parameters.get("include_cells") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let is_template = if let Some(param) = _parameters.get("is_template") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let type_ = if let Some(param) = _parameters.get("type") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_notebooks::ListNotebooksParams { + author_handle, + exclude_author_handle, + start, + count, + sort_field, + sort_dir, + query, + include_cells, + is_template, + type_, + }; + let response = match block_on(api.list_notebooks_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_notebook(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_notebooks + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_notebooks::CreateNotebookParams { body }; + let response = match block_on(api.create_notebook_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_notebook(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_notebooks + .as_ref() + .expect("api instance not found"); + let notebook_id = + serde_json::from_value(_parameters.get("notebook_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_notebooks::DeleteNotebookParams { notebook_id }; + let response = match block_on(api.delete_notebook_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_notebook(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_notebooks + .as_ref() + .expect("api instance not found"); + let notebook_id = + serde_json::from_value(_parameters.get("notebook_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_notebooks::GetNotebookParams { notebook_id }; + let response = match block_on(api.get_notebook_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_notebook(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_notebooks + .as_ref() + .expect("api instance not found"); + let notebook_id = + serde_json::from_value(_parameters.get("notebook_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_notebooks::UpdateNotebookParams { notebook_id, body }; + let response = match block_on(api.update_notebook_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_orgs(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_organizations + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_orgs_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_child_org(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_organizations + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_organizations::CreateChildOrgParams { body }; + let response = match block_on(api.create_child_org_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_org(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_organizations + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_organizations::GetOrgParams { public_id }; + let response = match block_on(api.get_org_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_org(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_organizations + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_organizations::UpdateOrgParams { public_id, body }; + let response = match block_on(api.update_org_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_downgrade_org(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_organizations + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_organizations::DowngradeOrgParams { public_id }; + let response = match block_on(api.downgrade_org_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_upload_id_p_for_org(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_organizations + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let idp_file = _parameters + .get("idp_file") + .unwrap() + .as_str() + .unwrap() + .as_bytes() + .to_vec(); + let params = datadogV1::api::api_organizations::UploadIdPForOrgParams { + public_id, + idp_file, + }; + let response = match block_on(api.upload_id_p_for_org_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_add_security_monitoring_signal_to_incident( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_security_monitoring + .as_ref() + .expect("api instance not found"); + let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_security_monitoring::AddSecurityMonitoringSignalToIncidentParams { + signal_id, + body, + }; + let response = + match block_on(api.add_security_monitoring_signal_to_incident_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_edit_security_monitoring_signal_assignee( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_security_monitoring + .as_ref() + .expect("api instance not found"); + let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_security_monitoring::EditSecurityMonitoringSignalAssigneeParams { + signal_id, + body, + }; + let response = + match block_on(api.edit_security_monitoring_signal_assignee_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_edit_security_monitoring_signal_state( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_security_monitoring + .as_ref() + .expect("api instance not found"); + let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_security_monitoring::EditSecurityMonitoringSignalStateParams { + signal_id, + body, + }; + let response = match block_on(api.edit_security_monitoring_signal_state_with_http_info(params)) + { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_sl_os(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let ids = if let Some(param) = _parameters.get("ids") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let query = if let Some(param) = _parameters.get("query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let tags_query = if let Some(param) = _parameters.get("tags_query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let metrics_query = if let Some(param) = _parameters.get("metrics_query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let limit = if let Some(param) = _parameters.get("limit") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let offset = if let Some(param) = _parameters.get("offset") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_service_level_objectives::ListSLOsParams { + ids, + query, + tags_query, + metrics_query, + limit, + offset, + }; + let response = match block_on(api.list_sl_os_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_slo(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_service_level_objectives::CreateSLOParams { body }; + let response = match block_on(api.create_slo_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_slo_timeframe_in_bulk( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_service_level_objectives::DeleteSLOTimeframeInBulkParams { body }; + let response = match block_on(api.delete_slo_timeframe_in_bulk_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_check_can_delete_slo(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let ids = serde_json::from_value(_parameters.get("ids").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_service_level_objectives::CheckCanDeleteSLOParams { ids }; + let response = match block_on(api.check_can_delete_slo_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_search_slo(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let query = if let Some(param) = _parameters.get("query") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include_facets = if let Some(param) = _parameters.get("include_facets") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_service_level_objectives::SearchSLOParams { + query, + page_size, + page_number, + include_facets, + }; + let response = match block_on(api.search_slo_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_slo(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); + let force = if let Some(param) = _parameters.get("force") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_service_level_objectives::DeleteSLOParams { slo_id, force }; + let response = match block_on(api.delete_slo_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_slo(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); + let with_configured_alert_ids = + if let Some(param) = _parameters.get("with_configured_alert_ids") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_service_level_objectives::GetSLOParams { + slo_id, + with_configured_alert_ids, + }; + let response = match block_on(api.get_slo_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_slo(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_service_level_objectives::UpdateSLOParams { slo_id, body }; + let response = match block_on(api.update_slo_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_slo_corrections(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_service_level_objectives::GetSLOCorrectionsParams { slo_id }; + let response = match block_on(api.get_slo_corrections_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_slo_history(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objectives + .as_ref() + .expect("api instance not found"); + let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); + let from_ts = serde_json::from_value(_parameters.get("from_ts").unwrap().clone()).unwrap(); + let to_ts = serde_json::from_value(_parameters.get("to_ts").unwrap().clone()).unwrap(); + let target = if let Some(param) = _parameters.get("target") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let apply_correction = if let Some(param) = _parameters.get("apply_correction") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_service_level_objectives::GetSLOHistoryParams { + slo_id, + from_ts, + to_ts, + target, + apply_correction, + }; + let response = match block_on(api.get_slo_history_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objective_corrections + .as_ref() + .expect("api instance not found"); + let offset = if let Some(param) = _parameters.get("offset") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let limit = if let Some(param) = _parameters.get("limit") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_service_level_objective_corrections::ListSLOCorrectionParams { + offset, + limit, + }; + let response = match block_on(api.list_slo_correction_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objective_corrections + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_service_level_objective_corrections::CreateSLOCorrectionParams { body }; + let response = match block_on(api.create_slo_correction_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objective_corrections + .as_ref() + .expect("api instance not found"); + let slo_correction_id = + serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_service_level_objective_corrections::DeleteSLOCorrectionParams { + slo_correction_id, + }; + let response = match block_on(api.delete_slo_correction_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objective_corrections + .as_ref() + .expect("api instance not found"); + let slo_correction_id = + serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_service_level_objective_corrections::GetSLOCorrectionParams { + slo_correction_id, + }; + let response = match block_on(api.get_slo_correction_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_service_level_objective_corrections + .as_ref() + .expect("api instance not found"); + let slo_correction_id = + serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV1::api::api_service_level_objective_corrections::UpdateSLOCorrectionParams { + slo_correction_id, + body, + }; + let response = match block_on(api.update_slo_correction_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_synthetics_ci_batch(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let batch_id = serde_json::from_value(_parameters.get("batch_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetSyntheticsCIBatchParams { batch_id }; + let response = match block_on(api.get_synthetics_ci_batch_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_locations(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_locations_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_private_location(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::CreatePrivateLocationParams { body }; + let response = match block_on(api.create_private_location_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_private_location(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let location_id = + serde_json::from_value(_parameters.get("location_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::DeletePrivateLocationParams { location_id }; + let response = match block_on(api.delete_private_location_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_private_location(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let location_id = + serde_json::from_value(_parameters.get("location_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetPrivateLocationParams { location_id }; + let response = match block_on(api.get_private_location_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_private_location(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let location_id = + serde_json::from_value(_parameters.get("location_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::UpdatePrivateLocationParams { location_id, body }; + let response = match block_on(api.update_private_location_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_synthetics_default_locations( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.get_synthetics_default_locations_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_tests(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let page_size = if let Some(param) = _parameters.get("page_size") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page_number") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_synthetics::ListTestsParams { + page_size, + page_number, + }; + let response = match block_on(api.list_tests_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_synthetics_api_test( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::CreateSyntheticsAPITestParams { body }; + let response = match block_on(api.create_synthetics_api_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_api_test(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetAPITestParams { public_id }; + let response = match block_on(api.get_api_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_api_test(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::UpdateAPITestParams { public_id, body }; + let response = match block_on(api.update_api_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_synthetics_browser_test( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::CreateSyntheticsBrowserTestParams { body }; + let response = match block_on(api.create_synthetics_browser_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_browser_test(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetBrowserTestParams { public_id }; + let response = match block_on(api.get_browser_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_browser_test(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::UpdateBrowserTestParams { public_id, body }; + let response = match block_on(api.update_browser_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_browser_test_latest_results( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let from_ts = if let Some(param) = _parameters.get("from_ts") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let to_ts = if let Some(param) = _parameters.get("to_ts") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let probe_dc = if let Some(param) = _parameters.get("probe_dc") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_synthetics::GetBrowserTestLatestResultsParams { + public_id, + from_ts, + to_ts, + probe_dc, + }; + let response = match block_on(api.get_browser_test_latest_results_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_browser_test_result(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let result_id = serde_json::from_value(_parameters.get("result_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetBrowserTestResultParams { + public_id, + result_id, + }; + let response = match block_on(api.get_browser_test_result_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_tests(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::DeleteTestsParams { body }; + let response = match block_on(api.delete_tests_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_trigger_tests(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::TriggerTestsParams { body }; + let response = match block_on(api.trigger_tests_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_trigger_ci_tests(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::TriggerCITestsParams { body }; + let response = match block_on(api.trigger_ci_tests_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_test(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetTestParams { public_id }; + let response = match block_on(api.get_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_patch_test(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::PatchTestParams { public_id, body }; + let response = match block_on(api.patch_test_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_api_test_latest_results( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let from_ts = if let Some(param) = _parameters.get("from_ts") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let to_ts = if let Some(param) = _parameters.get("to_ts") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let probe_dc = if let Some(param) = _parameters.get("probe_dc") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_synthetics::GetAPITestLatestResultsParams { + public_id, + from_ts, + to_ts, + probe_dc, + }; + let response = match block_on(api.get_api_test_latest_results_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_api_test_result(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let result_id = serde_json::from_value(_parameters.get("result_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetAPITestResultParams { + public_id, + result_id, + }; + let response = match block_on(api.get_api_test_result_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_test_pause_status( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::UpdateTestPauseStatusParams { public_id, body }; + let response = match block_on(api.update_test_pause_status_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_global_variables(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_global_variables_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_global_variable(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::CreateGlobalVariableParams { body }; + let response = match block_on(api.create_global_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_global_variable(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let variable_id = + serde_json::from_value(_parameters.get("variable_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::DeleteGlobalVariableParams { variable_id }; + let response = match block_on(api.delete_global_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_global_variable(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let variable_id = + serde_json::from_value(_parameters.get("variable_id").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::GetGlobalVariableParams { variable_id }; + let response = match block_on(api.get_global_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_edit_global_variable(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_synthetics + .as_ref() + .expect("api instance not found"); + let variable_id = + serde_json::from_value(_parameters.get("variable_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_synthetics::EditGlobalVariableParams { variable_id, body }; + let response = match block_on(api.edit_global_variable_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_tags + .as_ref() + .expect("api instance not found"); + let source = if let Some(param) = _parameters.get("source") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_tags::ListHostTagsParams { source }; + let response = match block_on(api.list_host_tags_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_delete_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_tags + .as_ref() + .expect("api instance not found"); + let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); + let source = if let Some(param) = _parameters.get("source") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_tags::DeleteHostTagsParams { host_name, source }; + let response = match block_on(api.delete_host_tags_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_tags + .as_ref() + .expect("api instance not found"); + let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); + let source = if let Some(param) = _parameters.get("source") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_tags::GetHostTagsParams { host_name, source }; + let response = match block_on(api.get_host_tags_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_tags + .as_ref() + .expect("api instance not found"); + let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let source = if let Some(param) = _parameters.get("source") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_tags::CreateHostTagsParams { + host_name, + body, + source, + }; + let response = match block_on(api.create_host_tags_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_tags + .as_ref() + .expect("api instance not found"); + let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let source = if let Some(param) = _parameters.get("source") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV1::api::api_tags::UpdateHostTagsParams { + host_name, + body, + source, + }; + let response = match block_on(api.update_host_tags_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_list_users(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_users + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_users_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_create_user(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_users + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_users::CreateUserParams { body }; + let response = match block_on(api.create_user_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_disable_user(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_users + .as_ref() + .expect("api instance not found"); + let user_handle = + serde_json::from_value(_parameters.get("user_handle").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_users::DisableUserParams { user_handle }; + let response = match block_on(api.disable_user_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_get_user(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_users + .as_ref() + .expect("api instance not found"); + let user_handle = + serde_json::from_value(_parameters.get("user_handle").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_users::GetUserParams { user_handle }; + let response = match block_on(api.get_user_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_update_user(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_users + .as_ref() + .expect("api instance not found"); + let user_handle = + serde_json::from_value(_parameters.get("user_handle").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV1::api::api_users::UpdateUserParams { user_handle, body }; + let response = match block_on(api.update_user_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v1_validate(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v1_api_authentication + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.validate_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_api_keys(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_start = if let Some(param) = _parameters.get("filter[created_at][start]") + { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_end = if let Some(param) = _parameters.get("filter[created_at][end]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_modified_at_start = + if let Some(param) = _parameters.get("filter[modified_at][start]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_modified_at_end = if let Some(param) = _parameters.get("filter[modified_at][end]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_remote_config_read_enabled = + if let Some(param) = _parameters.get("filter[remote_config_read_enabled]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_category = if let Some(param) = _parameters.get("filter[category]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_key_management::ListAPIKeysParams { + page_size, + page_number, + sort, + filter, + filter_created_at_start, + filter_created_at_end, + filter_modified_at_start, + filter_modified_at_end, + include, + filter_remote_config_read_enabled, + filter_category, + }; + let response = match block_on(api.list_api_keys_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_create_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_key_management::CreateAPIKeyParams { body }; + let response = match block_on(api.create_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_delete_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let api_key_id = + serde_json::from_value(_parameters.get("api_key_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_key_management::DeleteAPIKeyParams { api_key_id }; + let response = match block_on(api.delete_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let api_key_id = + serde_json::from_value(_parameters.get("api_key_id").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_key_management::GetAPIKeyParams { + api_key_id, + include, + }; + let response = match block_on(api.get_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let api_key_id = + serde_json::from_value(_parameters.get("api_key_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_key_management::UpdateAPIKeyParams { api_key_id, body }; + let response = match block_on(api.update_api_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_application_keys(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_start = if let Some(param) = _parameters.get("filter[created_at][start]") + { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_end = if let Some(param) = _parameters.get("filter[created_at][end]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_key_management::ListApplicationKeysParams { + page_size, + page_number, + sort, + filter, + filter_created_at_start, + filter_created_at_end, + include, + }; + let response = match block_on(api.list_application_keys_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_delete_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_key_management::DeleteApplicationKeyParams { app_key_id }; + let response = match block_on(api.delete_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_key_management::GetApplicationKeyParams { + app_key_id, + include, + }; + let response = match block_on(api.get_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_key_management::UpdateApplicationKeyParams { app_key_id, body }; + let response = match block_on(api.update_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_current_user_application_keys( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_start = if let Some(param) = _parameters.get("filter[created_at][start]") + { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_end = if let Some(param) = _parameters.get("filter[created_at][end]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_key_management::ListCurrentUserApplicationKeysParams { + page_size, + page_number, + sort, + filter, + filter_created_at_start, + filter_created_at_end, + include, + }; + let response = match block_on(api.list_current_user_application_keys_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_create_current_user_application_key( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_key_management::CreateCurrentUserApplicationKeyParams { body }; + let response = match block_on(api.create_current_user_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_delete_current_user_application_key( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_key_management::DeleteCurrentUserApplicationKeyParams { app_key_id }; + let response = match block_on(api.delete_current_user_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_current_user_application_key( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_key_management::GetCurrentUserApplicationKeyParams { app_key_id }; + let response = match block_on(api.get_current_user_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_current_user_application_key( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_key_management + .as_ref() + .expect("api instance not found"); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_key_management::UpdateCurrentUserApplicationKeyParams { + app_key_id, + body, + }; + let response = match block_on(api.update_current_user_application_key_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_spans_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_spans_metrics + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_spans_metrics_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_create_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_spans_metrics + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_spans_metrics::CreateSpansMetricParams { body }; + let response = match block_on(api.create_spans_metric_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_delete_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_spans_metrics + .as_ref() + .expect("api instance not found"); + let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_spans_metrics::DeleteSpansMetricParams { metric_id }; + let response = match block_on(api.delete_spans_metric_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_spans_metrics + .as_ref() + .expect("api instance not found"); + let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_spans_metrics::GetSpansMetricParams { metric_id }; + let response = match block_on(api.get_spans_metric_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_spans_metrics + .as_ref() + .expect("api instance not found"); + let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_spans_metrics::UpdateSpansMetricParams { metric_id, body }; + let response = match block_on(api.update_spans_metric_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_apm_retention_filters( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_apm_retention_filters + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_apm_retention_filters_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_create_apm_retention_filter( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_apm_retention_filters + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_apm_retention_filters::CreateApmRetentionFilterParams { body }; + let response = match block_on(api.create_apm_retention_filter_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_reorder_apm_retention_filters( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_apm_retention_filters + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_apm_retention_filters::ReorderApmRetentionFiltersParams { body }; + let response = match block_on(api.reorder_apm_retention_filters_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_delete_apm_retention_filter( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_apm_retention_filters + .as_ref() + .expect("api instance not found"); + let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_apm_retention_filters::DeleteApmRetentionFilterParams { filter_id }; + let response = match block_on(api.delete_apm_retention_filter_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_apm_retention_filter( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_apm_retention_filters + .as_ref() + .expect("api instance not found"); + let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_apm_retention_filters::GetApmRetentionFilterParams { filter_id }; + let response = match block_on(api.get_apm_retention_filter_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_apm_retention_filter( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_apm_retention_filters + .as_ref() + .expect("api instance not found"); + let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_apm_retention_filters::UpdateApmRetentionFilterParams { + filter_id, + body, + }; + let response = match block_on(api.update_apm_retention_filter_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_audit + .as_ref() + .expect("api instance not found"); + let filter_query = if let Some(param) = _parameters.get("filter[query]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_from = if let Some(param) = _parameters.get("filter[from]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_to = if let Some(param) = _parameters.get("filter[to]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_audit::ListAuditLogsParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; + let response = match block_on(api.list_audit_logs_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_search_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_audit + .as_ref() + .expect("api instance not found"); + let body = if let Some(param) = _parameters.get("body") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_audit::SearchAuditLogsParams { body }; + let response = match block_on(api.search_audit_logs_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_auth_n_mappings(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_auth_n_mappings + .as_ref() + .expect("api instance not found"); + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_auth_n_mappings::ListAuthNMappingsParams { + page_size, + page_number, + sort, + filter, + }; + let response = match block_on(api.list_auth_n_mappings_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_create_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_auth_n_mappings + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_auth_n_mappings::CreateAuthNMappingParams { body }; + let response = match block_on(api.create_auth_n_mapping_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_delete_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_auth_n_mappings + .as_ref() + .expect("api instance not found"); + let authn_mapping_id = + serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_auth_n_mappings::DeleteAuthNMappingParams { authn_mapping_id }; + let response = match block_on(api.delete_auth_n_mapping_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_auth_n_mappings + .as_ref() + .expect("api instance not found"); + let authn_mapping_id = + serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_auth_n_mappings::GetAuthNMappingParams { authn_mapping_id }; + let response = match block_on(api.get_auth_n_mapping_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_auth_n_mapping(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_auth_n_mappings + .as_ref() + .expect("api instance not found"); + let authn_mapping_id = + serde_json::from_value(_parameters.get("authn_mapping_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_auth_n_mappings::UpdateAuthNMappingParams { + authn_mapping_id, + body, + }; + let response = match block_on(api.update_auth_n_mapping_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_create_ci_app_pipeline_event( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_ci_visibility_pipelines + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_ci_visibility_pipelines::CreateCIAppPipelineEventParams { body }; + let response = match block_on(api.create_ci_app_pipeline_event_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_aggregate_ci_app_pipeline_events( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_ci_visibility_pipelines + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_ci_visibility_pipelines::AggregateCIAppPipelineEventsParams { body }; + let response = match block_on(api.aggregate_ci_app_pipeline_events_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_ci_app_pipeline_events( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_ci_visibility_pipelines + .as_ref() + .expect("api instance not found"); + let filter_query = if let Some(param) = _parameters.get("filter[query]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_from = if let Some(param) = _parameters.get("filter[from]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_to = if let Some(param) = _parameters.get("filter[to]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_ci_visibility_pipelines::ListCIAppPipelineEventsParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; + let response = match block_on(api.list_ci_app_pipeline_events_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_search_ci_app_pipeline_events( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_ci_visibility_pipelines + .as_ref() + .expect("api instance not found"); + let body = if let Some(param) = _parameters.get("body") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV2::api::api_ci_visibility_pipelines::SearchCIAppPipelineEventsParams { body }; + let response = match block_on(api.search_ci_app_pipeline_events_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_aggregate_ci_app_test_events( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_ci_visibility_tests + .as_ref() + .expect("api instance not found"); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_ci_visibility_tests::AggregateCIAppTestEventsParams { body }; + let response = match block_on(api.aggregate_ci_app_test_events_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_ci_app_test_events(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_ci_visibility_tests + .as_ref() + .expect("api instance not found"); + let filter_query = if let Some(param) = _parameters.get("filter[query]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_from = if let Some(param) = _parameters.get("filter[from]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_to = if let Some(param) = _parameters.get("filter[to]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_ci_visibility_tests::ListCIAppTestEventsParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; + let response = match block_on(api.list_ci_app_test_events_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); } -fn test_v1_get_ip_ranges(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_search_ci_app_test_events( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_ip_ranges + .v2_api_ci_visibility_tests .as_ref() .expect("api instance not found"); - let response = match block_on(api.get_ip_ranges_with_http_info()) { + let body = if let Some(param) = _parameters.get("body") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_ci_visibility_tests::SearchCIAppTestEventsParams { body }; + let response = match block_on(api.search_ci_app_test_events_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1390,13 +10008,45 @@ fn test_v1_get_ip_ranges(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_container_images(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_key_management + .v2_api_container_images .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_api_keys_with_http_info()) { + let filter_tags = if let Some(param) = _parameters.get("filter[tags]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let group_by = if let Some(param) = _parameters.get("group_by") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_container_images::ListContainerImagesParams { + filter_tags, + group_by, + sort, + page_size, + page_cursor, + }; + let response = match block_on(api.list_container_images_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1409,15 +10059,45 @@ fn test_v1_list_api_keys(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_containers(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_key_management + .v2_api_containers .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::CreateAPIKeyParams { body }; - let response = match block_on(api.create_api_key_with_http_info(params)) { + let filter_tags = if let Some(param) = _parameters.get("filter[tags]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let group_by = if let Some(param) = _parameters.get("group_by") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_containers::ListContainersParams { + filter_tags, + group_by, + sort, + page_size, + page_cursor, + }; + let response = match block_on(api.list_containers_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1430,15 +10110,16 @@ fn test_v1_create_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_cost_awscur_configs( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::DeleteAPIKeyParams { key }; - let response = match block_on(api.delete_api_key_with_http_info(params)) { + let response = match block_on(api.list_cost_awscur_configs_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -1451,15 +10132,18 @@ fn test_v1_delete_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_cost_awscur_config( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::GetAPIKeyParams { key }; - let response = match block_on(api.get_api_key_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_cloud_cost_management::CreateCostAWSCURConfigParams { body }; + let response = match block_on(api.create_cost_awscur_config_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1472,16 +10156,50 @@ fn test_v1_get_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_cost_awscur_config( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let cloud_account_id = + serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_cloud_cost_management::DeleteCostAWSCURConfigParams { + cloud_account_id, + }; + let response = match block_on(api.delete_cost_awscur_config_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_cost_awscur_config( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_cloud_cost_management + .as_ref() + .expect("api instance not found"); + let cloud_account_id = + serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::UpdateAPIKeyParams { key, body }; - let response = match block_on(api.update_api_key_with_http_info(params)) { + let params = datadogV2::api::api_cloud_cost_management::UpdateCostAWSCURConfigParams { + cloud_account_id, + body, + }; + let response = match block_on(api.update_cost_awscur_config_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1494,13 +10212,26 @@ fn test_v1_update_api_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_aws_related_accounts( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_application_keys_with_http_info()) { + let filter_management_account_id = serde_json::from_value( + _parameters + .get("filter[management_account_id]") + .unwrap() + .clone(), + ) + .unwrap(); + let params = datadogV2::api::api_cloud_cost_management::ListAWSRelatedAccountsParams { + filter_management_account_id, + }; + let response = match block_on(api.list_aws_related_accounts_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1513,15 +10244,16 @@ fn test_v1_list_application_keys(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_create_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_cost_azure_uc_configs( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::CreateApplicationKeyParams { body }; - let response = match block_on(api.create_application_key_with_http_info(params)) { + let response = match block_on(api.list_cost_azure_uc_configs_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -1534,15 +10266,18 @@ fn test_v1_create_application_key(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_delete_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_cost_azure_uc_configs( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::DeleteApplicationKeyParams { key }; - let response = match block_on(api.delete_application_key_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_cloud_cost_management::CreateCostAzureUCConfigsParams { body }; + let response = match block_on(api.create_cost_azure_uc_configs_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1555,15 +10290,21 @@ fn test_v1_delete_application_key(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_get_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_cost_azure_uc_config( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::GetApplicationKeyParams { key }; - let response = match block_on(api.get_application_key_with_http_info(params)) { + let cloud_account_id = + serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_cloud_cost_management::DeleteCostAzureUCConfigParams { + cloud_account_id, + }; + let response = match block_on(api.delete_cost_azure_uc_config_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1576,16 +10317,23 @@ fn test_v1_get_application_key(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_cost_azure_uc_configs( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_key_management + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let key = serde_json::from_value(_parameters.get("key").unwrap().clone()).unwrap(); + let cloud_account_id = + serde_json::from_value(_parameters.get("cloud_account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_key_management::UpdateApplicationKeyParams { key, body }; - let response = match block_on(api.update_application_key_with_http_info(params)) { + let params = datadogV2::api::api_cloud_cost_management::UpdateCostAzureUCConfigsParams { + cloud_account_id, + body, + }; + let response = match block_on(api.update_cost_azure_uc_configs_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1598,15 +10346,13 @@ fn test_v1_update_application_key(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_submit_service_check(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_cloud_cost_activity(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_checks + .v2_api_cloud_cost_management .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_checks::SubmitServiceCheckParams { body }; - let response = match block_on(api.submit_service_check_with_http_info(params)) { + let response = match block_on(api.get_cloud_cost_activity_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -1619,42 +10365,77 @@ fn test_v1_submit_service_check(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_get_daily_custom_reports( +fn test_v2_get_active_billing_dimensions( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); - let page_size = if let Some(param) = _parameters.get("page[size]") { + let response = match block_on(api.get_active_billing_dimensions_with_http_info()) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_monthly_cost_attribution( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_month = + serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); + let end_month = serde_json::from_value(_parameters.get("end_month").unwrap().clone()).unwrap(); + let fields = serde_json::from_value(_parameters.get("fields").unwrap().clone()).unwrap(); + let sort_direction = if let Some(param) = _parameters.get("sort_direction") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let page_number = if let Some(param) = _parameters.get("page[number]") { + let sort_name = if let Some(param) = _parameters.get("sort_name") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let sort_dir = if let Some(param) = _parameters.get("sort_dir") { + let tag_breakdown_keys = if let Some(param) = _parameters.get("tag_breakdown_keys") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let sort = if let Some(param) = _parameters.get("sort") { + let next_record_id = if let Some(param) = _parameters.get("next_record_id") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetDailyCustomReportsParams { - page_size, - page_number, - sort_dir, - sort, + let include_descendants = if let Some(param) = _parameters.get("include_descendants") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.get_daily_custom_reports_with_http_info(params)) { + let params = datadogV2::api::api_usage_metering::GetMonthlyCostAttributionParams { + start_month, + end_month, + fields, + sort_direction, + sort_name, + tag_breakdown_keys, + next_record_id, + include_descendants, + }; + let response = match block_on(api.get_monthly_cost_attribution_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1667,19 +10448,57 @@ fn test_v1_get_daily_custom_reports( world.response.code = response.status.as_u16(); } -fn test_v1_get_specified_daily_custom_reports( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_usage_application_security_monitoring( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_usage_metering + .as_ref() + .expect("api instance not found"); + let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); + let end_hr = if let Some(param) = _parameters.get("end_hr") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_usage_metering::GetUsageApplicationSecurityMonitoringParams { + start_hr, + end_hr, + }; + let response = + match block_on(api.get_usage_application_security_monitoring_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_cost_by_org(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); - let report_id = serde_json::from_value(_parameters.get("report_id").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_usage_metering::GetSpecifiedDailyCustomReportsParams { report_id }; - let response = match block_on(api.get_specified_daily_custom_reports_with_http_info(params)) { + let start_month = + serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); + let end_month = if let Some(param) = _parameters.get("end_month") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_usage_metering::GetCostByOrgParams { + start_month, + end_month, + }; + let response = match block_on(api.get_cost_by_org_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1692,42 +10511,48 @@ fn test_v1_get_specified_daily_custom_reports( world.response.code = response.status.as_u16(); } -fn test_v1_get_monthly_custom_reports( +fn test_v2_get_estimated_cost_by_org( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); - let page_size = if let Some(param) = _parameters.get("page[size]") { + let view = if let Some(param) = _parameters.get("view") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let page_number = if let Some(param) = _parameters.get("page[number]") { + let start_month = if let Some(param) = _parameters.get("start_month") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let sort_dir = if let Some(param) = _parameters.get("sort_dir") { + let end_month = if let Some(param) = _parameters.get("end_month") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let sort = if let Some(param) = _parameters.get("sort") { + let start_date = if let Some(param) = _parameters.get("start_date") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetMonthlyCustomReportsParams { - page_size, - page_number, - sort_dir, - sort, + let end_date = if let Some(param) = _parameters.get("end_date") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.get_monthly_custom_reports_with_http_info(params)) { + let params = datadogV2::api::api_usage_metering::GetEstimatedCostByOrgParams { + view, + start_month, + end_month, + start_date, + end_date, + }; + let response = match block_on(api.get_estimated_cost_by_org_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1740,46 +10565,33 @@ fn test_v1_get_monthly_custom_reports( world.response.code = response.status.as_u16(); } -fn test_v1_get_specified_monthly_custom_reports( +fn test_v2_get_historical_cost_by_org( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); - let report_id = serde_json::from_value(_parameters.get("report_id").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_usage_metering::GetSpecifiedMonthlyCustomReportsParams { report_id }; - let response = match block_on(api.get_specified_monthly_custom_reports_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } + let start_month = + serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); + let view = if let Some(param) = _parameters.get("view") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v1_get_usage_analyzed_logs(world: &mut DatadogWorld, _parameters: &HashMap) { - let api = world - .api_instances - .v1_api_usage_metering - .as_ref() - .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let end_month = if let Some(param) = _parameters.get("end_month") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageAnalyzedLogsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_analyzed_logs_with_http_info(params)) { + let params = datadogV2::api::api_usage_metering::GetHistoricalCostByOrgParams { + start_month, + view, + end_month, + }; + let response = match block_on(api.get_historical_cost_by_org_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1792,56 +10604,61 @@ fn test_v1_get_usage_analyzed_logs(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_attribution(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_hourly_usage(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); - let start_month = - serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); - let fields = serde_json::from_value(_parameters.get("fields").unwrap().clone()).unwrap(); - let end_month = if let Some(param) = _parameters.get("end_month") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let sort_direction = if let Some(param) = _parameters.get("sort_direction") { + let filter_timestamp_start = + serde_json::from_value(_parameters.get("filter[timestamp][start]").unwrap().clone()) + .unwrap(); + let filter_product_families = + serde_json::from_value(_parameters.get("filter[product_families]").unwrap().clone()) + .unwrap(); + let filter_timestamp_end = if let Some(param) = _parameters.get("filter[timestamp][end]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let sort_name = if let Some(param) = _parameters.get("sort_name") { + let filter_include_descendants = + if let Some(param) = _parameters.get("filter[include_descendants]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_include_breakdown = if let Some(param) = _parameters.get("filter[include_breakdown]") + { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let include_descendants = if let Some(param) = _parameters.get("include_descendants") { + let filter_versions = if let Some(param) = _parameters.get("filter[versions]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let offset = if let Some(param) = _parameters.get("offset") { + let page_limit = if let Some(param) = _parameters.get("page[limit]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let limit = if let Some(param) = _parameters.get("limit") { + let page_next_record_id = if let Some(param) = _parameters.get("page[next_record_id]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageAttributionParams { - start_month, - fields, - end_month, - sort_direction, - sort_name, - include_descendants, - offset, - limit, + let params = datadogV2::api::api_usage_metering::GetHourlyUsageParams { + filter_timestamp_start, + filter_product_families, + filter_timestamp_end, + filter_include_descendants, + filter_include_breakdown, + filter_versions, + page_limit, + page_next_record_id, }; - let response = match block_on(api.get_usage_attribution_with_http_info(params)) { + let response = match block_on(api.get_hourly_usage_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1854,10 +10671,13 @@ fn test_v1_get_usage_attribution(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_usage_lambda_traced_invocations( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); @@ -1866,8 +10686,11 @@ fn test_v1_get_usage_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap< } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageAuditLogsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_audit_logs_with_http_info(params)) { + let params = datadogV2::api::api_usage_metering::GetUsageLambdaTracedInvocationsParams { + start_hr, + end_hr, + }; + let response = match block_on(api.get_usage_lambda_traced_invocations_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1880,10 +10703,13 @@ fn test_v1_get_usage_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_lambda(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_usage_observability_pipelines( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); @@ -1892,8 +10718,11 @@ fn test_v1_get_usage_lambda(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -1906,22 +10735,19 @@ fn test_v1_get_usage_lambda(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_get_projected_cost(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_usage_metering .as_ref() .expect("api instance not found"); - let month = if let Some(param) = _parameters.get("month") { + let view = if let Some(param) = _parameters.get("view") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageBillableSummaryParams { month }; - let response = match block_on(api.get_usage_billable_summary_with_http_info(params)) { + let params = datadogV2::api::api_usage_metering::GetProjectedCostParams { view }; + let response = match block_on(api.get_projected_cost_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1934,20 +10760,23 @@ fn test_v1_get_usage_billable_summary( world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_ci_app(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_dashboard_list_items( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_dashboard_lists .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let dashboard_list_id = + serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_dashboard_lists::DeleteDashboardListItemsParams { + dashboard_list_id, + body, }; - let params = datadogV1::api::api_usage_metering::GetUsageCIAppParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_ci_app_with_http_info(params)) { + let response = match block_on(api.delete_dashboard_list_items_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -1960,53 +10789,49 @@ fn test_v1_get_usage_ci_app(world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_dashboard_lists .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_usage_metering::GetUsageCloudSecurityPostureManagementParams { - start_hr, - end_hr, - }; - let response = - match block_on(api.get_usage_cloud_security_posture_management_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; + let dashboard_list_id = + serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_dashboard_lists::GetDashboardListItemsParams { dashboard_list_id }; + let response = match block_on(api.get_dashboard_list_items_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_cws(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_dashboard_list_items( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_dashboard_lists .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let dashboard_list_id = + serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_dashboard_lists::CreateDashboardListItemsParams { + dashboard_list_id, + body, }; - let params = datadogV1::api::api_usage_metering::GetUsageCWSParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_cws_with_http_info(params)) { + let response = match block_on(api.create_dashboard_list_items_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2019,20 +10844,23 @@ fn test_v1_get_usage_cws(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_dashboard_list_items( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_dashboard_lists .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let dashboard_list_id = + serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_dashboard_lists::UpdateDashboardListItemsParams { + dashboard_list_id, + body, }; - let params = datadogV1::api::api_usage_metering::GetUsageDBMParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_dbm_with_http_info(params)) { + let response = match block_on(api.update_dashboard_list_items_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2045,20 +10873,15 @@ fn test_v1_get_usage_dbm(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_dora_deployment(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_dora_metrics .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_usage_metering::GetUsageFargateParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_fargate_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_dora_metrics::CreateDORADeploymentParams { body }; + let response = match block_on(api.create_dora_deployment_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2071,20 +10894,15 @@ fn test_v1_get_usage_fargate(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_dora_incident(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_dora_metrics .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_usage_metering::GetUsageHostsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_hosts_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_dora_metrics::CreateDORAIncidentParams { body }; + let response = match block_on(api.create_dora_incident_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2097,47 +10915,39 @@ fn test_v1_get_usage_hosts(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_list_downtimes(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_downtimes .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let usage_type = - serde_json::from_value(_parameters.get("usage_type").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let current_only = if let Some(param) = _parameters.get("current_only") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let next_record_id = if let Some(param) = _parameters.get("next_record_id") { + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let tag_breakdown_keys = if let Some(param) = _parameters.get("tag_breakdown_keys") { + let page_offset = if let Some(param) = _parameters.get("page[offset]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let include_descendants = if let Some(param) = _parameters.get("include_descendants") { + let page_limit = if let Some(param) = _parameters.get("page[limit]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetHourlyUsageAttributionParams { - start_hr, - usage_type, - end_hr, - next_record_id, - tag_breakdown_keys, - include_descendants, + let params = datadogV2::api::api_downtimes::ListDowntimesParams { + current_only, + include, + page_offset, + page_limit, }; - let response = match block_on(api.get_hourly_usage_attribution_with_http_info(params)) { + let response = match block_on(api.list_downtimes_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2150,21 +10960,15 @@ fn test_v1_get_hourly_usage_attribution( world.response.code = response.status.as_u16(); } -fn test_v1_get_incident_management(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_downtimes .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = - datadogV1::api::api_usage_metering::GetIncidentManagementParams { start_hr, end_hr }; - let response = match block_on(api.get_incident_management_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_downtimes::CreateDowntimeParams { body }; + let response = match block_on(api.create_downtime_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2177,21 +10981,16 @@ fn test_v1_get_incident_management(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_indexed_spans(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_cancel_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_downtimes .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = - datadogV1::api::api_usage_metering::GetUsageIndexedSpansParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_indexed_spans_with_http_info(params)) { + let downtime_id = + serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_downtimes::CancelDowntimeParams { downtime_id }; + let response = match block_on(api.cancel_downtime_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2204,20 +11003,24 @@ fn test_v1_get_usage_indexed_spans(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_get_ingested_spans(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_downtimes .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let downtime_id = + serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetIngestedSpansParams { start_hr, end_hr }; - let response = match block_on(api.get_ingested_spans_with_http_info(params)) { + let params = datadogV2::api::api_downtimes::GetDowntimeParams { + downtime_id, + include, + }; + let response = match block_on(api.get_downtime_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2230,24 +11033,17 @@ fn test_v1_get_ingested_spans(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_update_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_downtimes .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = - datadogV1::api::api_usage_metering::GetUsageInternetOfThingsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_internet_of_things_with_http_info(params)) { + let downtime_id = + serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_downtimes::UpdateDowntimeParams { downtime_id, body }; + let response = match block_on(api.update_downtime_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2260,20 +11056,30 @@ fn test_v1_get_usage_internet_of_things( world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_logs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_monitor_downtimes(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_downtimes .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let monitor_id = + serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); + let page_offset = if let Some(param) = _parameters.get("page[offset]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageLogsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_logs_with_http_info(params)) { + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_downtimes::ListMonitorDowntimesParams { + monitor_id, + page_offset, + page_limit, + }; + let response = match block_on(api.list_monitor_downtimes_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2286,24 +11092,51 @@ fn test_v1_get_usage_logs(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_list_events(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_events .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let filter_query = if let Some(param) = _parameters.get("filter[query]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageLogsByRetentionParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_logs_by_retention_with_http_info(params)) { + let filter_from = if let Some(param) = _parameters.get("filter[from]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_to = if let Some(param) = _parameters.get("filter[to]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_events::ListEventsParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; + let response = match block_on(api.list_events_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2316,29 +11149,19 @@ fn test_v1_get_usage_logs_by_retention( world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_logs_by_index(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_search_events(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_events .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let index_name = if let Some(param) = _parameters.get("index_name") { + let body = if let Some(param) = _parameters.get("body") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageLogsByIndexParams { - start_hr, - end_hr, - index_name, - }; - let response = match block_on(api.get_usage_logs_by_index_with_http_info(params)) { + let params = datadogV2::api::api_events::SearchEventsParams { body }; + let response = match block_on(api.search_events_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2351,59 +11174,33 @@ fn test_v1_get_usage_logs_by_index(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_get_monthly_usage_attribution( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_incidents(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() - .expect("api instance not found"); - let start_month = - serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); - let fields = serde_json::from_value(_parameters.get("fields").unwrap().clone()).unwrap(); - let end_month = if let Some(param) = _parameters.get("end_month") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let sort_direction = if let Some(param) = _parameters.get("sort_direction") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let sort_name = if let Some(param) = _parameters.get("sort_name") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let tag_breakdown_keys = if let Some(param) = _parameters.get("tag_breakdown_keys") { + .expect("api instance not found"); + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let next_record_id = if let Some(param) = _parameters.get("next_record_id") { + let page_size = if let Some(param) = _parameters.get("page[size]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let include_descendants = if let Some(param) = _parameters.get("include_descendants") { + let page_offset = if let Some(param) = _parameters.get("page[offset]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetMonthlyUsageAttributionParams { - start_month, - fields, - end_month, - sort_direction, - sort_name, - tag_breakdown_keys, - next_record_id, - include_descendants, + let params = datadogV2::api::api_incidents::ListIncidentsParams { + include, + page_size, + page_offset, }; - let response = match block_on(api.get_monthly_usage_attribution_with_http_info(params)) { + let response = match block_on(api.list_incidents_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2416,21 +11213,15 @@ fn test_v1_get_monthly_usage_attribution( world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_network_flows(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_incident(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = - datadogV1::api::api_usage_metering::GetUsageNetworkFlowsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_network_flows_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::CreateIncidentParams { body }; + let response = match block_on(api.create_incident_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2443,21 +11234,41 @@ fn test_v1_get_usage_network_flows(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_network_hosts(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_search_incidents(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let query = serde_json::from_value(_parameters.get("query").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = - datadogV1::api::api_usage_metering::GetUsageNetworkHostsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_network_hosts_with_http_info(params)) { + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_offset = if let Some(param) = _parameters.get("page[offset]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_incidents::SearchIncidentsParams { + query, + include, + sort, + page_size, + page_offset, + }; + let response = match block_on(api.search_incidents_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2470,24 +11281,16 @@ fn test_v1_get_usage_network_hosts(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_online_archive( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_delete_incident(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = - datadogV1::api::api_usage_metering::GetUsageOnlineArchiveParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_online_archive_with_http_info(params)) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::DeleteIncidentParams { incident_id }; + let response = match block_on(api.delete_incident_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2500,20 +11303,24 @@ fn test_v1_get_usage_online_archive( world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_profiling(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_incident(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageProfilingParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_profiling_with_http_info(params)) { + let params = datadogV2::api::api_incidents::GetIncidentParams { + incident_id, + include, + }; + let response = match block_on(api.get_incident_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2526,20 +11333,26 @@ fn test_v1_get_usage_profiling(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_incident(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageRumUnitsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_rum_units_with_http_info(params)) { + let params = datadogV2::api::api_incidents::UpdateIncidentParams { + incident_id, + body, + include, + }; + let response = match block_on(api.update_incident_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2552,29 +11365,33 @@ fn test_v1_get_usage_rum_units(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_incident_attachments( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let type_ = if let Some(param) = _parameters.get("type") { + let filter_attachment_type = if let Some(param) = _parameters.get("filter[attachment_type]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageRumSessionsParams { - start_hr, - end_hr, - type_, + let params = datadogV2::api::api_incidents::ListIncidentAttachmentsParams { + incident_id, + include, + filter_attachment_type, }; - let response = match block_on(api.get_usage_rum_sessions_with_http_info(params)) { + let response = match block_on(api.list_incident_attachments_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2587,20 +11404,29 @@ fn test_v1_get_usage_rum_sessions(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_sds(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_incident_attachments( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_usage_metering::GetUsageSDSParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_sds_with_http_info(params)) { + let params = datadogV2::api::api_incidents::UpdateIncidentAttachmentsParams { + incident_id, + body, + include, + }; + let response = match block_on(api.update_incident_attachments_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2613,20 +11439,19 @@ fn test_v1_get_usage_sds(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_incident_integrations( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_usage_metering::GetUsageSNMPParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_snmp_with_http_info(params)) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::ListIncidentIntegrationsParams { incident_id }; + let response = match block_on(api.list_incident_integrations_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2639,30 +11464,21 @@ fn test_v1_get_usage_snmp(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_incident_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_month = - serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); - let end_month = if let Some(param) = _parameters.get("end_month") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let include_org_details = if let Some(param) = _parameters.get("include_org_details") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_usage_metering::GetUsageSummaryParams { - start_month, - end_month, - include_org_details, - }; - let response = match block_on(api.get_usage_summary_with_http_info(params)) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_incidents::CreateIncidentIntegrationParams { incident_id, body }; + let response = match block_on(api.create_incident_integration_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2675,20 +11491,25 @@ fn test_v1_get_usage_summary(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_incident_integration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let integration_metadata_id = + serde_json::from_value(_parameters.get("integration_metadata_id").unwrap().clone()) + .unwrap(); + let params = datadogV2::api::api_incidents::DeleteIncidentIntegrationParams { + incident_id, + integration_metadata_id, }; - let params = datadogV1::api::api_usage_metering::GetUsageSyntheticsParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_synthetics_with_http_info(params)) { + let response = match block_on(api.delete_incident_integration_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2701,24 +11522,25 @@ fn test_v1_get_usage_synthetics(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_synthetics_api( +fn test_v2_get_incident_integration( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let integration_metadata_id = + serde_json::from_value(_parameters.get("integration_metadata_id").unwrap().clone()) + .unwrap(); + let params = datadogV2::api::api_incidents::GetIncidentIntegrationParams { + incident_id, + integration_metadata_id, }; - let params = - datadogV1::api::api_usage_metering::GetUsageSyntheticsAPIParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_synthetics_api_with_http_info(params)) { + let response = match block_on(api.get_incident_integration_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2731,24 +11553,27 @@ fn test_v1_get_usage_synthetics_api( world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_synthetics_browser( +fn test_v2_update_incident_integration( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let integration_metadata_id = + serde_json::from_value(_parameters.get("integration_metadata_id").unwrap().clone()) + .unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::UpdateIncidentIntegrationParams { + incident_id, + integration_metadata_id, + body, }; - let params = - datadogV1::api::api_usage_metering::GetUsageSyntheticsBrowserParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_synthetics_browser_with_http_info(params)) { + let response = match block_on(api.update_incident_integration_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2761,20 +11586,16 @@ fn test_v1_get_usage_synthetics_browser( world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_timeseries(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_incident_todos(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_usage_metering::GetUsageTimeseriesParams { start_hr, end_hr }; - let response = match block_on(api.get_usage_timeseries_with_http_info(params)) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::ListIncidentTodosParams { incident_id }; + let response = match block_on(api.list_incident_todos_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2787,48 +11608,17 @@ fn test_v1_get_usage_timeseries(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_get_usage_top_avg_metrics( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_create_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_usage_metering + .v2_api_incidents .as_ref() .expect("api instance not found"); - let month = if let Some(param) = _parameters.get("month") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let day = if let Some(param) = _parameters.get("day") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let names = if let Some(param) = _parameters.get("names") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let limit = if let Some(param) = _parameters.get("limit") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let next_record_id = if let Some(param) = _parameters.get("next_record_id") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_usage_metering::GetUsageTopAvgMetricsParams { - month, - day, - names, - limit, - next_record_id, - }; - let response = match block_on(api.get_usage_top_avg_metrics_with_http_info(params)) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::CreateIncidentTodoParams { incident_id, body }; + let response = match block_on(api.create_incident_todo_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2841,13 +11631,20 @@ fn test_v1_get_usage_top_avg_metrics( world.response.code = response.status.as_u16(); } -fn test_v1_list_dashboard_lists(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_dashboard_lists + .v2_api_incidents .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_dashboard_lists_with_http_info()) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let todo_id = serde_json::from_value(_parameters.get("todo_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::DeleteIncidentTodoParams { + incident_id, + todo_id, + }; + let response = match block_on(api.delete_incident_todo_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2860,15 +11657,20 @@ fn test_v1_list_dashboard_lists(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_create_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_dashboard_lists + .v2_api_incidents .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboard_lists::CreateDashboardListParams { body }; - let response = match block_on(api.create_dashboard_list_with_http_info(params)) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let todo_id = serde_json::from_value(_parameters.get("todo_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::GetIncidentTodoParams { + incident_id, + todo_id, + }; + let response = match block_on(api.get_incident_todo_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2881,15 +11683,22 @@ fn test_v1_create_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_delete_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_incident_todo(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_dashboard_lists + .v2_api_incidents .as_ref() .expect("api instance not found"); - let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboard_lists::DeleteDashboardListParams { list_id }; - let response = match block_on(api.delete_dashboard_list_with_http_info(params)) { + let incident_id = + serde_json::from_value(_parameters.get("incident_id").unwrap().clone()).unwrap(); + let todo_id = serde_json::from_value(_parameters.get("todo_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incidents::UpdateIncidentTodoParams { + incident_id, + todo_id, + body, + }; + let response = match block_on(api.update_incident_todo_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2902,15 +11711,13 @@ fn test_v1_delete_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_get_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_gcpsts_accounts(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_dashboard_lists + .v2_api_gcp_integration .as_ref() - .expect("api instance not found"); - let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboard_lists::GetDashboardListParams { list_id }; - let response = match block_on(api.get_dashboard_list_with_http_info(params)) { + .expect("api instance not found"); + let response = match block_on(api.list_gcpsts_accounts_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -2923,16 +11730,15 @@ fn test_v1_get_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_dashboard_lists + .v2_api_gcp_integration .as_ref() .expect("api instance not found"); - let list_id = serde_json::from_value(_parameters.get("list_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_dashboard_lists::UpdateDashboardListParams { list_id, body }; - let response = match block_on(api.update_dashboard_list_with_http_info(params)) { + let params = datadogV2::api::api_gcp_integration::CreateGCPSTSAccountParams { body }; + let response = match block_on(api.create_gcpsts_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2945,27 +11751,16 @@ fn test_v1_update_dashboard_list(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_list_downtimes(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_downtimes + .v2_api_gcp_integration .as_ref() .expect("api instance not found"); - let current_only = if let Some(param) = _parameters.get("current_only") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let with_creator = if let Some(param) = _parameters.get("with_creator") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_downtimes::ListDowntimesParams { - current_only, - with_creator, - }; - let response = match block_on(api.list_downtimes_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_gcp_integration::DeleteGCPSTSAccountParams { account_id }; + let response = match block_on(api.delete_gcpsts_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2978,15 +11773,18 @@ fn test_v1_list_downtimes(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_downtimes + .v2_api_gcp_integration .as_ref() .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::CreateDowntimeParams { body }; - let response = match block_on(api.create_downtime_with_http_info(params)) { + let params = + datadogV2::api::api_gcp_integration::UpdateGCPSTSAccountParams { account_id, body }; + let response = match block_on(api.update_gcpsts_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -2999,18 +11797,13 @@ fn test_v1_create_downtime(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_get_gcpsts_delegate(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_downtimes + .v2_api_gcp_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::CancelDowntimesByScopeParams { body }; - let response = match block_on(api.cancel_downtimes_by_scope_with_http_info(params)) { + let response = match block_on(api.get_gcpsts_delegate_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -3023,16 +11816,19 @@ fn test_v1_cancel_downtimes_by_scope( world.response.code = response.status.as_u16(); } -fn test_v1_cancel_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_make_gcpsts_delegate(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_downtimes + .v2_api_gcp_integration .as_ref() .expect("api instance not found"); - let downtime_id = - serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::CancelDowntimeParams { downtime_id }; - let response = match block_on(api.cancel_downtime_with_http_info(params)) { + let body = if let Some(param) = _parameters.get("body") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_gcp_integration::MakeGCPSTSDelegateParams { body }; + let response = match block_on(api.make_gcpsts_delegate_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3045,16 +11841,13 @@ fn test_v1_cancel_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_opsgenie_services(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_downtimes + .v2_api_opsgenie_integration .as_ref() .expect("api instance not found"); - let downtime_id = - serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::GetDowntimeParams { downtime_id }; - let response = match block_on(api.get_downtime_with_http_info(params)) { + let response = match block_on(api.list_opsgenie_services_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -3067,17 +11860,15 @@ fn test_v1_get_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_downtimes + .v2_api_opsgenie_integration .as_ref() .expect("api instance not found"); - let downtime_id = - serde_json::from_value(_parameters.get("downtime_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::UpdateDowntimeParams { downtime_id, body }; - let response = match block_on(api.update_downtime_with_http_info(params)) { + let params = datadogV2::api::api_opsgenie_integration::CreateOpsgenieServiceParams { body }; + let response = match block_on(api.create_opsgenie_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3090,16 +11881,18 @@ fn test_v1_update_downtime(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_downtimes + .v2_api_opsgenie_integration .as_ref() .expect("api instance not found"); - let monitor_id = - serde_json::from_value(_parameters.get("monitor_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_downtimes::ListMonitorDowntimesParams { monitor_id }; - let response = match block_on(api.list_monitor_downtimes_with_http_info(params)) { + let integration_service_id = + serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_opsgenie_integration::DeleteOpsgenieServiceParams { + integration_service_id, + }; + let response = match block_on(api.delete_opsgenie_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3112,55 +11905,18 @@ fn test_v1_list_monitor_downtimes(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_list_events(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_events + .v2_api_opsgenie_integration .as_ref() .expect("api instance not found"); - let start = serde_json::from_value(_parameters.get("start").unwrap().clone()).unwrap(); - let end = serde_json::from_value(_parameters.get("end").unwrap().clone()).unwrap(); - let priority = if let Some(param) = _parameters.get("priority") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let sources = if let Some(param) = _parameters.get("sources") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let tags = if let Some(param) = _parameters.get("tags") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let unaggregated = if let Some(param) = _parameters.get("unaggregated") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let exclude_aggregate = if let Some(param) = _parameters.get("exclude_aggregate") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page = if let Some(param) = _parameters.get("page") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_events::ListEventsParams { - start, - end, - priority, - sources, - tags, - unaggregated, - exclude_aggregate, - page, + let integration_service_id = + serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_opsgenie_integration::GetOpsgenieServiceParams { + integration_service_id, }; - let response = match block_on(api.list_events_with_http_info(params)) { + let response = match block_on(api.get_opsgenie_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3173,15 +11929,20 @@ fn test_v1_list_events(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_events + .v2_api_opsgenie_integration .as_ref() .expect("api instance not found"); + let integration_service_id = + serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_events::CreateEventParams { body }; - let response = match block_on(api.create_event_with_http_info(params)) { + let params = datadogV2::api::api_opsgenie_integration::UpdateOpsgenieServiceParams { + integration_service_id, + body, + }; + let response = match block_on(api.update_opsgenie_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3194,15 +11955,16 @@ fn test_v1_create_event(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_cloudflare_accounts( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_events + .v2_api_cloudflare_integration .as_ref() .expect("api instance not found"); - let event_id = serde_json::from_value(_parameters.get("event_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_events::GetEventParams { event_id }; - let response = match block_on(api.get_event_with_http_info(params)) { + let response = match block_on(api.list_cloudflare_accounts_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -3215,55 +11977,18 @@ fn test_v1_get_event(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_cloudflare_account( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_snapshots + .v2_api_cloudflare_integration .as_ref() .expect("api instance not found"); - let start = serde_json::from_value(_parameters.get("start").unwrap().clone()).unwrap(); - let end = serde_json::from_value(_parameters.get("end").unwrap().clone()).unwrap(); - let metric_query = if let Some(param) = _parameters.get("metric_query") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let event_query = if let Some(param) = _parameters.get("event_query") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let graph_def = if let Some(param) = _parameters.get("graph_def") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let title = if let Some(param) = _parameters.get("title") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let height = if let Some(param) = _parameters.get("height") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let width = if let Some(param) = _parameters.get("width") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_snapshots::GetGraphSnapshotParams { - start, - end, - metric_query, - event_query, - graph_def, - title, - height, - width, - }; - let response = match block_on(api.get_graph_snapshot_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_cloudflare_integration::CreateCloudflareAccountParams { body }; + let response = match block_on(api.create_cloudflare_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3276,16 +12001,20 @@ fn test_v1_get_graph_snapshot(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_cloudflare_account( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_hosts + .v2_api_cloudflare_integration .as_ref() .expect("api instance not found"); - let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_hosts::MuteHostParams { host_name, body }; - let response = match block_on(api.mute_host_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_cloudflare_integration::DeleteCloudflareAccountParams { account_id }; + let response = match block_on(api.delete_cloudflare_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3298,15 +12027,17 @@ fn test_v1_mute_host(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_cloudflare_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_hosts + .v2_api_cloudflare_integration .as_ref() .expect("api instance not found"); - let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_hosts::UnmuteHostParams { host_name }; - let response = match block_on(api.unmute_host_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_cloudflare_integration::GetCloudflareAccountParams { account_id }; + let response = match block_on(api.get_cloudflare_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3319,64 +12050,23 @@ fn test_v1_unmute_host(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_cloudflare_account( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_hosts + .v2_api_cloudflare_integration .as_ref() .expect("api instance not found"); - let filter = if let Some(param) = _parameters.get("filter") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let sort_field = if let Some(param) = _parameters.get("sort_field") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let sort_dir = if let Some(param) = _parameters.get("sort_dir") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let start = if let Some(param) = _parameters.get("start") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let count = if let Some(param) = _parameters.get("count") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let from = if let Some(param) = _parameters.get("from") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let include_muted_hosts_data = if let Some(param) = _parameters.get("include_muted_hosts_data") - { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let include_hosts_metadata = if let Some(param) = _parameters.get("include_hosts_metadata") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_hosts::ListHostsParams { - filter, - sort_field, - sort_dir, - start, - count, - from, - include_muted_hosts_data, - include_hosts_metadata, + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_cloudflare_integration::UpdateCloudflareAccountParams { + account_id, + body, }; - let response = match block_on(api.list_hosts_with_http_info(params)) { + let response = match block_on(api.update_cloudflare_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3389,19 +12079,13 @@ fn test_v1_list_hosts(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_confluent_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_hosts + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); - let from = if let Some(param) = _parameters.get("from") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_hosts::GetHostTotalsParams { from }; - let response = match block_on(api.get_host_totals_with_http_info(params)) { + let response = match block_on(api.list_confluent_account_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -3414,15 +12098,18 @@ fn test_v1_get_host_totals(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_confluent_account( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::DeleteAWSAccountParams { body }; - let response = match block_on(api.delete_aws_account_with_http_info(params)) { + let params = datadogV2::api::api_confluent_cloud::CreateConfluentAccountParams { body }; + let response = match block_on(api.create_confluent_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3435,33 +12122,19 @@ fn test_v1_delete_aws_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_confluent_account( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); - let account_id = if let Some(param) = _parameters.get("account_id") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let role_name = if let Some(param) = _parameters.get("role_name") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let access_key_id = if let Some(param) = _parameters.get("access_key_id") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_aws_integration::ListAWSAccountsParams { - account_id, - role_name, - access_key_id, - }; - let response = match block_on(api.list_aws_accounts_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_confluent_cloud::DeleteConfluentAccountParams { account_id }; + let response = match block_on(api.delete_confluent_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3474,15 +12147,16 @@ fn test_v1_list_aws_accounts(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_confluent_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::CreateAWSAccountParams { body }; - let response = match block_on(api.create_aws_account_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_confluent_cloud::GetConfluentAccountParams { account_id }; + let response = match block_on(api.get_confluent_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3495,35 +12169,21 @@ fn test_v1_create_aws_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_confluent_account( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let account_id = if let Some(param) = _parameters.get("account_id") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let role_name = if let Some(param) = _parameters.get("role_name") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let access_key_id = if let Some(param) = _parameters.get("access_key_id") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_aws_integration::UpdateAWSAccountParams { - body, - account_id, - role_name, - access_key_id, - }; - let response = match block_on(api.update_aws_account_with_http_info(params)) { + let params = + datadogV2::api::api_confluent_cloud::UpdateConfluentAccountParams { account_id, body }; + let response = match block_on(api.update_confluent_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3536,16 +12196,16 @@ fn test_v1_update_aws_account(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_list_confluent_resource(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_available_aws_namespaces_with_http_info()) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_confluent_cloud::ListConfluentResourceParams { account_id }; + let response = match block_on(api.list_confluent_resource_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3558,18 +12218,21 @@ fn test_v1_list_available_aws_namespaces( world.response.code = response.status.as_u16(); } -fn test_v1_delete_aws_event_bridge_source( +fn test_v2_create_confluent_resource( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::DeleteAWSEventBridgeSourceParams { body }; - let response = match block_on(api.delete_aws_event_bridge_source_with_http_info(params)) { + let params = + datadogV2::api::api_confluent_cloud::CreateConfluentResourceParams { account_id, body }; + let response = match block_on(api.create_confluent_resource_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3582,16 +12245,24 @@ fn test_v1_delete_aws_event_bridge_source( world.response.code = response.status.as_u16(); } -fn test_v1_list_aws_event_bridge_sources( +fn test_v2_delete_confluent_resource( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_aws_event_bridge_sources_with_http_info()) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let resource_id = + serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_confluent_cloud::DeleteConfluentResourceParams { + account_id, + resource_id, + }; + let response = match block_on(api.delete_confluent_resource_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3604,18 +12275,21 @@ fn test_v1_list_aws_event_bridge_sources( world.response.code = response.status.as_u16(); } -fn test_v1_create_aws_event_bridge_source( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_confluent_resource(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::CreateAWSEventBridgeSourceParams { body }; - let response = match block_on(api.create_aws_event_bridge_source_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let resource_id = + serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_confluent_cloud::GetConfluentResourceParams { + account_id, + resource_id, + }; + let response = match block_on(api.get_confluent_resource_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3628,15 +12302,26 @@ fn test_v1_create_aws_event_bridge_source( world.response.code = response.status.as_u16(); } -fn test_v1_delete_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_confluent_resource( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_confluent_cloud .as_ref() .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let resource_id = + serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::DeleteAWSTagFilterParams { body }; - let response = match block_on(api.delete_aws_tag_filter_with_http_info(params)) { + let params = datadogV2::api::api_confluent_cloud::UpdateConfluentResourceParams { + account_id, + resource_id, + body, + }; + let response = match block_on(api.update_confluent_resource_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3649,16 +12334,13 @@ fn test_v1_delete_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_list_aws_tag_filters(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_fastly_accounts(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::ListAWSTagFiltersParams { account_id }; - let response = match block_on(api.list_aws_tag_filters_with_http_info(params)) { + let response = match block_on(api.list_fastly_accounts_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -3671,15 +12353,15 @@ fn test_v1_list_aws_tag_filters(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_create_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::CreateAWSTagFilterParams { body }; - let response = match block_on(api.create_aws_tag_filter_with_http_info(params)) { + let params = datadogV2::api::api_fastly_integration::CreateFastlyAccountParams { body }; + let response = match block_on(api.create_fastly_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3692,18 +12374,16 @@ fn test_v1_create_aws_tag_filter(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_create_new_aws_external_id( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_delete_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_integration::CreateNewAWSExternalIDParams { body }; - let response = match block_on(api.create_new_aws_external_id_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_fastly_integration::DeleteFastlyAccountParams { account_id }; + let response = match block_on(api.delete_fastly_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3716,15 +12396,16 @@ fn test_v1_create_new_aws_external_id( world.response.code = response.status.as_u16(); } -fn test_v1_delete_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_logs_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::DeleteAWSLambdaARNParams { body }; - let response = match block_on(api.delete_aws_lambda_arn_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_fastly_integration::GetFastlyAccountParams { account_id }; + let response = match block_on(api.get_fastly_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3737,16 +12418,18 @@ fn test_v1_delete_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_list_aws_logs_integrations( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_logs_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_aws_logs_integrations_with_http_info()) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_fastly_integration::UpdateFastlyAccountParams { account_id, body }; + let response = match block_on(api.update_fastly_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3759,15 +12442,16 @@ fn test_v1_list_aws_logs_integrations( world.response.code = response.status.as_u16(); } -fn test_v1_create_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_fastly_services(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_logs_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::CreateAWSLambdaARNParams { body }; - let response = match block_on(api.create_aws_lambda_arn_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_fastly_integration::ListFastlyServicesParams { account_id }; + let response = match block_on(api.list_fastly_services_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3780,18 +12464,18 @@ fn test_v1_create_aws_lambda_arn(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_check_aws_logs_lambda_async( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_create_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_logs_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::CheckAWSLogsLambdaAsyncParams { body }; - let response = match block_on(api.check_aws_logs_lambda_async_with_http_info(params)) { + let params = + datadogV2::api::api_fastly_integration::CreateFastlyServiceParams { account_id, body }; + let response = match block_on(api.create_fastly_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3804,13 +12488,21 @@ fn test_v1_check_aws_logs_lambda_async( world.response.code = response.status.as_u16(); } -fn test_v1_list_aws_logs_services(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_logs_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_aws_logs_services_with_http_info()) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let service_id = + serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_fastly_integration::DeleteFastlyServiceParams { + account_id, + service_id, + }; + let response = match block_on(api.delete_fastly_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3823,15 +12515,21 @@ fn test_v1_list_aws_logs_services(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_enable_aws_log_services(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_logs_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::EnableAWSLogServicesParams { body }; - let response = match block_on(api.enable_aws_log_services_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let service_id = + serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_fastly_integration::GetFastlyServiceParams { + account_id, + service_id, + }; + let response = match block_on(api.get_fastly_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3844,18 +12542,23 @@ fn test_v1_enable_aws_log_services(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_check_aws_logs_services_async( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_aws_logs_integration + .v2_api_fastly_integration .as_ref() .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let service_id = + serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_aws_logs_integration::CheckAWSLogsServicesAsyncParams { body }; - let response = match block_on(api.check_aws_logs_services_async_with_http_info(params)) { + let params = datadogV2::api::api_fastly_integration::UpdateFastlyServiceParams { + account_id, + service_id, + body, + }; + let response = match block_on(api.update_fastly_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3868,18 +12571,13 @@ fn test_v1_check_aws_logs_services_async( world.response.code = response.status.as_u16(); } -fn test_v1_delete_azure_integration( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_okta_accounts(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_azure_integration + .v2_api_okta_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::DeleteAzureIntegrationParams { body }; - let response = match block_on(api.delete_azure_integration_with_http_info(params)) { + let response = match block_on(api.list_okta_accounts_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -3892,13 +12590,15 @@ fn test_v1_delete_azure_integration( world.response.code = response.status.as_u16(); } -fn test_v1_list_azure_integration(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_okta_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_azure_integration + .v2_api_okta_integration .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_azure_integration_with_http_info()) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_okta_integration::CreateOktaAccountParams { body }; + let response = match block_on(api.create_okta_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3911,18 +12611,16 @@ fn test_v1_list_azure_integration(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_create_azure_integration( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_delete_okta_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_azure_integration + .v2_api_okta_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::CreateAzureIntegrationParams { body }; - let response = match block_on(api.create_azure_integration_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_okta_integration::DeleteOktaAccountParams { account_id }; + let response = match block_on(api.delete_okta_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3935,18 +12633,16 @@ fn test_v1_create_azure_integration( world.response.code = response.status.as_u16(); } -fn test_v1_update_azure_integration( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_okta_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_azure_integration + .v2_api_okta_integration .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::UpdateAzureIntegrationParams { body }; - let response = match block_on(api.update_azure_integration_with_http_info(params)) { + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_okta_integration::GetOktaAccountParams { account_id }; + let response = match block_on(api.get_okta_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3959,18 +12655,17 @@ fn test_v1_update_azure_integration( world.response.code = response.status.as_u16(); } -fn test_v1_update_azure_host_filters( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_okta_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_azure_integration + .v2_api_okta_integration .as_ref() .expect("api instance not found"); + let account_id = + serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_azure_integration::UpdateAzureHostFiltersParams { body }; - let response = match block_on(api.update_azure_host_filters_with_http_info(params)) { + let params = datadogV2::api::api_okta_integration::UpdateOktaAccountParams { account_id, body }; + let response = match block_on(api.update_okta_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -3983,15 +12678,13 @@ fn test_v1_update_azure_host_filters( world.response.code = response.status.as_u16(); } -fn test_v1_delete_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_ip_allowlist(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_gcp_integration + .v2_api_ip_allowlist .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_gcp_integration::DeleteGCPIntegrationParams { body }; - let response = match block_on(api.delete_gcp_integration_with_http_info(params)) { + let response = match block_on(api.get_ip_allowlist_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -4004,13 +12697,15 @@ fn test_v1_delete_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_list_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_ip_allowlist(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_gcp_integration + .v2_api_ip_allowlist .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_gcp_integration_with_http_info()) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_ip_allowlist::UpdateIPAllowlistParams { body }; + let response = match block_on(api.update_ip_allowlist_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4023,15 +12718,29 @@ fn test_v1_list_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_create_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_submit_log(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_gcp_integration + .v2_api_logs .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_gcp_integration::CreateGCPIntegrationParams { body }; - let response = match block_on(api.create_gcp_integration_with_http_info(params)) { + let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let ddtags = if let Some(param) = _parameters.get("ddtags") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_logs::SubmitLogParams { + body, + content_encoding, + ddtags, + }; + let response = match block_on(api.submit_log_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4044,15 +12753,15 @@ fn test_v1_create_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_update_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_aggregate_logs(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_gcp_integration + .v2_api_logs .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_gcp_integration::UpdateGCPIntegrationParams { body }; - let response = match block_on(api.update_gcp_integration_with_http_info(params)) { + let params = datadogV2::api::api_logs::AggregateLogsParams { body }; + let response = match block_on(api.aggregate_logs_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4065,22 +12774,63 @@ fn test_v1_update_gcp_integration(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_create_pager_duty_integration_service( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_logs_get(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_pager_duty_integration + .v2_api_logs .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_pager_duty_integration::CreatePagerDutyIntegrationServiceParams { - body, - }; - let response = match block_on(api.create_pager_duty_integration_service_with_http_info(params)) - { + let filter_query = if let Some(param) = _parameters.get("filter[query]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_indexes = if let Some(param) = _parameters.get("filter[indexes]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_from = if let Some(param) = _parameters.get("filter[from]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_to = if let Some(param) = _parameters.get("filter[to]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_storage_tier = if let Some(param) = _parameters.get("filter[storage_tier]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_logs::ListLogsGetParams { + filter_query, + filter_indexes, + filter_from, + filter_to, + filter_storage_tier, + sort, + page_cursor, + page_limit, + }; + let response = match block_on(api.list_logs_get_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4093,23 +12843,19 @@ fn test_v1_create_pager_duty_integration_service( world.response.code = response.status.as_u16(); } -fn test_v1_delete_pager_duty_integration_service( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_logs(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_pager_duty_integration + .v2_api_logs .as_ref() .expect("api instance not found"); - let service_name = - serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_pager_duty_integration::DeletePagerDutyIntegrationServiceParams { - service_name, - }; - let response = match block_on(api.delete_pager_duty_integration_service_with_http_info(params)) - { + let body = if let Some(param) = _parameters.get("body") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_logs::ListLogsParams { body }; + let response = match block_on(api.list_logs_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4122,21 +12868,13 @@ fn test_v1_delete_pager_duty_integration_service( world.response.code = response.status.as_u16(); } -fn test_v1_get_pager_duty_integration_service( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_logs_archive_order(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_pager_duty_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let service_name = - serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_pager_duty_integration::GetPagerDutyIntegrationServiceParams { - service_name, - }; - let response = match block_on(api.get_pager_duty_integration_service_with_http_info(params)) { + let response = match block_on(api.get_logs_archive_order_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -4149,25 +12887,18 @@ fn test_v1_get_pager_duty_integration_service( world.response.code = response.status.as_u16(); } -fn test_v1_update_pager_duty_integration_service( +fn test_v2_update_logs_archive_order( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_pager_duty_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let service_name = - serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_pager_duty_integration::UpdatePagerDutyIntegrationServiceParams { - service_name, - body, - }; - let response = match block_on(api.update_pager_duty_integration_service_with_http_info(params)) - { + let params = datadogV2::api::api_logs_archives::UpdateLogsArchiveOrderParams { body }; + let response = match block_on(api.update_logs_archive_order_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4180,20 +12911,13 @@ fn test_v1_update_pager_duty_integration_service( world.response.code = response.status.as_u16(); } -fn test_v1_get_slack_integration_channels( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_logs_archives(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_slack_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let account_name = - serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_slack_integration::GetSlackIntegrationChannelsParams { account_name }; - let response = match block_on(api.get_slack_integration_channels_with_http_info(params)) { + let response = match block_on(api.list_logs_archives_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -4206,23 +12930,15 @@ fn test_v1_get_slack_integration_channels( world.response.code = response.status.as_u16(); } -fn test_v1_create_slack_integration_channel( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_create_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_slack_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let account_name = - serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::CreateSlackIntegrationChannelParams { - account_name, - body, - }; - let response = match block_on(api.create_slack_integration_channel_with_http_info(params)) { + let params = datadogV2::api::api_logs_archives::CreateLogsArchiveParams { body }; + let response = match block_on(api.create_logs_archive_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4235,24 +12951,16 @@ fn test_v1_create_slack_integration_channel( world.response.code = response.status.as_u16(); } -fn test_v1_remove_slack_integration_channel( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_delete_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_slack_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let account_name = - serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); - let channel_name = - serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::RemoveSlackIntegrationChannelParams { - account_name, - channel_name, - }; - let response = match block_on(api.remove_slack_integration_channel_with_http_info(params)) { + let archive_id = + serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_logs_archives::DeleteLogsArchiveParams { archive_id }; + let response = match block_on(api.delete_logs_archive_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4265,24 +12973,16 @@ fn test_v1_remove_slack_integration_channel( world.response.code = response.status.as_u16(); } -fn test_v1_get_slack_integration_channel( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_slack_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let account_name = - serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); - let channel_name = - serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::GetSlackIntegrationChannelParams { - account_name, - channel_name, - }; - let response = match block_on(api.get_slack_integration_channel_with_http_info(params)) { + let archive_id = + serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_logs_archives::GetLogsArchiveParams { archive_id }; + let response = match block_on(api.get_logs_archive_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4295,26 +12995,17 @@ fn test_v1_get_slack_integration_channel( world.response.code = response.status.as_u16(); } -fn test_v1_update_slack_integration_channel( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_logs_archive(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_slack_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let account_name = - serde_json::from_value(_parameters.get("account_name").unwrap().clone()).unwrap(); - let channel_name = - serde_json::from_value(_parameters.get("channel_name").unwrap().clone()).unwrap(); + let archive_id = + serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_slack_integration::UpdateSlackIntegrationChannelParams { - account_name, - channel_name, - body, - }; - let response = match block_on(api.update_slack_integration_channel_with_http_info(params)) { + let params = datadogV2::api::api_logs_archives::UpdateLogsArchiveParams { archive_id, body }; + let response = match block_on(api.update_logs_archive_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4327,135 +13018,43 @@ fn test_v1_update_slack_integration_channel( world.response.code = response.status.as_u16(); } -fn test_v1_create_webhooks_integration_custom_variable( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { - let api = world - .api_instances - .v1_api_webhooks_integration - .as_ref() - .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::CreateWebhooksIntegrationCustomVariableParams { - body, - }; - let response = - match block_on(api.create_webhooks_integration_custom_variable_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v1_delete_webhooks_integration_custom_variable( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { - let api = world - .api_instances - .v1_api_webhooks_integration - .as_ref() - .expect("api instance not found"); - let custom_variable_name = - serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::DeleteWebhooksIntegrationCustomVariableParams { - custom_variable_name, - }; - let response = - match block_on(api.delete_webhooks_integration_custom_variable_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v1_get_webhooks_integration_custom_variable( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { - let api = world - .api_instances - .v1_api_webhooks_integration - .as_ref() - .expect("api instance not found"); - let custom_variable_name = - serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::GetWebhooksIntegrationCustomVariableParams { - custom_variable_name, - }; - let response = - match block_on(api.get_webhooks_integration_custom_variable_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v1_update_webhooks_integration_custom_variable( +fn test_v2_remove_role_from_archive( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_webhooks_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let custom_variable_name = - serde_json::from_value(_parameters.get("custom_variable_name").unwrap().clone()).unwrap(); + let archive_id = + serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); let params = - datadogV1::api::api_webhooks_integration::UpdateWebhooksIntegrationCustomVariableParams { - custom_variable_name, - body, - }; - let response = - match block_on(api.update_webhooks_integration_custom_variable_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; + datadogV2::api::api_logs_archives::RemoveRoleFromArchiveParams { archive_id, body }; + let response = match block_on(api.remove_role_from_archive_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } -fn test_v1_create_webhooks_integration( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_archive_read_roles(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_webhooks_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_webhooks_integration::CreateWebhooksIntegrationParams { body }; - let response = match block_on(api.create_webhooks_integration_with_http_info(params)) { + let archive_id = + serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_logs_archives::ListArchiveReadRolesParams { archive_id }; + let response = match block_on(api.list_archive_read_roles_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4468,20 +13067,20 @@ fn test_v1_create_webhooks_integration( world.response.code = response.status.as_u16(); } -fn test_v1_delete_webhooks_integration( +fn test_v2_add_read_role_to_archive( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_webhooks_integration + .v2_api_logs_archives .as_ref() .expect("api instance not found"); - let webhook_name = - serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::DeleteWebhooksIntegrationParams { webhook_name }; - let response = match block_on(api.delete_webhooks_integration_with_http_info(params)) { + let archive_id = + serde_json::from_value(_parameters.get("archive_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_logs_archives::AddReadRoleToArchiveParams { archive_id, body }; + let response = match block_on(api.add_read_role_to_archive_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4494,20 +13093,13 @@ fn test_v1_delete_webhooks_integration( world.response.code = response.status.as_u16(); } -fn test_v1_get_webhooks_integration( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_logs_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_webhooks_integration + .v2_api_logs_metrics .as_ref() .expect("api instance not found"); - let webhook_name = - serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_webhooks_integration::GetWebhooksIntegrationParams { webhook_name }; - let response = match block_on(api.get_webhooks_integration_with_http_info(params)) { + let response = match block_on(api.list_logs_metrics_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -4520,23 +13112,15 @@ fn test_v1_get_webhooks_integration( world.response.code = response.status.as_u16(); } -fn test_v1_update_webhooks_integration( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_create_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_webhooks_integration + .v2_api_logs_metrics .as_ref() .expect("api instance not found"); - let webhook_name = - serde_json::from_value(_parameters.get("webhook_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_webhooks_integration::UpdateWebhooksIntegrationParams { - webhook_name, - body, - }; - let response = match block_on(api.update_webhooks_integration_with_http_info(params)) { + let params = datadogV2::api::api_logs_metrics::CreateLogsMetricParams { body }; + let response = match block_on(api.create_logs_metric_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4549,15 +13133,15 @@ fn test_v1_update_webhooks_integration( world.response.code = response.status.as_u16(); } -fn test_v1_list_logs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_logs + .v2_api_logs_metrics .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs::ListLogsParams { body }; - let response = match block_on(api.list_logs_with_http_info(params)) { + let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_logs_metrics::DeleteLogsMetricParams { metric_id }; + let response = match block_on(api.delete_logs_metric_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4570,29 +13154,15 @@ fn test_v1_list_logs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_logs + .v2_api_logs_metrics .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let ddtags = if let Some(param) = _parameters.get("ddtags") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_logs::SubmitLogParams { - body, - content_encoding, - ddtags, - }; - let response = match block_on(api.submit_log_with_http_info(params)) { + let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_logs_metrics::GetLogsMetricParams { metric_id }; + let response = match block_on(api.get_logs_metric_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4605,13 +13175,16 @@ fn test_v1_submit_log(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_logs_indexes + .v2_api_logs_metrics .as_ref() .expect("api instance not found"); - let response = match block_on(api.get_logs_index_order_with_http_info()) { + let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_logs_metrics::UpdateLogsMetricParams { metric_id, body }; + let response = match block_on(api.update_logs_metric_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4624,15 +13197,58 @@ fn test_v1_get_logs_index_order(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_update_logs_index_order(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_tag_configurations(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_logs_indexes + .v2_api_metrics .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_indexes::UpdateLogsIndexOrderParams { body }; - let response = match block_on(api.update_logs_index_order_with_http_info(params)) { + let filter_configured = if let Some(param) = _parameters.get("filter[configured]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_tags_configured = if let Some(param) = _parameters.get("filter[tags_configured]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_metric_type = if let Some(param) = _parameters.get("filter[metric_type]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_include_percentiles = + if let Some(param) = _parameters.get("filter[include_percentiles]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_queried = if let Some(param) = _parameters.get("filter[queried]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_tags = if let Some(param) = _parameters.get("filter[tags]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let window_seconds = if let Some(param) = _parameters.get("window[seconds]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_metrics::ListTagConfigurationsParams { + filter_configured, + filter_tags_configured, + filter_metric_type, + filter_include_percentiles, + filter_queried, + filter_tags, + window_seconds, + }; + let response = match block_on(api.list_tag_configurations_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4645,13 +13261,19 @@ fn test_v1_update_logs_index_order(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v1_list_log_indexes(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_bulk_tags_metrics_configuration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_logs_indexes + .v2_api_metrics .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_log_indexes_with_http_info()) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_metrics::DeleteBulkTagsMetricsConfigurationParams { body }; + let response = match block_on(api.delete_bulk_tags_metrics_configuration_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -4664,15 +13286,19 @@ fn test_v1_list_log_indexes(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_bulk_tags_metrics_configuration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_logs_indexes + .v2_api_metrics .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_indexes::CreateLogsIndexParams { body }; - let response = match block_on(api.create_logs_index_with_http_info(params)) { + let params = datadogV2::api::api_metrics::CreateBulkTagsMetricsConfigurationParams { body }; + let response = match block_on(api.create_bulk_tags_metrics_configuration_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -4685,15 +13311,27 @@ fn test_v1_create_logs_index(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_active_metric_configurations( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_logs_indexes + .v2_api_metrics .as_ref() .expect("api instance not found"); - let name = serde_json::from_value(_parameters.get("name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_indexes::GetLogsIndexParams { name }; - let response = match block_on(api.get_logs_index_with_http_info(params)) { + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let window_seconds = if let Some(param) = _parameters.get("window[seconds]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_metrics::ListActiveMetricConfigurationsParams { + metric_name, + window_seconds, + }; + let response = match block_on(api.list_active_metric_configurations_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4706,16 +13344,19 @@ fn test_v1_get_logs_index(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_tags_by_metric_name( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_logs_indexes + .v2_api_metrics .as_ref() .expect("api instance not found"); - let name = serde_json::from_value(_parameters.get("name").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_logs_indexes::UpdateLogsIndexParams { name, body }; - let response = match block_on(api.update_logs_index_with_http_info(params)) { + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_metrics::ListTagsByMetricNameParams { metric_name }; + let response = match block_on(api.list_tags_by_metric_name_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4728,29 +13369,51 @@ fn test_v1_update_logs_index(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_estimate_metrics_output_series( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_metrics + .v2_api_metrics .as_ref() .expect("api instance not found"); - let from = serde_json::from_value(_parameters.get("from").unwrap().clone()).unwrap(); - let host = if let Some(param) = _parameters.get("host") { + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let filter_groups = if let Some(param) = _parameters.get("filter[groups]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let tag_filter = if let Some(param) = _parameters.get("tag_filter") { + let filter_hours_ago = if let Some(param) = _parameters.get("filter[hours_ago]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_metrics::ListActiveMetricsParams { - from, - host, - tag_filter, + let filter_num_aggregations = if let Some(param) = _parameters.get("filter[num_aggregations]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.list_active_metrics_with_http_info(params)) { + let filter_pct = if let Some(param) = _parameters.get("filter[pct]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_timespan_h = if let Some(param) = _parameters.get("filter[timespan_h]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_metrics::EstimateMetricsOutputSeriesParams { + metric_name, + filter_groups, + filter_hours_ago, + filter_num_aggregations, + filter_pct, + filter_timespan_h, + }; + let response = match block_on(api.estimate_metrics_output_series_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4763,16 +13426,19 @@ fn test_v1_list_active_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_tag_configuration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_metrics + .v2_api_metrics .as_ref() .expect("api instance not found"); let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_metrics::GetMetricMetadataParams { metric_name }; - let response = match block_on(api.get_metric_metadata_with_http_info(params)) { + let params = datadogV2::api::api_metrics::DeleteTagConfigurationParams { metric_name }; + let response = match block_on(api.delete_tag_configuration_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4785,17 +13451,45 @@ fn test_v1_get_metric_metadata(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_tag_configuration_by_name( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_metrics + .v2_api_metrics + .as_ref() + .expect("api instance not found"); + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_metrics::ListTagConfigurationByNameParams { metric_name }; + let response = match block_on(api.list_tag_configuration_by_name_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_update_tag_configuration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_metrics .as_ref() .expect("api instance not found"); let metric_name = serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_metrics::UpdateMetricMetadataParams { metric_name, body }; - let response = match block_on(api.update_metric_metadata_with_http_info(params)) { + let params = datadogV2::api::api_metrics::UpdateTagConfigurationParams { metric_name, body }; + let response = match block_on(api.update_tag_configuration_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4808,17 +13502,20 @@ fn test_v1_update_metric_metadata(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v1_query_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_tag_configuration( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_metrics + .v2_api_metrics .as_ref() .expect("api instance not found"); - let from = serde_json::from_value(_parameters.get("from").unwrap().clone()).unwrap(); - let to = serde_json::from_value(_parameters.get("to").unwrap().clone()).unwrap(); - let query = serde_json::from_value(_parameters.get("query").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_metrics::QueryMetricsParams { from, to, query }; - let response = match block_on(api.query_metrics_with_http_info(params)) { + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_metrics::CreateTagConfigurationParams { metric_name, body }; + let response = match block_on(api.create_tag_configuration_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4831,15 +13528,19 @@ fn test_v1_query_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_volumes_by_metric_name( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_metrics + .v2_api_metrics .as_ref() .expect("api instance not found"); - let q = serde_json::from_value(_parameters.get("q").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_metrics::ListMetricsParams { q }; - let response = match block_on(api.list_metrics_with_http_info(params)) { + let metric_name = + serde_json::from_value(_parameters.get("metric_name").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_metrics::ListVolumesByMetricNameParams { metric_name }; + let response = match block_on(api.list_volumes_by_metric_name_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4852,23 +13553,15 @@ fn test_v1_list_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_query_scalar_data(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_metrics + .v2_api_metrics .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_metrics::SubmitMetricsParams { - body, - content_encoding, - }; - let response = match block_on(api.submit_metrics_with_http_info(params)) { + let params = datadogV2::api::api_metrics::QueryScalarDataParams { body }; + let response = match block_on(api.query_scalar_data_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4881,13 +13574,15 @@ fn test_v1_submit_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_query_timeseries_data(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_organizations + .v2_api_metrics .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_orgs_with_http_info()) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_metrics::QueryTimeseriesDataParams { body }; + let response = match block_on(api.query_timeseries_data_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4900,15 +13595,23 @@ fn test_v1_list_orgs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_submit_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_organizations + .v2_api_metrics .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_organizations::CreateChildOrgParams { body }; - let response = match block_on(api.create_child_org_with_http_info(params)) { + let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_metrics::SubmitMetricsParams { + body, + content_encoding, + }; + let response = match block_on(api.submit_metrics_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4921,15 +13624,16 @@ fn test_v1_create_child_org(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_monitor_config_policies( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_organizations + .v2_api_monitors .as_ref() .expect("api instance not found"); - let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_organizations::GetOrgParams { public_id }; - let response = match block_on(api.get_org_with_http_info(params)) { + let response = match block_on(api.list_monitor_config_policies_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -4942,16 +13646,18 @@ fn test_v1_get_org(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_monitor_config_policy( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_organizations + .v2_api_monitors .as_ref() .expect("api instance not found"); - let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_organizations::UpdateOrgParams { public_id, body }; - let response = match block_on(api.update_org_with_http_info(params)) { + let params = datadogV2::api::api_monitors::CreateMonitorConfigPolicyParams { body }; + let response = match block_on(api.create_monitor_config_policy_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4964,15 +13670,18 @@ fn test_v1_update_org(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_monitor_config_policy( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_organizations + .v2_api_monitors .as_ref() .expect("api instance not found"); - let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_organizations::DowngradeOrgParams { public_id }; - let response = match block_on(api.downgrade_org_with_http_info(params)) { + let policy_id = serde_json::from_value(_parameters.get("policy_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_monitors::DeleteMonitorConfigPolicyParams { policy_id }; + let response = match block_on(api.delete_monitor_config_policy_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -4985,25 +13694,18 @@ fn test_v1_downgrade_org(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_monitor_config_policy( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_organizations + .v2_api_monitors .as_ref() .expect("api instance not found"); - let public_id = serde_json::from_value(_parameters.get("public_id").unwrap().clone()).unwrap(); - let idp_file = _parameters - .get("idp_file") - .unwrap() - .as_str() - .unwrap() - .as_bytes() - .to_vec(); - let params = datadogV1::api::api_organizations::UploadIdPForOrgParams { - public_id, - idp_file, - }; - let response = match block_on(api.upload_id_p_for_org_with_http_info(params)) { + let policy_id = serde_json::from_value(_parameters.get("policy_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_monitors::GetMonitorConfigPolicyParams { policy_id }; + let response = match block_on(api.get_monitor_config_policy_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5016,83 +13718,38 @@ fn test_v1_upload_id_p_for_org(world: &mut DatadogWorld, _parameters: &HashMap, -) { - let api = world - .api_instances - .v1_api_security_monitoring - .as_ref() - .expect("api instance not found"); - let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_security_monitoring::AddSecurityMonitoringSignalToIncidentParams { - signal_id, - body, - }; - let response = - match block_on(api.add_security_monitoring_signal_to_incident_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v1_edit_security_monitoring_signal_assignee( +fn test_v2_update_monitor_config_policy( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v1_api_security_monitoring + .v2_api_monitors .as_ref() .expect("api instance not found"); - let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); + let policy_id = serde_json::from_value(_parameters.get("policy_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_security_monitoring::EditSecurityMonitoringSignalAssigneeParams { - signal_id, - body, - }; - let response = - match block_on(api.edit_security_monitoring_signal_assignee_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; + let params = datadogV2::api::api_monitors::UpdateMonitorConfigPolicyParams { policy_id, body }; + let response = match block_on(api.update_monitor_config_policy_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } -fn test_v1_edit_security_monitoring_signal_state( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_permissions(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_security_monitoring + .v2_api_roles .as_ref() .expect("api instance not found"); - let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_security_monitoring::EditSecurityMonitoringSignalStateParams { - signal_id, - body, - }; - let response = match block_on(api.edit_security_monitoring_signal_state_with_http_info(params)) - { + let response = match block_on(api.list_permissions_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -5105,51 +13762,45 @@ fn test_v1_edit_security_monitoring_signal_state( world.response.code = response.status.as_u16(); } -fn test_v1_list_sl_os(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_roles(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let ids = if let Some(param) = _parameters.get("ids") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let query = if let Some(param) = _parameters.get("query") { + let page_size = if let Some(param) = _parameters.get("page[size]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let tags_query = if let Some(param) = _parameters.get("tags_query") { + let page_number = if let Some(param) = _parameters.get("page[number]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let metrics_query = if let Some(param) = _parameters.get("metrics_query") { + let sort = if let Some(param) = _parameters.get("sort") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let limit = if let Some(param) = _parameters.get("limit") { + let filter = if let Some(param) = _parameters.get("filter") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let offset = if let Some(param) = _parameters.get("offset") { + let filter_id = if let Some(param) = _parameters.get("filter[id]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_service_level_objectives::ListSLOsParams { - ids, - query, - tags_query, - metrics_query, - limit, - offset, + let params = datadogV2::api::api_roles::ListRolesParams { + page_size, + page_number, + sort, + filter, + filter_id, }; - let response = match block_on(api.list_sl_os_with_http_info(params)) { + let response = match block_on(api.list_roles_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5162,15 +13813,15 @@ fn test_v1_list_sl_os(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_level_objectives::CreateSLOParams { body }; - let response = match block_on(api.create_slo_with_http_info(params)) { + let params = datadogV2::api::api_roles::CreateRoleParams { body }; + let response = match block_on(api.create_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5183,19 +13834,15 @@ fn test_v1_create_slo(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_delete_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objectives::DeleteSLOTimeframeInBulkParams { body }; - let response = match block_on(api.delete_slo_timeframe_in_bulk_with_http_info(params)) { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::DeleteRoleParams { role_id }; + let response = match block_on(api.delete_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5208,15 +13855,15 @@ fn test_v1_delete_slo_timeframe_in_bulk( world.response.code = response.status.as_u16(); } -fn test_v1_check_can_delete_slo(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let ids = serde_json::from_value(_parameters.get("ids").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_level_objectives::CheckCanDeleteSLOParams { ids }; - let response = match block_on(api.check_can_delete_slo_with_http_info(params)) { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::GetRoleParams { role_id }; + let response = match block_on(api.get_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5229,39 +13876,16 @@ fn test_v1_check_can_delete_slo(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v1_search_slo(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let query = if let Some(param) = _parameters.get("query") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page_size = if let Some(param) = _parameters.get("page[size]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page_number = if let Some(param) = _parameters.get("page[number]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let include_facets = if let Some(param) = _parameters.get("include_facets") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_service_level_objectives::SearchSLOParams { - query, - page_size, - page_number, - include_facets, - }; - let response = match block_on(api.search_slo_with_http_info(params)) { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::UpdateRoleParams { role_id, body }; + let response = match block_on(api.update_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5274,20 +13898,16 @@ fn test_v1_search_slo(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_clone_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); - let force = if let Some(param) = _parameters.get("force") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_service_level_objectives::DeleteSLOParams { slo_id, force }; - let response = match block_on(api.delete_slo_with_http_info(params)) { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::CloneRoleParams { role_id, body }; + let response = match block_on(api.clone_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5300,24 +13920,40 @@ fn test_v1_delete_slo(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_remove_permission_from_role( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); - let with_configured_alert_ids = - if let Some(param) = _parameters.get("with_configured_alert_ids") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_service_level_objectives::GetSLOParams { - slo_id, - with_configured_alert_ids, + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::RemovePermissionFromRoleParams { role_id, body }; + let response = match block_on(api.remove_permission_from_role_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } }; - let response = match block_on(api.get_slo_with_http_info(params)) { + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_role_permissions(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_roles + .as_ref() + .expect("api instance not found"); + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::ListRolePermissionsParams { role_id }; + let response = match block_on(api.list_role_permissions_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5330,16 +13966,16 @@ fn test_v1_get_slo(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_add_permission_to_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_level_objectives::UpdateSLOParams { slo_id, body }; - let response = match block_on(api.update_slo_with_http_info(params)) { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::AddPermissionToRoleParams { role_id, body }; + let response = match block_on(api.add_permission_to_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5352,15 +13988,16 @@ fn test_v1_update_slo(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_remove_user_from_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_level_objectives::GetSLOCorrectionsParams { slo_id }; - let response = match block_on(api.get_slo_corrections_with_http_info(params)) { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::RemoveUserFromRoleParams { role_id, body }; + let response = match block_on(api.remove_user_from_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5373,33 +14010,41 @@ fn test_v1_get_slo_corrections(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_role_users(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objectives + .v2_api_roles .as_ref() .expect("api instance not found"); - let slo_id = serde_json::from_value(_parameters.get("slo_id").unwrap().clone()).unwrap(); - let from_ts = serde_json::from_value(_parameters.get("from_ts").unwrap().clone()).unwrap(); - let to_ts = serde_json::from_value(_parameters.get("to_ts").unwrap().clone()).unwrap(); - let target = if let Some(param) = _parameters.get("target") { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let page_size = if let Some(param) = _parameters.get("page[size]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let apply_correction = if let Some(param) = _parameters.get("apply_correction") { + let page_number = if let Some(param) = _parameters.get("page[number]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_service_level_objectives::GetSLOHistoryParams { - slo_id, - from_ts, - to_ts, - target, - apply_correction, + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.get_slo_history_with_http_info(params)) { + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_roles::ListRoleUsersParams { + role_id, + page_size, + page_number, + sort, + filter, + }; + let response = match block_on(api.list_role_users_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5412,27 +14057,16 @@ fn test_v1_get_slo_history(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_add_user_to_role(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objective_corrections + .v2_api_roles .as_ref() .expect("api instance not found"); - let offset = if let Some(param) = _parameters.get("offset") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let limit = if let Some(param) = _parameters.get("limit") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_service_level_objective_corrections::ListSLOCorrectionParams { - offset, - limit, - }; - let response = match block_on(api.list_slo_correction_with_http_info(params)) { + let role_id = serde_json::from_value(_parameters.get("role_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_roles::AddUserToRoleParams { role_id, body }; + let response = match block_on(api.add_user_to_role_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5445,16 +14079,89 @@ fn test_v1_list_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_findings(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objective_corrections + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objective_corrections::CreateSLOCorrectionParams { body }; - let response = match block_on(api.create_slo_correction_with_http_info(params)) { + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let snapshot_timestamp = if let Some(param) = _parameters.get("snapshot_timestamp") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_tags = if let Some(param) = _parameters.get("filter[tags]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_evaluation_changed_at = + if let Some(param) = _parameters.get("filter[evaluation_changed_at]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_muted = if let Some(param) = _parameters.get("filter[muted]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_id = if let Some(param) = _parameters.get("filter[rule_id]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_name = if let Some(param) = _parameters.get("filter[rule_name]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_resource_type = if let Some(param) = _parameters.get("filter[resource_type]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_discovery_timestamp = + if let Some(param) = _parameters.get("filter[discovery_timestamp]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_evaluation = if let Some(param) = _parameters.get("filter[evaluation]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_status = if let Some(param) = _parameters.get("filter[status]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_security_monitoring::ListFindingsParams { + page_limit, + snapshot_timestamp, + page_cursor, + filter_tags, + filter_evaluation_changed_at, + filter_muted, + filter_rule_id, + filter_rule_name, + filter_resource_type, + filter_discovery_timestamp, + filter_evaluation, + filter_status, + }; + let response = match block_on(api.list_findings_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5467,19 +14174,15 @@ fn test_v1_create_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_delete_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_mute_findings(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objective_corrections + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let slo_correction_id = - serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objective_corrections::DeleteSLOCorrectionParams { - slo_correction_id, - }; - let response = match block_on(api.delete_slo_correction_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_security_monitoring::MuteFindingsParams { body }; + let response = match block_on(api.mute_findings_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5492,18 +14195,24 @@ fn test_v1_delete_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_get_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_finding(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objective_corrections + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let slo_correction_id = - serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_service_level_objective_corrections::GetSLOCorrectionParams { - slo_correction_id, + let finding_id = + serde_json::from_value(_parameters.get("finding_id").unwrap().clone()).unwrap(); + let snapshot_timestamp = if let Some(param) = _parameters.get("snapshot_timestamp") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.get_slo_correction_with_http_info(params)) { + let params = datadogV2::api::api_security_monitoring::GetFindingParams { + finding_id, + snapshot_timestamp, + }; + let response = match block_on(api.get_finding_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5516,21 +14225,13 @@ fn test_v1_get_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_security_filters(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_service_level_objective_corrections + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let slo_correction_id = - serde_json::from_value(_parameters.get("slo_correction_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV1::api::api_service_level_objective_corrections::UpdateSLOCorrectionParams { - slo_correction_id, - body, - }; - let response = match block_on(api.update_slo_correction_with_http_info(params)) { + let response = match block_on(api.list_security_filters_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -5543,19 +14244,15 @@ fn test_v1_update_slo_correction(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v1_list_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_security_filter(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_tags + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let source = if let Some(param) = _parameters.get("source") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_tags::ListHostTagsParams { source }; - let response = match block_on(api.list_host_tags_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_security_monitoring::CreateSecurityFilterParams { body }; + let response = match block_on(api.create_security_filter_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5568,20 +14265,17 @@ fn test_v1_list_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_security_filter(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_tags + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); - let source = if let Some(param) = _parameters.get("source") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_tags::DeleteHostTagsParams { host_name, source }; - let response = match block_on(api.delete_host_tags_with_http_info(params)) { + let security_filter_id = + serde_json::from_value(_parameters.get("security_filter_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_security_monitoring::DeleteSecurityFilterParams { security_filter_id }; + let response = match block_on(api.delete_security_filter_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5594,20 +14288,17 @@ fn test_v1_delete_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_security_filter(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_tags + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); - let source = if let Some(param) = _parameters.get("source") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_tags::GetHostTagsParams { host_name, source }; - let response = match block_on(api.get_host_tags_with_http_info(params)) { + let security_filter_id = + serde_json::from_value(_parameters.get("security_filter_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_security_monitoring::GetSecurityFilterParams { security_filter_id }; + let response = match block_on(api.get_security_filter_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5620,25 +14311,20 @@ fn test_v1_get_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_security_filter(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v1_api_tags + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); + let security_filter_id = + serde_json::from_value(_parameters.get("security_filter_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let source = if let Some(param) = _parameters.get("source") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV1::api::api_tags::CreateHostTagsParams { - host_name, + let params = datadogV2::api::api_security_monitoring::UpdateSecurityFilterParams { + security_filter_id, body, - source, }; - let response = match block_on(api.create_host_tags_with_http_info(params)) { + let response = match block_on(api.update_security_filter_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5651,25 +14337,30 @@ fn test_v1_create_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_security_monitoring_rules( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_tags + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let host_name = serde_json::from_value(_parameters.get("host_name").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let source = if let Some(param) = _parameters.get("source") { + let page_size = if let Some(param) = _parameters.get("page[size]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV1::api::api_tags::UpdateHostTagsParams { - host_name, - body, - source, + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.update_host_tags_with_http_info(params)) { + let params = datadogV2::api::api_security_monitoring::ListSecurityMonitoringRulesParams { + page_size, + page_number, + }; + let response = match block_on(api.list_security_monitoring_rules_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5682,13 +14373,19 @@ fn test_v1_update_host_tags(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_security_monitoring_rule( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_users + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_users_with_http_info()) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_security_monitoring::CreateSecurityMonitoringRuleParams { body }; + let response = match block_on(api.create_security_monitoring_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5701,15 +14398,19 @@ fn test_v1_list_users(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_security_monitoring_rule( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_users + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_users::CreateUserParams { body }; - let response = match block_on(api.create_user_with_http_info(params)) { + let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_security_monitoring::DeleteSecurityMonitoringRuleParams { rule_id }; + let response = match block_on(api.delete_security_monitoring_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5722,16 +14423,19 @@ fn test_v1_create_user(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_security_monitoring_rule( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_users + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let user_handle = - serde_json::from_value(_parameters.get("user_handle").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_users::DisableUserParams { user_handle }; - let response = match block_on(api.disable_user_with_http_info(params)) { + let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_security_monitoring::GetSecurityMonitoringRuleParams { rule_id }; + let response = match block_on(api.get_security_monitoring_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5744,16 +14448,22 @@ fn test_v1_disable_user(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_security_monitoring_rule( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_users + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let user_handle = - serde_json::from_value(_parameters.get("user_handle").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_users::GetUserParams { user_handle }; - let response = match block_on(api.get_user_with_http_info(params)) { + let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_security_monitoring::UpdateSecurityMonitoringRuleParams { + rule_id, + body, + }; + let response = match block_on(api.update_security_monitoring_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5766,17 +14476,54 @@ fn test_v1_get_user(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_security_monitoring_signals( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_users + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let user_handle = - serde_json::from_value(_parameters.get("user_handle").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV1::api::api_users::UpdateUserParams { user_handle, body }; - let response = match block_on(api.update_user_with_http_info(params)) { + let filter_query = if let Some(param) = _parameters.get("filter[query]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_from = if let Some(param) = _parameters.get("filter[from]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_to = if let Some(param) = _parameters.get("filter[to]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_security_monitoring::ListSecurityMonitoringSignalsParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; + let response = match block_on(api.list_security_monitoring_signals_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5789,13 +14536,23 @@ fn test_v1_update_user(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_search_security_monitoring_signals( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v1_api_authentication + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let response = match block_on(api.validate_with_http_info()) { + let body = if let Some(param) = _parameters.get("body") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = + datadogV2::api::api_security_monitoring::SearchSecurityMonitoringSignalsParams { body }; + let response = match block_on(api.search_security_monitoring_signals_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5808,13 +14565,19 @@ fn test_v1_validate(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_security_monitoring_signal( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_spans_metrics + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_spans_metrics_with_http_info()) { + let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_security_monitoring::GetSecurityMonitoringSignalParams { signal_id }; + let response = match block_on(api.get_security_monitoring_signal_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5827,15 +14590,83 @@ fn test_v2_list_spans_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_edit_security_monitoring_signal_assignee( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_spans_metrics + .v2_api_security_monitoring .as_ref() .expect("api instance not found"); + let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_spans_metrics::CreateSpansMetricParams { body }; - let response = match block_on(api.create_spans_metric_with_http_info(params)) { + let params = + datadogV2::api::api_security_monitoring::EditSecurityMonitoringSignalAssigneeParams { + signal_id, + body, + }; + let response = + match block_on(api.edit_security_monitoring_signal_assignee_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_edit_security_monitoring_signal_incidents( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_security_monitoring + .as_ref() + .expect("api instance not found"); + let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_security_monitoring::EditSecurityMonitoringSignalIncidentsParams { + signal_id, + body, + }; + let response = + match block_on(api.edit_security_monitoring_signal_incidents_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_edit_security_monitoring_signal_state( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { + let api = world + .api_instances + .v2_api_security_monitoring + .as_ref() + .expect("api instance not found"); + let signal_id = serde_json::from_value(_parameters.get("signal_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_security_monitoring::EditSecurityMonitoringSignalStateParams { + signal_id, + body, + }; + let response = match block_on(api.edit_security_monitoring_signal_state_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -5848,15 +14679,27 @@ fn test_v2_create_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_powerpacks(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_spans_metrics + .v2_api_powerpack .as_ref() .expect("api instance not found"); - let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_spans_metrics::DeleteSpansMetricParams { metric_id }; - let response = match block_on(api.delete_spans_metric_with_http_info(params)) { + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_offset = if let Some(param) = _parameters.get("page[offset]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_powerpack::ListPowerpacksParams { + page_limit, + page_offset, + }; + let response = match block_on(api.list_powerpacks_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5869,15 +14712,15 @@ fn test_v2_delete_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_powerpack(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_spans_metrics + .v2_api_powerpack .as_ref() .expect("api instance not found"); - let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_spans_metrics::GetSpansMetricParams { metric_id }; - let response = match block_on(api.get_spans_metric_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_powerpack::CreatePowerpackParams { body }; + let response = match block_on(api.create_powerpack_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5890,16 +14733,16 @@ fn test_v2_get_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_powerpack(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_spans_metrics + .v2_api_powerpack .as_ref() .expect("api instance not found"); - let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_spans_metrics::UpdateSpansMetricParams { metric_id, body }; - let response = match block_on(api.update_spans_metric_with_http_info(params)) { + let powerpack_id = + serde_json::from_value(_parameters.get("powerpack_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_powerpack::DeletePowerpackParams { powerpack_id }; + let response = match block_on(api.delete_powerpack_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5912,16 +14755,16 @@ fn test_v2_update_spans_metric(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_get_powerpack(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_apm_retention_filters + .v2_api_powerpack .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_apm_retention_filters_with_http_info()) { + let powerpack_id = + serde_json::from_value(_parameters.get("powerpack_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_powerpack::GetPowerpackParams { powerpack_id }; + let response = match block_on(api.get_powerpack_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5934,18 +14777,17 @@ fn test_v2_list_apm_retention_filters( world.response.code = response.status.as_u16(); } -fn test_v2_create_apm_retention_filter( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_powerpack(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_apm_retention_filters + .v2_api_powerpack .as_ref() .expect("api instance not found"); + let powerpack_id = + serde_json::from_value(_parameters.get("powerpack_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_apm_retention_filters::CreateApmRetentionFilterParams { body }; - let response = match block_on(api.create_apm_retention_filter_with_http_info(params)) { + let params = datadogV2::api::api_powerpack::UpdatePowerpackParams { powerpack_id, body }; + let response = match block_on(api.update_powerpack_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5954,23 +14796,55 @@ fn test_v2_create_apm_retention_filter( }; } }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v2_reorder_apm_retention_filters( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { - let api = world - .api_instances - .v2_api_apm_retention_filters - .as_ref() - .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_apm_retention_filters::ReorderApmRetentionFiltersParams { body }; - let response = match block_on(api.reorder_apm_retention_filters_with_http_info(params)) { + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_processes(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_processes + .as_ref() + .expect("api instance not found"); + let search = if let Some(param) = _parameters.get("search") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let tags = if let Some(param) = _parameters.get("tags") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let from = if let Some(param) = _parameters.get("from") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let to = if let Some(param) = _parameters.get("to") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_processes::ListProcessesParams { + search, + tags, + from, + to, + page_limit, + page_cursor, + }; + let response = match block_on(api.list_processes_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -5983,19 +14857,20 @@ fn test_v2_reorder_apm_retention_filters( world.response.code = response.status.as_u16(); } -fn test_v2_delete_apm_retention_filter( +fn test_v2_delete_restriction_policy( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_apm_retention_filters + .v2_api_restriction_policies .as_ref() .expect("api instance not found"); - let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); + let resource_id = + serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); let params = - datadogV2::api::api_apm_retention_filters::DeleteApmRetentionFilterParams { filter_id }; - let response = match block_on(api.delete_apm_retention_filter_with_http_info(params)) { + datadogV2::api::api_restriction_policies::DeleteRestrictionPolicyParams { resource_id }; + let response = match block_on(api.delete_restriction_policy_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6008,19 +14883,17 @@ fn test_v2_delete_apm_retention_filter( world.response.code = response.status.as_u16(); } -fn test_v2_get_apm_retention_filter( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_restriction_policy(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_apm_retention_filters + .v2_api_restriction_policies .as_ref() .expect("api instance not found"); - let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); + let resource_id = + serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); let params = - datadogV2::api::api_apm_retention_filters::GetApmRetentionFilterParams { filter_id }; - let response = match block_on(api.get_apm_retention_filter_with_http_info(params)) { + datadogV2::api::api_restriction_policies::GetRestrictionPolicyParams { resource_id }; + let response = match block_on(api.get_restriction_policy_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6033,22 +14906,23 @@ fn test_v2_get_apm_retention_filter( world.response.code = response.status.as_u16(); } -fn test_v2_update_apm_retention_filter( +fn test_v2_update_restriction_policy( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_apm_retention_filters + .v2_api_restriction_policies .as_ref() .expect("api instance not found"); - let filter_id = serde_json::from_value(_parameters.get("filter_id").unwrap().clone()).unwrap(); + let resource_id = + serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_apm_retention_filters::UpdateApmRetentionFilterParams { - filter_id, + let params = datadogV2::api::api_restriction_policies::UpdateRestrictionPolicyParams { + resource_id, body, }; - let response = match block_on(api.update_apm_retention_filter_with_http_info(params)) { + let response = match block_on(api.update_restriction_policy_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6061,51 +14935,15 @@ fn test_v2_update_apm_retention_filter( world.response.code = response.status.as_u16(); } -fn test_v2_list_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_aggregate_rum_events(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_audit + .v2_api_rum .as_ref() .expect("api instance not found"); - let filter_query = if let Some(param) = _parameters.get("filter[query]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_from = if let Some(param) = _parameters.get("filter[from]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_to = if let Some(param) = _parameters.get("filter[to]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let sort = if let Some(param) = _parameters.get("sort") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page_limit = if let Some(param) = _parameters.get("page[limit]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_audit::ListAuditLogsParams { - filter_query, - filter_from, - filter_to, - sort, - page_cursor, - page_limit, - }; - let response = match block_on(api.list_audit_logs_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_rum::AggregateRUMEventsParams { body }; + let response = match block_on(api.aggregate_rum_events_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6118,19 +14956,13 @@ fn test_v2_list_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_rum_applications(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_audit + .v2_api_rum .as_ref() .expect("api instance not found"); - let body = if let Some(param) = _parameters.get("body") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_audit::SearchAuditLogsParams { body }; - let response = match block_on(api.search_audit_logs_with_http_info(params)) { + let response = match block_on(api.get_rum_applications_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -6143,23 +14975,15 @@ fn test_v2_search_audit_logs(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_create_rum_application(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_dashboard_lists + .v2_api_rum .as_ref() .expect("api instance not found"); - let dashboard_list_id = - serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dashboard_lists::DeleteDashboardListItemsParams { - dashboard_list_id, - body, - }; - let response = match block_on(api.delete_dashboard_list_items_with_http_info(params)) { + let params = datadogV2::api::api_rum::CreateRUMApplicationParams { body }; + let response = match block_on(api.create_rum_application_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6172,20 +14996,15 @@ fn test_v2_delete_dashboard_list_items( world.response.code = response.status.as_u16(); } -fn test_v2_get_dashboard_list_items( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_delete_rum_application(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_dashboard_lists + .v2_api_rum .as_ref() .expect("api instance not found"); - let dashboard_list_id = - serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_dashboard_lists::GetDashboardListItemsParams { dashboard_list_id }; - let response = match block_on(api.get_dashboard_list_items_with_http_info(params)) { + let id = serde_json::from_value(_parameters.get("id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_rum::DeleteRUMApplicationParams { id }; + let response = match block_on(api.delete_rum_application_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6198,23 +15017,15 @@ fn test_v2_get_dashboard_list_items( world.response.code = response.status.as_u16(); } -fn test_v2_create_dashboard_list_items( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_rum_application(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_dashboard_lists + .v2_api_rum .as_ref() .expect("api instance not found"); - let dashboard_list_id = - serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dashboard_lists::CreateDashboardListItemsParams { - dashboard_list_id, - body, - }; - let response = match block_on(api.create_dashboard_list_items_with_http_info(params)) { + let id = serde_json::from_value(_parameters.get("id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_rum::GetRUMApplicationParams { id }; + let response = match block_on(api.get_rum_application_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6227,23 +15038,16 @@ fn test_v2_create_dashboard_list_items( world.response.code = response.status.as_u16(); } -fn test_v2_update_dashboard_list_items( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_rum_application(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_dashboard_lists + .v2_api_rum .as_ref() .expect("api instance not found"); - let dashboard_list_id = - serde_json::from_value(_parameters.get("dashboard_list_id").unwrap().clone()).unwrap(); + let id = serde_json::from_value(_parameters.get("id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_dashboard_lists::UpdateDashboardListItemsParams { - dashboard_list_id, - body, - }; - let response = match block_on(api.update_dashboard_list_items_with_http_info(params)) { + let params = datadogV2::api::api_rum::UpdateRUMApplicationParams { id, body }; + let response = match block_on(api.update_rum_application_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6256,10 +15060,10 @@ fn test_v2_update_dashboard_list_items( world.response.code = response.status.as_u16(); } -fn test_v2_list_events(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_rum_events(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_events + .v2_api_rum .as_ref() .expect("api instance not found"); let filter_query = if let Some(param) = _parameters.get("filter[query]") { @@ -6292,7 +15096,7 @@ fn test_v2_list_events(world: &mut DatadogWorld, _parameters: &HashMap response, Err(error) => { return match error { @@ -6313,19 +15117,15 @@ fn test_v2_list_events(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_search_rum_events(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_events + .v2_api_rum .as_ref() .expect("api instance not found"); - let body = if let Some(param) = _parameters.get("body") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_events::SearchEventsParams { body }; - let response = match block_on(api.search_events_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_rum::SearchRUMEventsParams { body }; + let response = match block_on(api.search_rum_events_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6338,34 +15138,19 @@ fn test_v2_search_events(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_upload_id_p_metadata(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_gcp_integration + .v2_api_organizations .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_gcpsts_accounts_with_http_info()) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } + let idp_file = if let Some(param) = _parameters.get("idp_file") { + Some(param.as_str().unwrap().as_bytes().to_vec()) + } else { + None }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v2_create_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap) { - let api = world - .api_instances - .v2_api_gcp_integration - .as_ref() - .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_gcp_integration::CreateGCPSTSAccountParams { body }; - let response = match block_on(api.create_gcpsts_account_with_http_info(params)) { + let params = datadogV2::api::api_organizations::UploadIdPMetadataParams { idp_file }; + let response = match block_on(api.upload_id_p_metadata_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6378,16 +15163,76 @@ fn test_v2_create_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_delete_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_scorecard_outcomes(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_gcp_integration + .v2_api_service_scorecards .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_gcp_integration::DeleteGCPSTSAccountParams { account_id }; - let response = match block_on(api.delete_gcpsts_account_with_http_info(params)) { + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_offset = if let Some(param) = _parameters.get("page[offset]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let fields_outcome = if let Some(param) = _parameters.get("fields[outcome]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let fields_rule = if let Some(param) = _parameters.get("fields[rule]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_outcome_service_name = + if let Some(param) = _parameters.get("filter[outcome][service_name]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_outcome_state = if let Some(param) = _parameters.get("filter[outcome][state]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_enabled = if let Some(param) = _parameters.get("filter[rule][enabled]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_id = if let Some(param) = _parameters.get("filter[rule][id]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_name = if let Some(param) = _parameters.get("filter[rule][name]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_service_scorecards::ListScorecardOutcomesParams { + page_size, + page_offset, + include, + fields_outcome, + fields_rule, + filter_outcome_service_name, + filter_outcome_state, + filter_rule_enabled, + filter_rule_id, + filter_rule_name, + }; + let response = match block_on(api.list_scorecard_outcomes_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6400,18 +15245,19 @@ fn test_v2_delete_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_update_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_scorecard_outcomes_batch( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_gcp_integration + .v2_api_service_scorecards .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); let params = - datadogV2::api::api_gcp_integration::UpdateGCPSTSAccountParams { account_id, body }; - let response = match block_on(api.update_gcpsts_account_with_http_info(params)) { + datadogV2::api::api_service_scorecards::CreateScorecardOutcomesBatchParams { body }; + let response = match block_on(api.create_scorecard_outcomes_batch_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6424,13 +15270,76 @@ fn test_v2_update_gcpsts_account(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_get_gcpsts_delegate(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_scorecard_rules(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_gcp_integration + .v2_api_service_scorecards .as_ref() .expect("api instance not found"); - let response = match block_on(api.get_gcpsts_delegate_with_http_info()) { + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_offset = if let Some(param) = _parameters.get("page[offset]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_id = if let Some(param) = _parameters.get("filter[rule][id]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_enabled = if let Some(param) = _parameters.get("filter[rule][enabled]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_custom = if let Some(param) = _parameters.get("filter[rule][custom]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_name = if let Some(param) = _parameters.get("filter[rule][name]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_rule_description = if let Some(param) = _parameters.get("filter[rule][description]") + { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let fields_rule = if let Some(param) = _parameters.get("fields[rule]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let fields_scorecard = if let Some(param) = _parameters.get("fields[scorecard]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_service_scorecards::ListScorecardRulesParams { + page_size, + page_offset, + include, + filter_rule_id, + filter_rule_enabled, + filter_rule_custom, + filter_rule_name, + filter_rule_description, + fields_rule, + fields_scorecard, + }; + let response = match block_on(api.list_scorecard_rules_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6443,19 +15352,15 @@ fn test_v2_get_gcpsts_delegate(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_scorecard_rule(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_gcp_integration + .v2_api_service_scorecards .as_ref() .expect("api instance not found"); - let body = if let Some(param) = _parameters.get("body") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_gcp_integration::MakeGCPSTSDelegateParams { body }; - let response = match block_on(api.make_gcpsts_delegate_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_service_scorecards::CreateScorecardRuleParams { body }; + let response = match block_on(api.create_scorecard_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6468,13 +15373,15 @@ fn test_v2_make_gcpsts_delegate(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v2_list_opsgenie_services(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_scorecard_rule(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_opsgenie_integration + .v2_api_service_scorecards .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_opsgenie_services_with_http_info()) { + let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_service_scorecards::DeleteScorecardRuleParams { rule_id }; + let response = match block_on(api.delete_scorecard_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6487,15 +15394,16 @@ fn test_v2_list_opsgenie_services(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v2_create_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_download_cloud_workload_policy_file( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_opsgenie_integration + .v2_api_cloud_workload_security .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::CreateOpsgenieServiceParams { body }; - let response = match block_on(api.create_opsgenie_service_with_http_info(params)) { + let response = match block_on(api.download_cloud_workload_policy_file_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -6508,18 +15416,16 @@ fn test_v2_create_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v2_delete_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_cloud_workload_security_agent_rules( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_opsgenie_integration + .v2_api_cloud_workload_security .as_ref() .expect("api instance not found"); - let integration_service_id = - serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::DeleteOpsgenieServiceParams { - integration_service_id, - }; - let response = match block_on(api.delete_opsgenie_service_with_http_info(params)) { + let response = match block_on(api.list_cloud_workload_security_agent_rules_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -6532,66 +15438,80 @@ fn test_v2_delete_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v2_get_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_cloud_workload_security_agent_rule( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_opsgenie_integration + .v2_api_cloud_workload_security .as_ref() .expect("api instance not found"); - let integration_service_id = - serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::GetOpsgenieServiceParams { - integration_service_id, - }; - let response = match block_on(api.get_opsgenie_service_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_cloud_workload_security::CreateCloudWorkloadSecurityAgentRuleParams { + body, + }; + let response = + match block_on(api.create_cloud_workload_security_agent_rule_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } -fn test_v2_update_opsgenie_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_cloud_workload_security_agent_rule( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_opsgenie_integration + .v2_api_cloud_workload_security .as_ref() .expect("api instance not found"); - let integration_service_id = - serde_json::from_value(_parameters.get("integration_service_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_opsgenie_integration::UpdateOpsgenieServiceParams { - integration_service_id, - body, - }; - let response = match block_on(api.update_opsgenie_service_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; + let agent_rule_id = + serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_cloud_workload_security::DeleteCloudWorkloadSecurityAgentRuleParams { + agent_rule_id, + }; + let response = + match block_on(api.delete_cloud_workload_security_agent_rule_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } -fn test_v2_list_cloudflare_accounts( +fn test_v2_get_cloud_workload_security_agent_rule( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_cloudflare_integration + .v2_api_cloud_workload_security .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_cloudflare_accounts_with_http_info()) { + let agent_rule_id = + serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_cloud_workload_security::GetCloudWorkloadSecurityAgentRuleParams { + agent_rule_id, + }; + let response = match block_on(api.get_cloud_workload_security_agent_rule_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -6604,18 +15524,44 @@ fn test_v2_list_cloudflare_accounts( world.response.code = response.status.as_u16(); } -fn test_v2_create_cloudflare_account( +fn test_v2_update_cloud_workload_security_agent_rule( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_cloudflare_integration + .v2_api_cloud_workload_security .as_ref() .expect("api instance not found"); + let agent_rule_id = + serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloudflare_integration::CreateCloudflareAccountParams { body }; - let response = match block_on(api.create_cloudflare_account_with_http_info(params)) { + let params = + datadogV2::api::api_cloud_workload_security::UpdateCloudWorkloadSecurityAgentRuleParams { + agent_rule_id, + body, + }; + let response = + match block_on(api.update_cloud_workload_security_agent_rule_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_scanning_groups(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_sensitive_data_scanner + .as_ref() + .expect("api instance not found"); + let response = match block_on(api.list_scanning_groups_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -6628,20 +15574,15 @@ fn test_v2_create_cloudflare_account( world.response.code = response.status.as_u16(); } -fn test_v2_delete_cloudflare_account( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_reorder_scanning_groups(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_cloudflare_integration + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloudflare_integration::DeleteCloudflareAccountParams { account_id }; - let response = match block_on(api.delete_cloudflare_account_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_sensitive_data_scanner::ReorderScanningGroupsParams { body }; + let response = match block_on(api.reorder_scanning_groups_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6654,17 +15595,15 @@ fn test_v2_delete_cloudflare_account( world.response.code = response.status.as_u16(); } -fn test_v2_get_cloudflare_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_scanning_group(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_cloudflare_integration + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloudflare_integration::GetCloudflareAccountParams { account_id }; - let response = match block_on(api.get_cloudflare_account_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_sensitive_data_scanner::CreateScanningGroupParams { body }; + let response = match block_on(api.create_scanning_group_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6677,23 +15616,17 @@ fn test_v2_get_cloudflare_account(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v2_update_cloudflare_account( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_delete_scanning_group(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_cloudflare_integration + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_cloudflare_integration::UpdateCloudflareAccountParams { - account_id, - body, - }; - let response = match block_on(api.update_cloudflare_account_with_http_info(params)) { + let group_id = serde_json::from_value(_parameters.get("group_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_sensitive_data_scanner::DeleteScanningGroupParams { group_id, body }; + let response = match block_on(api.delete_scanning_group_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6706,13 +15639,17 @@ fn test_v2_update_cloudflare_account( world.response.code = response.status.as_u16(); } -fn test_v2_list_confluent_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_scanning_group(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_confluent_account_with_http_info()) { + let group_id = serde_json::from_value(_parameters.get("group_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_sensitive_data_scanner::UpdateScanningGroupParams { group_id, body }; + let response = match block_on(api.update_scanning_group_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6725,18 +15662,15 @@ fn test_v2_list_confluent_account(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v2_create_confluent_account( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_create_scanning_rule(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::CreateConfluentAccountParams { body }; - let response = match block_on(api.create_confluent_account_with_http_info(params)) { + let params = datadogV2::api::api_sensitive_data_scanner::CreateScanningRuleParams { body }; + let response = match block_on(api.create_scanning_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6749,19 +15683,17 @@ fn test_v2_create_confluent_account( world.response.code = response.status.as_u16(); } -fn test_v2_delete_confluent_account( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_delete_scanning_rule(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::DeleteConfluentAccountParams { account_id }; - let response = match block_on(api.delete_confluent_account_with_http_info(params)) { + let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_sensitive_data_scanner::DeleteScanningRuleParams { rule_id, body }; + let response = match block_on(api.delete_scanning_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6774,16 +15706,17 @@ fn test_v2_delete_confluent_account( world.response.code = response.status.as_u16(); } -fn test_v2_get_confluent_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_scanning_rule(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::GetConfluentAccountParams { account_id }; - let response = match block_on(api.get_confluent_account_with_http_info(params)) { + let rule_id = serde_json::from_value(_parameters.get("rule_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_sensitive_data_scanner::UpdateScanningRuleParams { rule_id, body }; + let response = match block_on(api.update_scanning_rule_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6796,21 +15729,13 @@ fn test_v2_get_confluent_account(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_update_confluent_account( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_standard_patterns(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_sensitive_data_scanner .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_confluent_cloud::UpdateConfluentAccountParams { account_id, body }; - let response = match block_on(api.update_confluent_account_with_http_info(params)) { + let response = match block_on(api.list_standard_patterns_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -6823,16 +15748,15 @@ fn test_v2_update_confluent_account( world.response.code = response.status.as_u16(); } -fn test_v2_list_confluent_resource(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_service_account(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_service_accounts .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::ListConfluentResourceParams { account_id }; - let response = match block_on(api.list_confluent_resource_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_service_accounts::CreateServiceAccountParams { body }; + let response = match block_on(api.create_service_account_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6845,21 +15769,59 @@ fn test_v2_list_confluent_resource(world: &mut DatadogWorld, _parameters: &HashM world.response.code = response.status.as_u16(); } -fn test_v2_create_confluent_resource( +fn test_v2_list_service_account_application_keys( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_service_accounts .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_confluent_cloud::CreateConfluentResourceParams { account_id, body }; - let response = match block_on(api.create_confluent_resource_with_http_info(params)) { + let service_account_id = + serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_start = if let Some(param) = _parameters.get("filter[created_at][start]") + { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_created_at_end = if let Some(param) = _parameters.get("filter[created_at][end]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_service_accounts::ListServiceAccountApplicationKeysParams { + service_account_id, + page_size, + page_number, + sort, + filter, + filter_created_at_start, + filter_created_at_end, + }; + let response = match block_on(api.list_service_account_application_keys_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -6872,24 +15834,24 @@ fn test_v2_create_confluent_resource( world.response.code = response.status.as_u16(); } -fn test_v2_delete_confluent_resource( +fn test_v2_create_service_account_application_key( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_service_accounts .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let resource_id = - serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::DeleteConfluentResourceParams { - account_id, - resource_id, + let service_account_id = + serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_service_accounts::CreateServiceAccountApplicationKeyParams { + service_account_id, + body, }; - let response = match block_on(api.delete_confluent_resource_with_http_info(params)) { + let response = match block_on(api.create_service_account_application_key_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -6902,21 +15864,25 @@ fn test_v2_delete_confluent_resource( world.response.code = response.status.as_u16(); } -fn test_v2_get_confluent_resource(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_service_account_application_key( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_service_accounts .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let resource_id = - serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::GetConfluentResourceParams { - account_id, - resource_id, - }; - let response = match block_on(api.get_confluent_resource_with_http_info(params)) { + let service_account_id = + serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_service_accounts::DeleteServiceAccountApplicationKeyParams { + service_account_id, + app_key_id, + }; + let response = match block_on(api.delete_service_account_application_key_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -6929,26 +15895,24 @@ fn test_v2_get_confluent_resource(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v2_update_confluent_resource( +fn test_v2_get_service_account_application_key( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_confluent_cloud + .v2_api_service_accounts .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let resource_id = - serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_confluent_cloud::UpdateConfluentResourceParams { - account_id, - resource_id, - body, - }; - let response = match block_on(api.update_confluent_resource_with_http_info(params)) { + let service_account_id = + serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_service_accounts::GetServiceAccountApplicationKeyParams { + service_account_id, + app_key_id, + }; + let response = match block_on(api.get_service_account_application_key_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -6961,13 +15925,27 @@ fn test_v2_update_confluent_resource( world.response.code = response.status.as_u16(); } -fn test_v2_list_fastly_accounts(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_service_account_application_key( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_service_accounts .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_fastly_accounts_with_http_info()) { + let service_account_id = + serde_json::from_value(_parameters.get("service_account_id").unwrap().clone()).unwrap(); + let app_key_id = + serde_json::from_value(_parameters.get("app_key_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_service_accounts::UpdateServiceAccountApplicationKeyParams { + service_account_id, + app_key_id, + body, + }; + let response = match block_on(api.update_service_account_application_key_with_http_info(params)) + { Ok(response) => response, Err(error) => { return match error { @@ -6980,15 +15958,39 @@ fn test_v2_list_fastly_accounts(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v2_create_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_incident_services(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_incident_services .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::CreateFastlyAccountParams { body }; - let response = match block_on(api.create_fastly_account_with_http_info(params)) { + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_offset = if let Some(param) = _parameters.get("page[offset]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_incident_services::ListIncidentServicesParams { + include, + page_size, + page_offset, + filter, + }; + let response = match block_on(api.list_incident_services_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7001,16 +16003,15 @@ fn test_v2_create_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_delete_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_incident_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_incident_services .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::DeleteFastlyAccountParams { account_id }; - let response = match block_on(api.delete_fastly_account_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incident_services::CreateIncidentServiceParams { body }; + let response = match block_on(api.create_incident_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7023,16 +16024,16 @@ fn test_v2_delete_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_get_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_incident_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_incident_services .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::GetFastlyAccountParams { account_id }; - let response = match block_on(api.get_fastly_account_with_http_info(params)) { + let service_id = + serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incident_services::DeleteIncidentServiceParams { service_id }; + let response = match block_on(api.delete_incident_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7045,18 +16046,24 @@ fn test_v2_get_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_incident_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_incident_services .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_fastly_integration::UpdateFastlyAccountParams { account_id, body }; - let response = match block_on(api.update_fastly_account_with_http_info(params)) { + let service_id = + serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_incident_services::GetIncidentServiceParams { + service_id, + include, + }; + let response = match block_on(api.get_incident_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7069,16 +16076,18 @@ fn test_v2_update_fastly_account(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_list_fastly_services(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_incident_service(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_incident_services .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::ListFastlyServicesParams { account_id }; - let response = match block_on(api.list_fastly_services_with_http_info(params)) { + let service_id = + serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_incident_services::UpdateIncidentServiceParams { service_id, body }; + let response = match block_on(api.update_incident_service_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7091,18 +16100,36 @@ fn test_v2_list_fastly_services(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v2_create_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_service_definitions( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_service_definition .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_fastly_integration::CreateFastlyServiceParams { account_id, body }; - let response = match block_on(api.create_fastly_service_with_http_info(params)) { + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let schema_version = if let Some(param) = _parameters.get("schema_version") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_service_definition::ListServiceDefinitionsParams { + page_size, + page_number, + schema_version, + }; + let response = match block_on(api.list_service_definitions_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7115,21 +16142,19 @@ fn test_v2_create_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_delete_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_or_update_service_definitions( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_service_definition .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let service_id = - serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::DeleteFastlyServiceParams { - account_id, - service_id, - }; - let response = match block_on(api.delete_fastly_service_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_service_definition::CreateOrUpdateServiceDefinitionsParams { body }; + let response = match block_on(api.create_or_update_service_definitions_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7142,21 +16167,20 @@ fn test_v2_delete_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_get_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_service_definition( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_service_definition .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let service_id = - serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::GetFastlyServiceParams { - account_id, - service_id, - }; - let response = match block_on(api.get_fastly_service_with_http_info(params)) { + let service_name = + serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); + let params = + datadogV2::api::api_service_definition::DeleteServiceDefinitionParams { service_name }; + let response = match block_on(api.delete_service_definition_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7169,23 +16193,24 @@ fn test_v2_get_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_service_definition(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_fastly_integration + .v2_api_service_definition .as_ref() .expect("api instance not found"); - let account_id = - serde_json::from_value(_parameters.get("account_id").unwrap().clone()).unwrap(); - let service_id = - serde_json::from_value(_parameters.get("service_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_fastly_integration::UpdateFastlyServiceParams { - account_id, - service_id, - body, + let service_name = + serde_json::from_value(_parameters.get("service_name").unwrap().clone()).unwrap(); + let schema_version = if let Some(param) = _parameters.get("schema_version") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.update_fastly_service_with_http_info(params)) { + let params = datadogV2::api::api_service_definition::GetServiceDefinitionParams { + service_name, + schema_version, + }; + let response = match block_on(api.get_service_definition_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7198,13 +16223,15 @@ fn test_v2_update_fastly_service(world: &mut DatadogWorld, _parameters: &HashMap world.response.code = response.status.as_u16(); } -fn test_v2_get_ip_allowlist(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_aggregate_spans(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_ip_allowlist + .v2_api_spans .as_ref() .expect("api instance not found"); - let response = match block_on(api.get_ip_allowlist_with_http_info()) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_spans::AggregateSpansParams { body }; + let response = match block_on(api.aggregate_spans_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7217,15 +16244,51 @@ fn test_v2_get_ip_allowlist(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_spans_get(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_ip_allowlist + .v2_api_spans .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_ip_allowlist::UpdateIPAllowlistParams { body }; - let response = match block_on(api.update_ip_allowlist_with_http_info(params)) { + let filter_query = if let Some(param) = _parameters.get("filter[query]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_from = if let Some(param) = _parameters.get("filter[from]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_to = if let Some(param) = _parameters.get("filter[to]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_limit = if let Some(param) = _parameters.get("page[limit]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_spans::ListSpansGetParams { + filter_query, + filter_from, + filter_to, + sort, + page_cursor, + page_limit, + }; + let response = match block_on(api.list_spans_get_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7238,29 +16301,15 @@ fn test_v2_update_ip_allowlist(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_spans(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_logs + .v2_api_spans .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let ddtags = if let Some(param) = _parameters.get("ddtags") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_logs::SubmitLogParams { - body, - content_encoding, - ddtags, - }; - let response = match block_on(api.submit_log_with_http_info(params)) { + let params = datadogV2::api::api_spans::ListSpansParams { body }; + let response = match block_on(api.list_spans_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7273,13 +16322,16 @@ fn test_v2_submit_log(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_on_demand_concurrency_cap( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_logs_metrics + .v2_api_synthetics .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_logs_metrics_with_http_info()) { + let response = match block_on(api.get_on_demand_concurrency_cap_with_http_info()) { Ok(response) => response, Err(error) => { return match error { @@ -7292,15 +16344,18 @@ fn test_v2_list_logs_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_set_on_demand_concurrency_cap( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_logs_metrics + .v2_api_synthetics .as_ref() .expect("api instance not found"); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_logs_metrics::CreateLogsMetricParams { body }; - let response = match block_on(api.create_logs_metric_with_http_info(params)) { + let params = datadogV2::api::api_synthetics::SetOnDemandConcurrencyCapParams { body }; + let response = match block_on(api.set_on_demand_concurrency_cap_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7313,15 +16368,57 @@ fn test_v2_create_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_list_teams(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_logs_metrics + .v2_api_teams .as_ref() .expect("api instance not found"); - let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_logs_metrics::DeleteLogsMetricParams { metric_id }; - let response = match block_on(api.delete_logs_metric_with_http_info(params)) { + let page_number = if let Some(param) = _parameters.get("page[number]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let sort = if let Some(param) = _parameters.get("sort") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_keyword = if let Some(param) = _parameters.get("filter[keyword]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter_me = if let Some(param) = _parameters.get("filter[me]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let fields_team = if let Some(param) = _parameters.get("fields[team]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_teams::ListTeamsParams { + page_number, + page_size, + sort, + include, + filter_keyword, + filter_me, + fields_team, + }; + let response = match block_on(api.list_teams_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7334,15 +16431,15 @@ fn test_v2_delete_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_logs_metrics + .v2_api_teams .as_ref() .expect("api instance not found"); - let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_logs_metrics::GetLogsMetricParams { metric_id }; - let response = match block_on(api.get_logs_metric_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::CreateTeamParams { body }; + let response = match block_on(api.create_team_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7355,16 +16452,15 @@ fn test_v2_get_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_logs_metrics + .v2_api_teams .as_ref() .expect("api instance not found"); - let metric_id = serde_json::from_value(_parameters.get("metric_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_logs_metrics::UpdateLogsMetricParams { metric_id, body }; - let response = match block_on(api.update_logs_metric_with_http_info(params)) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::DeleteTeamParams { team_id }; + let response = match block_on(api.delete_team_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7377,13 +16473,15 @@ fn test_v2_update_logs_metric(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_roles + .v2_api_teams .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_permissions_with_http_info()) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::GetTeamParams { team_id }; + let response = match block_on(api.get_team_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7396,89 +16494,37 @@ fn test_v2_list_permissions(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_security_monitoring + .v2_api_teams .as_ref() .expect("api instance not found"); - let page_limit = if let Some(param) = _parameters.get("page[limit]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let snapshot_timestamp = if let Some(param) = _parameters.get("snapshot_timestamp") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_tags = if let Some(param) = _parameters.get("filter[tags]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_evaluation_changed_at = - if let Some(param) = _parameters.get("filter[evaluation_changed_at]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_muted = if let Some(param) = _parameters.get("filter[muted]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_rule_id = if let Some(param) = _parameters.get("filter[rule_id]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_rule_name = if let Some(param) = _parameters.get("filter[rule_name]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_resource_type = if let Some(param) = _parameters.get("filter[resource_type]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_discovery_timestamp = - if let Some(param) = _parameters.get("filter[discovery_timestamp]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_evaluation = if let Some(param) = _parameters.get("filter[evaluation]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_status = if let Some(param) = _parameters.get("filter[status]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_security_monitoring::ListFindingsParams { - page_limit, - snapshot_timestamp, - page_cursor, - filter_tags, - filter_evaluation_changed_at, - filter_muted, - filter_rule_id, - filter_rule_name, - filter_resource_type, - filter_discovery_timestamp, - filter_evaluation, - filter_status, + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::UpdateTeamParams { team_id, body }; + let response = match block_on(api.update_team_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } }; - let response = match block_on(api.list_findings_with_http_info(params)) { + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_team_links(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_teams + .as_ref() + .expect("api instance not found"); + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::GetTeamLinksParams { team_id }; + let response = match block_on(api.get_team_links_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7491,24 +16537,38 @@ fn test_v2_list_findings(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_create_team_link(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_security_monitoring + .v2_api_teams .as_ref() .expect("api instance not found"); - let finding_id = - serde_json::from_value(_parameters.get("finding_id").unwrap().clone()).unwrap(); - let snapshot_timestamp = if let Some(param) = _parameters.get("snapshot_timestamp") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_security_monitoring::GetFindingParams { - finding_id, - snapshot_timestamp, + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::CreateTeamLinkParams { team_id, body }; + let response = match block_on(api.create_team_link_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } }; - let response = match block_on(api.get_finding_with_http_info(params)) { + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_delete_team_link(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_teams + .as_ref() + .expect("api instance not found"); + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let link_id = serde_json::from_value(_parameters.get("link_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::DeleteTeamLinkParams { team_id, link_id }; + let response = match block_on(api.delete_team_link_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7521,17 +16581,16 @@ fn test_v2_get_finding(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_team_link(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_security_monitoring + .v2_api_teams .as_ref() .expect("api instance not found"); - let finding_id = - serde_json::from_value(_parameters.get("finding_id").unwrap().clone()).unwrap(); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_security_monitoring::UpdateFindingParams { finding_id, body }; - let response = match block_on(api.update_finding_with_http_info(params)) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let link_id = serde_json::from_value(_parameters.get("link_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::GetTeamLinkParams { team_id, link_id }; + let response = match block_on(api.get_team_link_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7544,51 +16603,68 @@ fn test_v2_update_finding(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_update_team_link(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_processes + .v2_api_teams .as_ref() .expect("api instance not found"); - let search = if let Some(param) = _parameters.get("search") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let link_id = serde_json::from_value(_parameters.get("link_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::UpdateTeamLinkParams { + team_id, + link_id, + body, }; - let tags = if let Some(param) = _parameters.get("tags") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let response = match block_on(api.update_team_link_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } }; - let from = if let Some(param) = _parameters.get("from") { + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_get_team_memberships(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_teams + .as_ref() + .expect("api instance not found"); + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let page_size = if let Some(param) = _parameters.get("page[size]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let to = if let Some(param) = _parameters.get("to") { + let page_number = if let Some(param) = _parameters.get("page[number]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let page_limit = if let Some(param) = _parameters.get("page[limit]") { + let sort = if let Some(param) = _parameters.get("sort") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let page_cursor = if let Some(param) = _parameters.get("page[cursor]") { + let filter_keyword = if let Some(param) = _parameters.get("filter[keyword]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV2::api::api_processes::ListProcessesParams { - search, - tags, - from, - to, - page_limit, - page_cursor, + let params = datadogV2::api::api_teams::GetTeamMembershipsParams { + team_id, + page_size, + page_number, + sort, + filter_keyword, }; - let response = match block_on(api.list_processes_with_http_info(params)) { + let response = match block_on(api.get_team_memberships_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7601,20 +16677,16 @@ fn test_v2_list_processes(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_create_team_membership(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_restriction_policies + .v2_api_teams .as_ref() .expect("api instance not found"); - let resource_id = - serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_restriction_policies::DeleteRestrictionPolicyParams { resource_id }; - let response = match block_on(api.delete_restriction_policy_with_http_info(params)) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::CreateTeamMembershipParams { team_id, body }; + let response = match block_on(api.create_team_membership_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7627,17 +16699,16 @@ fn test_v2_delete_restriction_policy( world.response.code = response.status.as_u16(); } -fn test_v2_get_restriction_policy(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_team_membership(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_restriction_policies + .v2_api_teams .as_ref() .expect("api instance not found"); - let resource_id = - serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_restriction_policies::GetRestrictionPolicyParams { resource_id }; - let response = match block_on(api.get_restriction_policy_with_http_info(params)) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::DeleteTeamMembershipParams { team_id, user_id }; + let response = match block_on(api.delete_team_membership_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7650,23 +16721,21 @@ fn test_v2_get_restriction_policy(world: &mut DatadogWorld, _parameters: &HashMa world.response.code = response.status.as_u16(); } -fn test_v2_update_restriction_policy( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_team_membership(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_restriction_policies + .v2_api_teams .as_ref() .expect("api instance not found"); - let resource_id = - serde_json::from_value(_parameters.get("resource_id").unwrap().clone()).unwrap(); + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_restriction_policies::UpdateRestrictionPolicyParams { - resource_id, + let params = datadogV2::api::api_teams::UpdateTeamMembershipParams { + team_id, + user_id, body, }; - let response = match block_on(api.update_restriction_policy_with_http_info(params)) { + let response = match block_on(api.update_team_membership_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7679,19 +16748,18 @@ fn test_v2_update_restriction_policy( world.response.code = response.status.as_u16(); } -fn test_v2_upload_id_p_metadata(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_team_permission_settings( + world: &mut DatadogWorld, + _parameters: &HashMap, +) { let api = world .api_instances - .v2_api_organizations + .v2_api_teams .as_ref() .expect("api instance not found"); - let idp_file = if let Some(param) = _parameters.get("idp_file") { - Some(param.as_str().unwrap().as_bytes().to_vec()) - } else { - None - }; - let params = datadogV2::api::api_organizations::UploadIdPMetadataParams { idp_file }; - let response = match block_on(api.upload_id_p_metadata_with_http_info(params)) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::GetTeamPermissionSettingsParams { team_id }; + let response = match block_on(api.get_team_permission_settings_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7704,16 +16772,24 @@ fn test_v2_upload_id_p_metadata(world: &mut DatadogWorld, _parameters: &HashMap< world.response.code = response.status.as_u16(); } -fn test_v2_download_cloud_workload_policy_file( +fn test_v2_update_team_permission_setting( world: &mut DatadogWorld, _parameters: &HashMap, ) { let api = world .api_instances - .v2_api_cloud_workload_security + .v2_api_teams .as_ref() .expect("api instance not found"); - let response = match block_on(api.download_cloud_workload_policy_file_with_http_info()) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let action = serde_json::from_value(_parameters.get("action").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::UpdateTeamPermissionSettingParams { + team_id, + action, + body, + }; + let response = match block_on(api.update_team_permission_setting_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7726,16 +16802,15 @@ fn test_v2_download_cloud_workload_policy_file( world.response.code = response.status.as_u16(); } -fn test_v2_list_cloud_workload_security_agent_rules( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_get_user_memberships(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_cloud_workload_security + .v2_api_teams .as_ref() .expect("api instance not found"); - let response = match block_on(api.list_cloud_workload_security_agent_rules_with_http_info()) { + let user_uuid = serde_json::from_value(_parameters.get("user_uuid").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_teams::GetUserMembershipsParams { user_uuid }; + let response = match block_on(api.get_user_memberships_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7748,80 +16823,39 @@ fn test_v2_list_cloud_workload_security_agent_rules( world.response.code = response.status.as_u16(); } -fn test_v2_create_cloud_workload_security_agent_rule( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { - let api = world - .api_instances - .v2_api_cloud_workload_security - .as_ref() - .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::CreateCloudWorkloadSecurityAgentRuleParams { - body, - }; - let response = - match block_on(api.create_cloud_workload_security_agent_rule_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v2_delete_cloud_workload_security_agent_rule( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { - let api = world - .api_instances - .v2_api_cloud_workload_security - .as_ref() - .expect("api instance not found"); - let agent_rule_id = - serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::DeleteCloudWorkloadSecurityAgentRuleParams { - agent_rule_id, - }; - let response = - match block_on(api.delete_cloud_workload_security_agent_rule_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; - world.response.object = serde_json::to_value(response.entity).unwrap(); - world.response.code = response.status.as_u16(); -} - -fn test_v2_get_cloud_workload_security_agent_rule( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_list_incident_teams(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_cloud_workload_security + .v2_api_incident_teams .as_ref() .expect("api instance not found"); - let agent_rule_id = - serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::GetCloudWorkloadSecurityAgentRuleParams { - agent_rule_id, - }; - let response = match block_on(api.get_cloud_workload_security_agent_rule_with_http_info(params)) - { + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_size = if let Some(param) = _parameters.get("page[size]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let page_offset = if let Some(param) = _parameters.get("page[offset]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let filter = if let Some(param) = _parameters.get("filter") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_incident_teams::ListIncidentTeamsParams { + include, + page_size, + page_offset, + filter, + }; + let response = match block_on(api.list_incident_teams_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7834,54 +16868,36 @@ fn test_v2_get_cloud_workload_security_agent_rule( world.response.code = response.status.as_u16(); } -fn test_v2_update_cloud_workload_security_agent_rule( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_create_incident_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_cloud_workload_security + .v2_api_incident_teams .as_ref() .expect("api instance not found"); - let agent_rule_id = - serde_json::from_value(_parameters.get("agent_rule_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = - datadogV2::api::api_cloud_workload_security::UpdateCloudWorkloadSecurityAgentRuleParams { - agent_rule_id, - body, - }; - let response = - match block_on(api.update_cloud_workload_security_agent_rule_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; + let params = datadogV2::api::api_incident_teams::CreateIncidentTeamParams { body }; + let response = match block_on(api.create_incident_team_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } + }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } -fn test_v2_submit_metrics(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_delete_incident_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_metrics + .v2_api_incident_teams .as_ref() .expect("api instance not found"); - let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let content_encoding = if let Some(param) = _parameters.get("Content-Encoding") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_metrics::SubmitMetricsParams { - body, - content_encoding, - }; - let response = match block_on(api.submit_metrics_with_http_info(params)) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_incident_teams::DeleteIncidentTeamParams { team_id }; + let response = match block_on(api.delete_incident_team_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7894,16 +16910,20 @@ fn test_v2_submit_metrics(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_get_incident_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_synthetics + .v2_api_incident_teams .as_ref() .expect("api instance not found"); - let response = match block_on(api.get_on_demand_concurrency_cap_with_http_info()) { + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); + let include = if let Some(param) = _parameters.get("include") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None + }; + let params = datadogV2::api::api_incident_teams::GetIncidentTeamParams { team_id, include }; + let response = match block_on(api.get_incident_team_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7916,18 +16936,16 @@ fn test_v2_get_on_demand_concurrency_cap( world.response.code = response.status.as_u16(); } -fn test_v2_set_on_demand_concurrency_cap( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_incident_team(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_synthetics + .v2_api_incident_teams .as_ref() .expect("api instance not found"); + let team_id = serde_json::from_value(_parameters.get("team_id").unwrap().clone()).unwrap(); let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); - let params = datadogV2::api::api_synthetics::SetOnDemandConcurrencyCapParams { body }; - let response = match block_on(api.set_on_demand_concurrency_cap_with_http_info(params)) { + let params = datadogV2::api::api_incident_teams::UpdateIncidentTeamParams { team_id, body }; + let response = match block_on(api.update_incident_team_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -7940,57 +16958,39 @@ fn test_v2_set_on_demand_concurrency_cap( world.response.code = response.status.as_u16(); } -fn test_v2_get_usage_application_security_monitoring( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_send_invitations(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_usage_metering + .v2_api_users .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_usage_metering::GetUsageApplicationSecurityMonitoringParams { - start_hr, - end_hr, + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::SendInvitationsParams { body }; + let response = match block_on(api.send_invitations_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } }; - let response = - match block_on(api.get_usage_application_security_monitoring_with_http_info(params)) { - Ok(response) => response, - Err(error) => { - return match error { - Error::ResponseError(e) => world.response.code = e.status.as_u16(), - _ => panic!("error parsing response: {}", error), - }; - } - }; world.response.object = serde_json::to_value(response.entity).unwrap(); world.response.code = response.status.as_u16(); } -fn test_v2_get_cost_by_org(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_get_invitation(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_usage_metering + .v2_api_users .as_ref() .expect("api instance not found"); - let start_month = - serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); - let end_month = if let Some(param) = _parameters.get("end_month") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_usage_metering::GetCostByOrgParams { - start_month, - end_month, + let user_invitation_uuid = + serde_json::from_value(_parameters.get("user_invitation_uuid").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::GetInvitationParams { + user_invitation_uuid, }; - let response = match block_on(api.get_cost_by_org_with_http_info(params)) { + let response = match block_on(api.get_invitation_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -8003,48 +17003,51 @@ fn test_v2_get_cost_by_org(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_list_users(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_usage_metering + .v2_api_users .as_ref() .expect("api instance not found"); - let view = if let Some(param) = _parameters.get("view") { + let page_size = if let Some(param) = _parameters.get("page[size]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let start_month = if let Some(param) = _parameters.get("start_month") { + let page_number = if let Some(param) = _parameters.get("page[number]") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let end_month = if let Some(param) = _parameters.get("end_month") { + let sort = if let Some(param) = _parameters.get("sort") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let start_date = if let Some(param) = _parameters.get("start_date") { + let sort_dir = if let Some(param) = _parameters.get("sort_dir") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let end_date = if let Some(param) = _parameters.get("end_date") { + let filter = if let Some(param) = _parameters.get("filter") { Some(serde_json::from_value(param.clone()).unwrap()) } else { None }; - let params = datadogV2::api::api_usage_metering::GetEstimatedCostByOrgParams { - view, - start_month, - end_month, - start_date, - end_date, + let filter_status = if let Some(param) = _parameters.get("filter[status]") { + Some(serde_json::from_value(param.clone()).unwrap()) + } else { + None }; - let response = match block_on(api.get_estimated_cost_by_org_with_http_info(params)) { + let params = datadogV2::api::api_users::ListUsersParams { + page_size, + page_number, + sort, + sort_dir, + filter, + filter_status, + }; + let response = match block_on(api.list_users_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -8057,33 +17060,15 @@ fn test_v2_get_estimated_cost_by_org( world.response.code = response.status.as_u16(); } -fn test_v2_get_historical_cost_by_org( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_create_user(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_usage_metering + .v2_api_users .as_ref() .expect("api instance not found"); - let start_month = - serde_json::from_value(_parameters.get("start_month").unwrap().clone()).unwrap(); - let view = if let Some(param) = _parameters.get("view") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let end_month = if let Some(param) = _parameters.get("end_month") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_usage_metering::GetHistoricalCostByOrgParams { - start_month, - view, - end_month, - }; - let response = match block_on(api.get_historical_cost_by_org_with_http_info(params)) { + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::CreateUserParams { body }; + let response = match block_on(api.create_user_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -8096,61 +17081,15 @@ fn test_v2_get_historical_cost_by_org( world.response.code = response.status.as_u16(); } -fn test_v2_get_hourly_usage(world: &mut DatadogWorld, _parameters: &HashMap) { +fn test_v2_disable_user(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_usage_metering + .v2_api_users .as_ref() .expect("api instance not found"); - let filter_timestamp_start = - serde_json::from_value(_parameters.get("filter[timestamp][start]").unwrap().clone()) - .unwrap(); - let filter_product_families = - serde_json::from_value(_parameters.get("filter[product_families]").unwrap().clone()) - .unwrap(); - let filter_timestamp_end = if let Some(param) = _parameters.get("filter[timestamp][end]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_include_descendants = - if let Some(param) = _parameters.get("filter[include_descendants]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_include_breakdown = if let Some(param) = _parameters.get("filter[include_breakdown]") - { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let filter_versions = if let Some(param) = _parameters.get("filter[versions]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page_limit = if let Some(param) = _parameters.get("page[limit]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let page_next_record_id = if let Some(param) = _parameters.get("page[next_record_id]") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_usage_metering::GetHourlyUsageParams { - filter_timestamp_start, - filter_product_families, - filter_timestamp_end, - filter_include_descendants, - filter_include_breakdown, - filter_versions, - page_limit, - page_next_record_id, - }; - let response = match block_on(api.get_hourly_usage_with_http_info(params)) { + let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::DisableUserParams { user_id }; + let response = match block_on(api.disable_user_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -8163,26 +17102,15 @@ fn test_v2_get_hourly_usage(world: &mut DatadogWorld, _parameters: &HashMap, -) { +fn test_v2_get_user(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_usage_metering + .v2_api_users .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None - }; - let params = datadogV2::api::api_usage_metering::GetUsageLambdaTracedInvocationsParams { - start_hr, - end_hr, - }; - let response = match block_on(api.get_usage_lambda_traced_invocations_with_http_info(params)) { + let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::GetUserParams { user_id }; + let response = match block_on(api.get_user_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error { @@ -8195,26 +17123,58 @@ fn test_v2_get_usage_lambda_traced_invocations( world.response.code = response.status.as_u16(); } -fn test_v2_get_usage_observability_pipelines( - world: &mut DatadogWorld, - _parameters: &HashMap, -) { +fn test_v2_update_user(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances - .v2_api_usage_metering + .v2_api_users .as_ref() .expect("api instance not found"); - let start_hr = serde_json::from_value(_parameters.get("start_hr").unwrap().clone()).unwrap(); - let end_hr = if let Some(param) = _parameters.get("end_hr") { - Some(serde_json::from_value(param.clone()).unwrap()) - } else { - None + let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::UpdateUserParams { user_id, body }; + let response = match block_on(api.update_user_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } }; - let params = datadogV2::api::api_usage_metering::GetUsageObservabilityPipelinesParams { - start_hr, - end_hr, + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_user_organizations(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_users + .as_ref() + .expect("api instance not found"); + let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::ListUserOrganizationsParams { user_id }; + let response = match block_on(api.list_user_organizations_with_http_info(params)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => world.response.code = e.status.as_u16(), + _ => panic!("error parsing response: {}", error), + }; + } }; - let response = match block_on(api.get_usage_observability_pipelines_with_http_info(params)) { + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + +fn test_v2_list_user_permissions(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_users + .as_ref() + .expect("api instance not found"); + let user_id = serde_json::from_value(_parameters.get("user_id").unwrap().clone()).unwrap(); + let params = datadogV2::api::api_users::ListUserPermissionsParams { user_id }; + let response = match block_on(api.list_user_permissions_with_http_info(params)) { Ok(response) => response, Err(error) => { return match error {